esp32_BNO08x 1.4 C++ BNO08x IMU driver component for esp-idf.

BNO08xRptActivityClassifier.hpp
Go to the documentation of this file.
1
6#pragma once
7
8#include "BNO08xRpt.hpp"
9
15 class BNO08xRptActivityClassifier : public BNO08xRpt
16{
17 public:
18 BNO08xRptActivityClassifier(uint8_t ID, EventBits_t rpt_bit, BNO08xPrivateTypes::bno08x_sync_ctx_t* sync_ctx)
19 : BNO08xRpt(ID, rpt_bit, sync_ctx)
20 {
21 }
22
23 bool enable(
24 uint32_t time_between_reports, sh2_SensorConfig_t sensor_cfg = BNO08xPrivateTypes::default_sensor_cfg) override;
25 bno08x_activity_classifier_t get();
26 BNO08xActivity get_most_likely_activity();
27 void set_activities_to_enable(BNO08xActivityEnable activities_to_enable);
28
29 private:
30 void update_data(sh2_SensorValue_t* sensor_val) override;
31 bno08x_activity_classifier_t data;
32 BNO08xActivityEnable activities_to_enable =
33 BNO08xActivityEnable::ALL;
34 static const constexpr char* TAG = "BNO08xRptActivityClassifier";
35};
BNO08xActivity
BNO08xActivity
BNO08xActivity states returned from BNO08x::activity_classifier.get()
Definition: BNO08xGlobalTypes.hpp:152
BNO08xActivityEnable
BNO08xActivityEnable
BNO08xActivity Classifier enable bits passed to enable_activity_classifier() See ref manual 6....
Definition: BNO08xGlobalTypes.hpp:137
BNO08xActivityEnable::ALL
@ ALL
BNO08xRpt.hpp
BNO08xRptActivityClassifier
Class to represent activity classifier reports. (See Ref. Manual 6.5.36)
Definition: BNO08xRptActivityClassifier.hpp:16
BNO08xRptActivityClassifier::enable
bool enable(uint32_t time_between_reports, sh2_SensorConfig_t sensor_cfg=BNO08xPrivateTypes::default_sensor_cfg) override
Enables activity classifier reports such that the BNO08x begins sending them.
Definition: BNO08xRptActivityClassifier.cpp:35
BNO08xRptActivityClassifier::get_most_likely_activity
BNO08xActivity get_most_likely_activity()
Grabs most the most likely activity from most recent activity classifier data.
Definition: BNO08xRptActivityClassifier.cpp:60
BNO08xRptActivityClassifier::get
bno08x_activity_classifier_t get()
Grabs most recent activity classifier data.
Definition: BNO08xRptActivityClassifier.cpp:47
BNO08xRptActivityClassifier::BNO08xRptActivityClassifier
BNO08xRptActivityClassifier(uint8_t ID, EventBits_t rpt_bit, BNO08xPrivateTypes::bno08x_sync_ctx_t *sync_ctx)
Definition: BNO08xRptActivityClassifier.hpp:18
BNO08xRptActivityClassifier::set_activities_to_enable
void set_activities_to_enable(BNO08xActivityEnable activities_to_enable)
Sets the activities to be monitored for with ActivityClassifier reports, all enable after setting.
Definition: BNO08xRptActivityClassifier.cpp:75
BNO08xRpt
Class to represent and manage reports returned from BNO08x.
Definition: BNO08xRpt.hpp:26
BNO08xRpt::sync_ctx
BNO08xPrivateTypes::bno08x_sync_ctx_t * sync_ctx
Definition: BNO08xRpt.hpp:42
BNO08xRpt::ID
uint8_t ID
Report ID, ex. SH2_ACCELERATION.
Definition: BNO08xRpt.hpp:39
BNO08xRpt::rpt_bit
EventBits_t rpt_bit
Respective enable and data bit for report in evt_grp_rpt_en and evt_grp_rpt_data.
Definition: BNO08xRpt.hpp:40
BNO08xPrivateTypes::bno08x_sync_ctx_t
Holds context used to synchronize tasks and callback execution.
Definition: BNO08xPrivateTypes.hpp:57
bno08x_activity_classifier_t
Struct to represent activity classifier data.
Definition: BNO08xGlobalTypes.hpp:728