Reset the step count every day at midnight.
This commit is contained in:
@@ -105,3 +105,7 @@ Bma421::Values Bma421::Process() {
|
||||
bool Bma421::IsOk() const {
|
||||
return isOk;
|
||||
}
|
||||
|
||||
void Bma421::ResetStepCounter() {
|
||||
bma423_reset_step_counter(&bma);
|
||||
}
|
||||
|
@@ -19,8 +19,8 @@ namespace Pinetime {
|
||||
Bma421& operator=(Bma421&&) = delete;
|
||||
|
||||
void Init();
|
||||
void Reset();
|
||||
Values Process();
|
||||
void ResetStepCounter();
|
||||
|
||||
void Read(uint8_t registerAddress, uint8_t *buffer, size_t size);
|
||||
void Write(uint8_t registerAddress, const uint8_t *data, size_t size);
|
||||
@@ -28,6 +28,8 @@ namespace Pinetime {
|
||||
bool IsOk() const;
|
||||
|
||||
private:
|
||||
void Reset();
|
||||
|
||||
TwiMaster& twiMaster;
|
||||
uint8_t deviceAddress = 0x18;
|
||||
struct bma4_dev bma;
|
||||
|
Reference in New Issue
Block a user