6static const char *
const TAG =
"as5600.sensor";
9static const uint8_t REGISTER_ZMCO = 0x00;
10static const uint8_t REGISTER_ZPOS = 0x01;
11static const uint8_t REGISTER_MPOS = 0x03;
12static const uint8_t REGISTER_MANG = 0x05;
13static const uint8_t REGISTER_CONF = 0x07;
16static const uint8_t REGISTER_ANGLE_RAW = 0x0C;
17static const uint8_t REGISTER_ANGLE = 0x0E;
20static const uint8_t REGISTER_STATUS = 0x0B;
21static const uint8_t REGISTER_AGC = 0x1A;
22static const uint8_t REGISTER_MAGNITUDE = 0x1B;
25 LOG_SENSOR(
"",
"AS5600 Sensor",
this);
31 LOG_UPDATE_INTERVAL(
this);
41 this->
parent_->read_byte_16(REGISTER_MAGNITUDE, &value);
54 if (!
pos.has_value()) {
60 if (!
raw.has_value()) {
void status_set_warning()
void status_clear_warning()
AS5600Component * parent_
sensor::Sensor * magnitude_sensor_
sensor::Sensor * raw_position_sensor_
OutRangeMode out_of_range_mode_
sensor::Sensor * gain_sensor_
void dump_config() override
sensor::Sensor * status_sensor_
void publish_state(float state)
Publish a new state to the front-end.