示例#1
0
 public void UpdateSensorTelemetry(ProsthesisCore.Telemetry.ProsthesisTelemetry.ProsthesisSensorTelemetry sensorTelem)
 {
     if (sensorTelem != null)
     {
         mContext.UpdateSensorTelemetry(sensorTelem);
     }
 }
示例#2
0
        public TelemetrySimulator()
        {
            mTelemetryBroadcastTimer           = new Timer(kTelemetryBroadcastPeriod);
            mTelemetryBroadcastTimer.AutoReset = true;
            mTelemetryBroadcastTimer.Elapsed  += OnTelemetryPublishAlarm;

            InitializeComponent();

            //Initialize telemetry data
            int numMotorsToSimulate = 2;

            ProsthesisCore.Telemetry.ProsthesisTelemetry.ProsthesisMotorTelemetry motorTelem = mTelem.MotorTelem;
            motorTelem.Current           = new float[numMotorsToSimulate];
            motorTelem.MilliVolts        = new int[numMotorsToSimulate];
            motorTelem.FlowRate          = new float[numMotorsToSimulate];
            motorTelem.MotorDutyCycles   = new float[numMotorsToSimulate];
            motorTelem.PressureLoad      = new float[numMotorsToSimulate];
            motorTelem.OutputPressure    = new float[numMotorsToSimulate];
            motorTelem.PressureSetPoints = new float[numMotorsToSimulate];

            ProsthesisCore.Telemetry.ProsthesisTelemetry.ProsthesisSensorTelemetry sensTelem = mTelem.SensorTelem;
            sensTelem.MotorTemps = new float[numMotorsToSimulate];
            sensTelem.OilTemps   = new float[1];

            //Set all GUI limits
            mHipThrottleSlider.Maximum   = 100;
            mHipThrottleNumeric.Maximum  = 100;
            mKneeThrottleSlider.Maximum  = 100;
            mKneeThrottleNumeric.Maximum = 100;

            mHipSetpointSlider.Maximum   = (int)ProsthesisTelemetry.ProsthesisMotorTelemetry.kMaxPressurePSI;
            mHipSetpointNumeric.Maximum  = (int)ProsthesisTelemetry.ProsthesisMotorTelemetry.kMaxPressurePSI;
            mKneeSetpointSlider.Maximum  = (int)ProsthesisTelemetry.ProsthesisMotorTelemetry.kMaxPressurePSI;
            mKneeSetpointNumeric.Maximum = (int)ProsthesisTelemetry.ProsthesisMotorTelemetry.kMaxPressurePSI;

            mHipOutputPressureSlider.Maximum   = (int)ProsthesisTelemetry.ProsthesisMotorTelemetry.kMaxPressurePSI;
            mHipOutputPressureNumeric.Maximum  = (int)ProsthesisTelemetry.ProsthesisMotorTelemetry.kMaxPressurePSI;
            mKneeOutputPressureSlider.Maximum  = (int)ProsthesisTelemetry.ProsthesisMotorTelemetry.kMaxPressurePSI;
            mKneeOutputPressureNumeric.Maximum = (int)ProsthesisTelemetry.ProsthesisMotorTelemetry.kMaxPressurePSI;

            mHipFlowrateSlider.Maximum   = (int)ProsthesisTelemetry.ProsthesisMotorTelemetry.kMaxFlowRateLPM;
            mHipFlowrateNumeric.Maximum  = (int)ProsthesisTelemetry.ProsthesisMotorTelemetry.kMaxFlowRateLPM;
            mKneeFlowrateSlider.Maximum  = (int)ProsthesisTelemetry.ProsthesisMotorTelemetry.kMaxFlowRateLPM;
            mKneeFlowrateNumeric.Maximum = (int)ProsthesisTelemetry.ProsthesisMotorTelemetry.kMaxFlowRateLPM;

            mHipMotorCurrentSlider.Maximum   = (int)ProsthesisTelemetry.ProsthesisMotorTelemetry.kMaxCurrentAmps;
            mHipMotorCurrentNumeric.Maximum  = (int)ProsthesisTelemetry.ProsthesisMotorTelemetry.kMaxCurrentAmps;
            mKneeMotorCurrentSlider.Maximum  = (int)ProsthesisTelemetry.ProsthesisMotorTelemetry.kMaxCurrentAmps;
            mKneeMotorCurrentNumeric.Maximum = (int)ProsthesisTelemetry.ProsthesisMotorTelemetry.kMaxCurrentAmps;
        }
 public void UpdateSensorTelemetry(ProsthesisCore.Telemetry.ProsthesisTelemetry.ProsthesisSensorTelemetry sensorTelem)
 {
     mTelemetryObject.ST = new ProsthesisCore.Telemetry.ProsthesisTelemetry.ProsthesisSensorTelemetry(sensorTelem);
 }