esp32_BNO08x 1.3
C++ BNO08x IMU driver component for esp-idf.
Loading...
Searching...
No Matches
BNO08xRptStepCounter.hpp
Go to the documentation of this file.
1
6#pragma once
7
8#include "BNO08xRpt.hpp"
9
16{
17 public:
22
24 uint32_t get_total_steps();
25
26 private:
27 void update_data(sh2_SensorValue_t* sensor_val) override;
30 0UL;
31 static const constexpr char* TAG = "BNO08xRptStepCounter";
32};
Class to represent and manage reports returned from BNO08x.
Definition BNO08xRpt.hpp:24
BNO08xPrivateTypes::bno08x_sync_ctx_t * sync_ctx
Definition BNO08xRpt.hpp:39
uint8_t ID
Report ID, ex. SH2_ACCELERATION.
Definition BNO08xRpt.hpp:36
EventBits_t rpt_bit
Respective enable and data bit for report in evt_grp_rpt_en and evt_grp_rpt_data.
Definition BNO08xRpt.hpp:37
Class to represent step counter reports. (See Ref. Manual 6.5.29)
Definition BNO08xRptStepCounter.hpp:16
uint32_t get_total_steps()
Grabs the total step count since boot, accounts for rollover in report data.
Definition BNO08xRptStepCounter.cpp:42
BNO08xRptStepCounter(uint8_t ID, EventBits_t rpt_bit, BNO08xPrivateTypes::bno08x_sync_ctx_t *sync_ctx)
Definition BNO08xRptStepCounter.hpp:18
void update_data(sh2_SensorValue_t *sensor_val) override
Updates step counter data from decoded sensor event.
Definition BNO08xRptStepCounter.cpp:15
static const constexpr char * TAG
Definition BNO08xRptStepCounter.hpp:31
uint32_t step_accumulator
Every time step count rolls over, the previous steps are accumulated here such that the total steps c...
Definition BNO08xRptStepCounter.hpp:29
bno08x_step_counter_t data
Most recent report data, doesn't account for step rollover.
Definition BNO08xRptStepCounter.hpp:28
bno08x_step_counter_t get()
Grabs most recent step counter data (rollover not accounted for in step count, just most recent repor...
Definition BNO08xRptStepCounter.cpp:56
Holds context used to synchronize tasks and callback execution.
Definition BNO08xPrivateTypes.hpp:57
Struct to represent step counter data from step counter reports.
Definition BNO08xGlobalTypes.hpp:568