Esempio n. 1
0
        public EngExhaustTempGauge()
            : base("EngExhaustTempGauge", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(300d, 0d, 900d, 231d);
            _needleCalibration.Add(new CalibrationPointDouble(400d, 29d));
            _needleCalibration.Add(new CalibrationPointDouble(500d, 59));
            _needleCalibration.Add(new CalibrationPointDouble(600d, 88d));
            _needleCalibration.Add(new CalibrationPointDouble(650d, 118d));
            _needleCalibration.Add(new CalibrationPointDouble(700d, 148d));
            _needleCalibration.Add(new CalibrationPointDouble(750d, 177d));
            _needleCalibration.Add(new CalibrationPointDouble(800d, 206d));
            _needleCalibration.Add(new CalibrationPointDouble(850d, 218d));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/EngExhaustTemp/EngExhaustTemp_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/EngExhaustTemp/EngExhaustTemp_needle.xaml", center, new Size(69d, 178d), new Point(34.5d, 126.5d), 242d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/EngExhaustTemp/EngExhaustTemp_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentTemp = new HeliosValue(this, BindingValue.Empty, "", "Engine Exhaust", "Current Temp", "", BindingValueUnits.Numeric);
            _currentTemp.Execute += CurrentFuel_Execute;
            Actions.Add(_currentTemp);
        }
Esempio n. 2
0
        public EGT()
            : base("Exhast Gas Temperature", new Size(340, 340))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/EGT/egt_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _leftSmallNeedle = new GaugeNeedle("{Helios}/Gauges/KA-50/EGT/egt_small_needle.xaml", new Point(97, 227), new Size(15, 45), new Point(7.5, 37.5), 180d);
            Components.Add(_leftSmallNeedle);

            _leftLargeNeedle = new GaugeNeedle("{Helios}/Gauges/KA-50/EGT/egt_large_needle.xaml", new Point(97, 158), new Size(19, 76), new Point(9.5, 66.5), -135d);
            Components.Add(_leftLargeNeedle);

            _rightSmallNeedle = new GaugeNeedle("{Helios}/Gauges/KA-50/EGT/egt_small_needle.xaml", new Point(238, 227), new Size(15, 45), new Point(7.5, 37.5), 180d);
            Components.Add(_rightSmallNeedle);

            _rightLargeNeedle = new GaugeNeedle("{Helios}/Gauges/KA-50/EGT/egt_large_needle.xaml", new Point(238, 158), new Size(19, 76), new Point(9.5, 66.5), -135d);
            Components.Add(_rightLargeNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/EGT/egt_bezel.xaml", new Rect(0, 0, 340, 340)));

            _leftTemperature = new HeliosValue(this, BindingValue.Empty, "", "Left Exhaust Temperature", "Exhaust Gas Temperature of left engine.", "", BindingValueUnits.Celsius);
            _leftTemperature.Execute += LeftTemperature_Execute;
            Actions.Add(_leftTemperature);

            _rigthTemperature = new HeliosValue(this, BindingValue.Empty, "", "Right Exhaust Temperature", "Exhaust Gas Temperature of right engine.", "", BindingValueUnits.Celsius);
            _rigthTemperature.Execute += RightTemperature_Execute;
            Actions.Add(_rigthTemperature);
        }
Esempio n. 3
0
        public Altimeter()
            : base("Altimeter", new Size(364, 376))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/Altimeter/altimeter_backplate.xaml", new Rect(32d, 38d, 300d, 300d)));

            _tensDrum      = new GaugeDrumCounter("{Helios}/Gauges/F-16/Altimeter/alt_drum_tape.xaml", new Point(71d, 164d), "#", new Size(10d, 15d), new Size(30d, 45d));
            _tensDrum.Clip = new RectangleGeometry(new Rect(71d, 144d, 150d, 81d));
            Components.Add(_tensDrum);

            _drum      = new GaugeDrumCounter("{Helios}/Gauges/F-16/Common/drum_tape.xaml", new Point(101d, 164d), "#%00", new Size(10d, 15d), new Size(30d, 45d));
            _drum.Clip = new RectangleGeometry(new Rect(101d, 144d, 150d, 81d));
            Components.Add(_drum);

            _airPressureDrum       = new GaugeDrumCounter("{Helios}/Gauges/F-16/Common/drum_tape.xaml", new Point(214d, 233d), "###%", new Size(10d, 15d), new Size(15d, 20d));
            _airPressureDrum.Value = 2992d;
            _airPressureDrum.Clip  = new RectangleGeometry(new Rect(214d, 233d, 60d, 20d));
            Components.Add(_airPressureDrum);

            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/Altimeter/altimeter_faceplate.xaml", new Rect(32d, 38d, 300d, 300d)));

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 1000d, 360d);
            _needle            = new GaugeNeedle("{Helios}/Gauges/F-16/Altimeter/altimeter_needle.xaml", new Point(182d, 188d), new Size(16d, 257d), new Point(8d, 138.5d));
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/Common/f16_gauge_bezel.png", new Rect(0d, 0d, 364d, 376d)));

            _airPressure = new HeliosValue(this, new BindingValue(0d), "", "air pressure", "Current air pressure calibaration setting for the altimeter.", "", BindingValueUnits.InchesOfMercury);
            _airPressure.SetValue(new BindingValue(29.92), true);
            _airPressure.Execute += new HeliosActionHandler(AirPressure_Execute);
            Actions.Add(_airPressure);

            _altitdue          = new HeliosValue(this, new BindingValue(0d), "", "altitude", "Current altitude of the aricraft.", "", BindingValueUnits.Feet);
            _altitdue.Execute += new HeliosActionHandler(Altitude_Execute);
            Actions.Add(_altitdue);
        }
Esempio n. 4
0
        public VVI()
            : base("VVI", new Size(182, 188))
        {
            //Components.Add(new GaugeImage("{Helios}/Gauges/AV-8B/VVI/vvi_faceplate.xaml", new Rect(32d, 38d, 300d, 300d)));
            _needle = new GaugeNeedle("{Helios}/Gauges/AV-8B/Common/needle_a.xaml", new Point(91d, 94d), new Size(11, 82), new Point(5, 65), -90d);
            Components.Add(_needle);

            //Components.Add(new GaugeImage("{Helios}/Gauges/A-10/Common/gauge_bezel.png", new Rect(0d, 0d, 364d, 376d)));

            _verticalVelocity          = new HeliosValue(this, new BindingValue(0d), "", "vertical velocity", "Veritcal velocity of the aircraft", "(-6,000 to 6,000)", BindingValueUnits.FeetPerMinute);
            _verticalVelocity.Execute += new HeliosActionHandler(VerticalVelocity_Execute);
            Actions.Add(_verticalVelocity);

            _calibrationPoints = new CalibrationPointCollectionDouble(-6000d, -167d, 6000d, 167d);
            _calibrationPoints.Add(new CalibrationPointDouble(-5000d, -153d));
            _calibrationPoints.Add(new CalibrationPointDouble(-4000d, -135d));
            _calibrationPoints.Add(new CalibrationPointDouble(-2000d, -90d));
            _calibrationPoints.Add(new CalibrationPointDouble(-1000d, -57d));
            _calibrationPoints.Add(new CalibrationPointDouble(-500d, -35d));
            _calibrationPoints.Add(new CalibrationPointDouble(0d, 0d));
            _calibrationPoints.Add(new CalibrationPointDouble(500d, 35d));
            _calibrationPoints.Add(new CalibrationPointDouble(1000d, 57d));
            _calibrationPoints.Add(new CalibrationPointDouble(2000d, 90d));
            _calibrationPoints.Add(new CalibrationPointDouble(4000d, 135d));
            _calibrationPoints.Add(new CalibrationPointDouble(5000d, 153d));
        }
Esempio n. 5
0
        public Altimeter()
            : base("Altimeter", new Size(364, 376))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/Altimeter/altimeter_backplate.xaml", new Rect(32d, 38d, 300d, 300d)));

            _tensDrum = new GaugeDrumCounter("{Helios}/Gauges/F-16/Altimeter/alt_drum_tape.xaml", new Point(71d, 164d), "#", new Size(10d, 15d), new Size(30d, 45d));
            _tensDrum.Clip = new RectangleGeometry(new Rect(71d, 144d, 150d, 81d));
            Components.Add(_tensDrum);

            _drum = new GaugeDrumCounter("{Helios}/Gauges/F-16/Common/drum_tape.xaml", new Point(101d, 164d), "#%00", new Size(10d, 15d), new Size(30d, 45d));
            _drum.Clip = new RectangleGeometry(new Rect(101d, 144d, 150d, 81d));
            Components.Add(_drum);

            _airPressureDrum = new GaugeDrumCounter("{Helios}/Gauges/F-16/Common/drum_tape.xaml", new Point(214d, 233d), "###%", new Size(10d, 15d), new Size(15d, 20d));
            _airPressureDrum.Value = 2992d;
            _airPressureDrum.Clip = new RectangleGeometry(new Rect(214d, 233d, 60d, 20d));
            Components.Add(_airPressureDrum);

            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/Altimeter/altimeter_faceplate.xaml", new Rect(32d, 38d, 300d, 300d)));

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 1000d, 360d);
            _needle = new GaugeNeedle("{Helios}/Gauges/F-16/Altimeter/altimeter_needle.xaml", new Point(182d, 188d), new Size(16d, 257d), new Point(8d, 138.5d));
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/Common/f16_gauge_bezel.png", new Rect(0d, 0d, 364d, 376d)));

            _airPressure = new HeliosValue(this, new BindingValue(0d), "", "air pressure", "Current air pressure calibaration setting for the altimeter.", "", BindingValueUnits.InchesOfMercury);
            _airPressure.SetValue(new BindingValue(29.92), true);
            _airPressure.Execute += new HeliosActionHandler(AirPressure_Execute);
            Actions.Add(_airPressure);

            _altitdue = new HeliosValue(this, new BindingValue(0d), "", "altitude", "Current altitude of the aricraft.", "", BindingValueUnits.Feet);
            _altitdue.Execute += new HeliosActionHandler(Altitude_Execute);
            Actions.Add(_altitdue);
        }
Esempio n. 6
0
        public HatSwitch(BaseUDPInterface sourceInterface, string deviceId, string argId,
                         string leftAction, string leftValue,
                         string upAction, string upValue,
                         string rightAction, string rightValue,
                         string downAction, string downValue,
                         string releaseAction, string releaseValue,
                         string device, string name, string exportFormat, bool everyFrame)
            : base(sourceInterface)
        {
            _id         = argId;
            _format     = exportFormat;
            _everyframe = everyFrame;

            _sendData.Add(HatPosition.Center, "C" + deviceId + "," + releaseAction + "," + releaseValue);
            _sendData.Add(HatPosition.Left, "C" + deviceId + "," + leftAction + "," + leftValue);
            _sendData.Add(HatPosition.Up, "C" + deviceId + "," + upAction + "," + upValue);
            _sendData.Add(HatPosition.Right, "C" + deviceId + "," + rightAction + "," + rightValue);
            _sendData.Add(HatPosition.Down, "C" + deviceId + "," + downAction + "," + downValue);

            _positionByValue.Add(releaseValue, HatPosition.Center);
            _positionByValue.Add(leftValue, HatPosition.Left);
            _positionByValue.Add(upValue, HatPosition.Up);
            _positionByValue.Add(rightValue, HatPosition.Right);
            _positionByValue.Add(downValue, HatPosition.Down);

            _positionValue          = new HeliosValue(sourceInterface, new BindingValue((double)_currentPosition), device, name, "Current position of the hat switch.", "Position 0 = center, 1 = up, 2 = down, 3 = left,  or 4 = right.", BindingValueUnits.Numeric);
            _positionValue.Execute += new HeliosActionHandler(SetPositionAction_Execute);
            Values.Add(_positionValue);
            Actions.Add(_positionValue);
            Triggers.Add(_positionValue);
        }
