Mercurial > public > ostc4
diff BootLoader/Src/base_bootlader.c @ 971:d29e752660c5 Evo_2_23
Bootloader BT module factory reset:
The new BT module may now be reinitialized (factory reset) using the "Enter" bottom (invisible option). If a serial number is available then it will be used as BT name instead of the default name.
author | Ideenmodellierer |
---|---|
date | Sun, 19 Jan 2025 20:58:03 +0100 (2 months ago) |
parents | 58cc980ee848 |
children |
line wrap: on
line diff
--- a/BootLoader/Src/base_bootlader.c Sun Jan 19 20:55:30 2025 +0100 +++ b/BootLoader/Src/base_bootlader.c Sun Jan 19 20:58:03 2025 +0100 @@ -716,7 +716,14 @@ if(tComm_Set_Bluetooth_Name(0) == 0xFF) { tInfo_write("init bluetooth"); - tComm_StartBlueModBaseInit(); + if(isNewDisplay()) + { + tComm_StartBlueModBaseInit(); + } + else + { + tComm_StartBlueModConfig(); + } } else { @@ -837,42 +844,40 @@ action = 0; get_globalStateList(&status); - switch(status.base) + if(status.base == BaseComm) { - case BaseComm: if(action == ACTION_BUTTON_BACK) { reset_to_firmware_using_Watchdog(); } - break; - - default: - if((action == ACTION_BUTTON_NEXT) && (counterToPreventSleep == 255) && (get_globalState() == StS)) - { - while(1) - { - MX_tell_reset_logik_alles_ok(); - DataEX_call(); - HAL_Delay(100); - } - } - else - if(action == ACTION_BUTTON_BACK) - { - reset_to_firmware_using_Watchdog(); - } - else - if(action == ACTION_BUTTON_CUSTOM) - { - if(get_globalState() == StS) - gotoSleep(); - } - else - if(action == ACTION_BUTTON_ENTER) - { - reset_to_update_using_system_reset(); - } - break; + } + else + { + switch (action) + { + case ACTION_BUTTON_NEXT: if((counterToPreventSleep == 255) && (get_globalState() == StS)) + { + while(1) + { + MX_tell_reset_logik_alles_ok(); + DataEX_call(); + HAL_Delay(100); + } + } + break; + case ACTION_BUTTON_BACK: reset_to_firmware_using_Watchdog(); + break; + case ACTION_BUTTON_CUSTOM: if(get_globalState() == StS) + { + gotoSleep(); + } + break; + case ACTION_BUTTON_ENTER: /* reset_to_update_using_system_reset(); old function */ + tComm_StartBlueModBaseInit(); /* new: factory reset bluetooth */ + break; + default: + break; + } } }