Skip to content

Commit 71ce13d

Browse files
committed
Motion service : fix step notifications that were sent as a single byte instead of 4 (uint32_t).
1 parent 82ca526 commit 71ce13d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/ble/MotionService.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ int MotionService::OnStepCountRequested(uint16_t connectionHandle, uint16_t attr
8080
return 0;
8181
}
8282

83-
void MotionService::OnNewStepCountValue(uint8_t stepCount) {
83+
void MotionService::OnNewStepCountValue(uint32_t stepCount) {
8484
if(!stepCountNoficationEnabled) return;
8585

8686
uint32_t buffer = stepCount;

src/components/ble/MotionService.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace Pinetime {
1717
MotionService(Pinetime::System::SystemTask& system, Controllers::MotionController& motionController);
1818
void Init();
1919
int OnStepCountRequested(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt* context);
20-
void OnNewStepCountValue(uint8_t stepCount);
20+
void OnNewStepCountValue(uint32_t stepCount);
2121
void OnNewMotionValues(int16_t x, int16_t y, int16_t z);
2222

2323
void SubscribeNotification(uint16_t connectionHandle, uint16_t attributeHandle);

0 commit comments

Comments
 (0)