/// <summary> /// Create Experimental Run. /// Refactor Idea: This class should not hold mca/motor/thermometer at all. It should be pass along from DAQThread as arguments. /// </summary> /// <param name="mca"></param> /// <param name="motor"></param> /// <param name="thermometer"></param> /// <param name="runmode"></param> public ExperimentalRun(DT5780 mca, LinearMotor motor, DigitalThermometer thermometer, RunMode runmode = RunMode.Experiment) { this.mca = mca; this.thermometer = thermometer; this.motor = motor; Timeout = 60; MaxSample = 0; Log = new ExperimentLog(); ClearData(); RunMode = runmode; Channel0PeakFinder = new PeakFinder(); Channel1PeakFinder = new PeakFinder(); ExperimentStatus = ExperimentStatusEnum.Prepared; StartActionMap = new Dictionary<RunMode, DAQThread.OnSuccessfulStartDelegate>{ {RunMode.Experiment, OnExperimentStart}, {RunMode.Calibrate, OnCalibrationStart}, {RunMode.Simulated, OnSimulationStart} }; StopActionMap = new Dictionary<RunMode, DAQThread.OnSuccessfulStopDelegate>{ {RunMode.Experiment, OnExperimentEnd}, {RunMode.Calibrate, OnCalibrationEnd}, {RunMode.Simulated, OnSimulationEnd} }; UpdateActionMap = new Dictionary<RunMode, DAQThread.UpdateProgressDelegate>{ {RunMode.Experiment, OnExperimentUpdate}, {RunMode.Calibrate, OnCalibrationUpdate}, {RunMode.Simulated, OnSimulationUpdate} }; InitCommand(); Channel0FittedDataPoints = new DataPoint[0]; Channel1FittedDataPoints = new DataPoint[0]; }
void Awake() { motor = GetComponent <LinearMotor>(); levelSelectMenuListener = GetComponent <LevelSelectMenuListener>(); levelSelectMenuListener.OnLevelSelectMenuClosed.AddListener(OnMenuClosed); levelSelectMenuListener.OnLevelSelectMenuOpened.AddListener(OnMenuOpened); }
public void Initialize() { lin = LinearMotor.GetInstance(); bool foundone = lin.ScanConnect(); if (!foundone) Assert.Inconclusive("Can't connect to the linear stage."); lin.testmode = true; lin.SetMotorPower(1); }
public SettingMaker(DT5780 mca, LinearMotor motor, DigitalThermometer thermometer, ObservableCollection<MCASetting> mcasettings) { this.mca = mca; this.motor = motor; this.thermometer = thermometer; this.MCASettings = mcasettings; this.MCAData = new MCAData(); TargetPosition = -15; MaxSample = 0; Timeout = -1; InitCommand(); }
protected internal override void ClearAccumulatedImpulses() { LinearMotor.ClearAccumulatedImpulses(); AngularMotor.ClearAccumulatedImpulses(); }
protected internal override void SolveVelocityIteration() { LinearMotor.SolveVelocityIteration(); AngularMotor.SolveVelocityIteration(); }
protected internal override void WarmStart() { LinearMotor.WarmStart(); AngularMotor.WarmStart(); }
protected internal override void ComputeEffectiveMass() { LinearMotor.ComputeEffectiveMass(); AngularMotor.ComputeEffectiveMass(); }
protected internal override void UpdateJacobiansAndVelocityBias() { LinearMotor.UpdateJacobiansAndVelocityBias(); AngularMotor.UpdateJacobiansAndVelocityBias(); }
protected internal override void Preupdate(Fix64 dt, Fix64 updateRate) { LinearMotor.Preupdate(dt, updateRate); AngularMotor.Preupdate(dt, updateRate); }
public void Initialize() { OdeTests.Initialize(); world = new World(); motor = new LinearMotor(world); }
protected internal override void Preupdate(float dt, float updateRate) { LinearMotor.Preupdate(dt, updateRate); AngularMotor.Preupdate(dt, updateRate); }
public MotorStatus(LinearMotor LinearMotor) { this.LinearMotor = LinearMotor; }
public static ExperimentalRun DummyFilledData(DT5780 mca, LinearMotor motor, DigitalThermometer thermometer, double position = 0) { ExperimentalRun ret = ExperimentalRun.DummyEmptyData(mca, motor, thermometer, position); ret.FillWithDummyData(); return ret; }
public static ExperimentalRun DummyEmptyData(DT5780 mca, LinearMotor motor, DigitalThermometer thermometer, double position = 0) { ExperimentalRun ret = new ExperimentalRun(mca, motor, thermometer); ret.Log.Setting = MCASetting.LargeLYSOSetting(); ret.Log.MotorPosition = position; return ret; }