updated to be consistent with uint8_t

This commit is contained in:
Charlie B committed 2023-04-19 19:57:53 -04:00
1 parent 687a54525e
commit 9388e7358c
3 files changed
+6 -5

No files matched your search

@@ -23,13 +23,14 @@ bool BLEClientIas::discover(uint16_t conn_handle) {
uint16_t BLEClientIas::getAlertLevel() {
uint16_t level = 0;
uint8_t level = 0;
ble_gattc_handle_range_t bck_range = Bluefruit.Discovery.getHandleRange();
BLEClientCharacteristic chr(uuid);
chr.begin(this);
if (Bluefruit.Discovery.discoverCharacteristic(_conn_hdl, chr)) {
level = chr.read16();
level = chr.read8();
}
Bluefruit.Discovery.setHandleRange(bck_range);
@@ -11,7 +11,7 @@ BLEIas::BLEIas(void) : BLEService(UUID16_SVC_IMMEDIATE_ALERT) {
}
void BLEIas::setAlertLevel(const uint8_t alert_level) {
void BLEIas::setAlertLevel(uint8_t alert_level) {
_alert_level = alert_level;
}
@@ -27,7 +27,7 @@ err_t BLEIas::begin(void) {
chars.setProperties(CHR_PROPS_READ);
chars.setFixedLen(sizeof(_alert_level));
VERIFY_STATUS(chars.begin());
chars.write(_alert_level, sizeof(_alert_level));
chars.write8(_alert_level);
return ERROR_NONE;
@@ -16,7 +16,7 @@ class BLEIas : public BLEService {
protected:
union {
struct {
const uint8_t _alert_level; // UUID 0x2A06
uint8_t _alert_level; // UUID 0x2A06
};
};