diff options
Diffstat (limited to 'src/components/ble')
| -rw-r--r-- | src/components/ble/MotionService.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/ble/MotionService.cpp b/src/components/ble/MotionService.cpp index 4b223c1e..44ad755f 100644 --- a/src/components/ble/MotionService.cpp +++ b/src/components/ble/MotionService.cpp @@ -64,7 +64,7 @@ int MotionService::OnStepCountRequested(uint16_t attributeHandle, ble_gatt_acces NRF_LOG_INFO("Motion-stepcount : handle = %d", stepCountHandle); uint32_t buffer = motionController.NbSteps(); - int res = os_mbuf_append(context->om, &buffer, 4); + int res = os_mbuf_append(context->om, &buffer, sizeof(buffer)); return (res == 0) ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES; } if (attributeHandle == motionValuesHandle) { @@ -82,7 +82,7 @@ void MotionService::OnNewStepCountValue(uint32_t stepCount) { } uint32_t buffer = stepCount; - auto* om = ble_hs_mbuf_from_flat(&buffer, 4); + auto* om = ble_hs_mbuf_from_flat(&buffer, sizeof(buffer)); uint16_t connectionHandle = nimble.connHandle(); |
