modified DEVEUI Generator & added Lmic PR #197
This commit is contained in:
parent
8125662753
commit
a3f35a6eca
@ -907,7 +907,7 @@ static ostime_t nextJoinState (void) {
|
|||||||
} else {
|
} else {
|
||||||
LMIC.txChnl = os_getRndU1() & 0x3F;
|
LMIC.txChnl = os_getRndU1() & 0x3F;
|
||||||
s1_t dr = DR_SF7 - ++LMIC.txCnt;
|
s1_t dr = DR_SF7 - ++LMIC.txCnt;
|
||||||
if( dr < DR_SF10 ) {
|
if( LMIC.txCnt > DR_SF7 ) {
|
||||||
dr = DR_SF10;
|
dr = DR_SF10;
|
||||||
failed = 1; // All DR exhausted - signal failed
|
failed = 1; // All DR exhausted - signal failed
|
||||||
}
|
}
|
||||||
|
@ -45,8 +45,8 @@ void gen_lora_deveui(uint8_t *pdeveui) {
|
|||||||
*p++ = dmac[5];
|
*p++ = dmac[5];
|
||||||
*p++ = dmac[4];
|
*p++ = dmac[4];
|
||||||
*p++ = dmac[3];
|
*p++ = dmac[3];
|
||||||
*p++ = 0xff;
|
|
||||||
*p++ = 0xfe;
|
*p++ = 0xfe;
|
||||||
|
*p++ = 0xff;
|
||||||
*p++ = dmac[2];
|
*p++ = dmac[2];
|
||||||
*p++ = dmac[1];
|
*p++ = dmac[1];
|
||||||
*p++ = dmac[0];
|
*p++ = dmac[0];
|
||||||
@ -247,9 +247,7 @@ void lorawan_loop(void *pvParameters) {
|
|||||||
configASSERT(((uint32_t)pvParameters) == 1); // FreeRTOS check
|
configASSERT(((uint32_t)pvParameters) == 1); // FreeRTOS check
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
//vTaskSuspendAll();
|
|
||||||
os_runloop_once(); // execute LMIC jobs
|
os_runloop_once(); // execute LMIC jobs
|
||||||
//xTaskResumeAll();
|
|
||||||
vTaskDelay(2 / portTICK_PERIOD_MS); // yield to CPU
|
vTaskDelay(2 / portTICK_PERIOD_MS); // yield to CPU
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user