示例#1
0
 private void CmdListenerMukFlapOuterAirReply03OnDataReceived(IList <byte> bytes, IMukFlapAirReply03Telemetry data)
 {
     _notifier.Notify(() => {
         Reply03TelemetryText.Update(bytes);
         Reply03Telemetry = data;
     });
 }
示例#2
0
        /// <summary>
        /// МУК заслонки наружного воздуха, MODBUS адрес = 2
        /// </summary>
        /// <param name="bytes"></param>
        /// <param name="data"></param>
        private void CmdListenerMukFlapAirReply03OnDataReceived(IList <byte> bytes, IMukFlapAirReply03Telemetry data)
        {
            _uiNotifier.Notify(() =>
            {
                MukInfo2      = IsFullVersion ? new TextFormatterIntegerDotted().Format(data.FirmwareBuildNumber) : OkLinkText;
                MukInfoColor2 = OkLinkColor;

                if (data.Diagnostic1.NoEmersionControllerAnswer)
                {
                    EmersonInfo      = NoLinkText;
                    EmersonInfoColor = NoLinkColor;

                    EmersonPressure1         = NoLinkText;
                    EmersonPressure1Color    = NoLinkColor;
                    EmersonTemperature1      = NoLinkText;
                    EmersonTemperature1Color = NoLinkColor;
                }
                else
                {
                    EmersonInfo      = OkLinkText;
                    EmersonInfoColor = OkLinkColor;

                    if (data.EmersonPressure.NoLinkWithSensor)
                    {
                        EmersonPressure1      = NoSensorText;
                        EmersonPressure1Color = NoSensorColor;
                    }
                    else
                    {
                        EmersonPressure1      = data.EmersonPressure.Indication.ToString("f2");
                        EmersonPressure1Color = OkSensorColor;
                    }

                    if (data.EmersonTemperature.NoLinkWithSensor)
                    {
                        EmersonTemperature1      = NoSensorText;
                        EmersonTemperature1Color = NoSensorColor;
                    }
                    else
                    {
                        EmersonTemperature1      = data.EmersonTemperature.Indication.ToString("f2");
                        EmersonTemperature1Color = OkSensorColor;
                    }
                }


                if (data.Diagnostic2.OsShowsFlapDoesNotReachLimitPositions)
                {
                    FlapAirOuterDiagInfo5      = ErDiagText;
                    FlapAirOuterDiagInfo5Color = ErDiagColor;
                }
                else
                {
                    FlapAirOuterDiagInfo5      = OkDiagText;
                    FlapAirOuterDiagInfo5Color = OkDiagColor;
                }

                if (data.Diagnostic2.OsShowsFlapDoesNotReach50Percent)
                {
                    FlapAirOuterDiagInfo6      = ErDiagText;
                    FlapAirOuterDiagInfo6Color = ErDiagColor;
                }
                else
                {
                    FlapAirOuterDiagInfo6      = OkDiagText;
                    FlapAirOuterDiagInfo6Color = OkDiagColor;
                }
            });
        }