Mercurial > public > ostc4
comparison Discovery/Src/data_exchange_main.c @ 805:dd7ce655db26
Adds a simple countdown timer, available as a custom view in surface and dive mode.
This can be used to time safety stops, or to prebreathe a CCR (or to boil your breakfast eggs if you are so inclined). The duration of the timer is configurable from 1 second to 9:59 minutes in the System menu.
The timer is started by switching to the custom view, and remaining on it until a 10 second delay has elapsed. Once the timer has started the custom view can be changed and the timer will continue running in the background.
After the timer has run out 'Finished' will be shown for 10 seconds in the timer custom view, and then automatic switching of custom views (if configured) resumes.
In surface mode the dive computer will not go to sleep while the timer is running, and a mini timer will be shown when the timer custom view is not showing. (mikeller)
author | heinrichsweikamp |
---|---|
date | Mon, 21 Aug 2023 17:20:07 +0200 |
parents | 75ace7af8212 |
children | da632300e7d4 |
comparison
equal
deleted
inserted
replaced
804:391b3d420a39 | 805:dd7ce655db26 |
---|---|
1023 } | 1023 } |
1024 if(stateUsed == stateSimGetPointer()) | 1024 if(stateUsed == stateSimGetPointer()) |
1025 { | 1025 { |
1026 simulation_exit(); | 1026 simulation_exit(); |
1027 } | 1027 } |
1028 disableTimer(); | |
1029 | |
1028 // new 170508 | 1030 // new 170508 |
1029 settingsGetPointer()->bluetoothActive = 0; | 1031 settingsGetPointer()->bluetoothActive = 0; |
1030 MX_Bluetooth_PowerOff(); | 1032 MX_Bluetooth_PowerOff(); |
1031 //Init dive Mode | 1033 //Init dive Mode |
1032 decoLock = DECO_CALC_init_as_is_start_of_dive; | 1034 decoLock = DECO_CALC_init_as_is_start_of_dive; |
1044 if(modeChangeFlag) | 1046 if(modeChangeFlag) |
1045 { | 1047 { |
1046 *modeChangeFlag = 1; | 1048 *modeChangeFlag = 1; |
1047 } | 1049 } |
1048 createDiveSettings(); | 1050 createDiveSettings(); |
1051 | |
1052 disableTimer(); | |
1049 | 1053 |
1050 if(pStateReal->warnings.cnsHigh) | 1054 if(pStateReal->warnings.cnsHigh) |
1051 { | 1055 { |
1052 if(pStateReal->lifeData.cns >= 130) | 1056 if(pStateReal->lifeData.cns >= 130) |
1053 dataOut.setAccidentFlag += ACCIDENT_CNSLVL2; | 1057 dataOut.setAccidentFlag += ACCIDENT_CNSLVL2; |