mirror of
https://github.com/arendst/Tasmota.git
synced 2025-08-02 07:27:42 +00:00
commit
728d162be8
@ -169,15 +169,15 @@ String sendIRJsonState(const struct decode_results &results) {
|
|||||||
char hvalue[64];
|
char hvalue[64];
|
||||||
if (UNKNOWN != results.decode_type) {
|
if (UNKNOWN != results.decode_type) {
|
||||||
Uint64toHex(results.value, hvalue, results.bits); // Get 64bit value as hex 0x00123456
|
Uint64toHex(results.value, hvalue, results.bits); // Get 64bit value as hex 0x00123456
|
||||||
json += "\"";
|
json += "\"0x";
|
||||||
json += hvalue;
|
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
|
Uint64toHex(reverseBitsInBytes64(results.value), hvalue, results.bits); // Get 64bit value as hex 0x00123456, LSB
|
||||||
json += hvalue;
|
json += hvalue;
|
||||||
json += "\"";
|
json += "\"";
|
||||||
} else { // UNKNOWN
|
} else { // UNKNOWN
|
||||||
Uint64toHex(results.value, hvalue, 32); // Unknown is always 32 bits
|
Uint64toHex(results.value, hvalue, 32); // Unknown is always 32 bits
|
||||||
json += "\"";
|
json += "\"0x";
|
||||||
json += hvalue;
|
json += hvalue;
|
||||||
json += "\"";
|
json += "\"";
|
||||||
}
|
}
|
||||||
@ -210,7 +210,7 @@ void IrReceiveCheck(void)
|
|||||||
// if ((now - ir_lasttime > IR_TIME_AVOID_DUPLICATE) && (UNKNOWN != results.decode_type) && (results.bits > 0)) {
|
// 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)) {
|
if (!irsend_active && (now - ir_lasttime > IR_TIME_AVOID_DUPLICATE)) {
|
||||||
ir_lasttime = now;
|
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) {
|
if (Settings.flag3.receive_raw) {
|
||||||
ResponseAppend_P(PSTR(",\"" D_JSON_IR_RAWDATA "\":["));
|
ResponseAppend_P(PSTR(",\"" D_JSON_IR_RAWDATA "\":["));
|
||||||
@ -438,7 +438,7 @@ uint32_t IrRemoteCmndIrSendJson(void)
|
|||||||
|
|
||||||
char dvalue[32];
|
char dvalue[32];
|
||||||
char hvalue[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);
|
protocol, bits, ulltoa(data, dvalue, 10), Uint64toHex(data, hvalue, bits), repeat);
|
||||||
|
|
||||||
irsend_active = true; // deactivate receive
|
irsend_active = true; // deactivate receive
|
||||||
|
Loading…
x
Reference in New Issue
Block a user