Ignore:
Timestamp:
Nov 1, 2025, 5:01:01 PM (37 hours ago)
Author:
f.jahn
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/fw_g473rct/SES/src/wh_counter.c

    r31 r35  
    4242
    4343  double cefwh;
    44   if (sys_data.s.values.calculatedCEFWh <= 0)
    45   {
    46         cefwh =  sys_data.s.parameter.cef / 100.0;
    47   }
    48   else
    49   {
    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//  }
    5252 
    5353  double realStrom;
     
    5757  // bei Strom größer 0 -> Ladestrom CEF rechnen
    5858  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)) ;   
    6060  }
    6161  else
     
    7575  sys_data.s.values.mWsCounter += p_mW; // Energy value for both positive and negative currents
    7676  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  }
    7882
    7983  // Begrenzen, Batterie darf nicht über 100% gehen
Note: See TracChangeset for help on using the changeset viewer.