Esempio n. 7
0
        internal void Initialize(ControlRouter parent)
        {
            _parent = parent;

            // conversion from pulses to values
            HeliosAction changeValueByPulses = new HeliosAction(parent, Name, "Value from Pulses", "change",
                                                                "Increment of decrement the value by a number of pulses", "+/- pulses", BindingValueUnits.Numeric);

            changeValueByPulses.Execute += ChangeValueByPulses_Execute;
            Actions.Add(changeValueByPulses);

            // direct angle mapping
            HeliosAction changeAngle = new HeliosAction(parent, Name, "Relative Angle", "change",
                                                        "Control the angle of bound rotary control relative to where it was when it was bound",
                                                        "Value of Control", BindingValueUnits.Numeric);

            changeAngle.Execute += ChangeAngle_Execute;
            Actions.Add(changeAngle);

            // status display: name of bound control
            _controlName = new HeliosValue(parent, BindingValue.Empty, Name, "Bound Control",
                                           "The name of the control receiving the output from this port", "Control name from Profile",
                                           BindingValueUnits.Text);
            Values.Add(_controlName);
            Triggers.Add(_controlName);
        }
Esempio n. 8
0
        public FuelGauge()
            : base("Fuel Gauge", new Size(360, 360))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/FuelGauge/fuel_gauge_faceplate.xaml", new Rect(30d, 30d, 300d, 300d)));

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 6000d, 168d);

            _totalDrum = new GaugeDrumCounter("{Helios}/Gauges/A-10/Common/drum_tape.xaml", new Point(135d, 95d), "##%00", new Size(10d, 15d), new Size(18d, 28d));
            _totalDrum.Clip = new RectangleGeometry(new Rect(135d, 95d, 90d, 28d));
            _totalDrum.Value = 0d;
            Components.Add(_totalDrum);

            _leftNeedle = new GaugeNeedle("{Helios}/Gauges/A-10/FuelGauge/fuel_gauge_needle.xaml", new Point(180d, 180d), new Size(90d, 177d), new Point(45d, 132d), 186d);
            Components.Add(_leftNeedle);

            _rightNeedle = new GaugeNeedle("{Helios}/Gauges/A-10/FuelGauge/fuel_gauge_needle.xaml", new Point(180d, 180d), new Size(90d, 177d), new Point(45d, 132d), 174d);
            Components.Add(_rightNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/Common/engine_bezel.png", new Rect(0d, 0d, 360d, 360d)));

            _leftQuantity = new HeliosValue(this, new BindingValue(0d), "", "left quantity", "Quantity of fuel to display on left needle.", "(0 - 6000)", BindingValueUnits.Pounds);
            _leftQuantity.Execute += new HeliosActionHandler(LeftQuantity_Execute);
            Actions.Add(_leftQuantity);

            _rightQuantity = new HeliosValue(this, new BindingValue(0d), "", "right quantity", "Quantity of fuel to display on right needle.", "(0 - 6000)", BindingValueUnits.Pounds);
            _rightQuantity.Execute += new HeliosActionHandler(RightQuantity_Execute);
            Actions.Add(_rightQuantity);

            _totalQuantity = new HeliosValue(this, new BindingValue(0d), "", "total quantity", "Quantity of fuel to display on the totalizer.", "(0 - 99,999)", BindingValueUnits.Pounds);
            _totalQuantity.Execute += new HeliosActionHandler(TotalQuantity_Execute);
            Actions.Add(_totalQuantity);
        }
Esempio n. 9
0
        public Nosecone()
            : base("Nosecone", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 1d, 300d);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Nosecone/nosecone_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/Common/generic_needle.xaml", center, new Size(32, 185), new Point(16, 127), 180d);
            Components.Add(_currentNeedle);

            _manualNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/Nosecone/nosecone_outer_needle.xaml", center, new Size(32, 230), new Point(16, 132), 180d);
            Components.Add(_manualNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));


            _currentPosition = new HeliosValue(this, BindingValue.Empty, "", "Nosecone", "Current Position", "", BindingValueUnits.Numeric);
            _currentPosition.Execute += CurrentPosition_Execute;
            Actions.Add(_currentPosition);

            _manualPosition = new HeliosValue(this, BindingValue.Empty, "", "Nosecone Manual", "Use Manual Knob controller output", "", BindingValueUnits.Numeric);
            _manualPosition.Execute += ManualPosition_Execute;
            Actions.Add(_manualPosition);
        }
Esempio n. 10
0
        public O2Level()
            : base("O2Level", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0, 0d, 150d, 158d);
            _needleCalibration.Add(new CalibrationPointDouble(10d, 4d));
            _needleCalibration.Add(new CalibrationPointDouble(50d, 47.8d));
            _needleCalibration.Add(new CalibrationPointDouble(100d, 103d));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/O2Level/o2_level_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/Common/small_needle.xaml", center, new Size(23, 164), new Point(11.5, 127), 277.5d);
            Components.Add(_currentNeedle);

            _lLungImage = new GaugeImage("{Helios}/Gauges/Mig-21/O2Level/o2_level_blinker_l.xaml", new Rect(136, 194, 25, 63.9));
            Components.Add(_lLungImage);

            _rLungImage = new GaugeImage("{Helios}/Gauges/Mig-21/O2Level/o2_level_blinker_r.xaml", new Rect(180, 194, 25, 63.9));
            Components.Add(_rLungImage);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentO2Level = new HeliosValue(this, BindingValue.Empty, "", "O2 Level", "Current O2 Level", "", BindingValueUnits.Numeric);
            _currentO2Level.Execute += CurrentO2Level_Execute;
            Actions.Add(_currentO2Level);

            _lLungFlag = new HeliosValue(this, new BindingValue(false), "", "Lung Blinkers", "White when working", "True if displayed.", BindingValueUnits.Boolean);
            _lLungFlag.Execute += LFlags_Execute;
            Actions.Add(_lLungFlag);
        }
Esempio n. 11
0
        public RotarySwitch()
            : base("Rotary Switch", new Size(100, 100))
        {
            _swipeCalibration = new CalibrationPointCollectionDouble(-1d, 2d, 1d, 0.5d);
            _swipeCalibration.Add(new CalibrationPointDouble(0.0d, 1d));

            _labelFormat.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(LabelFormat_PropertyChanged);

            _positionValue = new HeliosValue(this, new BindingValue(1), "", "position", "Current position of the switch.", "", BindingValueUnits.Numeric);
            _positionValue.Execute += new HeliosActionHandler(SetPositionAction_Execute);
            Values.Add(_positionValue);
            Actions.Add(_positionValue);
            Triggers.Add(_positionValue);

            _positionNameValue = new HeliosValue(this, new BindingValue("0"), "", "position name", "Name of the current position of the switch.", "", BindingValueUnits.Text);
            Values.Add(_positionNameValue);
            Triggers.Add(_positionNameValue);

            _positions.CollectionChanged += new NotifyCollectionChangedEventHandler(Positions_CollectionChanged);
            _positions.PositionChanged += new EventHandler<RotarySwitchPositionChangeArgs>(PositionChanged);
            _positions.Add(new RotarySwitchPosition(this, 1, "0", 0d));
            _positions.Add(new RotarySwitchPosition(this, 2, "1", 90d));
            _currentPosition = 1;
            _defaultPosition = 1;
        }
Esempio n. 12
0
 public TotalFuel(BaseUDPInterface sourceInterface)
     : base(sourceInterface)
 {
     _fuel = new HeliosValue(sourceInterface, BindingValue.Empty, "Fuel Gauge", "Total Fuel", "Fuel amount shown on the totalizer.", "", BindingValueUnits.Pounds);
     Values.Add(_fuel);
     Triggers.Add(_fuel);
 }
Esempio n. 13
0
 public MagVariation(BaseUDPInterface sourceInterface)
     : base(sourceInterface)
 {
     _variation = new HeliosValue(sourceInterface, BindingValue.Empty, "ZMS-3 Magnetic Variation", "Variation Display", "", "", BindingValueUnits.Degrees);
     Values.Add(_variation);
     Triggers.Add(_variation);
 }
Esempio n. 14
0
        public IAS()
            : base("IAS", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 555.55d, 720d);
            _needleCalibration.Add(new CalibrationPointDouble(83.33d, 108d));
            _needleCalibration.Add(new CalibrationPointDouble(166.67d, 216d));
            _needleCalibration.Add(new CalibrationPointDouble(250d, 324d));
            _needleCalibration.Add(new CalibrationPointDouble(333.34d, 432d));
            _needleCalibration.Add(new CalibrationPointDouble(416.67d, 540d));

            _backCalibration = new CalibrationPointCollectionDouble(0d, 0d, 555.55d, 90d);
            _backCalibration.Add(new CalibrationPointDouble(277, 90d));
            _backCalibration.Add(new CalibrationPointDouble(270, 0d));
            _currentBack = new GaugeNeedle("{Helios}/Gauges/Mig-21/IAS/ias_back.xaml", center, new Size(340, 340), center, -90);
            Components.Add(_currentBack);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/IAS/ias_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/Common/generic_needle.xaml", center, new Size(32, 185), new Point(16, 127));
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentIas = new HeliosValue(this, BindingValue.Empty, "", "IAS", "Current IAS", "", BindingValueUnits.Numeric);
            _currentIas.Execute += CurrentIas_Execute;
            _currentIas.Execute += CurrentBack_Execute;
            Actions.Add(_currentIas);

        }
Esempio n. 15
0
        public Axis(BaseUDPInterface sourceInterface, string deviceId, string buttonId, string argId, double argValue, double argMin, double argMax, string device, string name, bool loop, string exportFormat)
            : base(sourceInterface)
        {
            _id = argId;
            _format = exportFormat;
            _loop = loop;

            _argValue = argValue;
            _argMin = argMin;
            _argMax = argMax;

            _actionData = "C" + deviceId + "," + buttonId + ",";

            _value = new HeliosValue(sourceInterface, new BindingValue(0.0d), device, name, "Current value of this axis.", argMin.ToString() + "-" + argMax.ToString(), BindingValueUnits.Numeric);
            _value.Execute += new HeliosActionHandler(Value_Execute);
            Values.Add(_value);
            Actions.Add(_value);
            Triggers.Add(_value);

            _incrementAction = new HeliosAction(sourceInterface, device, name, "increment", "Increments this axis value.", "Amount to increment by (Default:"+ argValue + ")", BindingValueUnits.Numeric);
            _incrementAction.Execute += new HeliosActionHandler(IncrementAction_Execute);
            Actions.Add(_incrementAction);

            _decrementAction = new HeliosAction(sourceInterface, device, name, "decrement", "Decrement this axis value.", "Amount to decrement by (Default:" + -argValue + ")", BindingValueUnits.Numeric);
            _decrementAction.Execute += new HeliosActionHandler(DecrementAction_Execute);
            Actions.Add(_decrementAction);
        }
