如果心率测量值小于或等于255 bpm*应使用UINT8格式以节省电源。
/* If the Heart Rate Measurement Value is less than or equal to 255 bpm
* a UINT8 format should be used for power savings. */
APP_HRP_measure.measurement.flags |= (
APP_HRP_measure.measurement.heart_rate < 256 ?
HRS_FLAG_HR_8BITS_VALUE : HRS_FLAG_HR_16BITS_VALUE);
说明:
- 赋值语句:APP_HRP_measure.measurement.flags |=
- 条件判断: APP_HRP_measure.measurement.heart_rate < 256 ?
- 取值选择:HRS_FLAG_HR_8BITS_VALUE : HRS_FLAG_HR_16BITS_VALUE