mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 09:44:12 +01:00
maybe?
This commit is contained in:
parent
d691a4eb84
commit
b0bf6355c1
2 changed files with 4 additions and 2 deletions
|
@ -5,6 +5,7 @@ namespace lora {
|
|||
void Lora::update() {
|
||||
can_send_message_();
|
||||
get_mode_();
|
||||
check_for_message_();
|
||||
if (!this->update_needed_)
|
||||
return;
|
||||
if (this->rssi_sensor_ != nullptr)
|
||||
|
@ -145,7 +146,7 @@ void Lora::send_pin_info_(uint8_t pin, bool value) {
|
|||
this->setup_wait_response_(5000);
|
||||
ESP_LOGD(TAG, "Successfully put in queue");
|
||||
}
|
||||
void Lora::loop() {
|
||||
void Lora::check_for_message_() {
|
||||
std::string buffer;
|
||||
std::vector<uint8_t> data;
|
||||
bool pin_data_found = false;
|
||||
|
|
|
@ -31,7 +31,7 @@ class Lora : public PollingComponent, public uart::UARTDevice {
|
|||
void setup() override;
|
||||
float get_setup_priority() const override { return setup_priority::HARDWARE; }
|
||||
void update() override;
|
||||
void loop() override;
|
||||
|
||||
void dump_config() override;
|
||||
/// Helper function to write the value of a pin.
|
||||
void digital_write(uint8_t pin, bool value);
|
||||
|
@ -45,6 +45,7 @@ class Lora : public PollingComponent, public uart::UARTDevice {
|
|||
ModeType mode_ = MODE_INIT;
|
||||
// set WOR mode
|
||||
void set_mode_(ModeType mode);
|
||||
void check_for_message_();
|
||||
ModeType get_mode_();
|
||||
// checks the aux port to see if it is done setting
|
||||
void setup_wait_response_(uint32_t timeout = 1000);
|
||||
|
|
Loading…
Reference in a new issue