modified DEVEUI Generator & added Lmic PR #197

This commit is contained in:
Klaus K Wilting 2018-09-27 22:04:51 +02:00
parent 8125662753
commit a3f35a6eca
2 changed files with 2 additions and 4 deletions

View File

@ -907,7 +907,7 @@ static ostime_t nextJoinState (void) {
} else {
LMIC.txChnl = os_getRndU1() & 0x3F;
s1_t dr = DR_SF7 - ++LMIC.txCnt;
if( dr < DR_SF10 ) {
if( LMIC.txCnt > DR_SF7 ) {
dr = DR_SF10;
failed = 1; // All DR exhausted - signal failed
}

View File

@ -45,8 +45,8 @@ void gen_lora_deveui(uint8_t *pdeveui) {
*p++ = dmac[5];
*p++ = dmac[4];
*p++ = dmac[3];
*p++ = 0xff;
*p++ = 0xfe;
*p++ = 0xff;
*p++ = dmac[2];
*p++ = dmac[1];
*p++ = dmac[0];
@ -247,9 +247,7 @@ void lorawan_loop(void *pvParameters) {
configASSERT(((uint32_t)pvParameters) == 1); // FreeRTOS check
while (1) {
//vTaskSuspendAll();
os_runloop_once(); // execute LMIC jobs
//xTaskResumeAll();
vTaskDelay(2 / portTICK_PERIOD_MS); // yield to CPU
}
}