6#ifdef USE_BINARY_SENSOR
113 void setup()
override;
115 void loop()
override;
123 void set_offset(
float offset_x,
float offset_y,
float offset_z);
124 void set_transform(
bool mirror_x,
bool mirror_y,
bool mirror_z,
bool swap_xy);
127 virtual bool write_byte(uint8_t a_register, uint8_t data) = 0;
130#ifdef USE_BINARY_SENSOR
145#ifdef USE_TEXT_SENSOR
149 template<
typename F>
void add_on_tap_callback(F &&callback) { this->
tap_callback_.add(std::forward<F>(callback)); }
168#ifdef USE_TEXT_SENSOR
176#ifdef USE_BINARY_SENSOR
193#ifdef USE_TEXT_SENSOR
BedjetMode mode
BedJet operating mode.
This class simplifies creating components that periodically check a state.
Base class for all binary_sensor-type classes.
void set_range(Range range)
bool read_byte(uint8_t a_register, uint8_t *data)
LazyCallbackManager< void()> orientation_callback_
uint32_t last_event_ms_[EVENT_COUNT]
void set_tap_binary_sensor(binary_sensor::BinarySensor *s)
void publish_orientation_(RegSixdSrc sixd)
bool configure_registers_()
LazyCallbackManager< void()> double_tap_callback_
binary_sensor::BinarySensor * event_binary_sensors_[EVENT_COUNT]
void add_on_freefall_callback(F &&callback)
void set_freefall_binary_sensor(binary_sensor::BinarySensor *s)
void add_on_double_tap_callback(F &&callback)
void set_active_binary_sensor(binary_sensor::BinarySensor *s)
bool write_reg_(RegisterMap reg, uint8_t value)
virtual bool read_bytes(uint8_t a_register, uint8_t *data, size_t len)=0
SUB_SENSOR(acceleration_x) SUB_SENSOR(acceleration_y) SUB_SENSOR(acceleration_z) SUB_TEXT_SENSOR(orientation) template< typename F > void add_on_tap_callback(F &&callback)
void set_double_tap_binary_sensor(binary_sensor::BinarySensor *s)
void set_output_data_rate(DataRate rate)
void set_offset(float offset_x, float offset_y, float offset_z)
void add_on_active_callback(F &&callback)
void handle_event_(Event event, bool active, uint32_t now, LazyCallbackManager< void()> &callback)
LazyCallbackManager< void()> tap_callback_
void add_on_orientation_callback(F &&callback)
void set_power_mode(PowerMode mode)
void set_low_noise(bool low_noise)
virtual bool write_byte(uint8_t a_register, uint8_t data)=0
void dump_config() override
LazyCallbackManager< void()> freefall_callback_
FilterBandwidth filter_bandwidth_
LazyCallbackManager< void()> active_callback_
void set_filter_bandwidth(FilterBandwidth bw)
void set_transform(bool mirror_x, bool mirror_y, bool mirror_z, bool swap_xy)
bool read_acceleration_data_(float &x, float &y, float &z)
struct @66::@67 __attribute__
Wake the main loop task from an ISR. ISR-safe.