matthijskooijman / arduino-lmic

:warning: This library is deprecated, see the README for alternatives.
711 stars 653 forks source link

register value definition(MAP_DIO2_LORA_NOP) error? #54

Open Neutree opened 8 years ago

Neutree commented 8 years ago

MAP_DIO2_LORA_NOP value error?

radio.c line 229

 #define MAP_DIO2_LORA_NOP      0xC0  // ----11--

should be

 #define MAP_DIO2_LORA_NOP      0x0C  // ----11--

haven't test on sx1276???

radio.c line 777

// read the PDU and inform the MAC that we received something
            LMIC.dataLen = (readReg(LORARegModemConfig1) & SX1272_MC1_IMPLICIT_HEADER_MODE_ON) ?
                readReg(LORARegPayloadLength) : readReg(LORARegRxNbBytes);

should be

#ifdef CFG_sx1272_radio 
            LMIC.dataLen = (readReg(LORARegModemConfig1) & SX1272_MC1_IMPLICIT_HEADER_MODE_ON) ? 
                readReg(LORARegPayloadLength) : readReg(LORARegRxNbBytes); 
#else 
            LMIC.dataLen = (readReg(LORARegModemConfig1) & SX1276_MC1_IMPLICIT_HEADER_MODE_ON) ? 
                            readReg(LORARegPayloadLength) : readReg(LORARegRxNbBytes); 
#endif 
gmsotavio commented 5 years ago

I realized the same thing today. I agree.