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 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])); } }