Skip to content

Commit f1cf270

Browse files
committed
Fixed bug in Heart rate and Health thermometer
Removed is_freshest_sample
1 parent 5e5a608 commit f1cf270

File tree

5 files changed

+19
-23
lines changed

5 files changed

+19
-23
lines changed

Diff for: libraries/BLE/examples/ble_heart_rate_template/heart_rate.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -111,30 +111,30 @@ bool heart_rate_send_hr_16bits(uint16_t meas_hr);
111111
* @param expended_energy Measured expended energy.
112112
* @return : True when the ACI command is successfully placed in the ACI command queue
113113
*/
114-
bool heart_rate_send_hr_expended_energy(uint8_t meas_hr, uint16_t expended_energy, bool is_freshest_sample);
114+
bool heart_rate_send_hr_expended_energy(uint8_t meas_hr, uint16_t expended_energy);
115115

116116
/** @brief Function to send a heart rate measurement (16 bits) with expended energy.
117117
* @param meas_hr Measured heart_rate to send.
118118
* @param expended_energy Measured expended energy.
119119
* @return : True when the ACI command is successfully placed in the ACI command queue
120120
*/
121-
bool heart_rate_send_hr_16bits_expended_energy(uint16_t meas_hr, uint16_t expended_energy, bool is_freshest_sample);
121+
bool heart_rate_send_hr_16bits_expended_energy(uint16_t meas_hr, uint16_t expended_energy);
122122

123123
/** @brief Function to send a heart rate measurement (8 bits) with rr_intervals
124124
* @param meas_hr Measured heart_rate to send.
125125
* @param p_rr_intervals Pointer to rr_intervals values.
126126
* @param nb_intervals Number of rr_intervals.
127127
* @return : True when the ACI command is successfully placed in the ACI command queue
128128
*/
129-
bool heart_rate_send_hr_rr_interval(uint8_t meas_hr, uint16_t *p_rr_intervals, uint8_t nb_intervals, bool is_freshest_sample);
129+
bool heart_rate_send_hr_rr_interval(uint8_t meas_hr, uint16_t *p_rr_intervals, uint8_t nb_intervals);
130130

131131
/** @brief Function to send a heart rate measurement (16 bits) with rr_intervals
132132
* @param meas_hr Measured heart_rate to send.
133133
* @param p_rr_intervals Pointer to rr_intervals values.
134134
* @param nb_intervals Number of rr_intervals.
135135
* @return : True when the ACI command is successfully placed in the ACI command queue
136136
*/
137-
bool heart_rate_send_hr_16bits_rr_interval(uint16_t meas_hr, uint16_t *p_rr_intervals, uint8_t nb_intervals, bool is_freshest_sample);
137+
bool heart_rate_send_hr_16bits_rr_interval(uint16_t meas_hr, uint16_t *p_rr_intervals, uint8_t nb_intervals);
138138

139139
/** @brief Function to send a heart rate measurement (8 bits) with expended energy with rr_intervals
140140
* @param meas_hr Measured heart_rate to send.
@@ -143,7 +143,7 @@ bool heart_rate_send_hr_16bits_rr_interval(uint16_t meas_hr, uint16_t *p_rr_inte
143143
* @param nb_intervals Number of rr_intervals.
144144
* @return : True when the ACI command is successfully placed in the ACI command queue
145145
*/
146-
bool heart_rate_send_hr_expended_energy_rr_interval(uint8_t meas_hr, uint16_t expended_energy, uint16_t *p_rr_intervals, uint8_t nb_intervals, bool is_freshest_sample);
146+
bool heart_rate_send_hr_expended_energy_rr_interval(uint8_t meas_hr, uint16_t expended_energy, uint16_t *p_rr_intervals, uint8_t nb_intervals);
147147

