diff --git a/lighthub/candriver.cpp b/lighthub/candriver.cpp index 56dc4c1..f3baea9 100644 --- a/lighthub/candriver.cpp +++ b/lighthub/candriver.cpp @@ -140,10 +140,9 @@ bool canDriver::sendRemoteID(macAddress mac) id.payloadType=payloadType::lookupMAC; id.subjId=200; //CRC16 of remote config - //packet.data[0]=1; debugSerial<<("CAN: Send remote ID")<mac, sysConf.mac,6))) //Ignore responses for another controller + { + debugSerial.println(")"); + return false; + } break; case payloadType::configFrame: debugSerial.print("configFrame #"); debugSerial<< id.subjId; + if (id.status && (id.deviceId != controllerId)) //Ignore responses on config request not for me + { + debugSerial.println(")"); + return false; + } + break; case payloadType::OTAFrame: debugSerial.print("OTAFrame #"); @@ -377,9 +393,20 @@ switch ((id.payloadType)){ break; case payloadType::sysCmd: debugSerial.print("sysCmd"); + if (id.deviceId != controllerId) //Ignore commands not for me + { + debugSerial.println(")"); + return false; + } + break; case payloadType::rawPinCtrl: debugSerial.print("rawPinCtrl"); + if (id.deviceId != controllerId) //Ignore commands not for me + { + debugSerial.println(")"); + return false; + } } debugSerial<< ") "; diff --git a/lighthub/item.cpp b/lighthub/item.cpp index 80cfa66..0b9b714 100644 --- a/lighthub/item.cpp +++ b/lighthub/item.cpp @@ -689,7 +689,7 @@ if (!payload) return 0; int fr = freeRam(); if (fr < minimalMemory) { - errorSerial<