# HG changeset patch # User Ideenmodellierer # Date 1605207964 -3600 # Node ID 66aef216828b89f120b4221dd94c32d57cb69312 # Parent 2702bfa7b177a5e51d313880ff48dda3b4f0c70b 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) diff -r 2702bfa7b177 -r 66aef216828b Discovery/Src/tMenuEditSystem.c --- 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