Mercurial > public > ostc4
changeset 1075:ef99fff2d2de Icon_Integration tip
Unlock button lock if BT is connected:
In the previous version the button lock coluld only be disabled by following the correct button press order. In case a button does not work (e.g. low button sensitifity) the OSTC would be locked. To avoid such a scenario the button lock is now also removed if the OSTC is connected via Bluetooth
| author | ideenmodellierer |
|---|---|
| date | Sun, 22 Feb 2026 20:00:00 +0100 |
| parents | ad61a2c9095a |
| children | |
| files | Discovery/Inc/base.h Discovery/Src/base.c Discovery/Src/tComm.c Discovery/Src/tInfoSensor.c Discovery/Src/tMenu.c |
| diffstat | 5 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Discovery/Inc/base.h Sun Feb 22 19:56:43 2026 +0100 +++ b/Discovery/Inc/base.h Sun Feb 22 20:00:00 2026 +0100 @@ -123,6 +123,7 @@ void set_Backlight_Boost(uint8_t level); void StoreButtonAction(uint8_t action); SButtonLock get_ButtonLock(void); +void reset_ButtonLock(void); #ifdef T7_DEBUG_RUNTIME uint32_t getMainLoopTime();
--- a/Discovery/Src/base.c Sun Feb 22 19:56:43 2026 +0100 +++ b/Discovery/Src/base.c Sun Feb 22 20:00:00 2026 +0100 @@ -1098,6 +1098,10 @@ return ret; } +void reset_ButtonLock(void) +{ + ButtonLockState = LOCK_OFF; +} SButtonLock get_ButtonLock(void) { return ButtonLockState;
--- a/Discovery/Src/tComm.c Sun Feb 22 19:56:43 2026 +0100 +++ b/Discovery/Src/tComm.c Sun Feb 22 20:00:00 2026 +0100 @@ -234,7 +234,10 @@ { UartReady = RESET; if((receiveStartByteUart == BYTE_DOWNLOAD_MODE) || (receiveStartByteUart == BYTE_SERVICE_MODE)) + { answer = openComm(receiveStartByteUart); + reset_ButtonLock(); + } StartListeningToUART = 1; return answer; }
--- a/Discovery/Src/tInfoSensor.c Sun Feb 22 19:56:43 2026 +0100 +++ b/Discovery/Src/tInfoSensor.c Sun Feb 22 20:00:00 2026 +0100 @@ -40,7 +40,6 @@ #include <inttypes.h> extern void openEdit_Sensors(uint8_t filter); -uint8_t OnAction_Sensor (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); /* Private variables ---------------------------------------------------------*/ static uint8_t activeSensorId = 0; @@ -206,8 +205,6 @@ // =============================================================================== void refreshInfo_Sensor(GFX_DrawCfgScreen s) { - const SDiveState *pStateReal = stateRealGetPointer(); - char text[31]; text[0] = '\001';
--- a/Discovery/Src/tMenu.c Sun Feb 22 19:56:43 2026 +0100 +++ b/Discovery/Src/tMenu.c Sun Feb 22 20:00:00 2026 +0100 @@ -963,7 +963,7 @@ } } -tM_setLinesForPage(uint32_t pageID, uint8_t lineCnt) +void tM_setLinesForPage(uint32_t pageID, uint8_t lineCnt) { SStateList list; get_idSpecificStateList(pageID, &list);
