Пример #1
0
void RtcEvTable::update(void)
{
  // We actually want to fire if now is AT or after 'when'
  if ( is_time_now() ) 
  {
    channel(current_channel())->emit(current_signal());
    current++;
  }
}
Пример #2
0
static void Activate_keyboard(Widget w, XEvent *ev, char **str, Cardinal *num) 
{
  /* make the current channel active preloading kbd cmd with str[0]+ctrl bit */
  chan_info *cp;
  cp = current_channel();
  if (cp) 
    {
      goto_graph(cp);
      keyboard_command(cp, (str[0][0] == 'u') ? snd_K_u : snd_K_x, CONTROL_KEY);
    }
}
Пример #3
0
void RtcEvTable::begin(void)
{
  char buf[32];

  // First, print all out for debugging
  printf_P(PSTR("REVT %u events\n\r"),num_lines);
  while ( is_valid() )
  {
    printf_P(PSTR("REVT %s on %u %S\n\r"),DateTime(whenNext()).toString(buf,sizeof(buf)),current_channel(),logger.find_symbol(current_signal()));
    current++;
  }

  // Reset to the top
  current = table;

  // seek the current pointer to the right place
  while ( is_time_now() ) 
    current++;

  if ( is_valid() )
  {
    int signal = current_signal(); 
    printf_P(PSTR("REVT next event is %s on %u %S\n\r"),DateTime(whenNext()).toString(buf,sizeof(buf)),current_channel(),logger.find_symbol(signal));
  }
  else
    printf_P(PSTR("REVT No more events remain.\n\r"));
}