Variable doesn't change in NRF.setServices #1849
Unanswered
espruino-discuss
asked this question in
Puck.js, Pixl.js, Jolt.js and MDBT42
Replies: 2 comments
-
Posted at 2017-01-05 by @gfwilliams I think once you have set the services up at the start, you probably want to use NRF.updateServices every time they change |
Beta Was this translation helpful? Give feedback.
0 replies
-
Posted at 2017-01-05 by user71506 Great! I have missed that. Works like a charm now. Thanks a lot |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-01-05 by user71506
Hi All,
I have the following code that does not do what I want:
The variable count_str is a counter as string that gets incremented every time I connect in a "NRF.on('connect', function()". I can see that the counter string increments correctly (puck console), but when I check the services and characteristics that the Puck advertises via Android, I see only the initial value of the counter string (#00000 - Serial Number) and not the updated one.
I am not aware if this is maybe a caching problem of Android? Do I have to do anything else to receive the updated counter string?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions