Update lora.cpp

This commit is contained in:
Daniël Koek 2024-03-24 16:44:21 +00:00
parent bba562550e
commit 0744e7195b

View file

@ -126,8 +126,8 @@ void Lora::dump_config() {
}; };
void Lora::digital_write(uint8_t pin, bool value) { void Lora::digital_write(uint8_t pin, bool value) {
ESP_LOGD(TAG, "Starting to write message"); ESP_LOGD(TAG, "Starting to write message");
// std::string message = str_snprintf("%02x%02x", 9, pin, value); std::string message = str_snprintf("%02x%02x", 9, pin, value);
this->sendMessage("bla"); this->sendMessage(message);
} }
bool Lora::sendMessage(std::string message) { bool Lora::sendMessage(std::string message) {
uint8_t size = message.length(); uint8_t size = message.length();
@ -138,10 +138,9 @@ bool Lora::sendMessage(std::string message) {
return false; return false;
} }
ESP_LOGD(TAG, "Sending: %s", message); ESP_LOGD(TAG, "Sending: %s", message);
// this->write_array((uint8_t *) &messageFixed, size); this->write_array((uint8_t *) &messageFixed, size);
// bool result = this->waitCompleteResponse(5000, 5000); bool result = this->waitCompleteResponse(5000, 5000);
// return result; return result;
return true;
} }
void Lora::loop() { void Lora::loop() {
if (!available()) { if (!available()) {