/// <summary> /// Subscribes to messages from devices to translate them. /// </summary> public static void InitRealDevices() { BodyModule.Init(); Bordmonitor.Init(); Immobiliser.Init(); InstrumentClusterElectronics.Init(); LightControlModule.Init(); MultiFunctionSteeringWheel.Init(); Radio.Init(); }
private static void ProcessCommand(object o) { var c = (Command)o; switch (c) { // TODO Fix windows closing: current commands close them just by half //case Command.FullCloseWindows: // for (byte i = 0; i < 3; i++) // { // Manager.Instance.EnqueueMessage(BodyModule.MessageCloseWindowDriverFront); // Thread.Sleep(750); // Manager.Instance.EnqueueMessage(BodyModule.MessageCloseWindowPassengerFront); // Thread.Sleep(750); // Manager.Instance.EnqueueMessage(BodyModule.MessageCloseWindowDriverRear); // Thread.Sleep(750); // Manager.Instance.EnqueueMessage(BodyModule.MessageCloseWindowPassengerRear); // Thread.Sleep(750); // } // break; //case Command.FullOpenWindows: // for (byte i = 0; i < 3; i++) // { // Manager.Instance.EnqueueMessage(BodyModule.MessageOpenWindowDriverFront); // Thread.Sleep(750); // Manager.Instance.EnqueueMessage(BodyModule.MessageOpenWindowPassengerFront); // Thread.Sleep(750); // Manager.Instance.EnqueueMessage(BodyModule.MessageOpenWindowDriverRear); // Thread.Sleep(750); // Manager.Instance.EnqueueMessage(BodyModule.MessageOpenWindowPassengerRear); // Thread.Sleep(750); // } // break; case Command.BlinkLamps: if (Settings.Instance.LightsBlinkerTimeout > 0) { LightControlModule.TurnOnLamps(Lights.FrontLeftFogLamp); Thread.Sleep(Settings.Instance.LightsBlinkerTimeout); LightControlModule.TurnOnLamps(Lights.FrontLeftBlinker); Thread.Sleep(Settings.Instance.LightsBlinkerTimeout); LightControlModule.TurnOnLamps(Lights.FrontLeftStandingLight); Thread.Sleep(Settings.Instance.LightsBlinkerTimeout); LightControlModule.TurnOnLamps(Lights.FrontRightStandingLight); Thread.Sleep(Settings.Instance.LightsBlinkerTimeout); LightControlModule.TurnOnLamps(Lights.FrontRightBlinker); Thread.Sleep(Settings.Instance.LightsBlinkerTimeout); LightControlModule.TurnOnLamps(Lights.FrontRightFogLamp); Thread.Sleep(Settings.Instance.LightsBlinkerTimeout); LightControlModule.TurnOnLamps(Lights.Off); } break; } }