-
Notifications
You must be signed in to change notification settings - Fork 270
Made the safe mode more clear #347
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
Conversation
I think this new feature requires its own section :) Right now it is hard to spot. I hope this helps.
| {{{device-animation device "blink" "magenta" }}} | ||
|
|
||
| Note that, if you enter this mode by holding {{#if photon}}`SETUP`{{/if}}{{#unless photon}}`MODE`{{/unless}} on boot, blinking magenta indicates that letting go of the {{#if photon}}`SETUP`{{/if}}{{#unless photon}}`MODE`{{/unless}} button will enter safe mode to connect to the cloud and not run application firmware. | ||
| If your latest code is crashing your Particle, this mode is for you! Hold down the {{#if photon}}`SETUP`{{/if}}{{#unless photon}}`MODE`{{/unless}}, then click the reset button once. When your Particle starts blinking in magenta, imediatly release the {{#if photon}}`SETUP`{{/if}}{{#unless photon}}`MODE`{{/unless}} button. If you do this step correctly, the device will enter in safe mode, and won't execute your old code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typos here and also, safe mode is not just for devices with crashing code. This ends up making it less clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm... so how can we make it more clear? Because for me how it is explained now, it is unclear, the word safe mode is hidden within the sentence, and I, for example always miss it while skimming through the document.
Also, you say this mode is not only for crashing code, can you tell me what other use cases there are?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main goal of safe mode is to a device in the state where the user code is not running at all. This can be deliberate through code or manually through the physical buttons.
We can always add a note to say that this is useful when your device firmware is crashing and not maintaining ☁️ connection. Placing the device in safe mode allows you to OTA new firmware without any user code running.
I would really recommending proof-reading (editors should have dictionary feature enabled as well) PRs too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll read once again what I wrote.
In the mean time. I'm still bit confused. Why would I want to set the Particle in safe mode if everything is ok with my code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There might be cases that you want to place the device in safe mode so that none of your firmware/project is running.
For example, you are controlling a water heater and you perform an OTA firmware update halfway. The code hangs, your Photon is 1000miles away and OTA firmware didn't work. The water heater keeps firing and eventually lead to a mishap.
Deliberately handling the peripherals status properly before entering Safe Mode ensures that no user code is running during an OTA. If the OTA fails, the device will simply reset and run the old firmware. Hope this helps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case could we write the following:
You should put your Particle in safe mode when you want to perform a safe OTA (no code is running on the device), or when your latest code is crashing the device.
What do you think?
And fixed spelling.
|
I think now this is nice :) what do you think @kennethlimcp |
|
I could be mistaken, but doesn't Safe Mode already have a section of its own? Stating it at the OTA firmware upgrade part is a simply pointer on what happens if you hold Mode on setup, and how you can recognize whether or not you're in Safe Mode. Personally I'd just make the mention of "Safe Mode" over there a link to the already existing docs. |
|
😮 how did I miss that. I'm so sorry for wasting your time guys. |
I think this new feature requires its own section :) Right now it is hard to spot. I hope this helps.