rename isValid() to discovered()
This commit is contained in:
1 parent
8883aa64a1
commit
78b3906ec1
4 files changed
+5
-5
No files matched your search
@@ -124,7 +124,7 @@ void connect_callback(uint16_t conn_handle)
|
||||
Serial.println("Characteristics");
|
||||
|
||||
// Measurement chr is mandatory, if it is not found (valid), then disconnect
|
||||
if ( !hrmc.isValid() )
|
||||
if ( !hrmc.discovered() )
|
||||
{
|
||||
Serial.println("Measurement characteristic not found");
|
||||
Bluefruit.Central.disconnect(conn_handle);
|
||||
@@ -134,7 +134,7 @@ void connect_callback(uint16_t conn_handle)
|
||||
|
||||
// https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.body_sensor_location.xml
|
||||
// Body Sensor Location is optional, print its location (in text) if present
|
||||
if ( bslc.isValid() )
|
||||
if ( bslc.discovered() )
|
||||
{
|
||||
// Body sensor location value is 8 bit
|
||||
const char* body_str[] = { "Other", "Chest", "Wrist", "Finger", "Hand", "Ear Lobe", "Foot" };
|
||||
|
||||
@@ -171,7 +171,7 @@ parentService KEYWORD2
|
||||
assign KEYWORD2
|
||||
discoverDescriptor KEYWORD2
|
||||
valueHandle KEYWORD2
|
||||
isValid KEYWORD2
|
||||
discovered KEYWORD2
|
||||
|
||||
read KEYWORD2
|
||||
write KEYWORD2
|
||||
|
||||
@@ -106,7 +106,7 @@ uint16_t BLEClientCharacteristic::valueHandle(void)
|
||||
return _chr.handle_value;
|
||||
}
|
||||
|
||||
bool BLEClientCharacteristic::isValid(void)
|
||||
bool BLEClientCharacteristic::discovered(void)
|
||||
{
|
||||
return _chr.handle_value != BLE_GATT_HANDLE_INVALID;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ class BLEClientCharacteristic
|
||||
|
||||
uint16_t connHandle(void);
|
||||
uint16_t valueHandle(void);
|
||||
bool isValid(void);
|
||||
bool discovered(void);
|
||||
uint8_t properties(void);
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user