public Form1() { InitializeComponent(); DriveCtrl driveCtrl = new DriveCtrl(Constants.IODriveCtrl); MotorCtrl motorCtrlLeft = new MotorCtrl(Constants.IOMotorCtrlLeft); MotorCtrl motorCtrlRight = new MotorCtrl(Constants.IOMotorCtrlRight); this.driveCtrlView.DriveCtrl = driveCtrl; this.motorCtrlViewLeft.MotorCtrl = motorCtrlLeft; this.motorCtrlViewRight.MotorCtrl = motorCtrlRight; }
public Form1() { InitializeComponent(); DriveCtrl driveCtrl = new DriveCtrl(0xF330); driveCtrlView.DriveCtrl = driveCtrl; MotorCtrl motorCtrlLeft = new MotorCtrl(0xF328); MotorCtrl motorCtrlRight = new MotorCtrl(0xF320); motorCtrlView1.MotorCtrl = motorCtrlLeft; motorCtrlView2.MotorCtrl = motorCtrlRight; }
public Form1() { InitializeComponent(); if (Constants.IsWinCE) { _driveControl = new DriveCtrlHW(Constants.IODriveCtrl); _leftMotorControl = new MotorCtrlHW(Constants.IOMotorCtrlLeft); _rightMotorControl = new MotorCtrlHW(Constants.IOMotorCtrlRight); } else { _driveControl = new DriveCtrlSim(); _leftMotorControl = new MotorCtrlSim(); _rightMotorControl = new MotorCtrlSim(); } leftMotorCtrlView.MotorCtrl = _leftMotorControl; rightMotorCtrlView.MotorCtrl = _rightMotorControl; driveCtrlView.DriveCtrl = _driveControl; }