Rev 2093 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2093 | Rev 2174 | ||
---|---|---|---|
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 |
- | |
80 | update_timer = SetDelay(CAPACITY_UPDATE_INTERVAL); |
75 | update_timer = SetDelay(CAPACITY_UPDATE_INTERVAL); |
81 | } |
76 | } |
Line 82... | Line 77... | ||
82 | 77 | ||
Line 142... | Line 137... | ||
142 | #define SUB_COUNTER_LIMIT (36000 / CAPACITY_UPDATE_INTERVAL) |
137 | #define SUB_COUNTER_LIMIT (36000 / CAPACITY_UPDATE_INTERVAL) |
143 | if(SubCounter > SUB_COUNTER_LIMIT) |
138 | if(SubCounter > SUB_COUNTER_LIMIT) |
144 | { |
139 | { |
145 | Capacity.UsedCapacity++; // we have one mAh more |
140 | Capacity.UsedCapacity++; // we have one mAh more |
146 | SubCounter -= SUB_COUNTER_LIMIT; // keep the remaining sub part |
141 | 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 | - | ||
155 | } |
142 | } |
156 | } // EOF check delay update timer |
143 | } // EOF check delay update timer |
157 | } |
144 | } |