From 4af4cfdf380a11068ad785b711b8cc0a6dedd57a Mon Sep 17 00:00:00 2001 From: schneider Date: Fri, 23 Dec 2011 21:08:45 +0100 Subject: [PATCH] game: added fallback to channel 81 --- firmware/l0dable/r_player.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/firmware/l0dable/r_player.c b/firmware/l0dable/r_player.c index 60fb018..51cf0d3 100644 --- a/firmware/l0dable/r_player.c +++ b/firmware/l0dable/r_player.c @@ -252,6 +252,23 @@ uint8_t selectGame() processPacket(&p); } } + if( gamecount == 0){ + config.channel = 81; + nrf_config_set(&config); + lcdClear(); + lcdPrintln("Searching for"); + lcdPrintln("games on"); + lcdPrintln("channel 81"); + lcdRefresh(); + for(i=0;i<60;i++){ + len= nrf_rcv_pkt_time(30, sizeof(p), (uint8_t*)&p); + if (len==sizeof(p)){ + if( a ) a = 0; else a = 1; + gpioSetValue (RB_LED2, a); + processPacket(&p); + } + } + } selected = 0; while(1){ showGames(selected);