Esempio n. 16
0
        public O2Pressure()
            : base("O2Pressure", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0, 0d, 20d, 277d);
            _needleCalibration.Add(new CalibrationPointDouble(2d, 30d));
            _needleCalibration.Add(new CalibrationPointDouble(4d, 58d));
            _needleCalibration.Add(new CalibrationPointDouble(6d, 86d));
            _needleCalibration.Add(new CalibrationPointDouble(8d, 115d));
            _needleCalibration.Add(new CalibrationPointDouble(10d, 137.9d));
            _needleCalibration.Add(new CalibrationPointDouble(12d, 160.7d));
            _needleCalibration.Add(new CalibrationPointDouble(14d, 189d));
            _needleCalibration.Add(new CalibrationPointDouble(16d, 210.1d));
            _needleCalibration.Add(new CalibrationPointDouble(18d, 245d));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/O2Pressure/o2_pressure_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/Common/small_needle.xaml", center, new Size(23, 164), new Point(11.5, 127), 222d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentO2Pressure = new HeliosValue(this, BindingValue.Empty, "", "Current O2 Pressure", "Current O2 Pressure", "", BindingValueUnits.Numeric);
            _currentO2Pressure.Execute += CurrentO2Pressure_Execute;
            Actions.Add(_currentO2Pressure);
        }
Esempio n. 17
0
 public DTSCardInterface() : base("DTS Card")
 {
     _angle = new HeliosValue(this, new BindingValue(0), "", "angle", "Current angle of the synchro output.", "Angle in degrees.", BindingValueUnits.Degrees);
     _angle.Execute += new HeliosActionHandler(Angle_Execute);
     Values.Add(_angle);
     Actions.Add(_angle);
 }
Esempio n. 18
0
        public ThreeWayToggleSwitch()
            : base("Three Way Toggle Switch", new System.Windows.Size(50, 100))
        {
            _positionOneImage = "{Helios}/Images/Toggles/toggle-up.png";
            _positionTwoImage = "{Helios}/Images/Toggles/toggle-norm.png";
            _positionThreeImage = "{Helios}/Images/Toggles/toggle-down.png";

            _positionOneEnterAction = new HeliosTrigger(this, "", "position one", "entered", "Triggered when position one is entered or depressed.");
            Triggers.Add(_positionOneEnterAction);
            _positionOneExitAction = new HeliosTrigger(this, "", "position one", "exited", "Triggered when posotion one is exited or released.");
            Triggers.Add(_positionOneExitAction);
            _positionTwoEnterAction = new HeliosTrigger(this, "", "position two", "entered", "Triggered when position two is entered or depressed.");
            Triggers.Add(_positionTwoEnterAction);
            _positionTwoExitAction = new HeliosTrigger(this, "", "position two", "exited", "Triggered when posotion two is exited or released.");
            Triggers.Add(_positionTwoExitAction);
            _positionThreeEnterAction = new HeliosTrigger(this, "", "position three", "entered", "Triggered when position three is entered or depressed.");
            Triggers.Add(_positionThreeEnterAction);
            _positionThreeExitAction = new HeliosTrigger(this, "", "position three", "exited", "Triggered when posotion three is exited or released.");
            Triggers.Add(_positionThreeExitAction);

            _positionValue = new HeliosValue(this, new BindingValue((double)SwitchPosition), "", "position", "Current position of the switch.", "Position number 1,2 or 3.  Positions are numbered from top to bottom.", BindingValueUnits.Numeric);
            _positionValue.Execute += new HeliosActionHandler(SetPositionAction_Execute);
            Values.Add(_positionValue);
            Actions.Add(_positionValue);
            Triggers.Add(_positionValue);
        }
Esempio n. 19
0
        public EngingeRpm()
            : base("EngingeRpm", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 110d, 344.5d);
            _needleCalibration.Add(new CalibrationPointDouble(100d, 315d));

            _needleCalibration1 = new CalibrationPointCollectionDouble(0d, 0d, 110d, 344.5d);
            _needleCalibration1.Add(new CalibrationPointDouble(25d, 6d));  
            _needleCalibration1.Add(new CalibrationPointDouble(65d, 158d));  
            _needleCalibration1.Add(new CalibrationPointDouble(92d, 281d));   
            _needleCalibration1.Add(new CalibrationPointDouble(100d, 318d));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/EngineRpm/enginerpm_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _twoNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/EngineRpm/enginerpm_needle2.xaml", center, new Size(32, 185), new Point(16, 127), 44);
            Components.Add(_twoNeedle);

            _oneNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/EngineRpm/enginerpm_needle1.xaml", center, new Size(32, 185), new Point(16, 127), 44);
            Components.Add(_oneNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/EngineRpm/enginerpm_bezel.xaml", new Rect(0, 0, 340, 340)));

            _oneE = new HeliosValue(this, BindingValue.Empty, "", "rpm1", "Engine rpm 1", "", BindingValueUnits.Numeric);
            _oneE.Execute += OneEng_Execute;
            Actions.Add(_oneE);

            _twoE = new HeliosValue(this, BindingValue.Empty, "", "rpm2", "Engine rpm 2", "", BindingValueUnits.Numeric);
            _twoE.Execute += TwoEng_Execute;
            Actions.Add(_twoE);

        }
Esempio n. 20
0
        public IndicatorPushButton(BaseUDPInterface sourceInterface, string deviceId, string buttonId, string argId, string device, string name, string pushValue, string releaseValue)
            : base(sourceInterface)
        {
            _id = argId;
            _format = "%0.1f";

            _pushValue = pushValue;
            _releaseValue = releaseValue;

            _pushActionData = "C" + deviceId + "," + buttonId + "," + pushValue;
            _releaseActionData = "C" + deviceId + "," + buttonId + "," + releaseValue;

            _value = new HeliosValue(sourceInterface, BindingValue.Empty, device, name, "Current state of this button.", "True if the button is currently pushed(either via pressure or toggle), otherwise false.", BindingValueUnits.Boolean);
            Values.Add(_value);
            Triggers.Add(_value);

            _indicatorValue = new HeliosValue(sourceInterface, BindingValue.Empty, device, name + " indicator", "Current state of the indicator lamp on this button.", "True if the indicator is on, otherwise false.", BindingValueUnits.Boolean);
            Values.Add(_indicatorValue);
            Triggers.Add(_indicatorValue);

            _pushedTrigger = new HeliosTrigger(sourceInterface, device, name, "pushed", "Fired when this button is pushed in the simulator.");
            Triggers.Add(_pushedTrigger);
            _releasedTrigger = new HeliosTrigger(sourceInterface, device, name, "released", "Fired when this button is released in the simulator.");
            Triggers.Add(_releasedTrigger);

            _pushAction = new HeliosAction(sourceInterface, device, name, "push", "Pushes this button in the simulator");
            _pushAction.Execute += new HeliosActionHandler(PushAction_Execute);
            Actions.Add(_pushAction);
            _releaseAction = new HeliosAction(sourceInterface, device, name, "release", "Releases the button in the simulator.");
            _releaseAction.Execute += new HeliosActionHandler(ReleaseAction_Execute);
            Actions.Add(_releaseAction);
        }
Esempio n. 21
0
        public BatteryCapacity()
            : base("BatteryCapacity", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 100d, 300d);
            _needleCalibration.Add(new CalibrationPointDouble(10d, 36d));
            _needleCalibration.Add(new CalibrationPointDouble(20d, 66d));
            _needleCalibration.Add(new CalibrationPointDouble(30d, 96d));
            _needleCalibration.Add(new CalibrationPointDouble(40d, 126d));
            _needleCalibration.Add(new CalibrationPointDouble(50d, 156d));
            _needleCalibration.Add(new CalibrationPointDouble(60d, 186d));
            _needleCalibration.Add(new CalibrationPointDouble(70d, 216d));
            _needleCalibration.Add(new CalibrationPointDouble(80d, 246d));
            _needleCalibration.Add(new CalibrationPointDouble(90d, 276d));

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/BatteryCapacity/battery_capacity_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/Common/generic_small_gray_needle.xaml", center, new Size(32, 185), new Point(16, 127), 210d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentBatteryCapacity          = new HeliosValue(this, BindingValue.Empty, "", "Current Battery Capacity", "Current Battery Capacity", "", BindingValueUnits.Numeric);
            _currentBatteryCapacity.Execute += CurrentBatteryCapacity_Execute;
            Actions.Add(_currentBatteryCapacity);
        }
Esempio n. 22
0
 public LatitudeEntry(BaseUDPInterface sourceInterface)
     : base(sourceInterface)
 {
     _variation = new HeliosValue(sourceInterface, BindingValue.Empty, "PShK-7 Latitude Entry", "Latitude Entry Display", "", "", BindingValueUnits.Degrees);
     Values.Add(_variation);
     Triggers.Add(_variation);
 }
Esempio n. 23
0
        public IndicatorPushButton(BaseUDPInterface sourceInterface, string deviceId, string buttonId, string argId, string device, string name, string pushValue, string releaseValue)
            : base(sourceInterface)
        {
            _id     = argId;
            _format = "%0.1f";

            _pushValue    = pushValue;
            _releaseValue = releaseValue;

            _pushActionData    = "C" + deviceId + "," + buttonId + "," + pushValue;
            _releaseActionData = "C" + deviceId + "," + buttonId + "," + releaseValue;

            _value = new HeliosValue(sourceInterface, BindingValue.Empty, device, name, "Current state of this button.", "True if the button is currently pushed(either via pressure or toggle), otherwise false.", BindingValueUnits.Boolean);
            Values.Add(_value);
            Triggers.Add(_value);

            _indicatorValue = new HeliosValue(sourceInterface, BindingValue.Empty, device, name + " indicator", "Current state of the indicator lamp on this button.", "True if the indicator is on, otherwise false.", BindingValueUnits.Boolean);
            Values.Add(_indicatorValue);
            Triggers.Add(_indicatorValue);

            _pushedTrigger = new HeliosTrigger(sourceInterface, device, name, "pushed", "Fired when this button is pushed in the simulator.");
            Triggers.Add(_pushedTrigger);
            _releasedTrigger = new HeliosTrigger(sourceInterface, device, name, "released", "Fired when this button is released in the simulator.");
            Triggers.Add(_releasedTrigger);

            _pushAction          = new HeliosAction(sourceInterface, device, name, "push", "Pushes this button in the simulator");
            _pushAction.Execute += new HeliosActionHandler(PushAction_Execute);
            Actions.Add(_pushAction);
            _releaseAction          = new HeliosAction(sourceInterface, device, name, "release", "Releases the button in the simulator.");
            _releaseAction.Execute += new HeliosActionHandler(ReleaseAction_Execute);
            Actions.Add(_releaseAction);
        }
Esempio n. 24
0
        public RadioAltimeter()
            : base("RadioAltimeter", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0.0d, 0d, 1000d, 231d);
            _needleCalibration.Add(new CalibrationPointDouble(10d, 22.5d));
            _needleCalibration.Add(new CalibrationPointDouble(20d, 34.6d));
            _needleCalibration.Add(new CalibrationPointDouble(30d, 55.6d));
            _needleCalibration.Add(new CalibrationPointDouble(40d, 73.8d));
            _needleCalibration.Add(new CalibrationPointDouble(50d, 94.2d));
            _needleCalibration.Add(new CalibrationPointDouble(60d, 103.2d));
            _needleCalibration.Add(new CalibrationPointDouble(70d, 114.2d));
            _needleCalibration.Add(new CalibrationPointDouble(80d, 119.6d));
            _needleCalibration.Add(new CalibrationPointDouble(90d, 127d));
            _needleCalibration.Add(new CalibrationPointDouble(100d, 130.5d));
            _needleCalibration.Add(new CalibrationPointDouble(150d, 151.2d));
            _needleCalibration.Add(new CalibrationPointDouble(200d, 160.6d));
            _needleCalibration.Add(new CalibrationPointDouble(250d, 181.9d));
            _needleCalibration.Add(new CalibrationPointDouble(300d, 192.6d));
            _needleCalibration.Add(new CalibrationPointDouble(400d, 210.9d));
            _needleCalibration.Add(new CalibrationPointDouble(500d, 220.6d));
            _needleCalibration.Add(new CalibrationPointDouble(600d, 231d));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/RadioAltimeter/radalt_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/RadioAltimeter/radalt_needle.xaml", center, new Size(69d, 178d), new Point(34.5d, 126.5d), -120d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentRadAlt = new HeliosValue(this, BindingValue.Empty, "", "Current RadAlt", "Current RadAlt", "", BindingValueUnits.Numeric);
            _currentRadAlt.Execute += CurrentRadAlt_Execute;
            Actions.Add(_currentRadAlt);
        }
