Functions which handle the battery voltage. More...
Modules | |
Advanced informations | |
Request Funktions | |
void | battery_request (eRequestType request) |
Requests new data from the battery. More... | |
uint8_t | battery_received (void) |
Indicates if new data for the data block sMD_SensBattery was received. More... | |
uint8_t | battery_changed (void) |
Indicates if new data changed the data block sMD_SensBattery. More... | |
Access Funktions | |
uint16_t | battery_get (void) |
Returns the last stored voltage of the battery. More... | |
Functions which handle the battery voltage.
0 | full | >6,9V | LED off |
1 | soon empty | 6,4V...6,9V | LED is toggled |
2 | empty | <6,4V | LED on; motors off |
3 | deep-discharge | <6V | Robot is protected by a hardware circuit. Please turn off the robot and charge battery as soon as possible! |
example
uint8_t battery_changed | ( | void | ) |
Indicates if new data changed the data block sMD_SensBattery.
The return value is boolean.
uint16_t battery_get | ( | void | ) |
Returns the last stored voltage of the battery.
This function relies on the internal data block sMD_SensBattery - for new data use battery_request().
uint8_t battery_received | ( | void | ) |
Indicates if new data for the data block sMD_SensBattery was received.
The return value is boolean.
void battery_request | ( | eRequestType | request | ) |
Requests new data from the battery.
For details on the request schema see The general request.
Involved data blocks are:
sMD_SensBattery
request | See also eRequestType |