Rev 2081 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2081 | Rev 2093 | ||
---|---|---|---|
Line 70... | Line 70... | ||
70 | { |
70 | { |
71 | Capacity.ActualCurrent = 0; |
71 | Capacity.ActualCurrent = 0; |
72 | Capacity.UsedCapacity = 0; |
72 | Capacity.UsedCapacity = 0; |
73 | Capacity.ActualPower = 0; |
73 | Capacity.ActualPower = 0; |
74 | Capacity.MinOfMaxPWM = 0; |
74 | Capacity.MinOfMaxPWM = 0; |
- | 75 | #ifdef WITH_REMAINCAPACITY // only include functions if DEBUG is defined in main.h |
|
- | 76 | ||
- | 77 | #warning : "### with REMAIN CAPACITY ###" |
|
- | 78 | Capacity.RemainCapacity = (Parameter_UserParam5*100); |
|
- | 79 | #endif |
|
75 | update_timer = SetDelay(CAPACITY_UPDATE_INTERVAL); |
80 | update_timer = SetDelay(CAPACITY_UPDATE_INTERVAL); |
76 | } |
81 | } |
Line 77... | Line 82... | ||
77 | 82 | ||
Line 137... | Line 142... | ||
137 | #define SUB_COUNTER_LIMIT (36000 / CAPACITY_UPDATE_INTERVAL) |
142 | #define SUB_COUNTER_LIMIT (36000 / CAPACITY_UPDATE_INTERVAL) |
138 | if(SubCounter > SUB_COUNTER_LIMIT) |
143 | if(SubCounter > SUB_COUNTER_LIMIT) |
139 | { |
144 | { |
140 | Capacity.UsedCapacity++; // we have one mAh more |
145 | Capacity.UsedCapacity++; // we have one mAh more |
141 | SubCounter -= SUB_COUNTER_LIMIT; // keep the remaining sub part |
146 | SubCounter -= SUB_COUNTER_LIMIT; // keep the remaining sub part |
- | 147 | #ifdef WITH_REMAINCAPACITY // only include functions if DEBUG is defined in main.h |
|
- | 148 | ||
- | 149 | #warning : "### with REMAIN CAPACITY ###" |
|
- | 150 | Capacity.RemainCapacity=(Parameter_UserParam5*100)-Capacity.UsedCapacity; //Added by metro |
|
- | 151 | if((Capacity.RemainCapacity<=0)&&(Capacity.RemainCapacity%10==0)&&(Parameter_UserParam5!=0)) beeptime = 1000; |
|
- | 152 | if((Capacity.RemainCapacity<=500)&&(Capacity.RemainCapacity%100==0)&&(Parameter_UserParam5!=0)) beeptime = 10000; |
|
- | 153 | #endif |
|
- | 154 | ||
142 | } |
155 | } |
143 | } // EOF check delay update timer |
156 | } // EOF check delay update timer |
144 | } |
157 | } |