 ********************************************************************************/
 
 /* Function returns the button name relating to the received code */
-void ir_handleInput(unsigned long code){
+void irHandleInput(unsigned long code){
   /* Character array used to hold the received button name */
   char CodeName[3];
   /* Is the received code is a repeat code (NEC protocol) */

  }
}

void action_stop()
{
  action_state = A_STOPPED;
  motion_stop();
  ping_stop();
  whiskersStop();
}

/**
 * Moves forward avoiding obstacles.
 */
void action_trundle()
{
  if (action_state != A_TRUNDLE) {
    Serial.println("TRUNDLING...");

    action_state = A_TRUNDLE;
    
    // Start pinging
    pingStart();
    
    // Start feeling
    whiskersStart();
  
    motionFwd();
  }
}

/**
 * Look for somewhare to go.
 */
void actionPingSearch()
{
  Serial.println("SEARCHING");
  // Set the state, so the action can be handeled by the state machine.
  action_state = A_PINGSEARCH;
}

void actionTimeoutStart(int duration)
{
  action_done = 0; 
  // Delete the previous timer, so we can use it's slot.
  timer.deleteTimer(timer_action); 
  // Start a new one.
  timer_action = timer.setTimeout(duration, actionTimeoutDone);
}

void actionTimeoutDone()
{
  action_done = 1; 
}
