minor improvements to documentation.
This commit is contained in:
parent
c7eb83db09
commit
ba5fb7fb36
3 changed files with 17 additions and 7 deletions
|
@ -81,11 +81,10 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @return
|
||||
* @brief get the handle for the value attribute of the control characteristic.
|
||||
*/
|
||||
uint16_t getControlHandle(void) {
|
||||
return controlPoint.getValueAttribute().getHandle();
|
||||
uint16_t getControlHandle(void) const {
|
||||
return controlPoint.getValueHandle();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -93,8 +92,8 @@ public:
|
|||
* handover control to the bootloader; but first the application is given a
|
||||
* chance to clean up.
|
||||
*
|
||||
* @param[in]
|
||||
*
|
||||
* @param[in] params
|
||||
* Information about the characterisitc being updated.
|
||||
*/
|
||||
virtual void onDataWritten(const GattCharacteristicWriteCBParams *params) {
|
||||
if (params->charHandle == controlPoint.getValueAttribute().getHandle()) {
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
* @enum Sensor Location
|
||||
* @brief Location of sensor on the body
|
||||
*/
|
||||
enum {
|
||||
enum SensorLocation_t {
|
||||
LOCATION_ARMPIT = 1, /*!< armpit */
|
||||
LOCATION_BODY, /*!< body */
|
||||
LOCATION_EAR, /*!< ear */
|
||||
|
@ -80,6 +80,15 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Update the location.
|
||||
* @param loc
|
||||
* new location value.
|
||||
*/
|
||||
void updateLocation(SensorLocation_t loc) {
|
||||
ble.updateCharacteristicValue(tempLocation.getValueHandle(), reinterpret_cast<uint8_t *>(&loc), sizeof(uint8_t));
|
||||
}
|
||||
|
||||
private:
|
||||
/* Private internal representation for the bytes used to work with the vaulue of the heart-rate characteristic. */
|
||||
struct TemperatureValueBytes {
|
||||
|
|
|
@ -115,6 +115,8 @@ public:
|
|||
* This callback allows the HeartRateService to receive updates to the
|
||||
* controlPoint Characteristic.
|
||||
*
|
||||
* @param[in] params
|
||||
* Information about the characterisitc being updated.
|
||||
*/
|
||||
virtual void onDataWritten(const GattCharacteristicWriteCBParams *params) {
|
||||
if (params->charHandle == controlPoint.getValueAttribute().getHandle()) {
|
||||
|
|
Loading…
Reference in a new issue