Revision 195
added more battery detection code (currently commented out for demo purposes)...also uses rangefinders for departing.
recharge.c | ||
---|---|---|
131 | 131 |
**/ |
132 | 132 |
void recharge_check_low_battery() |
133 | 133 |
{ |
134 |
//TODO: use battery_low instead of button press |
|
135 |
//if (battery_low()) |
|
134 |
//if (battery_low() || button2_click()) |
|
136 | 135 |
if (button2_click()) |
137 | 136 |
{ |
138 | 137 |
wl_recharge_begin(); |
... | ... | |
150 | 149 |
void recharge_seek() |
151 | 150 |
{ |
152 | 151 |
seek_station(wl_recharge_get_station()); |
153 |
|
|
154 |
//TODO: check if battery is charging |
|
155 |
//if (battery is charging) |
|
156 |
if (recharge_i2c_is_battery_charging()) |
|
152 |
|
|
153 |
if (recharge_i2c_is_battery_charging() || button2_click()) |
|
157 | 154 |
{ |
158 | 155 |
wl_recharge_dock(); |
159 | 156 |
move(0, 0); |
... | ... | |
167 | 164 |
**/ |
168 | 165 |
void recharge_check_charging_complete() |
169 | 166 |
{ |
170 |
//TODO: implement |
|
171 |
//if (battery is charged) |
|
167 |
//if (recharge_i2c_is_battery_full() || button2_click()) |
|
172 | 168 |
if (button2_click()) |
173 | 169 |
{ |
174 | 170 |
wl_recharge_depart(); |
Also available in: Unified diff