]> git.zerfleddert.de Git - fnordlicht-mini/commitdiff
whitespace cleanup, init eeprom for random startup, too
authorgitknilch <gitknilch@cwde.de>
Thu, 24 Mar 2011 22:24:32 +0000 (23:24 +0100)
committergitknilch <gitknilch@cwde.de>
Thu, 24 Mar 2011 22:24:32 +0000 (23:24 +0100)
firmware/fnordlicht-firmware/fnordlicht.c
firmware/fnordlicht-firmware/static_programs.c
firmware/fnordlicht-firmware/storage.c

index 76851e493fb3fd0a9cec1b0b026ac9a87aa6c20f..f98c4904edc6d495d08f8048234df8e7f557bca3 100644 (file)
@@ -42,8 +42,8 @@ static void startup(void)
 {
     /* if configuration is valid */
     if (storage_valid_config()) {
-       /* set global address to stored value */
-       global_remote.address = startup_config.startup_addr;
+        /* set global address to stored value */
+        global_remote.address = startup_config.startup_addr;
     }
 
 #if CONFIG_SCRIPT
index 5dc7c2d9136403faa5fb1270ac3f5844da5aa2f4..19edb2f8262a1e06a58a925985af1b293f2334c7 100644 (file)
@@ -64,7 +64,7 @@ PT_THREAD(program_showcfg(struct process_t *process))
         /* sleep 1s (remember: we are called every 100ms) */
         sleep = 10;
         while (sleep--)
-           PT_YIELD(&process->pt);
+            PT_YIELD(&process->pt);
 
         global_pwm.target.rgb = c;
 
index 0ad522d9594ee6d969642896757828e12646721a..7012dac4fde8cf22fa4fb3be471363e1d882dca7 100644 (file)
@@ -43,10 +43,16 @@ EEMEM struct storage_t eeprom_storage =
       STARTUP_PROGRAM,
       {
         /* uint8_t program */
-        CONFIG_SCRIPT_DEFAULT, /* FIXME expected to be 0 atm */
+        CONFIG_SCRIPT_DEFAULT,
         /* uint8_t program_parameters[PROGRAM_PARAMETER_SIZE] */
-        /* FIXME: hardcoded parameters for colorwheel */
+        /* these are taken from script.c */
+#if CONFIG_SCRIPT_DEFAULT == 0
+        /* parameters for colorwheel */
         1u, 2u, 0, 0, 0, 0, 60u, 0, 255u, 255u
+#elif CONFIG_SCRIPT_DEFAULT == 1
+        /* parameters for random */
+        0, 23u, 2u, 1u, 3u, 0, 100u, 255u, 255u, 60u
+#endif
       }
     }
   },
Impressum, Datenschutz