Changeset 35 for trunk/fw_g473rct/SES/src/wh_counter.c
- Timestamp:
- Nov 1, 2025, 5:01:01 PM (37 hours ago)
- File:
-
- 1 edited
-
trunk/fw_g473rct/SES/src/wh_counter.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/fw_g473rct/SES/src/wh_counter.c
r31 r35 42 42 43 43 double cefwh; 44 if (sys_data.s.values.calculatedCEFWh <= 0)45 {46 cefwh = sys_data.s.parameter.cef / 100.0;47 }48 else49 {50 cefwh = sys_data.s.values.calculatedCEFWh / 1000.0;51 }44 // if (sys_data.s.values.calculatedCEFWh <= 0) 45 // { 46 cefwh = sys_data.s.parameter.cefW / 1000.0; 47 // } 48 // else 49 // { 50 // cefwh = sys_data.s.values.calculatedCEFWh / 1000.0; 51 // } 52 52 53 53 double realStrom; … … 57 57 // bei Strom größer 0 -> Ladestrom CEF rechnen 58 58 if (realStrom >= 0) {// 99 --> 99% --> 0.99 59 sys_data.s.values.correctedStromForChargeWhCnt = (realStrom * cefwh ) ;59 sys_data.s.values.correctedStromForChargeWhCnt = (realStrom * cefwh * (sys_data.s.values.peukertRemoveCorrectionFaktor / 1000.0)) ; 60 60 } 61 61 else … … 75 75 sys_data.s.values.mWsCounter += p_mW; // Energy value for both positive and negative currents 76 76 sys_data.s.values.mWs_AutoMode += p_mW; 77 77 78 if (sys_data.s.values.soc > 0) 79 { 80 sys_data.s.values.mWsCounterUncorrected += ((int64_t) realStrom * sys_data.s.values.batteryVoltage )/ 1000LL; 81 } 78 82 79 83 // Begrenzen, Batterie darf nicht über 100% gehen
Note: See TracChangeset
for help on using the changeset viewer.
