private async void Calibrate() { var userinput1 = MessageBox.Show(Monitoring.mboxcalibrateZone, Monitoring.mboxcalibrateZoneTitle, MessageBoxButton.YesNo, MessageBoxImage.Warning); if (userinput1 == MessageBoxResult.Yes) { var ml = new CalibrateZone(_flow.Id, AmplifierCalibrationMode, PilotFrequency); CommunicationViewModel.AddData(ml); await ml.WaitAsync(); if (CalibrateFinished != null) { CalibrateFinished.Invoke(); } } else { if (CalibrateUserCancel != null) { CalibrateUserCancel.Invoke(); } } }
private void ReceivedDemuxByte(GetDspValue d) { //set demuxer for this channel var data = (DspCoefficients.DemuxBytes(McuDat.DemuxAlarm[_flow.Id % 12], _flowMux[_flow.Id % 12] + 2, _flowMux[_flow.Id % 12])).ToArray(); var q = new DspData(data, _main.Id); CommunicationViewModel.AddData(q); }
/// <summary> /// Set timestamp for all units when this is not already done. /// Otherwise put downloaded esc timestamp in designfile. /// </summary> /// <param name="mainunits"></param> private static void UpdateTimestampConnectedUnits(IEnumerable <MainUnitViewModel> mainunits) { foreach (var mainUnitViewModel in mainunits) { //if no timestamp ever made avaiable, create one if (mainUnitViewModel.Timestamp == 0) { var d = new TimeStampUpdater(mainUnitViewModel.DataModel); CommunicationViewModel.AddData(d.TimeStamp()); } else { mainUnitViewModel.DataModel.TimeStampWrittenToEsc = mainUnitViewModel.Timestamp; } } }
public static void AddData(IDispatchData data) { CommunicationViewModel.AddData(data); }