src/pi/ui/MainView.cpp
void commandMotorFront(int direction) {
	float speed = 0.5f;
	switch(direction) {
		case KeyboardInput::Idle:
			Car::writeControlMotor(Car::NoTurn, 0); 
			break;
		case KeyboardInput::TurnLeft:
			Car::writeControlMotor(Car::TurnLeft, 30); 
			break;
		case KeyboardInput::TurnRight:
			Car::writeControlMotor(Car::TurnRight, -30); 
			break;
	}
	LogD << "Keyboard: change direction to " << (direction*speed) <<endl;
}
/**
 * Callback for KeyboardInput to send command to direction motor.
 */
Callback for KeyboardInput to send command to direction motor.
Callback for KeyboardInput to send command to direction motor .
void commandMotorFront(int direction) {
	float speed = 0.5f;
	switch(direction) {
		case KeyboardInput::Idle:
			Car::writeControlMotor(Car::NoTurn, 0); 
			break;
		case KeyboardInput::TurnLeft:
			Car::writeControlMotor(Car::TurnLeft, 30); 
			break;
		case KeyboardInput::TurnRight:
			Car::writeControlMotor(Car::TurnRight, -30); 
			break;
	}
	LogD << "Keyboard: change direction to " << (direction*speed) <<endl;
}
void commandMotorFront ( int direction ) { float speed = 0.5f ; switch ( direction ) { case KeyboardInput :: Idle : Car :: writeControlMotor ( Car :: NoTurn , 0 ) ; break ; case KeyboardInput :: TurnLeft : Car :: writeControlMotor ( Car :: TurnLeft , 30 ) ; break ; case KeyboardInput :: TurnRight : Car :: writeControlMotor ( Car :: TurnRight , -30 ) ; break ; } LogD << " " << ( direction * speed ) << endl ; }
Callback for KeyboardInput to send command to direction motor.
Callback for KeyboardInput to send command to direction motor .