public static void StartTheTank() { string basePath = System.AppDomain.CurrentDomain.BaseDirectory; Console.WriteLine("Tread Manager: "); TreadsManager = new EffectManager(Sensor); SettingsLoader.LoadEffects(Path.Combine(basePath, "Settings/treads.json"), TreadsLED, TreadsManager.Effects); Console.WriteLine("Effects loaded {0}", TreadsManager.Effects.Count); TankManager.TreadsManager.SelectEffect(0); TankManager.TreadsManager.NextIdleEffect(); TankManager.TreadsManager.Start(15000, ThreadPriority.Highest); Thread.Sleep(5); Console.WriteLine("Barrel Manager: "); BarrelManager = new EffectManager(Sensor); SettingsLoader.LoadEffects(Path.Combine(basePath, "Settings/barrel.json"), BarrelLED, BarrelManager.Effects); Console.WriteLine("Effects loaded {0}", BarrelManager.Effects.Count); TankManager.BarrelManager.SelectEffect(0); TankManager.BarrelManager.NextIdleEffect(); TankManager.BarrelManager.Start(15000, ThreadPriority.Normal); Thread.Sleep(5); Console.WriteLine("Panel Manager: "); PanelsManager = new EffectManager(Sensor); SettingsLoader.LoadEffects(Path.Combine(basePath, "Settings/panels.json"), DmxLED, PanelsManager.Effects); Console.WriteLine("Effects loaded {0}", PanelsManager.Effects.Count); TankManager.PanelsManager.SelectEffect(0); TankManager.PanelsManager.NextIdleEffect(); TankManager.PanelsManager.Start(200000, ThreadPriority.Lowest); Sensor.Start(); idleTimer.Enabled = true; }
public static void StartTheTank() { Console.WriteLine("Tread Manager: "); TreadsManager = new EffectManager(Sensor); SettingsLoader.LoadEffects("Settings/treads.json", TreadsLED, TreadsManager.Effects); Console.WriteLine("Effects loaded {0}", TreadsManager.Effects.Count); TankManager.TreadsManager.SelectEffect(0); TankManager.TreadsManager.SelectIdleEffect(1); TankManager.TreadsManager.Start(); Console.WriteLine("Barrel Manager: "); BarrelManager = new EffectManager(Sensor); SettingsLoader.LoadEffects("Settings/barrel.json", BarrelLED, BarrelManager.Effects); Console.WriteLine("Effects loaded {0}", BarrelManager.Effects.Count); TankManager.BarrelManager.SelectEffect(0); TankManager.BarrelManager.SelectIdleEffect(1); TankManager.BarrelManager.Start(); Console.WriteLine("Panel Manager: "); PanelsManager = new EffectManager(Sensor); SettingsLoader.LoadEffects("Settings/panels.json", DmxLED, PanelsManager.Effects); Console.WriteLine("Effects loaded {0}", PanelsManager.Effects.Count); TankManager.PanelsManager.SelectEffect(0); TankManager.PanelsManager.SelectIdleEffect(1); TankManager.PanelsManager.Start(); Sensor.Start(); }