comparison Discovery/Src/data_exchange_main.c @ 924:4d98fb2a178e Evo_2_23

Bugfix real scrubber time decreased in sim mode: In the previous version the condition check for dive / simulation had been commented out causing the scrubber timer to be decreased during simulator usage. The problem has been fixed. In addition the scrubbertimer will now be maintained in simulator mode. In case the +5 minutes option is used the scrubber time is decreased by 5 minutes as well.
author Ideenmodellierer
date Wed, 13 Nov 2024 17:55:05 +0100
parents c4c9850a2039
children
comparison
equal deleted inserted replaced
923:6fc0e3d230e4 924:4d98fb2a178e
1037 settingsGetPointer()->bluetoothActive = 0; 1037 settingsGetPointer()->bluetoothActive = 0;
1038 MX_Bluetooth_PowerOff(); 1038 MX_Bluetooth_PowerOff();
1039 //Init dive Mode 1039 //Init dive Mode
1040 decoLock = DECO_CALC_init_as_is_start_of_dive; 1040 decoLock = DECO_CALC_init_as_is_start_of_dive;
1041 pStateReal->lifeData.boolResetAverageDepth = 1; 1041 pStateReal->lifeData.boolResetAverageDepth = 1;
1042
1043 memcpy(pStateReal->scrubberDataDive, pSettings->scrubberData, sizeof(pStateReal->scrubberDataDive));
1042 } 1044 }
1043 1045
1044 pStateReal->lifeData.cns = dataIn.data[dataIn.boolToxicData].cns; 1046 pStateReal->lifeData.cns = dataIn.data[dataIn.boolToxicData].cns;
1045 pStateReal->lifeData.otu = dataIn.data[dataIn.boolToxicData].otu; 1047 pStateReal->lifeData.otu = dataIn.data[dataIn.boolToxicData].otu;
1046 pStateReal->lifeData.no_fly_time_minutes = dataIn.data[dataIn.boolToxicData].no_fly_time_minutes; 1048 pStateReal->lifeData.no_fly_time_minutes = dataIn.data[dataIn.boolToxicData].no_fly_time_minutes;
1064 else if(pStateReal->lifeData.cns >= 100) 1066 else if(pStateReal->lifeData.cns >= 100)
1065 dataOut.setAccidentFlag += ACCIDENT_CNS; 1067 dataOut.setAccidentFlag += ACCIDENT_CNS;
1066 } 1068 }
1067 if(pStateReal->warnings.decoMissed) 1069 if(pStateReal->warnings.decoMissed)
1068 dataOut.setAccidentFlag += ACCIDENT_DECOSTOP; 1070 dataOut.setAccidentFlag += ACCIDENT_DECOSTOP;
1071
1072 memcpy(pSettings->scrubberData, pStateReal->scrubberDataDive, sizeof(pStateReal->scrubberDataDive)); /* Store value of current usage */
1069 } 1073 }
1070 pStateReal->mode = dataIn.mode; 1074 pStateReal->mode = dataIn.mode;
1071 pStateReal->chargeStatus = dataIn.chargeStatus; 1075 pStateReal->chargeStatus = dataIn.chargeStatus;
1072 1076
1073 pStateReal->lifeData.depth_meter = meter; 1077 pStateReal->lifeData.depth_meter = meter;