148148
/** @brief Function to send a heart rate measurement (16 bits) with expended energy with rr_intervals
149149
* @param meas_hr measured heart_rate to send.
@@ -152,7 +152,7 @@ bool heart_rate_send_hr_expended_energy_rr_interval(uint8_t meas_hr, uint16_t ex
152152
* @param nb_intervals Number of rr_intervals.
153153
* @return : True when the ACI command is successfully placed in the ACI command queue
154154
*/
155-
bool heart_rate_send_hr_16bits_expended_energy_rr_interval(uint16_t meas_hr, uint16_t expended_energy, uint16_t *p_rr_intervals, uint8_t nb_intervals, bool is_freshest_sample);
155+
bool heart_rate_send_hr_16bits_expended_energy_rr_interval(uint16_t meas_hr, uint16_t expended_energy, uint16_t *p_rr_intervals, uint8_t nb_intervals);
156156

157157
/** @brief Function to check received data
158158
* @details Call this function each time data is received (on @c ACI_EVT_DATA_RECEIVED on the control point pipe ).

Diff for: libraries/BLE/examples/ble_heart_rate_template_with_battery_service/heart_rate.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -137,30 +137,30 @@ bool heart_rate_send_hr_16bits(uint16_t meas_hr);
137137
* @param expended_energy Measured expended energy.
138138
* @return : True when the ACI command is successfully placed in the ACI command queue
139139
*/
140-
bool heart_rate_send_hr_expended_energy(uint8_t meas_hr, uint16_t expended_energy, bool is_freshest_sample);
140+
bool heart_rate_send_hr_expended_energy(uint8_t meas_hr, uint16_t expended_energy);
141141

142142
/** @brief Function to send a heart rate measurement (16 bits) with expended energy.
143143
* @param meas_hr Measured heart_rate to send.
144144
* @param expended_energy Measured expended energy.
145145
* @return : True when the ACI command is successfully placed in the ACI command queue
146146
*/
147-
bool heart_rate_send_hr_16bits_expended_energy(uint16_t meas_hr, uint16_t expended_energy, bool is_freshest_sample);
147+
bool heart_rate_send_hr_16bits_expended_energy(uint16_t meas_hr, uint16_t expended_energy);
148148

149149
/** @brief Function to send a heart rate measurement (8 bits) with rr_intervals
150150
* @param meas_hr Measured heart_rate to send.
151151
* @param p_rr_intervals Pointer to rr_intervals values.
152152
* @param nb_intervals Number of rr_intervals.
153153
* @return : True when the ACI command is successfully placed in the ACI command queue
154154
*/
155-
bool heart_rate_send_hr_rr_interval(uint8_t meas_hr, uint16_t *p_rr_intervals, uint8_t nb_intervals, bool is_freshest_sample);
155+
bool heart_rate_send_hr_rr_interval(uint8_t meas_hr, uint16_t *p_rr_intervals, uint8_t nb_intervals);
156156

157157
/** @brief Function to send a heart rate measurement (16 bits) with rr_intervals
158158
* @param meas_hr Measured heart_rate to send.
159159
* @param p_rr_intervals Pointer to rr_intervals values.
160160
* @param nb_intervals Number of rr_intervals.
161161
* @return : True when the ACI command is successfully placed in the ACI command queue
162162
*/
163-
bool heart_rate_send_hr_16bits_rr_interval(uint16_t meas_hr, uint16_t *p_rr_intervals, uint8_t nb_intervals, bool is_freshest_sample);
163+
bool heart_rate_send_hr_16bits_rr_interval(uint16_t meas_hr, uint16_t *p_rr_intervals, uint8_t nb_intervals);
164164

165165
/** @brief Function to send a heart rate measurement (8 bits) with expended energy with rr_intervals
166166
* @param meas_hr Measured heart_rate to send.
@@ -169,7 +169,7 @@ bool heart_rate_send_hr_16bits_rr_interval(uint16_t meas_hr, uint16_t *p_rr_inte
169169
* @param nb_intervals Number of rr_intervals.
170170
* @return : True when the ACI command is successfully placed in the ACI command queue
171171
*/
172-
bool heart_rate_send_hr_expended_energy_rr_interval(uint8_t meas_hr, uint16_t expended_energy, uint16_t *p_rr_intervals, uint8_t nb_intervals, bool is_freshest_sample);
172+
bool heart_rate_send_hr_expended_energy_rr_interval(uint8_t meas_hr, uint16_t expended_energy, uint16_t *p_rr_intervals, uint8_t nb_intervals);
173173

