inav icon indicating copy to clipboard operation
inav copied to clipboard

Remove legacy option of rebooting fc without using MSP

Open mmosca opened this issue 1 year ago • 5 comments

This can cause some issues with some devices, eg.:

https://github.com/betaflight/betaflight/pull/13572

Kudos to @hydra for identifying this on BF.

mmosca avatar Apr 23 '24 10:04 mmosca

This is a useful function for scripts / tools. I would be sorry to see it removed ... we have a guard time around it to prevent misuse.

stronnag avatar Apr 23 '24 10:04 stronnag

I understand it is pratical for simple scripts, but Cli reboot/dfu command or MSP_REBOOT messages would still work.

Would that be a good enough replacement for the single character reboot?

mmosca avatar Apr 23 '24 10:04 mmosca

I understand it is pratical for simple scripts, but Cli reboot/dfu command or MSP_REBOOT messages would still work.

Would that be a good enough replacement for the single character reboot?

Having to enter the CLI is not really convenient either. If this is a problem for INAV, even with the guard time, then fine, remove it. Hacking up MSP_REBOOT in the shell is not so big a deal.

stronnag avatar Apr 23 '24 10:04 stronnag

I didn't realize there was supposed to be a guard time, I have run into some random issues where the fc would reboot when I was trying to do something over msp, but that was probably due to my own buggy code. This is not written as merged yet.

mmosca avatar Apr 23 '24 12:04 mmosca

As noted in the BF PR, using MSP_REBOOT is the correct way to tell the FC to enter a specific bootloader mode. IMHO guard times, arming checks and whatever other workaround/preventions/hacks that are put in place to prevent accidental reboots are all extra code and all require additional tests, maintenance, flash-space, etc. Less is more, YAGNI, etc...

hydra avatar Apr 29 '24 18:04 hydra