From 4ed2098c2ee2b10f0019eeb8ef84243fb65860f4 Mon Sep 17 00:00:00 2001 From: MayLaOwn Date: Wed, 25 Dec 2024 22:30:53 +0100 Subject: [PATCH 1/3] fix ir_read.cpp ir reader fix, now raw is forced and sending works without problems. --- src/modules/ir/ir_read.cpp | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/src/modules/ir/ir_read.cpp b/src/modules/ir/ir_read.cpp index 53cd7fe8..93f451e9 100644 --- a/src/modules/ir/ir_read.cpp +++ b/src/modules/ir/ir_read.cpp @@ -129,26 +129,18 @@ void IrRead::read_signal() { _read_signal = true; - // switch to raw mode if decoding failed - if(results.decode_type == decode_type_t::UNKNOWN ) { - Serial.println("signal decoding failed, switching to RAW mode"); - //displayWarning("signal decoding failed, switching to RAW mode", true); - raw = true; - // TODO: show a dialog - // raw = yesNoDialog("decoding failed, save as RAW?"); - } + // Passaggio ai dati RAW sempre, indipendentemente dal risultato della decodifica + raw = true; display_banner(); - // dump signal details - if(raw) { - padprint("HEX: RAW data"); - } else { - padprint("HEX: 0x"); - tft.println(results.value, HEX); - } - display_btn_options(); + // Dump dei dettagli del segnale + padprint("RAW Data Captured:"); + String raw_signal = parse_raw_signal(); + tft.println(raw_signal); // Mostra il segnale RAW sul display + Serial.println(raw_signal); // Stampa il segnale RAW nella console seriale + display_btn_options(); delay(500); } @@ -186,7 +178,7 @@ String IrRead::parse_state_signal() { } String IrRead::parse_raw_signal() { - // https://github.com/crankyoldgit/IRremoteESP8266/blob/master/examples/SmartIRRepeater/SmartIRRepeater.ino + // Cattura i dati RAW come array e li restituisce come stringa rawcode = resultToRawArray(&results); raw_data_len = getCorrectedRawLength(&results); From b6d8d8576eda12051c247d4aa603c28e38711c5b Mon Sep 17 00:00:00 2001 From: MayLaOwn Date: Wed, 25 Dec 2024 23:56:20 +0100 Subject: [PATCH 2/3] Updated comment language ir-read.cpp --- src/modules/ir/ir_read.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/ir/ir_read.cpp b/src/modules/ir/ir_read.cpp index 93f451e9..ee52b5fc 100644 --- a/src/modules/ir/ir_read.cpp +++ b/src/modules/ir/ir_read.cpp @@ -129,16 +129,16 @@ void IrRead::read_signal() { _read_signal = true; - // Passaggio ai dati RAW sempre, indipendentemente dal risultato della decodifica + // Always switches to RAW data, regardless of the decoding result raw = true; display_banner(); - // Dump dei dettagli del segnale + // Dump of signal details padprint("RAW Data Captured:"); String raw_signal = parse_raw_signal(); - tft.println(raw_signal); // Mostra il segnale RAW sul display - Serial.println(raw_signal); // Stampa il segnale RAW nella console seriale + tft.println(raw_signal); // Shows the RAW signal on the display + Serial.println(raw_signal); // Print RAW signal to serial monitor display_btn_options(); delay(500); From 26192f91bed6fa581d4326fd2ad14edee2212da1 Mon Sep 17 00:00:00 2001 From: MayLaOwn Date: Thu, 26 Dec 2024 00:10:52 +0100 Subject: [PATCH 3/3] Update comm. lang. ir_read.cpp --- src/modules/ir/ir_read.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ir/ir_read.cpp b/src/modules/ir/ir_read.cpp index ee52b5fc..27abb806 100644 --- a/src/modules/ir/ir_read.cpp +++ b/src/modules/ir/ir_read.cpp @@ -178,7 +178,7 @@ String IrRead::parse_state_signal() { } String IrRead::parse_raw_signal() { - // Cattura i dati RAW come array e li restituisce come stringa + rawcode = resultToRawArray(&results); raw_data_len = getCorrectedRawLength(&results);