fix error in downlink handling
This commit is contained in:
parent
4203d2e77e
commit
589b1990ce
@ -156,15 +156,15 @@ void downLinkDataHandle(McpsIndication_t *mcpsIndication)
|
||||
for (uint8_t i = 0; i < NUM_OF_SENSORS; i++) {
|
||||
bool found = false;
|
||||
for (uint8_t j = 0; j < NUM_OF_SENSORS; j++) {
|
||||
if (sensors[i].addr == downlinkSensors[i].addr) {
|
||||
if (sensors[i].addr == downlinkSensors[j].addr) {
|
||||
found = true;
|
||||
sensors[i].index = downlinkSensors[i].index;
|
||||
memcpy(sensors[i].label, downlinkSensors[i].label, LABEL_LENGTH);
|
||||
sensors[i].index = downlinkSensors[j].index;
|
||||
memcpy(sensors[i].label, downlinkSensors[j].label, LABEL_LENGTH);
|
||||
sensors[i].label[LABEL_LENGTH] = 0;
|
||||
}
|
||||
}
|
||||
if (! found) {
|
||||
Serial.printf("Illegal label received for not existing %08x\n\r", downlinkSensors[i].addr);
|
||||
Serial.printf("Illegal label received for not existing %016llx\n\r", downlinkSensors[i].addr);
|
||||
errorCode |= ERR_ILLEGAL_DOWNLINK_MESSAGE_RECEIVED;
|
||||
}
|
||||
}
|
||||
|
@ -60,3 +60,19 @@ typedef struct {
|
||||
28 C7 11 F6 62 20 01 B8
|
||||
00
|
||||
30 2C 35 6D 3A 00
|
||||
|
||||
|
||||
ED89E319826E7A9B61E39983A4CAFAD9E8DA3C798914947D787E0E150C6D22482010D4C018D7B67BF4C01160388551637C5F8C16173634A4
|
||||
|
||||
28 c7 11 f6 62 20 01 b8
|
||||
00
|
||||
30 2c 35 6d 3a
|
||||
28 19 c3 0a 0d 00 00 b4
|
||||
01
|
||||
32 2c 30 6d 3a
|
||||
28 8c 4f 6a 0d 00 00 94
|
||||
02
|
||||
33 2c 30 6d 3a
|
||||
28 35 86 6a 0d 00 00 d4
|
||||
03
|
||||
34 2c 30 6d 3a
|
Loading…
x
Reference in New Issue
Block a user