Open
Description
Version/revision of the library used
2.8.6
Describe the bug
When calling irrecv.decode(&results, NULL, 10, 0) then a variable that a has no relation with it is changed
To Reproduce
Serial.printf("--> Debug ip: %d %d %d %d \n", ServerIP[0],ServerIP[1],ServerIP[2],ServerIP[3]);
if (!irrecv.decode(&results, NULL, 10, 0)) return;
Serial.printf("--> Debug ip: %d %d %d %d \n", ServerIP[0],ServerIP[1],ServerIP[2],ServerIP[3]);
What steps did you do, and what did or didn't actually happen? How can we reproduce the issue?
global variables:
IPAddress NullIP;
byte ServerIP[] = {0, 0, 0, 0};
IPAddress BroadCastIP(255,255,255,255);
IPAddress LocalIp = NullIP;
byte MAC[6];
unsigned int localUdpPort = PORTNUMBER;
unsigned int ServerPort = PORTNUMBER;
bool ACKPending;
bool IsVest = false;
decode_results results;
IRrecv irrecv(PIN_IR_IN);
IRsend irsend(PIN_IR_OUT);
in setup
irrecv.enableIRIn(); // Start the ir receiver
irsend.begin();
in loop
ManageIRSensor();
then definition ofManageIRSensor();
//manage Ir reciever
void ManageIRSensor()
{
//decode_results results;
Serial.printf("--> Debug ip before: %d %d %d %d \n", ServerIP[0],ServerIP[1],ServerIP[2],ServerIP[3]);
if (!irrecv.decode(&results, NULL, 10, 0)) return;
Serial.printf("--> Debug ip after: %d %d %d %d \n", ServerIP[0],ServerIP[1],ServerIP[2],ServerIP[3]);
.......
}
result
23:05:18.075 -> --> Debug ip before: 192 168 1 155
23:05:18.075 -> --> Debug ip after: 24 0 1 155
Has this library/code previously worked as expected for you?
i didn't used this variable before so no idea.