mirror of
https://github.com/esphome/esphome.git
synced 2025-07-29 06:36:45 +00:00
[at581x] Fix issue with methods not being public (#8852)
This commit is contained in:
parent
0932e83b15
commit
6ae83dfe3d
@ -14,11 +14,8 @@ namespace esphome {
|
|||||||
namespace at581x {
|
namespace at581x {
|
||||||
|
|
||||||
class AT581XComponent : public Component, public i2c::I2CDevice {
|
class AT581XComponent : public Component, public i2c::I2CDevice {
|
||||||
#ifdef USE_SWITCH
|
|
||||||
protected:
|
|
||||||
switch_::Switch *rf_power_switch_{nullptr};
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
#ifdef USE_SWITCH
|
||||||
void set_rf_power_switch(switch_::Switch *s) {
|
void set_rf_power_switch(switch_::Switch *s) {
|
||||||
this->rf_power_switch_ = s;
|
this->rf_power_switch_ = s;
|
||||||
s->turn_on();
|
s->turn_on();
|
||||||
@ -48,6 +45,9 @@ class AT581XComponent : public Component, public i2c::I2CDevice {
|
|||||||
bool i2c_read_reg(uint8_t addr, uint8_t &data);
|
bool i2c_read_reg(uint8_t addr, uint8_t &data);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
#ifdef USE_SWITCH
|
||||||
|
switch_::Switch *rf_power_switch_{nullptr};
|
||||||
|
#endif
|
||||||
int freq_;
|
int freq_;
|
||||||
int self_check_time_ms_; /*!< Power-on self-test time, range: 0 ~ 65536 ms */
|
int self_check_time_ms_; /*!< Power-on self-test time, range: 0 ~ 65536 ms */
|
||||||
int protect_time_ms_; /*!< Protection time, recommended 1000 ms */
|
int protect_time_ms_; /*!< Protection time, recommended 1000 ms */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user