7static const char *
const TAG =
"as5600.sensor";
10static const uint8_t REGISTER_ZMCO = 0x00;
11static const uint8_t REGISTER_ZPOS = 0x01;
12static const uint8_t REGISTER_MPOS = 0x03;
13static const uint8_t REGISTER_MANG = 0x05;
14static const uint8_t REGISTER_CONF = 0x07;
17static const uint8_t REGISTER_ANGLE_RAW = 0x0C;
18static const uint8_t REGISTER_ANGLE = 0x0E;
21static const uint8_t REGISTER_STATUS = 0x0B;
22static const uint8_t REGISTER_AGC = 0x1A;
23static const uint8_t REGISTER_MAGNITUDE = 0x1B;
28 LOG_SENSOR(
"",
"AS5600 Sensor",
this);
51 LOG_UPDATE_INTERVAL(
this);
61 this->
parent_->read_byte_16(REGISTER_MAGNITUDE, &value);
73 auto pos = this->
parent_->read_position();
74 if (!pos.has_value()) {
80 if (!
raw.has_value()) {
void status_set_warning(const char *message="unspecified")
void status_clear_warning()
AS5600Component * parent_
sensor::Sensor * magnitude_sensor_
sensor::Sensor * raw_position_sensor_
sensor::Sensor * raw_angle_sensor_
sensor::Sensor * position_sensor_
OutRangeMode out_of_range_mode_
sensor::Sensor * angle_sensor_
sensor::Sensor * gain_sensor_
float get_setup_priority() const override
void dump_config() override
sensor::Sensor * status_sensor_
void publish_state(float state)
Publish a new state to the front-end.
const float DATA
For components that import data from directly connected sensors like DHT.
Providing packet encoding functions for exchanging data with a remote host.