-
• #2
indeed, something with boolean is off...
You see the workaround: make Commands for setting and clearing (not the most elegant, but it works).
Furthermore, notice:
- 1. To display the state of a boolean I convert them to a number that is in the range of the other ones... then I see a continuous graph line about the status - in this case: value 2 is true for on variable, 1 represents false
- 2. You can switch back to console and you see what the Espruino board returns every second. Unfortunately, you cannot see what the Testing/Monitor is sending to the Espruino board. For that you would have to look into the JS Testing plug-in code and change it.
When you take a look at the plug-in code, you may figure what is wrong with the boolean. Looks to me good what you do and I suspect as well something is broken for setting a boolean variable. - https://github.com/espruino/EspruinoWebIDE/blob/master/js/plugins/testing.js#L62
3 Attachments
- 1. To display the state of a boolean I convert them to a number that is in the range of the other ones... then I see a continuous graph line about the status - in this case: value 2 is true for on variable, 1 represents false
-
• #3
Thanks @allObjects for looking into it. Its not a big deal for me since I can just use number instead like you suggested. I wanted to know if its a real issue or just my poor js knowledge. It would be good to let know to whoever is maintaining the plugin. I bet there is an easy fix for it.
Hi All, I started using testing plugin in the IDE. I found an issue with boolean value setting. It could be my very basic knowledge of JS but here it is.
I am trying to change the value of a boolean variable with a button from the testing plugin. This is the code:
then I run the program and test. After toggling the test button, my_bool variable is still true. Same code works fine with numeric values.
1 Attachment