Beispiel #1
0
	void AutonomousInit(void) {
		m_autoPeriodicLoops = 0;				// Reset the loop counter for autonomous mode
//		ClearSolenoidLEDsKITT();
		m_feeding = true;
		m_feedCount = 50;						// (loops)
		m_feedSpeed = 0.5;						// (unitless)
		m_feedCounter = 0;
		m_loading = true;
		m_loadCount = 60;						// (loops)
		m_loadPauseCount = 2;					// (loops)
		m_loadSpeed = 0.2;						// (unitless)
		m_loadCounter = 0;
		m_frisbeeCounter = 0;					// (loops) frisbee counter for autonomous
		m_frisbeeCountMax = 3;					// (loops) maximum number of frisbees we're going to feed in autonomous
		m_breachFrisbee = true;
		
		m_robot->SetSafetyEnabled(false);
//		m_robotFrontDrive->SetSafetyEnabled(false);		
//		m_robotRearDrive->SetSafetyEnabled(false);
		m_launchMotor->SetSafetyEnabled(false);
		m_feedMotor->SetSafetyEnabled(false);
	}
Beispiel #2
0
	void TeleopInit(void) {
		m_telePeriodicLoops = 0;				// Reset the loop counter for teleop mode
		m_dsPacketsReceivedInCurrentSecond = 0;	// Reset the number of dsPackets in current second
//		m_driveMode = UNINITIALIZED_DRIVE;		// Set drive mode to uninitialized
//		ClearSolenoidLEDsKITT();
		m_feeding = false;
		m_feedCount = 50;						// (loops)
		m_feedSpeed = 0.5;						// (unitless)
		m_feedCounter = 0;
		m_loading = false;
		m_loadCount = 58;						// (loops)
		m_loadPauseCount = 2;					// (loops)
		m_loadSpeed = 0.2;						// (unitless)
		m_loadCounter = 0;
		m_robot->SetSafetyEnabled(false); // motor safety timers disabled as workaround for timeout problems on cRIO 2 
//		m_robotFrontDrive->SetSafetyEnabled(false);		
//		m_robotRearDrive->SetSafetyEnabled(false);
		m_launchMotor->SetSafetyEnabled(false);
		m_feedMotor->SetSafetyEnabled(false);
		m_loadMotor->SetSafetyEnabled(false);
		m_elevatorMotor->SetSafetyEnabled(false);
		
	}