comparison 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
comparison
equal deleted inserted replaced
557:2702bfa7b177 558:66aef216828b
1211 1211
1212 #ifdef ENABLE_ANALYSE_SAMPLES 1212 #ifdef ENABLE_ANALYSE_SAMPLES
1213 uint8_t OnAction_RecoverSampleIdx(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) 1213 uint8_t OnAction_RecoverSampleIdx(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action)
1214 { 1214 {
1215 char text[32]; 1215 char text[32];
1216 char strResult[20]; 1216 uint8_t openSec;
1217 1217 uint8_t retval = UNSPECIFIC_RETURN;
1218 ext_flash_AnalyseSampleBuffer(strResult); 1218 openSec = ext_flash_AnalyseSampleBuffer();
1219 snprintf(&text[0],30,"Ring: %s",strResult); //"Code: %X",settingsGetPointer()->logFlashNextSampleStartAddress); //getLicence()); 1219 snprintf(&text[0],30,"OpenSec: %d",openSec);
1220 write_label_var( 30, 800, ME_Y_LINE6, &FontT42, text); 1220 write_label_var( 30, 800, ME_Y_LINE6, &FontT42, text);
1221 return UNSPECIFIC_RETURN; 1221
1222 if(openSec == 2)
1223 {
1224 retval = UPDATE_DIVESETTINGS;
1225 }
1226 return retval;
1222 } 1227 }
1223 #endif 1228 #endif
1224 1229
1225 uint8_t OnAction_SetBatteryCharge(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) 1230 uint8_t OnAction_SetBatteryCharge(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action)
1226 { 1231 {