From 6a797bc851a70ad5a85b01252970c1377030e4e8 Mon Sep 17 00:00:00 2001 From: john stone Date: Thu, 25 Jul 2013 21:09:13 +0200 Subject: [PATCH] fix --- firmware/apps/geiger.c | 56 ------------------------------------------ 1 file changed, 56 deletions(-) delete mode 100644 firmware/apps/geiger.c diff --git a/firmware/apps/geiger.c b/firmware/apps/geiger.c deleted file mode 100644 index f07836a..0000000 --- a/firmware/apps/geiger.c +++ /dev/null @@ -1,56 +0,0 @@ -#include -#include -#include - -#include "../lib/apps.h" -#include "../lib/bughal.h" -#include "../lib/util.h" -#include "../lib/music.h" -#include "../lib/usart.h" - -/** - * ggrbug mode - * - simulate geiger counter sounds - */ -static void geiger(void) -{ - uint8_t max = 200; - uint8_t min = 10; - - static timer_t mytimer; - static bool blink; - if (mode_uninitialized) { - init_leds(); - music_setNote(NOTE_PAUSE, 0); - mode_uninitialized = false; - timer_set(&mytimer, 10); - blink = false; - }; - if (timer_expired(&mytimer)) { - if (!blink) { - /*lets blink*/ - int i = (rand() % 3); - switch (i) { - case 0: led_on(LED_L); break; - case 1: led_on(LED_R); break; - default: led_on(LED_L | LED_R); break; - }; - if (rand() % 10 > 8) - set_motor(MOTOR_ON); - music_setNote(NOTE_C, 5); - timer_set(&mytimer, 2); - blink = true; - } else { - /*stop blink*/ - led_off(LED_L | LED_R); - set_motor(MOTOR_OFF); - music_setNote(NOTE_PAUSE, 0); - timer_set(&mytimer, (rand() % (max - min)) + min); - blink = false; - } - - }//end if timer_expired - -} - -REGISTER(geiger)