mirror of
https://github.com/esphome/esphome.git
synced 2024-11-30 18:54:14 +01:00
missing ifdef
This commit is contained in:
parent
c3d1d777d6
commit
81fad20ac3
2 changed files with 5 additions and 2 deletions
|
@ -379,6 +379,7 @@ void EbyteLoraComponent::dump_config() {
|
|||
LOG_PIN("M0 Pin:", this->pin_m0_);
|
||||
LOG_PIN("M1 Pin:", this->pin_m1_);
|
||||
};
|
||||
#ifdef USE_SWITCH
|
||||
void EbyteLoraComponent::digital_write(uint8_t pin, bool value) { this->send_switch_push_(pin, value); }
|
||||
void EbyteLoraComponent::send_switch_push_(uint8_t pin, bool value) {
|
||||
if (!this->can_send_message_()) {
|
||||
|
@ -395,6 +396,7 @@ void EbyteLoraComponent::send_switch_push_(uint8_t pin, bool value) {
|
|||
this->setup_wait_response_(5000);
|
||||
ESP_LOGD(TAG, "Successfully put in queue");
|
||||
}
|
||||
#endif
|
||||
void EbyteLoraComponent::loop() {
|
||||
std::string buffer;
|
||||
std::vector<uint8_t> data;
|
||||
|
|
|
@ -30,12 +30,13 @@ class EbyteLoraComponent : public PollingComponent, public uart::UARTDevice {
|
|||
float get_setup_priority() const override { return setup_priority::HARDWARE; }
|
||||
void loop() override;
|
||||
void dump_config() override;
|
||||
/// Helper function to write the value of a pin.
|
||||
void digital_write(uint8_t pin, bool value);
|
||||
|
||||
void set_rssi_sensor(sensor::Sensor *rssi_sensor) { rssi_sensor_ = rssi_sensor; }
|
||||
void set_pin_aux(InternalGPIOPin *pin_aux) { pin_aux_ = pin_aux; }
|
||||
#ifdef USE_SWITCH
|
||||
void set_switch(EbyteLoraSwitch *obj) { this->sensors_.push_back(obj); }
|
||||
/// Helper function to write the value of a pin.
|
||||
void digital_write(uint8_t pin, bool value);
|
||||
#endif
|
||||
void set_pin_m0(InternalGPIOPin *pin_m0) { pin_m0_ = pin_m0; }
|
||||
void set_pin_m1(InternalGPIOPin *pin_m1) { pin_m1_ = pin_m1; }
|
||||
|
|
Loading…
Reference in a new issue