Exemplo n.º 1
0
void logic_headlamp(uint8_t state) {
    if (state) {
        /* headlamp switch on */
        lamp_on(LAMP_HEADLAMP);
        lamp_on(LAMP_TAILLAMP);
        usart_send(PACK_WORDS(MSG_LAMP_HEADLAMP, ON));
    } else {
        /* headlamp switch off */
        lamp_off(LAMP_HEADLAMP);
        lamp_off(LAMP_TAILLAMP);
        usart_send(PACK_WORDS(MSG_LAMP_HEADLAMP, OFF));
    }
}
Exemplo n.º 2
0
void kickback_disable (void)
{
	lamp_off(LM_KICKBACK_ARROW);
	lamp_flash_on(LM_LITE_KICKBACK);
	lamp_flash_on(LM_RIGHT_STANDUP_ARROW);
	kickback_driver_disable();
}
Exemplo n.º 3
0
CALLSET_ENTRY (deadend, sw_dead_end)
{
//	device_switch_can_follow (dead_end, slot, TIME_2S + TIME_500MS);
//	event_can_follow (dead_end, camera, TIME_2S);
	timer_restart_free (GID_DEADEND_TO_SLOT, TIME_4S);
	//event_can_follow (camera_or_piano, slot_prox, TIME_5S);

	if (lamp_test (LM_DEAD_END))
	{
		leff_start (LEFF_RIGHT_LOOP);
		dead_end_count++;
		deff_start_sync (DEFF_DEAD_END);
		if (!flag_test (FLAG_SNAKE_READY) && single_ball_play ())
		{
			flag_on (FLAG_SNAKE_READY);
			deff_start_sync (DEFF_SNAKE_READY);
		}
		switch (dead_end_count)
		{
			case 1:
				score (SC_250K);
				timed_game_extend (15);
				break;
			case 2:
				score (SC_500K);
				timed_game_extend (20);
				break;
			case 3:
				timed_game_extend (30);
				if (extra_ball_lit_from_deadend == FALSE 
					&& can_award_extra_ball ())
				{
					score (SC_1M);
					light_easy_extra_ball ();
					extra_ball_lit_from_deadend = TRUE;
				}
				else
				{
					score (SC_10M);
				}
				dead_end_count = 0;
				break;
			default:
				score (SC_2M);
				timed_game_extend (30);
				break;
		}
		lamp_off (LM_DEAD_END);
	}
	else
	{
		deff_start (DEFF_INLANE_LIGHTS_DEAD_END);
		award_unlit_shot (SW_DEAD_END);
		score (SC_100K);
		sound_send (SND_TOWN_SQUARE_AWARD);
		timed_game_pause (TIME_3S);
	}
}
Exemplo n.º 4
0
void mute_and_pause_stop (void)
{
	task_kill_gid (GID_MUTE_AND_PAUSE);
	music_enable ();
	kickout_unlock (KLOCK_USER);
	lamp_off (LM_BUY_IN_BUTTON);
	flipper_hold_off ();
	callset_invoke (machine_unpaused);
}
Exemplo n.º 5
0
CALLSET_ENTRY (gumball, sw_gumball_exit)
{
//	if (!global_flag_test (GLOBAL_FLAG_MULTIBALL_RUNNING))
//		sound_send (SND_GUMBALL_LOADED);
	if (task_kill_gid (GID_GENEVA_TRIPPED) 
		|| event_did_follow (gumball_release, gumball_exit))
	{
		/* Start a timer to tell the slot where the ball came from */
		timer_restart_free (GID_GUMBALL_TO_SLOT, TIME_5S);
		/* Signal the release motor to stop */
		gumball_exit_tripped = TRUE;
		/* A ball successfully came out of the gumball machine.*/
		bounded_decrement (gumball_count, 0);
		if (feature_config.easy_lite_gumball == YES)
		{
			lamp_off (LM_GUM);
			lamp_off (LM_BALL);
		}
	}
}
Exemplo n.º 6
0
void logic_reverse(uint8_t state) {
    if (state) {
        /* reverse switch on */
        lamp_on(LAMP_REVERSE);
        usart_send(PACK_WORDS(MSG_LAMP_REVERSE, ON));
    } else {
        /* reverse switch off */
        lamp_off(LAMP_REVERSE);
        usart_send(PACK_WORDS(MSG_LAMP_REVERSE, OFF));
    }
}
Exemplo n.º 7
0
void logic_highbeam(uint8_t state) {
    if (state) {
        /* highbeam switch on */
        lamp_on(LAMP_HIGHBEAM);
        usart_send(PACK_WORDS(MSG_LAMP_HIGHBEAM, ON));
    } else {
        /* highbeam switch off */
        lamp_off(LAMP_HIGHBEAM);
        usart_send(PACK_WORDS(MSG_LAMP_HIGHBEAM, OFF));
    }
}
Exemplo n.º 8
0
void logic_brake(uint8_t state) {
    if (state) {
        /* brake switch on */
        lamp_on(LAMP_BRAKE);
        usart_send(PACK_WORDS(MSG_LAMP_BRAKE, ON));
    } else {
        /* brake switch off */
        lamp_off(LAMP_BRAKE);
        usart_send(PACK_WORDS(MSG_LAMP_BRAKE, OFF));
    }
}
Exemplo n.º 9
0
void common_outlane (void)
{
	score (SC_50K);
	rudy_look_straight ();
	if (!flag_test (FLAG_STEPS_OPEN))
		sample_start (SND_OUTLANE, SL_500MS);
	if (lamp_test (LM_SPECIALS))
	{
		lamp_off (LM_SPECIALS);
		flag_off (FLAG_OUTLANES_LIT);
		special_award ();
	}
}
Exemplo n.º 10
0
void logic_rturn(uint8_t state) {
    if (state) {
        /* right-turn switch on */
        blinker_on(LAMP_RTURN);
        lamp_on(LAMP_RTURN);
        usart_send(PACK_WORDS(MSG_LAMP_RTURN, ON));
    } else {
        /* right-turn switch off */
        blinker_off(LAMP_RTURN);
        lamp_off(LAMP_RTURN);
        usart_send(PACK_WORDS(MSG_LAMP_RTURN, OFF));
    }
}
Exemplo n.º 11
0
void fastlock_mode_exit (void)
{
    lamp_off (LM_LOCK_ARROW);
}
Exemplo n.º 12
0
CALLSET_ENTRY (theatre_spell, start_ball)
{
	theatre_spelled_this_ball = 0;
	lamp_off (LM_HURRY_UP);
	fixed_ladder_reset (&theatre_letter_scoring);
}
Exemplo n.º 13
0
CALLSET_ENTRY (bonusx, start_ball)
{
	bonusx = 1;
	lamp_off (LM_ROLLOVER_1);
	lamp_off (LM_ROLLOVER_2);
}