aboutsummaryrefslogtreecommitdiff
path: root/laser-tag software/main.c
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amatus.name>2016-08-03 16:49:40 -0500
committerDavid Barksdale <amatus@amatus.name>2016-08-03 16:49:40 -0500
commit0a416aba5b94444c89eb44ea2e1c2597ff4c7409 (patch)
treee497dd8bdfa260c010dddb994871581351b16a1d /laser-tag software/main.c
parent019adcd4c6b5766a615c9dfd925161054abd1dcb (diff)
This is completely brokenradio
Diffstat (limited to 'laser-tag software/main.c')
-rw-r--r--laser-tag software/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/laser-tag software/main.c b/laser-tag software/main.c
index cccd32f..9d2273e 100644
--- a/laser-tag software/main.c
+++ b/laser-tag software/main.c
@@ -52,6 +52,7 @@
static int current_image = 0;
static volatile int cue_next_image = 0;
static uint32_t laser_pulse_length = 32;
+static bool have_radio = false;
////////////////////////////
@@ -322,6 +323,8 @@ static void lptmr_call_back(void)
foo = (foo + 1) % 3;
}
LPUART_DRV_SendData(1, txBuff, laser_pulse_length);
+ /* pew the radio! */
+ radio_send_test();
}
/* countdown to turn off LED */
@@ -606,6 +609,7 @@ int main (void)
ret = radio_init();
debug_printf("radio_init returned %d\r\n", ret);
if (0 == ret) {
+ have_radio = true;
led(0x22, 0x00, 0x22);
}
@@ -614,6 +618,9 @@ int main (void)
/* We're done, everything else is triggered through interrupts */
for(;;) {
+ if (have_radio) {
+ radio_idle();
+ }
if (cue_next_image) {
int old_image = current_image;
current_image = (current_image + 1) % IMAGE_COUNT;