From: gitknilch Date: Thu, 24 Mar 2011 22:24:32 +0000 (+0100) Subject: whitespace cleanup, init eeprom for random startup, too X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/fnordlicht-mini/commitdiff_plain/937531b62b01fa135fa28ab01475488f474a2653?ds=inline whitespace cleanup, init eeprom for random startup, too --- diff --git a/firmware/fnordlicht-firmware/fnordlicht.c b/firmware/fnordlicht-firmware/fnordlicht.c index 76851e4..f98c490 100644 --- a/firmware/fnordlicht-firmware/fnordlicht.c +++ b/firmware/fnordlicht-firmware/fnordlicht.c @@ -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 diff --git a/firmware/fnordlicht-firmware/static_programs.c b/firmware/fnordlicht-firmware/static_programs.c index 5dc7c2d..19edb2f 100644 --- a/firmware/fnordlicht-firmware/static_programs.c +++ b/firmware/fnordlicht-firmware/static_programs.c @@ -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; diff --git a/firmware/fnordlicht-firmware/storage.c b/firmware/fnordlicht-firmware/storage.c index 0ad522d..7012dac 100644 --- a/firmware/fnordlicht-firmware/storage.c +++ b/firmware/fnordlicht-firmware/storage.c @@ -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 } } },