New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Settings.log, off,display,log, both #2549
Conversation
When set to log (2) the boot0 code has _DBGLOG=require("Storage").open("log.txt","a"); I suspect the logging to the console is happening due to the Terminal.write(d); |
Hi - yes, I think this is broken.
Yes, it will be. To log, you'll need the console on Loopback. So you want:
Also:
doesn't work anyway because of log==3 the second bit is never hit. I'll make a change to the PR and maybe you can test it? |
Sorry - made a mess of that. I think it's ok now. The original code isn't ideal as it's quite duplicated - you've basically got 8 modes - the 4 log modes, but then when programmable=true and =false |
I was not entirely sure what you did here, you seem to adjust my pull request. To test I decided to download the raw file of bootupdate.js and upload it to my Bangle through the IDE. TEST 1 (log ) For 3 minutes I watched the watch face and could not see any debuig messages printed. TEST 2 (display) TEST 3 (both) CONCLUSION: It appears to be working, but connecting to the IDE means you get some debug printed to the watch screen on connection until you reload an app. I think that is to be expected from what you wrote in the Forum thread ? |
Ok, great - yes, that sounds good to me! Debug messages would have to go to Bluetooth when connected as otherwise the IDE/App Loader wouldn't function (normal messages go via the same channel). I guess the programmable:off case hasn't been tested - part of me wonders if logging with programmable:off should just be removed though as it seems like quite a rare case. |
Gordon - its your call. I would remove it on the basis that if you are debugging something then more than likely you will have switch programmable on. I never switch programmable off on mine, I'm just not that paranoid that someone on a train is going to hack my watch :) |
I have attempted to modify settings app and bootupdate.js to handle debug settings
so that you can have 0=off, 1=display, 2=log, 3=both
I have tested but still get stuff drawn on the screen using log when there should be no output to the screen
so not 100% that I have covered all the bases.
Pull request so you have have a look at my code.