174174
/** @brief Function to send a heart rate measurement (16 bits) with expended energy with rr_intervals
175175
* @param meas_hr measured heart_rate to send.
@@ -178,7 +178,7 @@ bool heart_rate_send_hr_expended_energy_rr_interval(uint8_t meas_hr, uint16_t ex
178178
* @param nb_intervals Number of rr_intervals.
179179
* @return : True when the ACI command is successfully placed in the ACI command queue
180180
*/
181-
bool heart_rate_send_hr_16bits_expended_energy_rr_interval(uint16_t meas_hr, uint16_t expended_energy, uint16_t *p_rr_intervals, uint8_t nb_intervals, bool is_freshest_sample);
181+
bool heart_rate_send_hr_16bits_expended_energy_rr_interval(uint16_t meas_hr, uint16_t expended_energy, uint16_t *p_rr_intervals, uint8_t nb_intervals);
182182

183183
/** @brief Function to check received data
184184
* @details Call this function each time data is received (on @c ACI_EVT_DATA_RECEIVED on the control point pipe ).

Diff for: libraries/BLE/examples/ble_heart_rate_template_with_simulated_battery_service/heart_rate.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -111,30 +111,30 @@ bool heart_rate_send_hr_16bits(uint16_t meas_hr);
111111
* @param expended_energy Measured expended energy.
112112
* @return : True when the ACI command is successfully placed in the ACI command queue
113113
*/
114-
bool heart_rate_send_hr_expended_energy(uint8_t meas_hr, uint16_t expended_energy, bool is_freshest_sample);
114+
bool heart_rate_send_hr_expended_energy(uint8_t meas_hr, uint16_t expended_energy);
115115

116116
/** @brief Function to send a heart rate measurement (16 bits) with expended energy.
117117
* @param meas_hr Measured heart_rate to send.
118118
* @param expended_energy Measured expended energy.
119119
* @return : True when the ACI command is successfully placed in the ACI command queue
120120
*/
121-
bool heart_rate_send_hr_16bits_expended_energy(uint16_t meas_hr, uint16_t expended_energy, bool is_freshest_sample);
121+
bool heart_rate_send_hr_16bits_expended_energy(uint16_t meas_hr, uint16_t expended_energy);
122122

123123
/** @brief Function to send a heart rate measurement (8 bits) with rr_intervals
124124
* @param meas_hr Measured heart_rate to send.
125125
* @param p_rr_intervals Pointer to rr_intervals values.
126126
* @param nb_intervals Number of rr_intervals.
127127
* @return : True when the ACI command is successfully placed in the ACI command queue
128128
*/
129-
bool heart_rate_send_hr_rr_interval(uint8_t meas_hr, uint16_t *p_rr_intervals, uint8_t nb_intervals, bool is_freshest_sample);
129+
bool heart_rate_send_hr_rr_interval(uint8_t meas_hr, uint16_t *p_rr_intervals, uint8_t nb_intervals);
130130

131131
/** @brief Function to send a heart rate measurement (16 bits) with rr_intervals
132132
* @param meas_hr Measured heart_rate to send.
133133
* @param p_rr_intervals Pointer to rr_intervals values.
134134
* @param nb_intervals Number of rr_intervals.
135135
* @return : True when the ACI command is successfully placed in the ACI command queue
136136
*/
137-
bool heart_rate_send_hr_16bits_rr_interval(uint16_t meas_hr, uint16_t *p_rr_intervals, uint8_t nb_intervals, bool is_freshest_sample);
137+
bool heart_rate_send_hr_16bits_rr_interval(uint16_t meas_hr, uint16_t *p_rr_intervals, uint8_t nb_intervals);
138138

