Skip to content

Commit

Permalink
attachPanelInterrupt
Browse files Browse the repository at this point in the history
  • Loading branch information
netmindz committed Oct 27, 2023
1 parent 59353a2 commit 1a8a3c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/BalboaGL/ESPBalboaGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,8 @@ void BalboaGL::setup() {

ESP_LOGI(TAG, "Serial begin rx,tx = %u,%u", this->rx_pin, this->tx_pin);
hw_serial_->begin(115200, SERIAL_8N1, rx_pin, tx_pin);
this->spa = new balboaGL(hw_serial_, rts_pin, panel_select_pin);
this->spa = new balboaGL(hw_serial_, rts_pin, panel_select_pin);
this->spa-attachPanelInterrupt();
// this->current_temperature = NAN;
// this->target_temperature = NAN;

Expand Down Expand Up @@ -319,6 +320,11 @@ void BalboaGL::setup() {
this->dump_config();
}

void BalboaGL::pause() {
ESP_LOGI(TAG, "pause");
this->spa-detachPanelInterrupt();
}

// /**
// * The ESP only has a few bytes of rtc storage, so instead
// * of storing floats directly, we'll store the number of
Expand Down
2 changes: 2 additions & 0 deletions components/BalboaGL/ESPBalboaGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class BalboaGL : public PollingComponent {

float get_setup_priority() const override { return esphome::setup_priority::AFTER_WIFI; }

void pause();

balboaGL* get_spa() {
return spa;
}
Expand Down

0 comments on commit 1a8a3c4

Please sign in to comment.