Mercurial > public > ostc4
diff Discovery/Src/tMenuEditSystem.c @ 558:66aef216828b
Changed operation mode of RecoverSampleIndex:
In previous implementation the check was only done for the first 16 sector to be able to display status using a string. This may not be done by an OSTC companion function externally => changed function to handle all 192 sector used for log samples. The lastSampleIdx will now be stored immediatly (dive was necessary in previous version)
author | Ideenmodellierer |
---|---|
date | Thu, 12 Nov 2020 20:06:04 +0100 |
parents | a9c195be907e |
children | 1c95f811967c |
line wrap: on
line diff
--- a/Discovery/Src/tMenuEditSystem.c Thu Nov 12 20:03:00 2020 +0100 +++ b/Discovery/Src/tMenuEditSystem.c Thu Nov 12 20:06:04 2020 +0100 @@ -1213,12 +1213,17 @@ uint8_t OnAction_RecoverSampleIdx(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) { char text[32]; - char strResult[20]; + uint8_t openSec; + uint8_t retval = UNSPECIFIC_RETURN; + openSec = ext_flash_AnalyseSampleBuffer(); + snprintf(&text[0],30,"OpenSec: %d",openSec); + write_label_var( 30, 800, ME_Y_LINE6, &FontT42, text); - ext_flash_AnalyseSampleBuffer(strResult); - snprintf(&text[0],30,"Ring: %s",strResult); //"Code: %X",settingsGetPointer()->logFlashNextSampleStartAddress); //getLicence()); - write_label_var( 30, 800, ME_Y_LINE6, &FontT42, text); - return UNSPECIFIC_RETURN; + if(openSec == 2) + { + retval = UPDATE_DIVESETTINGS; + } + return retval; } #endif