Hi,
I would like to use the ble_app_hrs to send pressure values via the heart_rate_measurement_send function. Unfortunately, they are too long: around 105000 Pa (equals 1 1001 1010 0010 1000 in binary), so I think about changing the uint16_t into uint32_t.
What configurations are needed to perform please?
Here is the code:
static void heart_rate_meas_timeout_handler(void * p_context)
{
static uint32_t cnt = 0;
uint32_t err_code;
uint16_t heart_rate;
UNUSED_PARAMETER(p_context);
heart_rate = (uint16_t)sensorsim_measure(&m_heart_rate_sim_state, &m_heart_rate_sim_cfg);
cnt++;
err_code = ble_hrs_heart_rate_measurement_send(&m_hrs, heart_rate);
if ((err_code != NRF_SUCCESS) &&
(err_code != NRF_ERROR_INVALID_STATE) &&
(err_code != BLE_ERROR_NO_TX_BUFFERS) &&
(err_code != BLE_ERROR_GATTS_SYS_ATTR_MISSING)
)
{
APP_ERROR_HANDLER(err_code);
}
// Disable RR Interval recording every third heart rate measurement.
// NOTE: An application will normally not do this. It is done here just for testing generation
// of messages without RR Interval measurements.
m_rr_interval_enabled = ((cnt % 3) != 0);
}
And I would like to change the “heart_rate = (uint16_t) sensorsim_measure(…);“ by “heart_rate = (uint32_t) 105000;” for example.
Regards, Mahaliana