Esempio n. 25
0
        public RotaryEncoderPushable()
            : base("Pushable Rotary Encoder", new Size(100, 100))
        {
            KnobImage = "{Helios}/Images/Knobs/knob1.png";

            _incrementTrigger = new HeliosTrigger(this, "", "encoder", "incremented", "Triggered when encoder is incremented.", "Current encoder value", BindingValueUnits.Numeric);
            Triggers.Add(_incrementTrigger);
            _decrementTrigger = new HeliosTrigger(this, "", "encoder", "decremented", "Triggered when encoder is decremented.", "Current encoder value", BindingValueUnits.Numeric);
            Triggers.Add(_decrementTrigger);

            _pushedTrigger   = new HeliosTrigger(this, "", "", "pushed", "Fired when this button is pushed.", "Always returns true.", BindingValueUnits.Boolean);
            _releasedTrigger = new HeliosTrigger(this, "", "", "released", "Fired when this button is released.", "Always returns false.", BindingValueUnits.Boolean);
            Triggers.Add(_pushedTrigger);
            Triggers.Add(_releasedTrigger);

            _pushAction             = new HeliosAction(this, "", "", "push", "Simulate physically pushing this button.");
            _pushAction.Execute    += new HeliosActionHandler(Push_ExecuteAction);
            _releaseAction          = new HeliosAction(this, "", "", "release", "Simulate physically removing pressure from this button.");
            _releaseAction.Execute += new HeliosActionHandler(Release_ExecuteAction);
            Actions.Add(_pushAction);
            Actions.Add(_releaseAction);

            _pushedValue          = new HeliosValue(this, new BindingValue(false), "", "physical state", "Current state of this button.", "True if the button is currently pushed(either via pressure or toggle), otherwise false.  Setting this value will not fire pushed/released triggers, but will fire on/off triggers.  Directly setting this state to on for a momentary buttons will not auto release, the state must be manually reset to false.", BindingValueUnits.Boolean);
            _pushedValue.Execute += new HeliosActionHandler(PushedValue_Execute);
            Values.Add(_pushedValue);
            Actions.Add(_pushedValue);
        }
Esempio n. 26
0
        public GuardedToggleSwitch()
            : base("Guarded Toggle Switch", new System.Windows.Size(65, 249))
        {
            _positionOneGuardUpImage   = "{Helios}/Images/Toggles/guard-up-on.png";
            _positionOneGuardDownImage = "{Helios}/Images/Toggles/guard-down-on.png";
            _positionTwoGuardUpImage   = "{Helios}/Images/Toggles/guard-up-off.png";
            _positionTwoGuardDownImage = "{Helios}/Images/Toggles/guard-down-off.png";

            _positionOneEnterAction = new HeliosTrigger(this, "", "position one", "entered", "Triggered when position one is entered or depressed.");
            Triggers.Add(_positionOneEnterAction);
            _positionOneExitAction = new HeliosTrigger(this, "", "position one", "exited", "Triggered when posotion one is exited or released.");
            Triggers.Add(_positionOneExitAction);
            _positionTwoEnterAction = new HeliosTrigger(this, "", "position two", "entered", "Triggered when position two is entered or depressed.");
            Triggers.Add(_positionTwoEnterAction);
            _positionTwoExitAction = new HeliosTrigger(this, "", "position two", "exited", "Triggered when position two is exited or released.");
            Triggers.Add(_positionTwoExitAction);
            _guardUpAction = new HeliosTrigger(this, "", "guard", "up", "Triggered when guard is moved up.");
            Triggers.Add(_guardUpAction);
            _guardDownAction = new HeliosTrigger(this, "", "guard", "down", "Triggered when guard is moved down.");
            Triggers.Add(_guardDownAction);
            _releaseTrigger = new HeliosTrigger(this, "", "", "released", "This trigger is fired when the user releases pressure on the switch (lifts finger or mouse button.).");
            Triggers.Add(_releaseTrigger);

            _positionValue          = new HeliosValue(this, new BindingValue((double)SwitchPosition), "", "position", "Current position of the switch.", "Position number 1 or 2.  Positions are numbered from top to bottom.", BindingValueUnits.Numeric);
            _positionValue.Execute += new HeliosActionHandler(SetPositionAction_Execute);
            Values.Add(_positionValue);
            Actions.Add(_positionValue);
            Triggers.Add(_positionValue);

            _guardPositionValue          = new HeliosValue(this, new BindingValue((double)GuardPosition), "", "guard position", "Current position of the switch guard.", "1 = Up, 2 = Down.", BindingValueUnits.Numeric);
            _guardPositionValue.Execute += new HeliosActionHandler(SetGuardPositionAction_Execute);
            Values.Add(_guardPositionValue);
            Actions.Add(_guardPositionValue);
            Triggers.Add(_guardPositionValue);
        }
Esempio n. 27
0
 public VHFRadioEncoder3(BaseUDPInterface sourceInterface, string deviceId, string buttonId, string button2Id, string argId, double argValue, double argMin, double argMax, string device, string name, bool loop, string exportFormat)
     : base(sourceInterface, deviceId, buttonId, button2Id, argId, argValue, argMin, argMax, device, name, loop, exportFormat)
 {
     _windowValue = new HeliosValue(sourceInterface, new BindingValue(0.0d), device, name + " window", "Current value displayed in this encoder.", argMin.ToString() + "-" + argMax.ToString(), BindingValueUnits.Text);
     Values.Add(_windowValue);
     Triggers.Add(_windowValue);
 }
Esempio n. 28
0
        public TACANChannel()
            : base("TACAN Channel", new Size(275, 100))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/TACANChannel/tacan_channel_faceplate.xaml", new Rect(0d, 0d, 275d, 100d)));

            _hundredsDrum = new GaugeDrumCounter("{Helios}/Gauges/A-10/TACANChannel/tacan_channel_hundreds_tape.xaml", new Point(15.5d, 11.5d), "#", new Size(10d, 15d), new Size(50d, 75d));
            _hundredsDrum.Clip = new RectangleGeometry(new Rect(15.5d, 11.5d, 50d, 75d));
            Components.Add(_hundredsDrum);

            _tensDrum = new GaugeDrumCounter("{Helios}/Gauges/A-10/Common/drum_tape.xaml", new Point(79.5d, 11.5d), "#", new Size(10d, 15d), new Size(50d, 75d));
            _tensDrum.Clip = new RectangleGeometry(new Rect(79.5d, 11.5d, 50d, 75d));
            Components.Add(_tensDrum);

            _onesDrum = new GaugeDrumCounter("{Helios}/Gauges/A-10/Common/drum_tape.xaml", new Point(145.5d, 11.5d), "#", new Size(10d, 15d), new Size(50d, 75d));
            _onesDrum.Clip = new RectangleGeometry(new Rect(145.5d, 11.5d, 50d, 75d));
            Components.Add(_onesDrum);

            _xModeImage = new GaugeImage("{Helios}/Gauges/A-10/TACANChannel/tacan_channel_x_mode.xaml", new Rect(0d, 0d, 275d, 100d));
            Components.Add(_xModeImage);

            _yModeImage = new GaugeImage("{Helios}/Gauges/A-10/TACANChannel/tacan_channel_y_mode.xaml", new Rect(0d, 0d, 275d, 100d));
            _yModeImage.IsHidden = true;
            Components.Add(_yModeImage);

            _channel = new HeliosValue(this, new BindingValue(0d), "", "channel", "TACAN channel", "Does not include X/Y mode", BindingValueUnits.Numeric);
            _channel.Execute += new HeliosActionHandler(Channel_Execute);
            Actions.Add(_channel);

            _xyMode = new HeliosValue(this, new BindingValue(0d), "", "mode", "TACAN X/Y Mode", "1=X, 2=Y", BindingValueUnits.Numeric);
            _xyMode.Execute += new HeliosActionHandler(Mode_Execute);
            Actions.Add(_xyMode);
        }
Esempio n. 29
0
        public TACANChannel()
            : base("TACAN Channel", new Size(275, 100))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/TACANChannel/tacan_channel_faceplate.xaml", new Rect(0d, 0d, 275d, 100d)));

            _hundredsDrum      = new GaugeDrumCounter("{Helios}/Gauges/A-10/TACANChannel/tacan_channel_hundreds_tape.xaml", new Point(15.5d, 11.5d), "#", new Size(10d, 15d), new Size(50d, 75d));
            _hundredsDrum.Clip = new RectangleGeometry(new Rect(15.5d, 11.5d, 50d, 75d));
            Components.Add(_hundredsDrum);

            _tensDrum      = new GaugeDrumCounter("{Helios}/Gauges/A-10/Common/drum_tape.xaml", new Point(79.5d, 11.5d), "#", new Size(10d, 15d), new Size(50d, 75d));
            _tensDrum.Clip = new RectangleGeometry(new Rect(79.5d, 11.5d, 50d, 75d));
            Components.Add(_tensDrum);

            _onesDrum      = new GaugeDrumCounter("{Helios}/Gauges/A-10/Common/drum_tape.xaml", new Point(145.5d, 11.5d), "#", new Size(10d, 15d), new Size(50d, 75d));
            _onesDrum.Clip = new RectangleGeometry(new Rect(145.5d, 11.5d, 50d, 75d));
            Components.Add(_onesDrum);

            _xModeImage = new GaugeImage("{Helios}/Gauges/A-10/TACANChannel/tacan_channel_x_mode.xaml", new Rect(0d, 0d, 275d, 100d));
            Components.Add(_xModeImage);

            _yModeImage          = new GaugeImage("{Helios}/Gauges/A-10/TACANChannel/tacan_channel_y_mode.xaml", new Rect(0d, 0d, 275d, 100d));
            _yModeImage.IsHidden = true;
            Components.Add(_yModeImage);

            _channel          = new HeliosValue(this, new BindingValue(0d), "", "channel", "TACAN channel", "Does not include X/Y mode", BindingValueUnits.Numeric);
            _channel.Execute += new HeliosActionHandler(Channel_Execute);
            Actions.Add(_channel);

            _xyMode          = new HeliosValue(this, new BindingValue(0d), "", "mode", "TACAN X/Y Mode", "1=X, 2=Y", BindingValueUnits.Numeric);
            _xyMode.Execute += new HeliosActionHandler(Mode_Execute);
            Actions.Add(_xyMode);
        }
Esempio n. 30
0
 public SMCMultipleDisplay(BaseUDPInterface sourceInterface)
     : base(sourceInterface)
 {
     _one_digit_display = new HeliosValue(sourceInterface, BindingValue.Empty, "Stores Management", "Stores multiple display", "Multiple value", "", BindingValueUnits.Numeric);
     Values.Add(_one_digit_display);
     Triggers.Add(_one_digit_display);
 }
