mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 09:44:12 +01:00
Trial this
This commit is contained in:
parent
756515c15b
commit
bba562550e
1 changed files with 5 additions and 4 deletions
|
@ -127,7 +127,7 @@ void Lora::dump_config() {
|
|||
void Lora::digital_write(uint8_t pin, bool value) {
|
||||
ESP_LOGD(TAG, "Starting to write message");
|
||||
// std::string message = str_snprintf("%02x%02x", 9, pin, value);
|
||||
sendMessage("bla");
|
||||
this->sendMessage("bla");
|
||||
}
|
||||
bool Lora::sendMessage(std::string message) {
|
||||
uint8_t size = message.length();
|
||||
|
@ -138,9 +138,10 @@ bool Lora::sendMessage(std::string message) {
|
|||
return false;
|
||||
}
|
||||
ESP_LOGD(TAG, "Sending: %s", message);
|
||||
this->write_array((uint8_t *) &messageFixed, size);
|
||||
bool result = this->waitCompleteResponse(5000, 5000);
|
||||
return result;
|
||||
// this->write_array((uint8_t *) &messageFixed, size);
|
||||
// bool result = this->waitCompleteResponse(5000, 5000);
|
||||
// return result;
|
||||
return true;
|
||||
}
|
||||
void Lora::loop() {
|
||||
if (!available()) {
|
||||
|
|
Loading…
Reference in a new issue