Skip to content

Commit 64a8e09

Browse files
C-D-LewisSorixelle
authored andcommitted
Address Sorixelle's comments
Signed-off-by: C-D-Lewis <[email protected]>
1 parent 671adc1 commit 64a8e09

File tree

6 files changed

+32
-11
lines changed

6 files changed

+32
-11
lines changed

source/tutorials/js-watchface-tutorial/part1.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ ctx.stroke();
276276
This is the complete code assembled so far, including a helpful function for
277277
drawing the hands and converting a time fraction to a Radian angle.
278278

279+
<details>
280+
<summary>View watchface source code</summary>
281+
{% markdown %}
279282
```js
280283
var rocky = require('rocky');
281284

@@ -342,6 +345,9 @@ rocky.on('minutechange', function(event) {
342345
rocky.requestDraw();
343346
});
344347
```
348+
{% endmarkdown %}
349+
</details>
350+
345351

346352
Now compile and run your project in the emulator to see the results!
347353

source/tutorials/js-watchface-tutorial/part2.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,9 @@ This is the complete code for this tutorial, separated by JS file. Compare it
351351
to yours if you have problems with any part of it or it is not working as
352352
expected.
353353

354+
<details>
355+
<summary>View watchface source code</summary>
356+
{% markdown %}
354357
```js
355358
// File: rocky/index.js
356359

@@ -457,7 +460,12 @@ rocky.on('message', function(event) {
457460
}
458461
});
459462
```
463+
{% endmarkdown %}
464+
</details>
460465

466+
<details>
467+
<summary>View PKJS source code</summary>
468+
{% markdown %}
461469
```js
462470
// File: pkjs/index.js
463471

@@ -502,6 +510,8 @@ Pebble.on('message', function(event) {
502510
}
503511
});
504512
```
513+
{% endmarkdown %}
514+
</details>
505515

506516

507517
## Conclusion
@@ -528,3 +538,7 @@ provided above.
528538

529539
We hope you enjoyed this tutorial and that it inspires you to make something
530540
awesome!
541+
542+
Why not let us know what you've created on Fediverse
543+
[@rebble](https://mastodon.social/@rebble), or join our epic developer
544+
community on [Discord]({{ site.links.discord_invite }}).

source/tutorials/watchface-tutorial/part1.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ Now we can start to write some code!
8383

8484
Our first source file is already created for you by the `pebble` command
8585
line tool and lives in the project's `src` directory. By default, this file
86-
contains sample code which you can safely remove completely, since we will be
87-
starting from scratch. Alternatively, you can avoid this by using the `--simple`
88-
flag when creating the project.
86+
contains sample code which you can safely remove, since we will be starting from
87+
scratch. Alternatively, you can avoid this by using the `--simple` flag when
88+
creating the project.
8989

9090
Let's add the basic code segments which are required by every watchapp. The
9191
first of these is the main directive to use the Pebble SDK at the top of the
@@ -95,7 +95,7 @@ file like so:
9595
#include <pebble.h>
9696
```
9797

98-
After this first line, we should begin with the recommended app structure,
98+
After this first line, we begin with the recommended app structure,
9999
specifically a standard C `main()` function and two other functions to help us
100100
organize the creation and destruction of all the Pebble SDK elements. This helps
101101
make the task of managing memory allocation and deallocation as simple as

source/tutorials/watchface-tutorial/part2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ done, you should end up with a watchface looking like this:
5454

5555
To continue from the last part, you can either modify your existing Pebble
5656
project or create a new one, using the code from the end of the last tutorial
57-
as a starting point. Don't forget also to include changes to `package.json`.
57+
as a starting point. Don't forget to also include changes to `package.json`.
5858

5959
The result of the first part should look something like this - a basic time
6060
display:
@@ -76,7 +76,7 @@ Let's improve it!
7676

7777
App resources (fonts and images etc.) are managed in the `package.json`
7878
file in the project's root directory, as detailed in
79-
[*App Resources*](/guides/app-resources/). Below is an example entry in the
79+
[*App Resources*](/guides/app-resources/). Below is an example entry in the
8080
`resources` section:
8181

8282
```json

source/tutorials/watchface-tutorial/part3.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ missed. The code snippet below shows this process using two variables to specify
208208
the inbox and outbox size (in bytes):
209209
210210
```c
211-
// Open AppMessage
211+
// Open AppMessage with some useful example buffer sizes
212212
const int inbox_size = 256;
213213
const int outbox_size = 128;
214214
app_message_open(inbox_size, outbox_size);
@@ -704,7 +704,7 @@ static void init() {
704704
app_message_register_outbox_failed(outbox_failed_callback);
705705
app_message_register_outbox_sent(outbox_sent_callback);
706706

707-
// Open AppMessage
707+
// Open AppMessage with some useful example buffer sizes
708708
const int inbox_size = 256;
709709
const int outbox_size = 128;
710710
app_message_open(inbox_size, outbox_size);

source/tutorials/watchface-tutorial/part5.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ hidden when reconnected. Save the image below for use in this project:
6262

6363
Add this icon to your project by copying the above icon image to the
6464
`/resources/images` project directory, and adding a new JSON object to the
65-
`media` array in `package.json` such as the following:
65+
`media` array in `package.json`:
6666

6767
```js
6868
{
@@ -138,8 +138,9 @@ twice. It may take a few seconds for the watch to register the disconnection.
138138

139139
## Conclusion
140140

141-
Now our watchface shows the watch's remaining battery level! It's discreet,
142-
but very useful.
141+
Now our watchface shows the watch's connection status, which is useful if the
142+
user goes out of range of their phone or might want to be aware notifications
143+
might not come through when disconnected.
143144

144145
As usual, you can compare your code to the example code provided below.
145146

0 commit comments

Comments
 (0)