public override void ExecuteAction(hexapod hexy) { foreach (var servo in hexy.Controller.Servos) { servo.setPos(0); } }
static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; //var serHandler = new serHandler(); var controller = new Controller(32); var hexy = new hexapod(controller); Thread.Sleep(2000); //hexy.GetUp(); //hexy.SetZero(); hexy.Move("GetUp"); Thread.Sleep(2000); hexy.Move("MoveForward"); Thread.Sleep(2000); hexy.Move("MoveForward"); //hexy.Move("SetZero"); //Thread.Sleep(500); //hexy.Move("GetUp"); //Thread.Sleep(500); //hexy.Move("MoveForward"); //while (true) //{ // hexy.Move("MoveForward"); // Thread.Sleep(3000); //} controller.killAll(); }
public override void ExecuteAction(hexapod hexy) { hexy.Move("SetZero"); Thread.Sleep(2000); hexy.Move("GetUp"); Thread.Sleep(500); }
public MainWindowViewModel() { Servos = new ObservableCollection<ServoViewModel>(); Servos2 = new ObservableCollection<ServoViewModel>(); var controller = new Controller(32); var hexy = new hexapod(controller); for (int i = 0; i < 16; i++) { Servos.Add(new ServoViewModel(i, controller.Servos[i])); Servos2.Add(new ServoViewModel(i + 16, controller.Servos[i + 16])); } }
public abstract void ExecuteAction(hexapod hexy);