diff --git a/apps/BLEcontroller/Bangle.code-workspace b/apps/BLEcontroller/Bangle.code-workspace new file mode 100644 index 000000000..90587e88f --- /dev/null +++ b/apps/BLEcontroller/Bangle.code-workspace @@ -0,0 +1,7 @@ +{ + "folders": [ + { + "path": "/Users/hopkira/Documents/BangleApps" + } + ] +} \ No newline at end of file diff --git a/apps/BLEcontroller/README.md b/apps/BLEcontroller/README.md index 3f9dfa6b8..c02e29543 100644 --- a/apps/BLEcontroller/README.md +++ b/apps/BLEcontroller/README.md @@ -7,10 +7,10 @@ Amaze your friends by controlling your robot, your house or any other BLE device To keep the messages small, commands are sent from the Controller to the BLE target in a text string. This is made up of a comma delimited string of the following elements: -* message number (3 characters) -* screen name (3 characters) -* object name (3 characters) -* value/status (3 characters) +* message number (up to the least significant four digits) +* screen name (up to four characters) +* object name (up to four characters) +* value/status (up to four characters) The combination of these variables will uniquely identify the status change requested from the watch to the target device that can then be programmed to respond appropriately. diff --git a/apps/BLEcontroller/app-ex2.js b/apps/BLEcontroller/app-ex2.js index a24d7805b..4ed3a5eeb 100644 --- a/apps/BLEcontroller/app-ex2.js +++ b/apps/BLEcontroller/app-ex2.js @@ -45,7 +45,7 @@ const transmit = (state,object,status) => { n: msgNum.toString().slice(-4), s: state.substr(0,4), o: object.substr(0,4), - v: status.substr(0.4), + v: status.substr(0,4), }; message= msg.n + "," + msg.s + "," + msg.o + "," + msg.v; NRF.setAdvertising({},{ diff --git a/apps/BLEcontroller/app-joy.js b/apps/BLEcontroller/app-joy.js index 66bad3934..8da1aadcb 100644 --- a/apps/BLEcontroller/app-joy.js +++ b/apps/BLEcontroller/app-joy.js @@ -45,7 +45,7 @@ const transmit = (state,object,status) => { n: msgNum.toString().slice(-4), s: state.substr(0,4), o: object.substr(0,4), - v: status.substr(0.4), + v: status.substr(0,4), }; message= msg.n + "," + msg.s + "," + msg.o + "," + msg.v; NRF.setAdvertising({},{ diff --git a/apps/BLEcontroller/app.js b/apps/BLEcontroller/app.js index ba172b047..c8217988c 100644 --- a/apps/BLEcontroller/app.js +++ b/apps/BLEcontroller/app.js @@ -46,7 +46,7 @@ const transmit = (state,object,status) => { n: msgNum.toString().slice(-4), s: state.substr(0,4), o: object.substr(0,4), - v: status.substr(0.4), + v: status.substr(0,4), }; message= msg.n + "," + msg.s + "," + msg.o + "," + msg.v; NRF.setAdvertising({},{