clean up
This commit is contained in:
1 parent
acce660751
commit
119db2ad03
2 files changed
+10
-10
No files matched your search
@@ -204,7 +204,7 @@ void loop()
|
||||
// Note: We use .indicate instead of .write!
|
||||
// If it is connected but CCCD is not enabled
|
||||
// The characteristic's value is still updated although indicate is not sent
|
||||
if ( htmc.indicate(0, htmdata, sizeof(htmdata)) ){
|
||||
if ( htmc.indicate(htmdata, sizeof(htmdata)) ){
|
||||
Serial.print("Temperature Measurement updated to: "); Serial.println(tempvalue);
|
||||
}else{
|
||||
Serial.println("ERROR: Indicate not set in the CCCD or not connected!");
|
||||
|
||||
@@ -91,21 +91,21 @@ class BLEClientCharacteristic
|
||||
uint16_t write32_resp (int value);
|
||||
|
||||
/*------------- Notify -------------*/
|
||||
bool writeCCCD (uint16_t value);
|
||||
bool writeCCCD (uint16_t value);
|
||||
|
||||
bool enableNotify (void);
|
||||
bool disableNotify (void);
|
||||
bool enableNotify (void);
|
||||
bool disableNotify (void);
|
||||
|
||||
bool enableIndicate (void);
|
||||
bool disableIndicate (void);
|
||||
bool enableIndicate (void);
|
||||
bool disableIndicate (void);
|
||||
|
||||
/*------------- Callbacks -------------*/
|
||||
void setNotifyCallback(notify_cb_t fp, bool useAdaCallback = true);
|
||||
void setIndicateCallback(indicate_cb_t fp, bool useAdaCallback = true);
|
||||
void setNotifyCallback(notify_cb_t fp, bool useAdaCallback = true);
|
||||
void setIndicateCallback(indicate_cb_t fp, bool useAdaCallback = true);
|
||||
|
||||
/*------------- Internal usage -------------*/
|
||||
void _assign(ble_gattc_char_t* gattc_chr);
|
||||
bool _discoverDescriptor(uint16_t conn_handle, ble_gattc_handle_range_t hdl_range);
|
||||
void _assign(ble_gattc_char_t* gattc_chr);
|
||||
bool _discoverDescriptor(uint16_t conn_handle, ble_gattc_handle_range_t hdl_range);
|
||||
|
||||
private:
|
||||
ble_gattc_char_t _chr;
|
||||
|
||||
Reference in new issue
Block a user