72,11 → 72,6 |
Capacity.UsedCapacity = 0; |
Capacity.ActualPower = 0; |
Capacity.MinOfMaxPWM = 0; |
#ifdef WITH_REMAINCAPACITY // only include functions if DEBUG is defined in main.h |
|
#warning : "### with REMAIN CAPACITY ###" |
Capacity.RemainCapacity = (Parameter_UserParam5*100); |
#endif |
update_timer = SetDelay(CAPACITY_UPDATE_INTERVAL); |
} |
|
144,14 → 139,6 |
{ |
Capacity.UsedCapacity++; // we have one mAh more |
SubCounter -= SUB_COUNTER_LIMIT; // keep the remaining sub part |
#ifdef WITH_REMAINCAPACITY // only include functions if DEBUG is defined in main.h |
|
#warning : "### with REMAIN CAPACITY ###" |
Capacity.RemainCapacity=(Parameter_UserParam5*100)-Capacity.UsedCapacity; //Added by metro |
if((Capacity.RemainCapacity<=0)&&(Capacity.RemainCapacity%10==0)&&(Parameter_UserParam5!=0)) beeptime = 1000; |
if((Capacity.RemainCapacity<=500)&&(Capacity.RemainCapacity%100==0)&&(Parameter_UserParam5!=0)) beeptime = 10000; |
#endif |
|
} |
} // EOF check delay update timer |
} |