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