Skip to content

Commit aa3ce23

Browse files
committedFeb 26, 2025
fix doc errors
1 parent 87286c5 commit aa3ce23

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed
 

‎libs/graphics/jswrap_graphics.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2391,7 +2391,7 @@ JsVarInt jswrap_graphics_stringWidth(JsVar *parent, JsVar *var) {
23912391
}
23922392
Return the width and height in pixels of a string of text in the current font. The object returned contains:
23932393
2394-
```JS
2394+
```
23952395
{
23962396
width, // Width of the string in pixels
23972397
height, // Height of the string in pixels

‎libs/puckjs/jswrap_puck.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ Check out [the Puck.js page on the
709709
magnetometer](http://www.espruino.com/Puck.js#on-board-peripherals) for more
710710
information.
711711
712-
```JS
712+
```
713713
Puck.magOn(10); // 10 Hz
714714
Puck.on('mag', function(e) {
715715
print(e);
@@ -731,7 +731,7 @@ Called after `Puck.accelOn()` every time accelerometer data is sampled. There is
731731
one argument which is an object of the form `{acc:{x,y,z}, gyro:{x,y,z}}`
732732
containing the data.
733733
734-
```JS
734+
```
735735
Puck.accelOn(12.5); // default 12.5Hz
736736
Puck.on('accel', function(e) {
737737
print(e);

‎src/jswrap_waveform.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ double-buffered - see `options` below) which contains the data to input/output.
170170
171171
Options can contain:
172172
173-
```JS
173+
```
174174
{
175175
doubleBuffer : bool // whether to allocate two buffers or not (default false)
176176
bits : 8/16 // the amount of bits to use (default 8).
@@ -181,7 +181,7 @@ When double-buffered, a 'buffer' event will be emitted each time a buffer is
181181
finished with (the argument is that buffer). When the recording stops, a
182182
'finish' event will be emitted (with the first argument as the buffer).
183183
184-
```JS
184+
```
185185
// Output a sine wave
186186
var w = new Waveform(1000);
187187
for (var i=0;i<1000;i++) w.buffer[i]=128+120*Math.sin(i/2);
@@ -190,7 +190,7 @@ w.on("finish", () => print("Done!"))
190190
w.startOutput(H0,8000); // start playback
191191
```
192192
193-
```JS
193+
```
194194
// On 2v25, from Storage
195195
var f = require("Storage").read("sound.pcm");
196196
var w = new Waveform(E.toArrayBuffer(f));

0 commit comments

Comments
 (0)