#include "remote.h"
#include "../common/common.h"
#include "storage.h"
+#include "script.h"
#if CONFIG_SCRIPT
c.green = (remote_address() & 0x02u) ? DEBUG_COLORLEVEL : 0;
c.blue = (remote_address() & 0x04u) ? DEBUG_COLORLEVEL : 0;
- d.red = d.green = d.blue = DEBUG_COLORLEVEL;
+ d.red = d.green = d.blue = 0;
global_pwm.target.rgb = c;
while (sleep--)
PT_YIELD(&process->pt);
- global_pwm.target.rgb = d;
+ global_pwm.target.rgb = c;
sleep = 5;
while (sleep--)
PT_YIELD(&process->pt);
- global_pwm.target.rgb = c;
+ global_pwm.target.rgb = d;
}
+ script_stop();
+
/* now start default script */
if (storage_valid_config() && (startup_config.params.mode == STARTUP_PROGRAM)) {
script_start(0, startup_config.params.program, (union program_params_t *)startup_config.params.program_parameters);
script_start_default();
}
+ /* hack: script_start() stuff above will reinitialize PT structures, so we
+ can't call any PT stuff any more and quit directly */
+ return 0;
+
PT_END(&process->pt);
}