Rev 1828 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1828 | Rev 1829 | ||
---|---|---|---|
Line 69... | Line 69... | ||
69 | { |
69 | { |
70 | Capacity.ActualCurrent = 0; |
70 | Capacity.ActualCurrent = 0; |
71 | Capacity.UsedCapacity = 0; |
71 | Capacity.UsedCapacity = 0; |
72 | Capacity.ActualPower = 0; |
72 | Capacity.ActualPower = 0; |
73 | Capacity.MinOfMaxPWM = 0; |
73 | Capacity.MinOfMaxPWM = 0; |
- | 74 | Capacity.RemainCapacity = (EE_Parameter.UserParam1*100); |
|
74 | update_timer = SetDelay(CAPACITY_UPDATE_INTERVAL); |
75 | update_timer = SetDelay(CAPACITY_UPDATE_INTERVAL); |
75 | } |
76 | } |
Line 76... | Line 77... | ||
76 | 77 | ||
Line 136... | Line 137... | ||
136 | #define SUB_COUNTER_LIMIT (36000 / CAPACITY_UPDATE_INTERVAL) |
137 | #define SUB_COUNTER_LIMIT (36000 / CAPACITY_UPDATE_INTERVAL) |
137 | if(SubCounter > SUB_COUNTER_LIMIT) |
138 | if(SubCounter > SUB_COUNTER_LIMIT) |
138 | { |
139 | { |
139 | Capacity.UsedCapacity++; // we have one mAh more |
140 | Capacity.UsedCapacity++; // we have one mAh more |
140 | SubCounter -= SUB_COUNTER_LIMIT; // keep the remaining sub part |
141 | SubCounter -= SUB_COUNTER_LIMIT; // keep the remaining sub part |
- | 142 | Capacity.RemainCapacity=(EE_Parameter.UserParam1*100)-Capacity.UsedCapacity; //Added by metro |
|
- | 143 | if((Capacity.RemainCapacity<=500)&&(Capacity.RemainCapacity%100==0)&&(EE_Parameter.UserParam1!=0)) beeptime = 10000; |
|
141 | } |
144 | } |
- | 145 | ||
- | 146 | ||
142 | } // EOF check delay update timer |
147 | } // EOF check delay update timer |
143 | } |
148 | } |