1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-13 11:29:51 +03:00

Add support for pwr-on and power-off speed

This commit is contained in:
Raphael Coeffic 2019-08-14 23:37:08 +02:00
parent 8d9a7c22e6
commit 995888ae41
32 changed files with 927 additions and 739 deletions

View file

@ -213,6 +213,17 @@ int main()
pwrInit();
pwrOff();
// wait a bit for the inputs to stabilize...
// ... otherwise the bootloader cannot be started
// when the power on delay is cut to 0.
for (int i=0; i<5000;i++)
readTrims();
// avoid booting after DFU bootloader
if (!pwrPressed()) {
boardOff();
}
// LHR & RHL trims not pressed simultanously
if (readTrims() != BOOTLOADER_KEYS) {
// Start main application