BLE Library with custom services for the tortuga bike
Fork of BLE_API by
BatteryService Class Reference
#include <BatteryService.h>
Public Member Functions | |
| BatteryService (BLE &_ble, uint8_t level=100) | |
| void | updateBatteryLevel (uint8_t newLevel) |
| Update the battery level with a new value. | |
| BatteryService (BLE &_ble, uint8_t level1=100, uint8_t level2=100, uint8_t level3=100) | |
| void | updateBatteryLevel1 (uint8_t newLevel) |
| Update the battery level with a new value. | |
Detailed Description
BLE Battery Service.
This service displays the battery level from 0% to 100%, represented as an 8bit number. Service: https://developer.bluetooth.org/gatt/services/Pages/ServiceViewer.aspx?u=org.bluetooth.service.battery_service.xml Battery Level Char: https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.battery_level.xml
Definition at line 28 of file BatteryService.h.
Constructor & Destructor Documentation
| BatteryService | ( | BLE & | _ble, |
| uint8_t | level = 100 |
||
| ) |
- Parameters:
-
ref] _ble BLE object for the underlying controller. [in] level 8bit batterly level. Usually used to represent percentage of batterly charge remaining.
Definition at line 36 of file BatteryService.h.
| BatteryService | ( | BLE & | _ble, |
| uint8_t | level1 = 100, |
||
| uint8_t | level2 = 100, |
||
| uint8_t | level3 = 100 |
||
| ) |
- Parameters:
-
ref] _ble BLE object for the underlying controller. [in] level 8bit batterly level. Usually used to represent percentage of batterly charge remaining.
Definition at line 43 of file BikeBatteryService.h.
Member Function Documentation
| void updateBatteryLevel | ( | uint8_t | newLevel ) |
Update the battery level with a new value.
[Valid values lie between 0 and 100]; anything outside this range will be ignored.
- Parameters:
-
newLevel Update to battery level.
Definition at line 54 of file BatteryService.h.
| void updateBatteryLevel1 | ( | uint8_t | newLevel ) |
Update the battery level with a new value.
[Valid values lie between 0 and 100]; anything outside this range will be ignored.
- Parameters:
-
newLevel Update to battery level.
Definition at line 68 of file BikeBatteryService.h.
Generated on Tue Jul 12 2022 21:14:55 by
1.7.2