Esempio n. 31
0
 public VHFPresetSelector(BaseUDPInterface sourceInterface, string deviceId, string buttonId, string argId, double argValue, double argMin, double argMax, string device, string name)
     : base(sourceInterface, deviceId, buttonId, argId, argValue, argMin, argMax, device, name, false, "%.3f")
 {
     _windowValue = new HeliosValue(sourceInterface, new BindingValue(0.0d), device, name + " window", "Current value displayed in this encoder.", argMin.ToString() + "-" + argMax.ToString(), BindingValueUnits.Text);
     Values.Add(_windowValue);
     Triggers.Add(_windowValue);
 }
Esempio n. 32
0
 public HSIMiles(BaseUDPInterface sourceInterface)
     : base(sourceInterface)
 {
     _distance = new HeliosValue(sourceInterface, BindingValue.Empty, "HSI", "Distance to beacon", "Range in nautical miles to the currently selected steerpoint or TACAN station.", "", BindingValueUnits.NauticalMiles);
     Values.Add(_distance);
     Triggers.Add(_distance);
 }
Esempio n. 33
0
 public ILSFrequency(BaseUDPInterface sourceInterface)
     : base(sourceInterface)
 {
     _frequency = new HeliosValue(sourceInterface, BindingValue.Empty, "ILS", "Frequency", "Currently tuned ILS frequency.", "", BindingValueUnits.Numeric);
     Values.Add(_frequency);
     Triggers.Add(_frequency);
 }
Esempio n. 34
0
        public VVI1()
            : base("Flight Instruments", new Size(364, 376))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/VVI/vvi_faceplate.xaml", new Rect(32d, 38d, 300d, 300d)));

            _needle = new GaugeNeedle("{Helios}/Gauges/A-10/Common/needle_a.xaml", new Point(182d, 188d), new Size(22, 165), new Point(11, 130), -90d);
            Components.Add(_needle);

            //Components.Add(new GaugeImage("{Helios}/Gauges/A-10/Common/gauge_bezel.png", new Rect(0d, 0d, 364d, 376d)));
            //Components.Add(new GaugeImage("{AV-8B}/Images/WQHD/Panel/crystal_reflection_round.png", new Rect(32d, 38d, 300d, 300d)));
            GaugeImage _gauge = new GaugeImage("{AV-8B}/Images/WQHD/Panel/crystal_reflection_round.png", new Rect(32d, 38d, 300d, 300d));

            _gauge.Opacity = 0.4;
            Components.Add(_gauge);

            _verticalVelocity          = new HeliosValue(this, new BindingValue(0d), "Flight Instruments", "vertical velocity", "Veritcal velocity of the aircraft", "(-6,000 to 6,000)", BindingValueUnits.FeetPerMinute);
            _verticalVelocity.Execute += new HeliosActionHandler(VerticalVelocity_Execute);
            Actions.Add(_verticalVelocity);

            _calibrationPoints = new CalibrationPointCollectionDouble(-6000d, -169d, 6000d, 169d);
            _calibrationPoints.Add(new CalibrationPointDouble(-2000d, -81d));
            _calibrationPoints.Add(new CalibrationPointDouble(-1000d, -45d));
            _calibrationPoints.Add(new CalibrationPointDouble(0d, 0d));
            _calibrationPoints.Add(new CalibrationPointDouble(1000d, 45d));
            _calibrationPoints.Add(new CalibrationPointDouble(2000d, 81d));
        }
Esempio n. 35
0
        public HydroPressure()
            : base("HydroPressure", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration1 = new CalibrationPointCollectionDouble(0d, 0d, 300d, 131d);

            _needleCalibration2 = new CalibrationPointCollectionDouble(0d, 0d, 300d, -131);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/HydroPressure/hydropressure_faceplate.xaml", new Rect(15, 15, 310, 310)));

            Point mainneedle = new Point(266, 266);
            Point secondneedle = new Point(71, 73);

            _oneNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/HydroPressure/hydropressure_needle.xaml", mainneedle, new Size(20, 130), new Point(10, 120), 248);
            Components.Add(_oneNeedle);

            _twoNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/HydroPressure/hydropressure_needle.xaml", secondneedle, new Size(20, 130), new Point(10, 120), 201);
            Components.Add(_twoNeedle);
 
            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/HydroPressure/hydropressure_needle_cover.xaml", new Rect(235, 235, 70, 70)));
            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/HydroPressure/hydropressure_needle_cover_second.xaml", new Rect(35, 35, 70, 70)));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _oneE = new HeliosValue(this, BindingValue.Empty, "", "Pressure Main", "Pressure Main", "", BindingValueUnits.Numeric);
            _oneE.Execute += OneEng_Execute;
            Actions.Add(_oneE);

            _twoE = new HeliosValue(this, BindingValue.Empty, "", "Pressure Secondary", "Pressure Secondary", "", BindingValueUnits.Numeric);
            _twoE.Execute += TwoEng_Execute;
            Actions.Add(_twoE);
        }
Esempio n. 36
0
        public EngExhaustTempGauge()
            : base("EngExhaustTempGauge", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(300d, 0d, 900d, 231d);
            _needleCalibration.Add(new CalibrationPointDouble(400d, 29d));
            _needleCalibration.Add(new CalibrationPointDouble(500d, 59));
            _needleCalibration.Add(new CalibrationPointDouble(600d, 88d));
            _needleCalibration.Add(new CalibrationPointDouble(650d, 118d));
            _needleCalibration.Add(new CalibrationPointDouble(700d, 148d));
            _needleCalibration.Add(new CalibrationPointDouble(750d, 177d));
            _needleCalibration.Add(new CalibrationPointDouble(800d, 206d));
            _needleCalibration.Add(new CalibrationPointDouble(850d, 218d));

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/EngExhaustTemp/EngExhaustTemp_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/EngExhaustTemp/EngExhaustTemp_needle.xaml", center, new Size(69d, 178d), new Point(34.5d, 126.5d), 242d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/EngExhaustTemp/EngExhaustTemp_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentTemp          = new HeliosValue(this, BindingValue.Empty, "", "Engine Exhaust", "Current Temp", "", BindingValueUnits.Numeric);
            _currentTemp.Execute += CurrentFuel_Execute;
            Actions.Add(_currentTemp);
        }
Esempio n. 37
0
        public ThreeWayToggleSwitch()
            : base("Three Way Toggle Switch", new System.Windows.Size(50, 100))
        {
            _positionOneImage   = "{Helios}/Images/Toggles/toggle-up.png";
            _positionTwoImage   = "{Helios}/Images/Toggles/toggle-norm.png";
            _positionThreeImage = "{Helios}/Images/Toggles/toggle-down.png";

            _positionOneEnterAction = new HeliosTrigger(this, "", "position one", "entered", "Triggered when position one is entered or depressed.");
            Triggers.Add(_positionOneEnterAction);
            _positionOneExitAction = new HeliosTrigger(this, "", "position one", "exited", "Triggered when posotion one is exited or released.");
            Triggers.Add(_positionOneExitAction);
            _positionTwoEnterAction = new HeliosTrigger(this, "", "position two", "entered", "Triggered when position two is entered or depressed.");
            Triggers.Add(_positionTwoEnterAction);
            _positionTwoExitAction = new HeliosTrigger(this, "", "position two", "exited", "Triggered when posotion two is exited or released.");
            Triggers.Add(_positionTwoExitAction);
            _positionThreeEnterAction = new HeliosTrigger(this, "", "position three", "entered", "Triggered when position three is entered or depressed.");
            Triggers.Add(_positionThreeEnterAction);
            _positionThreeExitAction = new HeliosTrigger(this, "", "position three", "exited", "Triggered when posotion three is exited or released.");
            Triggers.Add(_positionThreeExitAction);

            _positionValue          = new HeliosValue(this, new BindingValue((double)SwitchPosition), "", "position", "Current position of the switch.", "Position number 1,2 or 3.  Positions are numbered from top to bottom.", BindingValueUnits.Numeric);
            _positionValue.Execute += new HeliosActionHandler(SetPositionAction_Execute);
            Values.Add(_positionValue);
            Actions.Add(_positionValue);
            Triggers.Add(_positionValue);
        }
Esempio n. 38
0
        public EGT()
            : base("Exhast Gas Temperature", new Size(340, 340))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/EGT/egt_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _leftSmallNeedle = new GaugeNeedle("{Helios}/Gauges/KA-50/EGT/egt_small_needle.xaml", new Point(97, 227), new Size(15, 45), new Point(7.5, 37.5), 180d);
            Components.Add(_leftSmallNeedle);

            _leftLargeNeedle = new GaugeNeedle("{Helios}/Gauges/KA-50/EGT/egt_large_needle.xaml", new Point(97, 158), new Size(19, 76), new Point(9.5, 66.5), -135d);
            Components.Add(_leftLargeNeedle);

            _rightSmallNeedle = new GaugeNeedle("{Helios}/Gauges/KA-50/EGT/egt_small_needle.xaml", new Point(238, 227), new Size(15, 45), new Point(7.5, 37.5), 180d);
            Components.Add(_rightSmallNeedle);

            _rightLargeNeedle = new GaugeNeedle("{Helios}/Gauges/KA-50/EGT/egt_large_needle.xaml", new Point(238, 158), new Size(19, 76), new Point(9.5, 66.5), -135d);
            Components.Add(_rightLargeNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/EGT/egt_bezel.xaml", new Rect(0, 0, 340, 340)));

            _leftTemperature          = new HeliosValue(this, BindingValue.Empty, "", "Left Exhaust Temperature", "Exhaust Gas Temperature of left engine.", "", BindingValueUnits.Celsius);
            _leftTemperature.Execute += LeftTemperature_Execute;
            Actions.Add(_leftTemperature);

            _rigthTemperature          = new HeliosValue(this, BindingValue.Empty, "", "Right Exhaust Temperature", "Exhaust Gas Temperature of right engine.", "", BindingValueUnits.Celsius);
            _rigthTemperature.Execute += RightTemperature_Execute;
            Actions.Add(_rigthTemperature);
        }
Esempio n. 39
0
        public Accelerometer()
            : base("Accelerometer", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(-2d, -100d, 4d, 200d);

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/Accelerometer/accelerometer_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _lowNeedle = new GaugeNeedle("{Helios}/Gauges/KA-50/Accelerometer/accelerometer_limit_needle.xaml", center, new Size(32, 189), new Point(16, 131));
            Components.Add(_lowNeedle);

            _highNeedle = new GaugeNeedle("{Helios}/Gauges/KA-50/Accelerometer/accelerometer_limit_needle.xaml", center, new Size(32, 189), new Point(16, 131));
            Components.Add(_highNeedle);

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/KA-50/Accelerometer/accelerometer_needle.xaml", center, new Size(32, 185), new Point(16, 127));
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/Accelerometer/accelerometer_bezel.xaml", new Rect(0, 0, 340, 340)));

            _lowG = new HeliosValue(this, BindingValue.Empty, "", "Low G", "Lowest G attained", "", BindingValueUnits.Numeric);
            _lowG.Execute += LowG_Execute;
            Actions.Add(_lowG);

            _highG = new HeliosValue(this, BindingValue.Empty, "", "High G", "Highest G attained", "", BindingValueUnits.Numeric);
            _highG.Execute += HighG_Execute;
            Actions.Add(_highG);

            _currentG = new HeliosValue(this, BindingValue.Empty, "", "Current G", "Current G", "", BindingValueUnits.Numeric);
            _currentG.Execute += CurrentG_Execute;
            Actions.Add(_currentG);
        }
