Correct datastring implementation going to the esp to reset if publishing value and protocol only
This commit is contained in:
1 parent
4b0d3943ce
commit
60bc75f0b6
1 file changed
+9
-5
+9
-5
@@ -276,20 +276,24 @@ void IRtoMQTT(){
|
|||||||
unsigned long data = IRdata["value"];
|
unsigned long data = IRdata["value"];
|
||||||
const char * raw = IRdata["raw"];
|
const char * raw = IRdata["raw"];
|
||||||
const char * datastring = IRdata["datastring"];
|
const char * datastring = IRdata["datastring"];
|
||||||
if (data != 0||raw||datastring) {
|
if (data != 0 || raw || datastring) {
|
||||||
trc(F("MQTTtoIR data || raw ok"));
|
trc(F("MQTTtoIR value || raw || datasring ok"));
|
||||||
bool signalSent = false;
|
bool signalSent = false;
|
||||||
trc(F("value"));
|
trc(F("value"));
|
||||||
trc(data);
|
trc(data);
|
||||||
trc(F("raw"));
|
if(datastring){
|
||||||
trc(raw);
|
|
||||||
trc(F("datastring"));
|
trc(F("datastring"));
|
||||||
trc(datastring);
|
trc(datastring);
|
||||||
|
}else{
|
||||||
|
datastring ="";
|
||||||
|
}
|
||||||
const char * protocol_name = IRdata["protocol_name"];
|
const char * protocol_name = IRdata["protocol_name"];
|
||||||
unsigned int valueBITS = IRdata["bits"];
|
unsigned int valueBITS = IRdata["bits"]|0;
|
||||||
uint16_t valueRPT = IRdata["repeat"]|repeatIRwNumber;
|
uint16_t valueRPT = IRdata["repeat"]|repeatIRwNumber;
|
||||||
|
|
||||||
if(raw){
|
if(raw){
|
||||||
|
trc(F("raw"));
|
||||||
|
trc(raw);
|
||||||
unsigned int s = strlen(raw);
|
unsigned int s = strlen(raw);
|
||||||
//number of "," value count
|
//number of "," value count
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|||||||
Reference in new issue
Block a user