Exemplo n.º 1
0
static void pick_startup_mode(void)
{
    cube_start(0);

    // Quick fix to start in kiosk mode
    change_playlist(0);
}
Exemplo n.º 2
0
static void pick_startup_mode(void)
{
	cube_start(0);

	// Quick fix to start in kiosk mode
	mode = MODE_PLAYLIST;
	select_playlist_item(playlists[0]);
	init_current_effect();
}
Exemplo n.º 3
0
void set_mode(uint8_t new_mode) {
    if (mode == new_mode) return;
    store_mode(new_mode);
    modified.mode = true;

    if (mode == MODE_SLEEP) {
        cube_start(0);
    } else if (new_mode == MODE_SLEEP) {
        cube_shutdown(0);
    }

    mode = new_mode;
}
Exemplo n.º 4
0
static void pick_startup_mode(void)
{
    // Reading configrutaion etc. from non-volatile memory
    init_zcl();
    uint8_t start_mode = read_mode();

    // Actual mode selection
    if (start_mode != MODE_SLEEP) {
        cube_start(0);
        // cube_start() does implicit modification to 'mode'.
    }

    mode = start_mode;
    use_stored_effect();
    use_stored_playlist();
}
Exemplo n.º 5
0
static void pick_startup_mode(void)
{
    // Start normally
    cube_start(0);

    mode = simulation_mode;
    switch (mode) {
    case MODE_EFFECT:
        effect = effects + simulation_effect;
        init_current_effect();
        break;
    case MODE_PLAYLIST:
        change_playlist(0);
        break;
    default:
        mode = MODE_IDLE;
    }
}