/// <summary>
        /// 采集数据到达
        /// </summary>
        /// <param name="newData"></param>
        void cm_OnDataChanged(CompassModuleData newData)
        {
            UpdateView ev2 = delegate(CompassModuleData args)
            {
                VMThis.CMDataRT = args;

                CMDataList.Add(args);
            };

            Dispatcher.BeginInvoke(ev2, newData);
        }
Esempio n. 2
0
        /// <summary>
        /// angle data arrived
        /// </summary>
        /// <param name="newData"></param>
        void cm_OnDataChanged(CompassModuleData newData)
        {
            CMDataList.Add(newData);

            double alpha = float.Parse(newData.PitchAngle);

            AngleDataList.Add(alpha);

            // update angle
            AverageAngle = AngleDataList.Average();
        }