Rev 1829 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1829 | Rev 1833 | ||
---|---|---|---|
Line 137... | Line 137... | ||
137 | #define SUB_COUNTER_LIMIT (36000 / CAPACITY_UPDATE_INTERVAL) |
137 | #define SUB_COUNTER_LIMIT (36000 / CAPACITY_UPDATE_INTERVAL) |
138 | if(SubCounter > SUB_COUNTER_LIMIT) |
138 | if(SubCounter > SUB_COUNTER_LIMIT) |
139 | { |
139 | { |
140 | Capacity.UsedCapacity++; // we have one mAh more |
140 | Capacity.UsedCapacity++; // we have one mAh more |
141 | SubCounter -= SUB_COUNTER_LIMIT; // keep the remaining sub part |
141 | SubCounter -= SUB_COUNTER_LIMIT; // keep the remaining sub part |
- | 142 | ||
- | 143 | //Added by metro |
|
142 | Capacity.RemainCapacity=(EE_Parameter.UserParam1*100)-Capacity.UsedCapacity; //Added by metro |
144 | Capacity.RemainCapacity=(EE_Parameter.UserParam1*100)-Capacity.UsedCapacity; |
143 | if((Capacity.RemainCapacity<=500)&&(Capacity.RemainCapacity%100==0)&&(EE_Parameter.UserParam1!=0)) beeptime = 10000; |
145 | if((Capacity.RemainCapacity<=0)&&(Capacity.RemainCapacity%100==0)&&(EE_Parameter.UserParam1!=0)) |
- | 146 | { |
|
- | 147 | FC_StatusFlags |= FC_STATUS_LOWBAT; |
|
- | 148 | if(BeepMuster == 0xffff) |
|
- | 149 | { |
|
- | 150 | beeptime = (abs(Capacity.RemainCapacity/100)+1)*2000; |
|
- | 151 | BeepMuster = 0x0400; |
|
- | 152 | } |
|
- | 153 | } |
|
- | 154 | else if(!beeptime) FC_StatusFlags &= ~FC_STATUS_LOWBAT; |
|
- | 155 | //End Added by metro |
|
144 | } |
156 | } |
Line 145... | Line 157... | ||
145 | 157 | ||
146 | 158 |