static struct vt100 local_vt100;
static volatile uint8_t state_mode;
-static uint8_t ball_count;
+static volatile uint8_t ball_count;
/* short aliases */
#define INIT I2C_BALLBOARD_MODE_INIT
return ball_count;
}
+#if 0
static void state_debug_wait_key_pressed(void)
{
if (!state_debug)
printf_P(PSTR("press a key\r\n"));
while (!cmdline_keypressed());
}
+#endif
/* set a new state, return 0 on success */
int8_t state_set_mode(uint8_t mode)
{
state_mode = mode;
+ STMCH_DEBUG("%s(): mode=%x ", __FUNCTION__, mode);
/* STMCH_DEBUG("%s(): l_deploy=%d l_harvest=%d " */
/* "r_deploy=%d r_harvest=%d eject=%d", */
/* harvest balls from area */
static void state_do_harvest(void)
{
- state_debug_wait_key_pressed();
+ //state_debug_wait_key_pressed();
roller_on();
}
static void state_do_eject(void)
{
roller_reverse();
+ time_wait_ms(2000);
}
/* main state machine */