diff --git a/firmware/funk/openbeacon.c b/firmware/funk/openbeacon.c index 8aa53f6..3d904e9 100644 --- a/firmware/funk/openbeacon.c +++ b/firmware/funk/openbeacon.c @@ -82,6 +82,10 @@ static uint8_t openbeaconSendPacket(uint32_t id, uint32_t seq, { uint8_t buf[32]; + volatile uint8_t i; + i = getRandom()&0xff; + while(i--); + buf[0]=0x10; // Length: 16 bytes buf[1]=0x17; // Proto - fixed at 0x17? buf[2]=flags; @@ -100,9 +104,9 @@ static uint8_t openbeaconSendPacket(uint32_t id, uint32_t seq, #endif } -uint8_t openbeaconSend(void) +void openbeaconSend(void) { - uint8_t status; + //uint8_t status; nrf_config_get(&oldconfig); @@ -110,14 +114,14 @@ uint8_t openbeaconSend(void) nrf_set_strength(strength); nrf_set_tx_mac(sizeof(mac), mac); - status = openbeaconSendPacket(oid, seq++, 0xFF, strength++); + openbeaconSendPacket(oid, seq++, 0xFF, strength++); if( strength == 4 ) strength = 0; #if SAVE_OPENBEACON if( (seq & OPENBEACON_SAVE) == OPENBEACON_SAVE ) - push_queue(&openbeaconSaveBlock); + openbeaconSaveBlock(); #endif nrf_config_set(&oldconfig); - return status; + //return status; } diff --git a/firmware/funk/openbeacon.h b/firmware/funk/openbeacon.h index 8ff8870..d4d4667 100644 --- a/firmware/funk/openbeacon.h +++ b/firmware/funk/openbeacon.h @@ -9,6 +9,6 @@ #define OPENBEACON_CHANNEL 81 void openbeaconSetup(void); -uint8_t openbeaconSend(void); +void openbeaconSend(void); #endif