Skip to content

Commit ba30e2f

Browse files
author
qucchia
committed
Typos
1 parent 7435ff4 commit ba30e2f

File tree

7 files changed

+37
-37
lines changed

7 files changed

+37
-37
lines changed

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Improvements to Documentation are amazingly helpful, and are very rare so hugely
2727

2828
### Functions/Variables
2929

30-
If you want to change something in a [built-in function's documentation](http://www.espruino.com/Reference), look at the heading for the function on that page and there will be a right-arrow (⇒).
30+
If you want to change something in a [built-in function's documentation](http://www.espruino.com/Reference), look at the heading for the function on that page and there will be a right-arrow (⇒).
3131

3232
If you click on that it will bring you to the area of Espruino's source code where the function *and the documentation for it* are stored. You can then edit the documentation in that file (above the function) on GitHub and issue a pull request - it's in Markdown format.
3333

@@ -56,7 +56,7 @@ Please [see here](http://www.espruino.com/Writing+Modules)
5656
* Ensure that you are not contributing someone else's code, and that you are willing to add your code under Espruino's MPL Licence
5757
* Make sure that what you do doesn't break the Espruino board or the other boards we build for. We can't check all the boards for every commit, so if you break something you'll annoy a whole bunch of people.
5858
* Be aware that Espruino is designed for Microcontrollers - with very low amounts of flash and memory. Both are at a premium so don't statically allocate variables or do other stuff that will use up RAM.
59-
* Don't add a whole bunch of indirection/abstraction for the sake of it - it'll probably just use of more of our precious memory.
59+
* Don't add a whole bunch of indirection/abstraction for the sake of it - it'll probably just use more of our precious memory.
6060
* If you add a new API, try and make it familiar to Arduino/JavaScript users.
6161
* Please [RUN THE TESTS](tests/README.md) before and after your changes to check that there are no regressions
6262
* Finally, please issue us a pull request to [www.github.com/espruino](https://www.github.com/espruino/Espruino) via GitHub. It's way easier for us to incorporate, give credit, and track changes that way.

boards/RAK5010.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
'DEFINES+=-DCONFIG_NFCT_PINS_AS_GPIOS', # Don't use NFC - the pins are used for GPS
4444
'DEFINES += -DNRF_USB=1 -DUSB', # USB only works if connected at startup
4545
'DEFINES+=-DESPR_REGOUT0_1_8V=1', # Force RAK5010 nRF52 voltage regulator to 1.8v, which stops glitches in modem serial comms
46-
'NRF_SDK15=1'
46+
'NRF_SDK15=1',
4747
'DEFINES+=-DBLUETOOTH_NAME_PREFIX=\'"iTracker"\'',
4848
'DFU_PRIVATE_KEY=targets/nrf5x_dfu/dfu_private_key.pem',
4949
'DFU_SETTINGS=--application-version 0xff --hw-version 52 --sd-req 0x8C,0x91',

libs/banglejs/jswrap_bangle.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -1835,7 +1835,7 @@ Bangle.setLCDPower(1); // keep screen on
18351835
18361836
18371837
**When on full, the LCD draws roughly 40mA.** You can adjust
1838-
When brightness using `Bange.setLCDBrightness`.
1838+
When brightness using `Bangle.setLCDBrightness`.
18391839
*/
18401840
void jswrap_banglejs_setLCDPower(bool isOn) {
18411841
#ifdef ESPR_BACKLIGHT_FADE
@@ -2147,7 +2147,7 @@ Set internal options used for gestures, etc...
21472147
* `wakeOnFaceUp` should the LCD turn on when the watch is turned face up? default = `false`
21482148
* `wakeOnTouch` should the LCD turn on when the touchscreen is pressed? default = `false`
21492149
* `wakeOnTwist` should the LCD turn on when the watch is twisted? default = `true`
2150-
* `twistThreshold` How much acceleration to register a twist of the watch strap? Can be negative for oppsite direction. default = `800`
2150+
* `twistThreshold` How much acceleration to register a twist of the watch strap? Can be negative for opposite direction. default = `800`
21512151
* `twistMaxY` Maximum acceleration in Y to trigger a twist (low Y means watch is facing the right way up). default = `-800`
21522152
* `twistTimeout` How little time (in ms) must a twist take from low->high acceleration? default = `1000`
21532153
* `gestureStartThresh` how big a difference before we consider a gesture started? default = `sqr(800)`
@@ -2157,7 +2157,7 @@ Set internal options used for gestures, etc...
21572157
* `powerSave` after a minute of not being moved, Bangle.js will change the accelerometer poll interval down to 800ms (10x accelerometer samples).
21582158
On movement it'll be raised to the default 80ms. If `Bangle.setPollInterval` is used this is disabled, and for it to work the poll interval
21592159
must be either 80ms or 800ms. default = `true`. Setting `powerSave:false` will disable this automatic power saving, but will **not** change
2160-
the poll interval from its current value. If you desire a specific interval (eg the default 80ms) you must set it manually with `Bangle.setPollInterval(80)`
2160+
the poll interval from its current value. If you desire a specific interval (e.g. the default 80ms) you must set it manually with `Bangle.setPollInterval(80)`
21612161
after setting `powerSave:false`.
21622162
* `lockTimeout` how many milliseconds before the screen locks
21632163
* `lcdPowerTimeout` how many milliseconds before the screen turns off
@@ -2275,7 +2275,7 @@ int jswrap_banglejs_isLCDOn() {
22752275
"ifdef" : "BANGLEJS"
22762276
}
22772277
This function can be used to lock or unlock Bangle.js
2278-
(eg whether buttons and touchscreen work or not)
2278+
(e.g. whether buttons and touchscreen work or not)
22792279
*/
22802280
void jswrap_banglejs_setLocked(bool isLocked) {
22812281
#if defined(TOUCH_I2C)
@@ -2675,7 +2675,7 @@ void jswrap_banglejs_resetCompass() {
26752675
"#if" : "defined(DTNO1_F5) || defined(BANGLEJS_Q3) || defined(DICKENS)",
26762676
"typescript" : "setBarometerPower(isOn: boolean, appID: string): boolean;"
26772677
}
2678-
Set the power to the barometer IC. Once enbled, `Bangle.pressure` events
2678+
Set the power to the barometer IC. Once enabled, `Bangle.pressure` events
26792679
are fired each time a new barometer reading is available.
26802680
26812681
When on, the barometer draws roughly 50uA
@@ -5327,7 +5327,7 @@ Currently supported interface types are:
53275327
* 'clockupdown' - called for clocks. Sets `Bangle.CLOCK=1`, allows a button to start the launcher, but also provides up/down functionality
53285328
* Bangle.js 1 BTN2 starts the launcher, BTN1/BTN3 call `cb(-1)` and `cb(1)`
53295329
* Bangle.js 2 BTN1 starts the launcher, touchscreen tap in top/bottom right hand side calls `cb(-1)` and `cb(1)`
5330-
* `{mode:"custom", ...}` allows you to specify custom handlers for different interations. See below.
5330+
* `{mode:"custom", ...}` allows you to specify custom handlers for different interactions. See below.
53315331
* `undefined` removes all user interaction code
53325332
53335333
While you could use setWatch/etc manually, the benefit here is that you don't end up with multiple `setWatch` instances, and

libs/graphics/jswrap_graphics.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ int jswrap_graphics_getBPP(JsVar *parent) {
869869
"return" : ["JsVar","The instance of Graphics this was called on, to allow call chaining"],
870870
"return_object" : "Graphics"
871871
}
872-
Reset the state of Graphics to the defaults (eg. Color, Font, etc)
872+
Reset the state of Graphics to the defaults (e.g. Color, Font, etc)
873873
that would have been used when Graphics was initialised.
874874
*/
875875
JsVar *jswrap_graphics_reset(JsVar *parent) {
@@ -1503,7 +1503,7 @@ JsVarInt jswrap_graphics_getColorX(JsVar *parent, bool isForeground) {
15031503
This sets the 'clip rect' that subsequent drawing operations are clipped to
15041504
sit between.
15051505
1506-
These values are inclusive - eg `g.setClipRect(1,0,5,0)` will ensure that only
1506+
These values are inclusive - e.g. `g.setClipRect(1,0,5,0)` will ensure that only
15071507
pixel rows 1,2,3,4,5 are touched on column 0.
15081508
15091509
**Note:** For maximum flexibility on Bangle.js 1, the values here are not range checked. For normal
@@ -2195,7 +2195,7 @@ Draw a string of text in the current font.
21952195
g.drawString("Hello World", 10, 10);
21962196
```
21972197
2198-
Images may also be embedded inside strings (eg to render Emoji or characters not in the current font).
2198+
Images may also be embedded inside strings (e.g. to render Emoji or characters not in the current font).
21992199
To do this, just add `0` then the image string ([about Images](http://www.espruino.com/Graphics#images-bitmaps))
22002200
For example:
22012201
@@ -2467,7 +2467,7 @@ JsVar *jswrap_graphics_drawLineAA(JsVar *parent, double x1, double y1, double x2
24672467
"return" : ["JsVar","The instance of Graphics this was called on, to allow call chaining"],
24682468
"return_object" : "Graphics"
24692469
}
2470-
Draw a line from the last position of lineTo or moveTo to this position
2470+
Draw a line from the last position of `lineTo` or `moveTo` to this position
24712471
*/
24722472
JsVar *jswrap_graphics_lineTo(JsVar *parent, int x, int y) {
24732473
JsGraphics gfx; if (!graphicsGetFromVar(&gfx, parent)) return 0;
@@ -3712,7 +3712,7 @@ Returns an object of the form:
37123712
bg2 : 0x0007, // accented background colour
37133713
fgH : 0xFFFF, // highlighted foreground colour
37143714
bgH : 0x02F7, // highlighted background colour
3715-
dark : true, // Is background dark (eg. foreground should be a light colour)
3715+
dark : true, // Is background dark (e.g. foreground should be a light colour)
37163716
}
37173717
```
37183718

src/jswrap_array.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ bool jswrap_array_includes(JsVar *arr, JsVar *value, JsVarInt startIdx) {
176176
"return" : ["JsVar","A String representing the Joined array"],
177177
"typescript" : "join(separator?: string): string;"
178178
}
179-
Join all elements of this array together into one string, using 'separator' between them. eg. ```[1,2,3].join(' ')=='1 2 3'```
179+
Join all elements of this array together into one string, using 'separator' between them. e.g. ```[1,2,3].join(' ')=='1 2 3'```
180180
*/
181181
JsVar *jswrap_array_join(JsVar *parent, JsVar *filler) {
182182
if (!jsvIsIterable(parent)) return 0;

src/jswrap_arraybuffer.c

+13-13
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ The length, in bytes, of the `ArrayBuffer`
267267
"new(buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;"
268268
]
269269
}
270-
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (eg. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
270+
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (e.g. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
271271
*/
272272
/*JSON{
273273
"type" : "constructor",
@@ -287,7 +287,7 @@ Create a typed array based on the given input. Either an existing Array Buffer,
287287
"new(buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;"
288288
]
289289
}
290-
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (eg. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
290+
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (e.g. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
291291
292292
Clamped arrays clamp their values to the allowed range, rather than 'wrapping'. e.g. after `a[0]=12345;`, `a[0]==255`.
293293
*/
@@ -309,7 +309,7 @@ Clamped arrays clamp their values to the allowed range, rather than 'wrapping'.
309309
"new(buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;"
310310
]
311311
}
312-
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (eg. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
312+
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (e.g. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
313313
*/
314314
/*JSON{
315315
"type" : "constructor",
@@ -329,7 +329,7 @@ Create a typed array based on the given input. Either an existing Array Buffer,
329329
"new(buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;"
330330
]
331331
}
332-
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (eg. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
332+
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (e.g. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
333333
*/
334334
/*JSON{
335335
"type" : "constructor",
@@ -349,7 +349,7 @@ Create a typed array based on the given input. Either an existing Array Buffer,
349349
"new(buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;"
350350
]
351351
}
352-
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (eg. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
352+
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (e.g. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
353353
*/
354354
/*JSON{
355355
"type" : "constructor",
@@ -370,7 +370,7 @@ Create a typed array based on the given input. Either an existing Array Buffer,
370370
"new(buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint24Array;"
371371
]
372372
}
373-
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (eg. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
373+
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (e.g. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
374374
*/
375375
/*JSON{
376376
"type" : "constructor",
@@ -390,7 +390,7 @@ Create a typed array based on the given input. Either an existing Array Buffer,
390390
"new(buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;"
391391
]
392392
}
393-
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (eg. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
393+
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (e.g. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
394394
*/
395395
/*JSON{
396396
"type" : "constructor",
@@ -410,7 +410,7 @@ Create a typed array based on the given input. Either an existing Array Buffer,
410410
"new(buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;"
411411
]
412412
}
413-
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (eg. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
413+
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (e.g. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
414414
*/
415415
/*JSON{
416416
"type" : "constructor",
@@ -430,7 +430,7 @@ Create a typed array based on the given input. Either an existing Array Buffer,
430430
"new(buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;"
431431
]
432432
}
433-
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (eg. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
433+
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (e.g. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
434434
*/
435435
/*JSON{
436436
"type" : "constructor",
@@ -450,7 +450,7 @@ Create a typed array based on the given input. Either an existing Array Buffer,
450450
"new(buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;"
451451
]
452452
}
453-
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (eg. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
453+
Create a typed array based on the given input. Either an existing Array Buffer, an Integer as a Length, or a simple array. If an `ArrayBufferView` (e.g. `Uint8Array` rather than `ArrayBuffer`) is given, it will be completely copied rather than referenced.
454454
*/
455455

456456
JsVar *jswrap_typedarray_constructor(JsVarDataArrayBufferViewType type, JsVar *arr, JsVarInt byteOffset, JsVarInt length) {
@@ -558,7 +558,7 @@ void jswrap_arraybufferview_set(JsVar *parent, JsVar *arr, int offset) {
558558
return;
559559
}
560560
// Copy with the case where we copy from one arraybuffer to another but they use the
561-
// same data. If we copy forward (eg `a.set(a.subarray(),1)`) then we
561+
// same data. If we copy forward (e.g. `a.set(a.subarray(),1)`) then we
562562
// end up duplicating the same data, so we must copy in reverse.
563563
if (jsvIsArrayBuffer(parent) && jsvIsArrayBuffer(arr)) {
564564
JsVar *sa = jsvGetArrayBufferBackingString(parent, NULL);
@@ -616,7 +616,7 @@ void jswrap_arraybufferview_set(JsVar *parent, JsVar *arr, int offset) {
616616
}
617617
Return an array which is made from the following: ```A.map(function) = [function(A[0]), function(A[1]), ...]```
618618
619-
**Note:** This returns an `ArrayBuffer` of the same type it was called on. To get an `Array`, use `Array.map`, eg. `[].map.call(myArray, x=>x+1)`
619+
**Note:** This returns an `ArrayBuffer` of the same type it was called on. To get an `Array`, use `Array.map`, e.g. `[].map.call(myArray, x=>x+1)`
620620
*/
621621
JsVar *jswrap_arraybufferview_map(JsVar *parent, JsVar *funcVar, JsVar *thisVar) {
622622
if (!jsvIsArrayBuffer(parent)) {
@@ -761,7 +761,7 @@ Return `true` if the array includes the value, `false` otherwise
761761
"return" : ["JsVar","A String representing the Joined array"],
762762
"typescript" : "join(separator?: string): string;"
763763
}
764-
Join all elements of this array together into one string, using 'separator' between them. eg. ```[1,2,3].join(' ')=='1 2 3'```
764+
Join all elements of this array together into one string, using 'separator' between them. e.g. ```[1,2,3].join(' ')=='1 2 3'```
765765
*/
766766
/*JSON{
767767
"type" : "method",

0 commit comments

Comments
 (0)