Selaa lähdekoodia

update powerSupplier current set error

chenkui 1 kuukausi sitten
vanhempi
commit
1d1ac9cef0

+ 3 - 3
CyberX8_RT/Devices/PowerSupplier/PowerSupplierSetCurrentRoutine.cs

@@ -50,7 +50,7 @@ namespace CyberX8_RT.Devices.PowerSupplier
             Runner.Run(SetCurrentStep.CloseOutput, () => _powerSupplier.DisableOutput(), _delay_1ms)
                 .Run(SetCurrentStep.SetPoint, SetCurrentPoint, CheckCurrentSetPoint, _delay_2s)
                 .Run(SetCurrentStep.EnableOutput, () => _powerSupplier.EnableOutput(), _delay_1ms)
-                .Wait(SetCurrentStep.CheckCurrent, () => { return _powerSupplier.PowerSupplierData.Current > 0; },_delay_2s)
+                //.Wait(SetCurrentStep.CheckCurrent, () => { return _powerSupplier.PowerSupplierData.Current > 0; },_delay_2s)
                 .End(SetCurrentStep.End, NullFun, _delay_1ms);
             return Runner.Status;
         }
@@ -66,7 +66,7 @@ namespace CyberX8_RT.Devices.PowerSupplier
         /// 设置电流
         /// </summary>
         /// <returns></returns>
-        private bool SetCurrentPoint() 
+        private bool SetCurrentPoint()
         {
             return _powerSupplier.SetCurrent(_current);
         }
@@ -85,7 +85,7 @@ namespace CyberX8_RT.Devices.PowerSupplier
         /// <returns></returns>
         public RState Start(params object[] objs)
         {
-            _current=(double)objs[0];
+            _current = (double)objs[0];
             _powerSupplier = DEVICE.GetDevice<CellPowerSupplier>(Module);
             return Runner.Start(Module, $"Start Set Point {_current}");
         }