diff --git a/apps/iap/iap-lingo4.c b/apps/iap/iap-lingo4.c index fa01966..017351b 100644 --- a/apps/iap/iap-lingo4.c +++ b/apps/iap/iap-lingo4.c @@ -1873,15 +1873,28 @@ void iap_handlepkt_mode4(const unsigned int len, const unsigned char *buf) * 3 0x04 Lingo ID: Extended Interface lingo * 4 0x00 Command ID (bits 15:8) * 5 0x26 Command ID (bits 7:0) + * + * 2 byte version: * 6 0xNN The state of play status change notifications. * Possible values are: * 0x00 = Disable all change notification * 0x01 = Enable all change notification * 0x02 - 0xFF = Reserved * 7 0xNN Telegram payload checksum byte + * + * 4 byte version (len == 7): + * 6-9 0xNN bitmask */ { - device.do_notify = buf[3] ? true : false; + if (len == 7) + { + // simplistic check whether or not to notify at all + device.do_notify = (buf[3] | buf[4] | buf[5] | buf[6]) ? true : false; + } + else + { + device.do_notify = buf[3] ? true : false; + } /* respond with cmd ok packet */ cmd_ok(cmd); break;