Esempio n. 40
0
        public FuelGauge()
            : base("Fuel Gauge", new Size(360, 360))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/FuelGauge/fuel_gauge_faceplate.xaml", new Rect(30d, 30d, 300d, 300d)));

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 6000d, 168d);

            _totalDrum       = new GaugeDrumCounter("{Helios}/Gauges/A-10/Common/drum_tape.xaml", new Point(135d, 95d), "##%00", new Size(10d, 15d), new Size(18d, 28d));
            _totalDrum.Clip  = new RectangleGeometry(new Rect(135d, 95d, 90d, 28d));
            _totalDrum.Value = 0d;
            Components.Add(_totalDrum);

            _leftNeedle = new GaugeNeedle("{Helios}/Gauges/A-10/FuelGauge/fuel_gauge_needle.xaml", new Point(180d, 180d), new Size(90d, 177d), new Point(45d, 132d), 186d);
            Components.Add(_leftNeedle);

            _rightNeedle = new GaugeNeedle("{Helios}/Gauges/A-10/FuelGauge/fuel_gauge_needle.xaml", new Point(180d, 180d), new Size(90d, 177d), new Point(45d, 132d), 174d);
            Components.Add(_rightNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/Common/engine_bezel.png", new Rect(0d, 0d, 360d, 360d)));

            _leftQuantity          = new HeliosValue(this, new BindingValue(0d), "", "left quantity", "Quantity of fuel to display on left needle.", "(0 - 6000)", BindingValueUnits.Pounds);
            _leftQuantity.Execute += new HeliosActionHandler(LeftQuantity_Execute);
            Actions.Add(_leftQuantity);

            _rightQuantity          = new HeliosValue(this, new BindingValue(0d), "", "right quantity", "Quantity of fuel to display on right needle.", "(0 - 6000)", BindingValueUnits.Pounds);
            _rightQuantity.Execute += new HeliosActionHandler(RightQuantity_Execute);
            Actions.Add(_rightQuantity);

            _totalQuantity          = new HeliosValue(this, new BindingValue(0d), "", "total quantity", "Quantity of fuel to display on the totalizer.", "(0 - 99,999)", BindingValueUnits.Pounds);
            _totalQuantity.Execute += new HeliosActionHandler(TotalQuantity_Execute);
            Actions.Add(_totalQuantity);
        }
Esempio n. 41
0
        public FourDigitDisplay()
            : base("Four Digit Display", new Size(275, 100))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/AV-8B/4 Digit Display/digit_faceplate.xaml", new Rect(0d, 0d, 275d, 100d)));

            _thousandsDrum      = new GaugeDrumCounter("{Helios}/Gauges/AV-8B/Common/drum_tape.xaml", new Point(13.5d, 11.5d), "#", new Size(10d, 15d), new Size(50d, 75d));
            _thousandsDrum.Clip = new RectangleGeometry(new Rect(13.5d, 11.5d, 50d, 75d));
            Components.Add(_thousandsDrum);

            _hundredsDrum      = new GaugeDrumCounter("{Helios}/Gauges/AV-8B/Common/drum_tape.xaml", new Point(79.5d, 11.5d), "#", new Size(10d, 15d), new Size(50d, 75d));
            _hundredsDrum.Clip = new RectangleGeometry(new Rect(79.5d, 11.5d, 50d, 75d));
            Components.Add(_hundredsDrum);

            _tensDrum      = new GaugeDrumCounter("{Helios}/Gauges/AV-8B/Common/drum_tape.xaml", new Point(145.5d, 11.5d), "#", new Size(10d, 15d), new Size(50d, 75d));
            _tensDrum.Clip = new RectangleGeometry(new Rect(145.5d, 11.5d, 50d, 75d));
            Components.Add(_tensDrum);

            _onesDrum      = new GaugeDrumCounter("{Helios}/Gauges/AV-8B/Common/drum_tape.xaml", new Point(211.5d, 11.5d), "#", new Size(10d, 15d), new Size(50d, 75d));
            _onesDrum.Clip = new RectangleGeometry(new Rect(211.5d, 11.5d, 50d, 75d));
            Components.Add(_onesDrum);

            _four_digit_display          = new HeliosValue(this, new BindingValue(0d), "", "value", "Four digit display", "Simple four digit drum display", BindingValueUnits.Numeric);
            _four_digit_display.Execute += new HeliosActionHandler(DigitDisplay_Execute);
            Actions.Add(_four_digit_display);
        }
Esempio n. 42
0
        public RSBNDistance()
            : base("RSBN Distance", new Size(262, 152))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/RSBNDistance/RSBNDistance.png", new Rect(0d, 0d, 262d, 152d)));
  
            //======================================================================
            //need to create a new overload for GaugeDrumCounter to go the other way
            //but dont want to touch Gadrocs code until at least mine is ok and he's 
            //happy with it. Can live with the wrong rotation, still correct display.
            //=======================================================================

            _onesDrum = new GaugeDrumCounter("{Helios}/Gauges/Mig-21/Common/drum_tape.xaml", new Point(180d, 21.5d), "%", new Size(10d, 15d), new Size(35d, 55d));
            _onesDrum.Clip = new RectangleGeometry(new Rect(180d, 21.5d, 35d, 55d));
            Components.Add(_onesDrum);

            _tensDrum = new GaugeDrumCounter("{Helios}/Gauges/Mig-21/Common/drum_tape.xaml", new Point(111.5d, 21.5d), "#", new Size(10d, 15d), new Size(35d, 55d));
            _tensDrum.Clip = new RectangleGeometry(new Rect(111.5d, 21.5d, 35d, 55d));
            Components.Add(_tensDrum);

            _hundredsDrum = new GaugeDrumCounter("{Helios}/Gauges/Mig-21/Common/drum_tape.xaml", new Point(45.5d, 21.5d), "#", new Size(10d, 15d), new Size(35d, 55d));
            _hundredsDrum.Clip = new RectangleGeometry(new Rect(45.5d, 21.5d, 35d, 55d));
            Components.Add(_hundredsDrum);

            _ones = new HeliosValue(this, new BindingValue(0d), "", "Single Meters", "RSBN Distance", "Distance singles", BindingValueUnits.Numeric);
            _ones.Execute += new HeliosActionHandler(Drum_One_Execute);
            Actions.Add(_ones);

            _tens = new HeliosValue(this, new BindingValue(0d), "", "Tens Meters", "RSBN Distance", "Distance Tens", BindingValueUnits.Numeric);
            _tens.Execute += new HeliosActionHandler(Drum_Tens_Execute);
            Actions.Add(_tens);

            _hundreds = new HeliosValue(this, new BindingValue(0d), "", "Hundreds Meters", "RSBN Distance", "Distance Hundreds", BindingValueUnits.Numeric);
            _hundreds.Execute += new HeliosActionHandler(Drum_Hundreds_Execute);
            Actions.Add(_hundreds);
        }
Esempio n. 43
0
        public GuardedToggleSwitch()
            : base("Guarded Toggle Switch", new System.Windows.Size(65, 249))
        {
            _positionOneGuardUpImage = "{Helios}/Images/Toggles/guard-up-on.png";
            _positionOneGuardDownImage = "{Helios}/Images/Toggles/guard-down-on.png";
            _positionTwoGuardUpImage = "{Helios}/Images/Toggles/guard-up-off.png";
            _positionTwoGuardDownImage = "{Helios}/Images/Toggles/guard-down-off.png";

            _positionOneEnterAction = new HeliosTrigger(this, "", "position one", "entered", "Triggered when position one is entered or depressed.");
            Triggers.Add(_positionOneEnterAction);
            _positionOneExitAction = new HeliosTrigger(this, "", "position one", "exited", "Triggered when posotion one is exited or released.");
            Triggers.Add(_positionOneExitAction);
            _positionTwoEnterAction = new HeliosTrigger(this, "", "position two", "entered", "Triggered when position two is entered or depressed.");
            Triggers.Add(_positionTwoEnterAction);
            _positionTwoExitAction = new HeliosTrigger(this, "", "position two", "exited", "Triggered when position two is exited or released.");
            Triggers.Add(_positionTwoExitAction);
            _guardUpAction = new HeliosTrigger(this, "", "guard", "up", "Triggered when guard is moved up.");
            Triggers.Add(_guardUpAction);
            _guardDownAction = new HeliosTrigger(this, "", "guard", "down", "Triggered when guard is moved down.");
            Triggers.Add(_guardDownAction);
            _releaseTrigger = new HeliosTrigger(this, "", "", "released", "This trigger is fired when the user releases pressure on the switch (lifts finger or mouse button.).");
            Triggers.Add(_releaseTrigger);

            _positionValue = new HeliosValue(this, new BindingValue((double)SwitchPosition), "", "position", "Current position of the switch.", "Position number 1 or 2.  Positions are numbered from top to bottom.", BindingValueUnits.Numeric);
            _positionValue.Execute += new HeliosActionHandler(SetPositionAction_Execute);
            Values.Add(_positionValue);
            Actions.Add(_positionValue);
            Triggers.Add(_positionValue);

            _guardPositionValue = new HeliosValue(this, new BindingValue((double)GuardPosition), "", "guard position", "Current position of the switch guard.", "1 = Up, 2 = Down.", BindingValueUnits.Numeric);
            _guardPositionValue.Execute += new HeliosActionHandler(SetGuardPositionAction_Execute);
            Values.Add(_guardPositionValue);
            Actions.Add(_guardPositionValue);
            Triggers.Add(_guardPositionValue);
        }
Esempio n. 44
0
        public Accelerometer()
            : base("Accelerometer", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(-2d, -100d, 4d, 200d);

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/Accelerometer/accelerometer_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _lowNeedle = new GaugeNeedle("{Helios}/Gauges/KA-50/Accelerometer/accelerometer_limit_needle.xaml", center, new Size(32, 189), new Point(16, 131));
            Components.Add(_lowNeedle);

            _highNeedle = new GaugeNeedle("{Helios}/Gauges/KA-50/Accelerometer/accelerometer_limit_needle.xaml", center, new Size(32, 189), new Point(16, 131));
            Components.Add(_highNeedle);

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/KA-50/Accelerometer/accelerometer_needle.xaml", center, new Size(32, 185), new Point(16, 127));
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/Accelerometer/accelerometer_bezel.xaml", new Rect(0, 0, 340, 340)));

            _lowG          = new HeliosValue(this, BindingValue.Empty, "", "Low G", "Lowest G attained", "", BindingValueUnits.Numeric);
            _lowG.Execute += LowG_Execute;
            Actions.Add(_lowG);

            _highG          = new HeliosValue(this, BindingValue.Empty, "", "High G", "Highest G attained", "", BindingValueUnits.Numeric);
            _highG.Execute += HighG_Execute;
            Actions.Add(_highG);

            _currentG          = new HeliosValue(this, BindingValue.Empty, "", "Current G", "Current G", "", BindingValueUnits.Numeric);
            _currentG.Execute += CurrentG_Execute;
            Actions.Add(_currentG);
        }
