From a682b0e6043a6e706794efd3fe555839475e6dcf Mon Sep 17 00:00:00 2001 From: pascallanger Date: Wed, 22 Nov 2023 08:26:03 +0100 Subject: [PATCH] Update Losi_cyrf6936.ino --- Multiprotocol/Losi_cyrf6936.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Multiprotocol/Losi_cyrf6936.ino b/Multiprotocol/Losi_cyrf6936.ino index 7a13566..a7414fa 100644 --- a/Multiprotocol/Losi_cyrf6936.ino +++ b/Multiprotocol/Losi_cyrf6936.ino @@ -34,12 +34,12 @@ const uint8_t LOSI_data_code[][16] = { static uint16_t __attribute__((unused)) LOSI_check(uint16_t val) { - uint8_t tab[] = { 0xF1, 0xDA, 0xB6, 0xC8 }; + const uint8_t PROGMEM tab[] = { 0xF1, 0xDA, 0xB6, 0xC8 }; uint8_t res = 0x0B, tmp; uint16_t calc = val>>2; // don't care about the 2 first bits for(uint8_t i=0; i<5; i++) { - tmp=tab[i&0x03]; + tmp=pgm_read_byte_near(&tab[i&0x03]); if(calc&0x0001) res ^= tmp>>4; calc >>= 1;