From 21b1b51a859956079bf7bc17e18625512c9681f5 Mon Sep 17 00:00:00 2001 From: schneider Date: Wed, 21 Dec 2011 19:54:31 +0100 Subject: [PATCH] openbeacon, game: more jitter --- firmware/funk/openbeacon.c | 4 ++-- firmware/l0dable/r_player.c | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/firmware/funk/openbeacon.c b/firmware/funk/openbeacon.c index 3d904e9..170f872 100644 --- a/firmware/funk/openbeacon.c +++ b/firmware/funk/openbeacon.c @@ -82,8 +82,8 @@ static uint8_t openbeaconSendPacket(uint32_t id, uint32_t seq, { uint8_t buf[32]; - volatile uint8_t i; - i = getRandom()&0xff; + volatile uint16_t i; + i = getRandom()&0xfff; while(i--); buf[0]=0x10; // Length: 16 bytes diff --git a/firmware/l0dable/r_player.c b/firmware/l0dable/r_player.c index 44c7d50..72efbd7 100644 --- a/firmware/l0dable/r_player.c +++ b/firmware/l0dable/r_player.c @@ -148,6 +148,11 @@ void playGame(void) } int rnd = getRandom() % jitter; delayms(interval*5+rnd); + + volatile uint16_t i; + i = getRandom()&0xfff; + while(i--); + }; }