From 9ce32790db4d75e5f8d6997b4d5b3f613c541af1 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Sun, 29 Sep 2019 16:06:18 +0200 Subject: [PATCH] Fix 6508 --- sonoff/xdrv_05_irremote_full.ino | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sonoff/xdrv_05_irremote_full.ino b/sonoff/xdrv_05_irremote_full.ino index 6c2fe9452..2bfa7a6c4 100644 --- a/sonoff/xdrv_05_irremote_full.ino +++ b/sonoff/xdrv_05_irremote_full.ino @@ -169,15 +169,15 @@ String sendIRJsonState(const struct decode_results &results) { char hvalue[64]; if (UNKNOWN != results.decode_type) { Uint64toHex(results.value, hvalue, results.bits); // Get 64bit value as hex 0x00123456 - json += "\""; + json += "\"0x"; json += hvalue; - json += "\",\"" D_JSON_IR_DATALSB "\":\""; + json += "\",\"" D_JSON_IR_DATALSB "\":\"0x"; Uint64toHex(reverseBitsInBytes64(results.value), hvalue, results.bits); // Get 64bit value as hex 0x00123456, LSB json += hvalue; json += "\""; } else { // UNKNOWN Uint64toHex(results.value, hvalue, 32); // Unknown is always 32 bits - json += "\""; + json += "\"0x"; json += hvalue; json += "\""; } @@ -210,7 +210,7 @@ void IrReceiveCheck(void) // if ((now - ir_lasttime > IR_TIME_AVOID_DUPLICATE) && (UNKNOWN != results.decode_type) && (results.bits > 0)) { if (!irsend_active && (now - ir_lasttime > IR_TIME_AVOID_DUPLICATE)) { ir_lasttime = now; - ResponseTime_P(PSTR(",\"" D_JSON_IRRECEIVED "\":%s"), sendIRJsonState(results).c_str()); + Response_P(PSTR("{\"" D_JSON_IRRECEIVED "\":%s"), sendIRJsonState(results).c_str()); if (Settings.flag3.receive_raw) { ResponseAppend_P(PSTR(",\"" D_JSON_IR_RAWDATA "\":[")); @@ -438,7 +438,7 @@ uint32_t IrRemoteCmndIrSendJson(void) char dvalue[32]; char hvalue[32]; - AddLog_P2(LOG_LEVEL_DEBUG, PSTR("IRS: protocol %d, bits %d, data %s (%s), repeat %d"), + AddLog_P2(LOG_LEVEL_DEBUG, PSTR("IRS: protocol %d, bits %d, data 0x%s (%s), repeat %d"), protocol, bits, ulltoa(data, dvalue, 10), Uint64toHex(data, hvalue, bits), repeat); irsend_active = true; // deactivate receive