예제 #1
0
 public static void Main()
 {
     Motor testMotor = new TestMotor();
     MotorMixer mixer = new QuadMixer(testMotor, testMotor, testMotor, testMotor);
     ILogger logger = new PersistenceWriter(new MemoryStream(), new TelemetryFormatter());
     Gyro gyro = new TestGyro();
     Radio radio = new TestRadio();
     PIDSettings[] pidSettings = GetPIDSettings();
     AxesController axesController = new AxesController(pidSettings[0], pidSettings[1], pidSettings[2], true);
     ControllerLoopSettings loopSettings = GetLoopSettings();
     Controller controller = new Controller(mixer, axesController, gyro, radio, loopSettings, GetMotorSettings(), logger);
 }
예제 #2
0
        public static void Main()
        {
            Motor      testMotor = new TestMotor();
            MotorMixer mixer     = new QuadMixer(testMotor, testMotor, testMotor, testMotor);
            ILogger    logger    = new PersistenceWriter(new MemoryStream(), new TelemetryFormatter());
            Gyro       gyro      = new TestGyro();
            Radio      radio     = new TestRadio();

            PIDSettings[]          pidSettings    = GetPIDSettings();
            AxesController         axesController = new AxesController(pidSettings[0], pidSettings[1], pidSettings[2], true);
            ControllerLoopSettings loopSettings   = GetLoopSettings();
            Controller             controller     = new Controller(mixer, axesController, gyro, radio, loopSettings, GetMotorSettings(), logger);
        }
        public ThreadingProgram()
        {
            Gyro gyro = new TestGyro();
            Sensors sensors = new Sensors(gyro);

            Motor testMotor = new TestMotor();
            MotorMixer mixer = new QuadMixer(testMotor, testMotor, testMotor, testMotor);
            ILogger logger = new PersistenceWriter(new MemoryStream(), new TelemetryFormatter());

            Radio radio = new TestRadio();
            PIDSettings[] pidSettings = GetPIDSettings();
            AxesController axesController = new AxesController(pidSettings[0], pidSettings[1], pidSettings[2], true);
            _loopSettings = GetLoopSettings();

            Timer sensorTimer = new Timer(tester, sensors,new TimeSpan(0),new TimeSpan((long)_loopSettings.SensorLoopFrequency) );
        }
예제 #4
0
        public ThreadingProgram()
        {
            Gyro    gyro    = new TestGyro();
            Sensors sensors = new Sensors(gyro);

            Motor      testMotor = new TestMotor();
            MotorMixer mixer     = new QuadMixer(testMotor, testMotor, testMotor, testMotor);
            ILogger    logger    = new PersistenceWriter(new MemoryStream(), new TelemetryFormatter());

            Radio radio = new TestRadio();

            PIDSettings[]  pidSettings    = GetPIDSettings();
            AxesController axesController = new AxesController(pidSettings[0], pidSettings[1], pidSettings[2], true);

            _loopSettings = GetLoopSettings();


            Timer sensorTimer = new Timer(tester, sensors, new TimeSpan(0), new TimeSpan((long)_loopSettings.SensorLoopFrequency));
        }