Skip to content

Commit

Permalink
extra pin config
Browse files Browse the repository at this point in the history
  • Loading branch information
netmindz committed Oct 7, 2023
1 parent 81edcb3 commit c7b1631
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
15 changes: 12 additions & 3 deletions components/BalboaGL/ESPBalboaGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,17 +447,26 @@ void BalboaGL::setup() {
// return ESPMHP_MIN_TEMPERATURE + (steps * ESPMHP_TEMPERATURE_STEP);
// }

// void BalboaGL::dump_config() {
// this->banner();
void BalboaGL::dump_config() {
// this->banner();
ESP_LOGI(TAG, " rx,tx = %u,%u", this->rx_pin, this->tx_pin);
// ESP_LOGI(TAG, " Supports HEAT: %s", YESNO(true));
// ESP_LOGI(TAG, " Supports COOL: %s", YESNO(true));
// ESP_LOGI(TAG, " Supports AWAY mode: %s", YESNO(false));
// ESP_LOGI(TAG, " Saved heat: %.1f", heat_setpoint.value_or(-1));
// ESP_LOGI(TAG, " Saved cool: %.1f", cool_setpoint.value_or(-1));
// ESP_LOGI(TAG, " Saved auto: %.1f", auto_setpoint.value_or(-1));
// }
}

// void BalboaGL::dump_state() {
// LOG_CLIMATE("", "BalboaGL Climate", this);
// ESP_LOGI(TAG, "HELLO");
// }

void void BalboaGL::set_rx_pin(int pin) {
this->rx_pin = pin;
}

void void BalboaGL::set_tx_pin(int pin) {
this->tx_pin = pin;
}
18 changes: 12 additions & 6 deletions components/BalboaGL/ESPBalboaGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,25 @@ class BalboaGL : public PollingComponent, public climate::Climate {
HardwareSerial* hw_serial
);

// // print the current configuration
// void dump_config() override;
// print the current configuration
void dump_config() override;

// // handle a change in settings as detected by the HeatPump library.
// void hpSettingsChanged();

// // Handle a change in status as detected by the HeatPump library.
// void hpStatusChanged(heatpumpStatus currentStatus);

// // Set up the component, initializing the balboaGL object.
// Set up the component, initializing the balboaGL object.
void setup() override;

// // This is called every poll_interval.
// This is called every poll_interval.
void update() override;

// // Configure the climate object with traits that we support.
// Configure the climate object with traits that we support.
climate::ClimateTraits traits() override;

// // Get a mutable reference to the traits that we support.
// Get a mutable reference to the traits that we support.
climate::ClimateTraits& config_traits();

// Debugging function to print the object's state.
Expand All @@ -73,6 +73,9 @@ class BalboaGL : public PollingComponent, public climate::Climate {
// // set_remote_temp(0) to switch back to the internal sensor.
// void set_remote_temperature(float);

void set_rx_pin(int pin);

void set_tx_pin(int pin);

protected:
// The ClimateTraits supported by this HeatPump.
Expand All @@ -87,6 +90,9 @@ class BalboaGL : public PollingComponent, public climate::Climate {
//ESP8266 or UART0 on ESP32
void check_logger_conflict_();

int rx_pin;
int tx_pin;

private:
// Retrieve the HardwareSerial pointer from friend and subclasses.
HardwareSerial *hw_serial_;
Expand Down

0 comments on commit c7b1631

Please sign in to comment.