Browse Source

1.remove SETM mbar to mtor
2,fix Venusde /se Check recipe file bugs

hecl 1 year ago
parent
commit
e1a8bb6663

+ 9 - 2
Venus/Venus_MainPages/ViewModels/OverVenusDEViewModel.cs

@@ -1648,8 +1648,15 @@ namespace Venus_MainPages.ViewModels
         }
         private IEnumerable<string> GetFilesNames(string path)
         {
-            return Directory.GetFiles(path, "*.rcp")?
-      .Select(Path.GetFileNameWithoutExtension);
+            if (Directory.Exists(path))
+            {
+                return Directory.GetFiles(path, "*.rcp")?
+          .Select(Path.GetFileNameWithoutExtension);
+            }
+            else
+            {
+                return new List<string>();
+            }
         }
         void timer_Tick(object sender, EventArgs e)
         {

+ 9 - 2
Venus/Venus_MainPages/ViewModels/OverVenusSEViewModel.cs

@@ -1666,8 +1666,15 @@ namespace Venus_MainPages.ViewModels
         }
         private IEnumerable<string> GetFilesNames(string path)
         {
-            return Directory.GetFiles(path, "*.rcp")?
-      .Select(Path.GetFileNameWithoutExtension);
+            if (Directory.Exists(path))
+            {
+                return Directory.GetFiles(path, "*.rcp")?
+          .Select(Path.GetFileNameWithoutExtension);
+            }
+            else
+            {
+                return new List<string>();
+            }
         }
         void timer_Tick(object sender, EventArgs e)
         {

+ 1 - 1
Venus/Venus_RT/Devices/TM/HongHuTM.cs

@@ -542,7 +542,7 @@ namespace Venus_RT.Devices
             else
             {
                 double PMPressure = Singleton<RouteManager>.Instance.GetPM(mod).ChamberPressure;
-                if (Math.Abs(mbar2mtorrConvert(_TMPressure.Value) - PMPressure) <= MaxPressureDifference || (Singleton<RouteManager>.Instance.GetPM(mod).IsAtm && IsTMATM))
+                if (Math.Abs(_TMPressure.Value - PMPressure) <= MaxPressureDifference || (Singleton<RouteManager>.Instance.GetPM(mod).IsAtm && IsTMATM))
                 {
                     return true;
                 }