Esempio n. 45
0
        public BatteryCapacity()
            : base("BatteryCapacity", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 100d, 300d);
            _needleCalibration.Add(new CalibrationPointDouble(10d, 36d));
            _needleCalibration.Add(new CalibrationPointDouble(20d, 66d));
            _needleCalibration.Add(new CalibrationPointDouble(30d, 96d));
            _needleCalibration.Add(new CalibrationPointDouble(40d, 126d));
            _needleCalibration.Add(new CalibrationPointDouble(50d, 156d));
            _needleCalibration.Add(new CalibrationPointDouble(60d, 186d));
            _needleCalibration.Add(new CalibrationPointDouble(70d, 216d));
            _needleCalibration.Add(new CalibrationPointDouble(80d, 246d));
            _needleCalibration.Add(new CalibrationPointDouble(90d, 276d));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/BatteryCapacity/battery_capacity_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/Common/generic_small_gray_needle.xaml", center, new Size(32, 185), new Point(16, 127), 210d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentBatteryCapacity = new HeliosValue(this, BindingValue.Empty, "", "Current Battery Capacity", "Current Battery Capacity", "", BindingValueUnits.Numeric);
            _currentBatteryCapacity.Execute += CurrentBatteryCapacity_Execute;
            Actions.Add(_currentBatteryCapacity);
        }
Esempio n. 46
0
        public RotarySwitch()
            : base("Rotary Switch", new Size(100, 100))
        {
            _swipeCalibration = new CalibrationPointCollectionDouble(-1d, 2d, 1d, 0.5d);
            _swipeCalibration.Add(new CalibrationPointDouble(0.0d, 1d));

            _labelFormat.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(LabelFormat_PropertyChanged);

            _positionValue          = new HeliosValue(this, new BindingValue(1), "", "position", "Current position of the switch.", "", BindingValueUnits.Numeric);
            _positionValue.Execute += new HeliosActionHandler(SetPositionAction_Execute);
            Values.Add(_positionValue);
            Actions.Add(_positionValue);
            Triggers.Add(_positionValue);

            _positionNameValue = new HeliosValue(this, new BindingValue("0"), "", "position name", "Name of the current position of the switch.", "", BindingValueUnits.Text);
            Values.Add(_positionNameValue);
            Triggers.Add(_positionNameValue);

            _positions.CollectionChanged += new NotifyCollectionChangedEventHandler(Positions_CollectionChanged);
            _positions.PositionChanged   += new EventHandler <RotarySwitchPositionChangeArgs>(PositionChanged);
            _positions.Add(new RotarySwitchPosition(this, 1, "0", 0d));
            _positions.Add(new RotarySwitchPosition(this, 2, "1", 90d));
            _currentPosition = 1;
            _defaultPosition = 1;
        }
Esempio n. 47
0
 public TotalFuel(BaseUDPInterface sourceInterface)
     : base(sourceInterface)
 {
     _fuel = new HeliosValue(sourceInterface, BindingValue.Empty, "Fuel Gauge", "Total Fuel", "Fuel amount shown on the totalizer.", "", BindingValueUnits.Pounds);
     Values.Add(_fuel);
     Triggers.Add(_fuel);
 }
Esempio n. 48
0
        public HydroPressure()
            : base("HydroPressure", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration1 = new CalibrationPointCollectionDouble(0d, 0d, 300d, 131d);

            _needleCalibration2 = new CalibrationPointCollectionDouble(0d, 0d, 300d, -131);

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/HydroPressure/hydropressure_faceplate.xaml", new Rect(15, 15, 310, 310)));

            Point mainneedle   = new Point(266, 266);
            Point secondneedle = new Point(71, 73);

            _oneNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/HydroPressure/hydropressure_needle.xaml", mainneedle, new Size(20, 130), new Point(10, 120), 248);
            Components.Add(_oneNeedle);

            _twoNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/HydroPressure/hydropressure_needle.xaml", secondneedle, new Size(20, 130), new Point(10, 120), 201);
            Components.Add(_twoNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/HydroPressure/hydropressure_needle_cover.xaml", new Rect(235, 235, 70, 70)));
            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/HydroPressure/hydropressure_needle_cover_second.xaml", new Rect(35, 35, 70, 70)));

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _oneE          = new HeliosValue(this, BindingValue.Empty, "", "Pressure Main", "Pressure Main", "", BindingValueUnits.Numeric);
            _oneE.Execute += OneEng_Execute;
            Actions.Add(_oneE);

            _twoE          = new HeliosValue(this, BindingValue.Empty, "", "Pressure Secondary", "Pressure Secondary", "", BindingValueUnits.Numeric);
            _twoE.Execute += TwoEng_Execute;
            Actions.Add(_twoE);
        }
Esempio n. 49
0
        public BAltimeter()
            : base("Barometric Altimeter", new Size(376, 376))
        {
            _tensDrum      = new GaugeDrumCounter("{Helios}/Gauges/FA-18C/Altimeter/alt_drum_tape.xaml", new Point(73d, 129d), "#", new Size(10d, 15d), new Size(31d, 38d));
            _tensDrum.Clip = new RectangleGeometry(new Rect(71d, 144d, 31d, 38d));
            Components.Add(_tensDrum);

            _drum      = new GaugeDrumCounter("{Helios}/Gauges/FA-18C/Common/drum_tape.xaml", new Point(123d, 128d), "#%00", new Size(10d, 15d), new Size(31d, 38d));
            _drum.Clip = new RectangleGeometry(new Rect(123d, 130d, 31d, 38d));
            Components.Add(_drum);

            _airPressureDrum       = new GaugeDrumCounter("{Helios}/Gauges/FA-18C/Common/drum_tape.xaml", new Point(135d, 276d), "###%", new Size(10d, 15d), new Size(24d, 32d));
            _airPressureDrum.Value = 2992d;
            _airPressureDrum.Clip  = new RectangleGeometry(new Rect(135d, 276d, 96d, 32d));
            Components.Add(_airPressureDrum);

            Components.Add(new GaugeImage("{Helios}/Gauges/FA-18C/Altimeter/Altimeter_Faceplate.png", new Rect(0d, 0d, 376d, 376d)));

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 1000d, 360d);
            _needle            = new GaugeNeedle("{Helios}/Gauges/FA-18C/Altimeter/altimeter_needle.xaml", new Point(188d, 188d), new Size(16d, 160d), new Point(8d, 160d));
            Components.Add(_needle);

            //Components.Add(new GaugeImage("{Helios}/Gauges/FA-18C/Common/engine_bezel.png", new Rect(0d, 0d, 376d, 376d)));
            _altitude          = new HeliosValue(this, new BindingValue(0d), "", "altitude", "Current altitude of the aircraft in feet.", "", BindingValueUnits.Feet);
            _altitude.Execute += new HeliosActionHandler(Altitude_Execute);
            Actions.Add(_altitude);

            _airPressure = new HeliosValue(this, new BindingValue(0d), "", "air pressure", "Current air pressure calibaration setting for the altimeter.", "", BindingValueUnits.InchesOfMercury);
            _airPressure.SetValue(new BindingValue(29.92d), true);
            _airPressure.Execute += new HeliosActionHandler(AirPressure_Execute);
            Actions.Add(_airPressure);
        }
Esempio n. 50
0
        public Tachometer()
            : base("Tachometer", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 110d, 346.5d);

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/Tachometer/tachometer_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _needle2 = new GaugeNeedle("{Helios}/Gauges/KA-50/Tachometer/tachometer_needle_2.xaml", center, new Size(25, 152), new Point(12.5, 139.5), 45d);
            Components.Add(_needle2);

            _needle1 = new GaugeNeedle("{Helios}/Gauges/KA-50/Tachometer/tachometer_needle_1.xaml", center, new Size(25, 152), new Point(12.5, 139.5), 45d);
            Components.Add(_needle1);

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/Tachometer/tachometer_bezel.xaml", new Rect(0, 0, 340, 340)));

            _rightRpm = new HeliosValue(this, BindingValue.Empty, "", "Right Engine RPM", "Current RPM of the rotor blades", "", BindingValueUnits.RPMPercent);
            _rightRpm.Execute += RightRPM_Execute;
            Actions.Add(_rightRpm);

            _leftRpm = new HeliosValue(this, BindingValue.Empty, "", "Left Engine RPM", "Current RPM of the rotor blades", "", BindingValueUnits.RPMPercent);
            _leftRpm.Execute += LeftRPM_Execute;
            Actions.Add(_leftRpm);


        }
Esempio n. 51
0
        public Axis(BaseUDPInterface sourceInterface, string deviceId, string buttonId, string argId, double argValue, double argMin, double argMax, string device, string name, bool loop, string exportFormat)
            : base(sourceInterface)
        {
            _id     = argId;
            _format = exportFormat;
            _loop   = loop;

            _argValue = argValue;
            _argMin   = argMin;
            _argMax   = argMax;

            _actionData = "C" + deviceId + "," + buttonId + ",";

            _value          = new HeliosValue(sourceInterface, new BindingValue(0.0d), device, name, "Current value of this axis.", argMin.ToString() + "-" + argMax.ToString(), BindingValueUnits.Numeric);
            _value.Execute += new HeliosActionHandler(Value_Execute);
            Values.Add(_value);
            Actions.Add(_value);
            Triggers.Add(_value);

            _incrementAction          = new HeliosAction(sourceInterface, device, name, "increment", "Increments this axis value.", "Amount to increment by (Default:" + argValue + ")", BindingValueUnits.Numeric);
            _incrementAction.Execute += new HeliosActionHandler(IncrementAction_Execute);
            Actions.Add(_incrementAction);

            _decrementAction          = new HeliosAction(sourceInterface, device, name, "decrement", "Decrement this axis value.", "Amount to decrement by (Default:" + -argValue + ")", BindingValueUnits.Numeric);
            _decrementAction.Execute += new HeliosActionHandler(DecrementAction_Execute);
            Actions.Add(_decrementAction);
        }
Esempio n. 52
0
        public RadioAltimeter()
            : base("RadioAltimeter", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0.0d, 0d, 1000d, 231d);
            _needleCalibration.Add(new CalibrationPointDouble(10d, 22.5d));
            _needleCalibration.Add(new CalibrationPointDouble(20d, 34.6d));
            _needleCalibration.Add(new CalibrationPointDouble(30d, 55.6d));
            _needleCalibration.Add(new CalibrationPointDouble(40d, 73.8d));
            _needleCalibration.Add(new CalibrationPointDouble(50d, 94.2d));
            _needleCalibration.Add(new CalibrationPointDouble(60d, 103.2d));
            _needleCalibration.Add(new CalibrationPointDouble(70d, 114.2d));
            _needleCalibration.Add(new CalibrationPointDouble(80d, 119.6d));
            _needleCalibration.Add(new CalibrationPointDouble(90d, 127d));
            _needleCalibration.Add(new CalibrationPointDouble(100d, 130.5d));
            _needleCalibration.Add(new CalibrationPointDouble(150d, 151.2d));
            _needleCalibration.Add(new CalibrationPointDouble(200d, 160.6d));
            _needleCalibration.Add(new CalibrationPointDouble(250d, 181.9d));
            _needleCalibration.Add(new CalibrationPointDouble(300d, 192.6d));
            _needleCalibration.Add(new CalibrationPointDouble(400d, 210.9d));
            _needleCalibration.Add(new CalibrationPointDouble(500d, 220.6d));
            _needleCalibration.Add(new CalibrationPointDouble(600d, 231d));

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/RadioAltimeter/radalt_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/RadioAltimeter/radalt_needle.xaml", center, new Size(69d, 178d), new Point(34.5d, 126.5d), -120d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentRadAlt          = new HeliosValue(this, BindingValue.Empty, "", "Current RadAlt", "Current RadAlt", "", BindingValueUnits.Numeric);
            _currentRadAlt.Execute += CurrentRadAlt_Execute;
            Actions.Add(_currentRadAlt);
        }
