Skip to content

Commit

Permalink
update examples to align with Notecarrier-AF; change start:true to sy…
Browse files Browse the repository at this point in the history
…nc:true
  • Loading branch information
bsatrom committed Jan 4, 2021
1 parent cf8ad01 commit 678a73c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void loop() {
// at this on notehub.io you will see the data appearing 'live'.)
J *req = notecard.newRequest("note.add");
if (req != NULL) {
JAddBoolToObject(req, "start", true);
JAddBoolToObject(req, "sync", true);
J *body = JCreateObject();
if (body != NULL) {
JAddNumberToObject(body, "temp", temperature);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
// Note that both of these definitions are optional; just prefix either line with // to remove it.
// Remove serialNotecard if you wired your Notecard using I2C SDA/SCL pins instead of serial RX/TX
// Remove serialDebug if you don't want the Notecard library to output debug information
#define serialNotecard Serial1
// #define serialNotecard Serial1
#define serialDebugOut Serial

// This is the unique Product Identifier for your device.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void loop() {
J *req = notecard.newRequest("note.add");
if (req != NULL) {
JAddStringToObject(req, "file", "sensors.qo");
JAddBoolToObject(req, "start", true);
JAddBoolToObject(req, "sync", true);

J *body = JCreateObject();
if (body != NULL) {
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Blues Wireless Notecard
version=1.2.8
version=1.2.9
author=Blues Wireless
maintainer=Blues Wireless <[email protected]>
sentence=An easy to use Notecard Library for Arduino.
Expand Down
4 changes: 2 additions & 2 deletions src/note-c/n_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ bool NoteWake(int stateLen, void *state) {
return false;

// Send it a command to request the saved state
JAddBoolToObject(req, "start", true);
JAddBoolToObject(req, "sync", true);
J *rsp = NoteRequestResponse(req);
if (rsp == NULL)
return false;
Expand Down Expand Up @@ -1074,7 +1074,7 @@ bool NoteAdd(const char *target, J *body, bool urgent) {

// Initiate sync NOW if it's urgent
if (urgent)
JAddBoolToObject(req, "start", true);
JAddBoolToObject(req, "sync", true);

// Perform the transaction
return NoteRequest(req);
Expand Down

0 comments on commit 678a73c

Please sign in to comment.