Exemplo n.º 1
0
void main_wheel( int joy1_x1, int joy1_y1 )
{
	 int k=8;
   int drivePower = DEADBAND(joy1_x1/k);
   int turnPower  = DEADBAND(joy1_y1/k);

   motor[motorA] = BOUND(drivePower - turnPower);
   motor[motorB] = BOUND(drivePower + turnPower);
}
void main_wheel( int joy1_x1, int joy1_y1 )
{

   int drivePower = DEADBAND(joy1_x1);
   int turnPower  = DEADBAND(joy1_y1);

   motor[LeftBase] = BOUND(drivePower - turnPower);
   motor[RightBase] = BOUND(drivePower + turnPower);
}
Exemplo n.º 3
0
task main() {
	while (true) {
		wait1Msec(LOOP_INTERVAL);
		getJoystickSettings(joystick);

		holoMove(remapJoystickInput(DEADBAND(joystick.joy1_x1)), remapJoystickInput(DEADBAND(joystick.joy1_y1)), remapJoystickInput(DEADBAND(joystick.joy1_x2)));
		//holoRotate(remapJoystickInput(DEADBAND(joystick.joy1_x2)));

		// Test Code to test if Joystick Controller input is working
		if (joy1Btn(4)) {
			writeDebugStreamLine("JOY4BUTTON");
			//MissionImpossible();
		}
	}
}
Exemplo n.º 4
0
void arm_motors( int joy2_y1 )
{
	int k=8;
	int rotatePower = DEADBAND(joy2_y1/k);
	motor[motorD] = -BOUND(rotatePower);
}
Exemplo n.º 5
0
void central_motor( int joy1_y2 )
{
	int k=8;
	int rotatePower = DEADBAND(joy1_y2/k);
	motor[motorC] = BOUND(rotatePower);
}
Exemplo n.º 6
0
void arm_motors( int joy1_y2 )
{
	int k=10; //bigger = slower
	int rotatePower = DEADBAND(joy1_y2);
	motor[motorD] = -BOUND(rotatePower/k);
}
Exemplo n.º 7
0
void central_motor( int joy1_x2 )
{
	int k=15; //higher = slower
	int rotatePower = DEADBAND(joy1_x2);
	motor[motorC] = BOUND(rotatePower/k);
}
Exemplo n.º 8
0
// This method moves each wheel independently, taking input from the respective joysticks
void tank_drive(){
	motor[leftMotor] = DEADBAND(vexRT[JOY_AXIS_LEFT]) * SLOW * REVERSE;
	motor[rightMotor] = DEADBAND(vexRT[JOY_AXIS_RIGHT]) * SLOW * REVERSE;
}
Exemplo n.º 9
0
void sync_arcade(){
	motor[leftMotor] = (DEADBAND(vexRT[JOY_AXIS_LEFT]) + DEADBAND(vexRT[JOY_AXIS_TURN])) * SLOW * REVERSE;
	motor[rightMotor] = (DEADBAND(vexRT[JOY_AXIS_LEFT]) - DEADBAND(vexRT[JOY_AXIS_TURN])) * SLOW * REVERSE;
}
Exemplo n.º 10
0
/*
 * moveMotors
 *
 * Both the left and right motors are set to equal their respective joystick's
 * positions, times the constant move speed.
 */
void moveMotors(){
	motor[leftMotor] = (DEADBAND(vexRT[JOY_BTN_LEFT]) * BTN_JOYSTICK_MOVE_SPEED);
	motor[rightMotor] = (DEADBAND(vexRT[JOY_BTN_RIGHT]) * BTN_JOYSTICK_MOVE_SPEED);
}