139139
/** @brief Function to send a heart rate measurement (8 bits) with expended energy with rr_intervals
140140
* @param meas_hr Measured heart_rate to send.
@@ -143,7 +143,7 @@ bool heart_rate_send_hr_16bits_rr_interval(uint16_t meas_hr, uint16_t *p_rr_inte
143143
* @param nb_intervals Number of rr_intervals.
144144
* @return : True when the ACI command is successfully placed in the ACI command queue
145145
*/
146-
bool heart_rate_send_hr_expended_energy_rr_interval(uint8_t meas_hr, uint16_t expended_energy, uint16_t *p_rr_intervals, uint8_t nb_intervals, bool is_freshest_sample);
146+
bool heart_rate_send_hr_expended_energy_rr_interval(uint8_t meas_hr, uint16_t expended_energy, uint16_t *p_rr_intervals, uint8_t nb_intervals);
147147

148148
/** @brief Function to send a heart rate measurement (16 bits) with expended energy with rr_intervals
149149
* @param meas_hr measured heart_rate to send.
@@ -152,7 +152,7 @@ bool heart_rate_send_hr_expended_energy_rr_interval(uint8_t meas_hr, uint16_t ex
152152
* @param nb_intervals Number of rr_intervals.
153153
* @return : True when the ACI command is successfully placed in the ACI command queue
154154
*/
155-
bool heart_rate_send_hr_16bits_expended_energy_rr_interval(uint16_t meas_hr, uint16_t expended_energy, uint16_t *p_rr_intervals, uint8_t nb_intervals, bool is_freshest_sample);
155+
bool heart_rate_send_hr_16bits_expended_energy_rr_interval(uint16_t meas_hr, uint16_t expended_energy, uint16_t *p_rr_intervals, uint8_t nb_intervals);
156156

157157
/** @brief Function to check received data
158158
* @details Call this function each time data is received (on @c ACI_EVT_DATA_RECEIVED on the control point pipe ).

Diff for: libraries/BLE/examples/ble_temperature_template/health_thermometer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ bool health_thermometer_send_measure(uint32_t meas_temp)
8080
return lib_aci_send_data(PIPE_HEALTH_THERMOMETER_TEMPERATURE_MEASUREMENT_TX_ACK, (uint8_t *)&h_temperature, measurement_size);
8181
}
8282

83-
bool health_thermometer_send_measure_with_t_stamp(uint32_t meas_temp, time_stamp_t *t_stamp, bool is_freshest_sample)
83+
bool health_thermometer_send_measure_with_t_stamp(uint32_t meas_temp, time_stamp_t *t_stamp)
8484
{
8585
uint8_t measurement_size = 12;
8686
uint8_t *p_in_val = (uint8_t *)&meas_temp;

Diff for: libraries/BLE/examples/ble_temperature_template/health_thermometer.h

-4
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,13 @@ void health_thermometer_set_unit_f();
113113
/** @brief Function to send a temperature measurement without time_stamp.
114114
* @details Call this function to send (indicate) a new temperature measurement.
115115
* @param meas_temp Measured temperature to send.
116-
* @param is_freshest_sample Set it to true if you want to overwrite an eventual pending transaction on this pipe.
117-
* @return : True if is_freshest_sample true. Otherwise return false if a transaction on this pipe is already pending, true otherwise.
118116
*/
119117
bool health_thermometer_send_measure(uint32_t meas_temp);
120118

121119
/** @brief Function to send a temperature measurement with time_stamp.
122120
* @details Call this function to send (indicate) a new temperature measurement with a time_stamp.
123121
* @param meas_temp Measured temperature to send.
124122
* @param t_stamp Time stamp.
125-
* @param is_freshest_sample Set it to true if you want to overwrite an eventual pending transaction on this pipe.
126-
* @return : True if is_freshest_sample true. Otherwise return false if a transaction on this pipe is already pending, true otherwise.
127123
*/
128124
bool health_thermometer_send_measure_with_t_stamp(uint32_t meas_temp, time_stamp_t *t_stamp);
129125

0 commit comments

Comments
 (0)