Esempio n. 53
0
        public EosStepper(EosBoard board, byte number) : base(board)
        {
            _number = number;
            Name = "Servo " + number;

            _calibration = new CalibrationPointCollectionLong(-6000d, -6000, 6000d, 6000);
            _calibration.CalibrationChanged += new EventHandler(_calibration_CalibrationChanged);

            _zero = new HeliosAction(board.EOSInterface, "Stepper " + Number.ToString(), "zero", "", "Sets the current position as zero.");
            _zero.Execute += Zero_Execute;
            Actions.Add(_zero);

            _targetPosition = new HeliosValue(board.EOSInterface, new BindingValue(0d), "Stepper " + Number.ToString(), "target position", "Sets the raw target position of this stepper.", "", BindingValueUnits.Numeric);
            _targetPosition.Execute += TargetPosition_Execute;
            Actions.Add(_targetPosition);

            _value = new HeliosValue(board.EOSInterface, new BindingValue(0d), "Stepper " + Number.ToString(), "input value", "Sets the input value to be displayed on this stepper.", "Input value will be interpolated with the calibration data and set the target position for the stepper as appropriate.", BindingValueUnits.Numeric);
            _value.Execute += Value_Execute;
            Actions.Add(_value);

            _increment = new HeliosAction(board.EOSInterface, "Stepper " + Number.ToString(), "increment", "", "Increments the stepper position.", "Number of steps to increment steppers position. If empty or not a number 1 will be used.", BindingValueUnits.Numeric);
            _increment.Execute += IncrementPosition_Execute;
            Actions.Add(_increment);

            _decrement = new HeliosAction(board.EOSInterface, "Stepper " + Number.ToString(), "decrement", "", "Decrements the stepper position.", "Number of steps to decrement steppers position. If empty or not a number 1 will be used.", BindingValueUnits.Numeric);
            _decrement.Execute += DecrementPosition_Execute;
            Actions.Add(_decrement);
        }
Esempio n. 54
0
 public FuelTotalDisplay(BaseUDPInterface sourceInterface)
     : base(sourceInterface)
 {
     _five_digit_display = new HeliosValue(sourceInterface, BindingValue.Empty, "Fuel Quantity", "Total display", "Fuel Total value", "", BindingValueUnits.Numeric);
     Values.Add(_five_digit_display);
     Triggers.Add(_five_digit_display);
 }
Esempio n. 55
0
 public VHFRadioEncoder5(BaseUDPInterface sourceInterface, string deviceId, string buttonId, string argId, double argValue, string device, string name)
     : base(sourceInterface, deviceId, buttonId, argId, argValue, device, name)
 {
     _windowValue = new HeliosValue(sourceInterface, new BindingValue(0.0d), device, name + " window", "Current value displayed in this encoder.", "current value converted", BindingValueUnits.Text);
     Values.Add(_windowValue);
     Triggers.Add(_windowValue);
 }
Esempio n. 56
0
        public RSBNDistance()
            : base("RSBN Distance", new Size(262, 152))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/RSBNDistance/RSBNDistance.png", new Rect(0d, 0d, 262d, 152d)));

            //======================================================================
            //need to create a new overload for GaugeDrumCounter to go the other way
            //but dont want to touch Gadrocs code until at least mine is ok and he's
            //happy with it. Can live with the wrong rotation, still correct display.
            //=======================================================================

            _onesDrum      = new GaugeDrumCounter("{Helios}/Gauges/MiG-21/Common/drum_tape.xaml", new Point(180d, 21.5d), "%", new Size(10d, 15d), new Size(35d, 55d));
            _onesDrum.Clip = new RectangleGeometry(new Rect(180d, 21.5d, 35d, 55d));
            Components.Add(_onesDrum);

            _tensDrum      = new GaugeDrumCounter("{Helios}/Gauges/MiG-21/Common/drum_tape.xaml", new Point(111.5d, 21.5d), "#", new Size(10d, 15d), new Size(35d, 55d));
            _tensDrum.Clip = new RectangleGeometry(new Rect(111.5d, 21.5d, 35d, 55d));
            Components.Add(_tensDrum);

            _hundredsDrum      = new GaugeDrumCounter("{Helios}/Gauges/MiG-21/Common/drum_tape.xaml", new Point(45.5d, 21.5d), "#", new Size(10d, 15d), new Size(35d, 55d));
            _hundredsDrum.Clip = new RectangleGeometry(new Rect(45.5d, 21.5d, 35d, 55d));
            Components.Add(_hundredsDrum);

            _ones          = new HeliosValue(this, new BindingValue(0d), "", "Single Meters", "RSBN Distance", "Distance singles", BindingValueUnits.Numeric);
            _ones.Execute += new HeliosActionHandler(Drum_One_Execute);
            Actions.Add(_ones);

            _tens          = new HeliosValue(this, new BindingValue(0d), "", "Tens Meters", "RSBN Distance", "Distance Tens", BindingValueUnits.Numeric);
            _tens.Execute += new HeliosActionHandler(Drum_Tens_Execute);
            Actions.Add(_tens);

            _hundreds          = new HeliosValue(this, new BindingValue(0d), "", "Hundreds Meters", "RSBN Distance", "Distance Hundreds", BindingValueUnits.Numeric);
            _hundreds.Execute += new HeliosActionHandler(Drum_Hundreds_Execute);
            Actions.Add(_hundreds);
        }
Esempio n. 57
0
 public VHFRadioEncoder(BaseUDPInterface sourceInterface, string deviceId, string buttonId, string button2Id, string argId, double argValue, double argMin, double argMax, string device, string name, bool loop, string exportFormat)
     : base(sourceInterface, deviceId, buttonId, button2Id, argId, argValue, argMin, argMax, device, name, loop, exportFormat)
 {
     _windowValue = new HeliosValue(sourceInterface, new BindingValue(0.0d), device, name + " window", "Current value displayed in this encoder.", argMin.ToString() + "-" + argMax.ToString(), BindingValueUnits.Text);
     Values.Add(_windowValue);
     Triggers.Add(_windowValue);
 }
Esempio n. 58
0
        public SlipTurn()
            : base("SlipTurn", new Size(225, 114))
        {
            Point center = new Point(112d, 57d);

            Components.Add(new GaugeImage("{Helios}/Gauges/AV-8B/ADI/adi_slip_bezel.png", new Rect(0d, 0d, 225d, 114d)));

            _slipBallCalibration = new CalibrationPointCollectionDouble(-1d, -50d, 1d, 50d);
            _slipBallNeedle      = new GaugeNeedle("{Helios}/Gauges/AV-8B/ADI/adi_slip_ball.xaml", new Point(112d, 75d), new Size(24d, 24d), new Point(12d, 12d));
            _TurnMarker          = new GaugeNeedle("{Helios}/Gauges/AV-8B/ADI/adi_turn_marker.xaml", new Point(112d, 38d), new Size(14d, 18d), new Point(7d, 9d));
            Components.Add(_slipBallNeedle);
            Components.Add(_TurnMarker);

            _warningFlagNeedle = new GaugeNeedle("{Helios}/Gauges/AV-8B/AOA/aoa_off_flag.xaml", new Point(80d, 20d), new Size(28d, 36d), new Point(0d, 0d), 0d);
            Components.Add(_warningFlagNeedle);


            Components.Add(new GaugeImage("{Helios}/Gauges/AV-8B/ADI/adi_slip_guides.xaml", new Rect(0d, 0d, 225d, 114d)));

            _slipBall          = new HeliosValue(this, new BindingValue(0d), "", "Slip Ball Offset", "Side slip indicator offset from the center of the tube.", "(-1 to 1) -1 full left and 1 is full right.", BindingValueUnits.Numeric);
            _slipBall.Execute += new HeliosActionHandler(SlipBall_Execute);
            Actions.Add(_slipBall);

            _turnIndicator          = new HeliosValue(this, new BindingValue(0d), "", "Turn Indicator Offset", "Turn indicator offset from the center of the gauge.", "(-1 to 1) -1 full left and 1 is full right.", BindingValueUnits.Numeric);
            _turnIndicator.Execute += new HeliosActionHandler(turnIndicator_Execute);
            Actions.Add(_turnIndicator);

            _warningFlag          = new HeliosValue(this, new BindingValue(false), "", "Slip Turn Warning Flag", "Indicates whether the warning flag is displayed.", "True if displayed.", BindingValueUnits.Boolean);
            _warningFlag.Execute += new HeliosActionHandler(OffFlag_Execute);
            Actions.Add(_warningFlag);
        }
Esempio n. 59
0
        public O2Pressure()
            : base("O2Pressure", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0, 0d, 20d, 277d);
            _needleCalibration.Add(new CalibrationPointDouble(2d, 30d));
            _needleCalibration.Add(new CalibrationPointDouble(4d, 58d));
            _needleCalibration.Add(new CalibrationPointDouble(6d, 86d));
            _needleCalibration.Add(new CalibrationPointDouble(8d, 115d));
            _needleCalibration.Add(new CalibrationPointDouble(10d, 137.9d));
            _needleCalibration.Add(new CalibrationPointDouble(12d, 160.7d));
            _needleCalibration.Add(new CalibrationPointDouble(14d, 189d));
            _needleCalibration.Add(new CalibrationPointDouble(16d, 210.1d));
            _needleCalibration.Add(new CalibrationPointDouble(18d, 245d));

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/O2Pressure/o2_pressure_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/Common/small_needle.xaml", center, new Size(23, 164), new Point(11.5, 127), 222d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentO2Pressure          = new HeliosValue(this, BindingValue.Empty, "", "Current O2 Pressure", "Current O2 Pressure", "", BindingValueUnits.Numeric);
            _currentO2Pressure.Execute += CurrentO2Pressure_Execute;
            Actions.Add(_currentO2Pressure);
        }
Esempio n. 60
0
        public HatSwitch(BaseUDPInterface sourceInterface, string deviceId, string argId, 
                            string leftAction, string leftValue, 
                            string upAction, string upValue, 
                            string rightAction, string rightValue, 
                            string downAction, string downValue, 
                            string releaseAction, string releaseValue,
                            string device, string name, string exportFormat, bool everyFrame)
            : base(sourceInterface)
        {
            _id = argId;
            _format = exportFormat;
            _everyframe = everyFrame;

            _sendData.Add(HatPosition.Center, "C" + deviceId + "," + releaseAction + "," + releaseValue);
            _sendData.Add(HatPosition.Left, "C" + deviceId + "," + leftAction + "," + leftValue);
            _sendData.Add(HatPosition.Up, "C" + deviceId + "," + upAction + "," + upValue);
            _sendData.Add(HatPosition.Right, "C" + deviceId + "," + rightAction + "," + rightValue);
            _sendData.Add(HatPosition.Down, "C" + deviceId + "," + downAction + "," + downValue);

            _positionByValue.Add(releaseValue, HatPosition.Center);
            _positionByValue.Add(leftValue, HatPosition.Left);
            _positionByValue.Add(upValue, HatPosition.Up);
            _positionByValue.Add(rightValue, HatPosition.Right);
            _positionByValue.Add(downValue, HatPosition.Down);            

            _positionValue = new HeliosValue(sourceInterface, new BindingValue((double)_currentPosition), device, name, "Current position of the hat switch.", "Position 0 = center, 1 = up, 2 = down, 3 = left,  or 4 = right.", BindingValueUnits.Numeric);
            _positionValue.Execute += new HeliosActionHandler(SetPositionAction_Execute);
            Values.Add(_positionValue);
            Actions.Add(_positionValue);
            Triggers.Add(_positionValue);
        }