aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Ben Shabat <roy.mail.net@gmail.com>2025-09-07 22:16:10 +0300
committerRoy Ben Shabat <roy.mail.net@gmail.com>2025-09-07 22:16:10 +0300
commit619d2b36f37b47221d5d46fc02ca79fe1579609d (patch)
treec46530dff4af4be117c270538ff1f6dea13784e4
parent4c3213995aa079b6c5e14e5bb9e6769ba6e82845 (diff)
downloadTango-619d2b36f37b47221d5d46fc02ca79fe1579609d.tar.gz
Tango-619d2b36f37b47221d5d46fc02ca79fe1579609d.zip
Fixed issue with lubricant not found X1/X4.
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
index f153b3636..1491b79c9 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
@@ -33,6 +33,7 @@ using Tango.PPC.Common.Printing;
using Tango.PPC.Common.RemoteJob;
using Tango.PPC.UI.Dialogs;
using Tango.ColorConversion;
+using Tango.Logging;
namespace Tango.PPC.UI.ViewModels
{
@@ -173,7 +174,7 @@ namespace Tango.PPC.UI.ViewModels
if (_isDyeingProcess != value)
{
_isDyeingProcess = value;
- RaisePropertyChangedAuto();
+ RaisePropertyChangedAuto();
}
}
}
@@ -456,7 +457,7 @@ namespace Tango.PPC.UI.ViewModels
JerricanPresent = true,
}).ToList();
- var LubLevel = MachineProvider.Machine.Configuration.NoneEmptyIdsPacks.Where(x => x.MidTankType.Type == MidTankTypes.LubricantMidTank).FirstOrDefault();
+ var LubLevel = MachineProvider.Machine.Configuration.NoneEmptyIdsPacks.Where(x => x.MidTankType.Type == MidTankTypes.LubricantMidTank || x.LiquidType.Type == LiquidTypes.Lubricant).FirstOrDefault();
MidTankLubLevel = new JerricanLevelModel() { JerricanPresent = true };
if (LubLevel != null)
@@ -464,7 +465,11 @@ namespace Tango.PPC.UI.ViewModels
MidTankLubLevel.Max = LubLevel.MidTankType.LiterCapacity;
MidTankLubLevel.IDSPack = LubLevel;
MidTankLubLevel.JerricanPresent = true;
- };
+ }
+ else
+ {
+ LogManager.Log("Error finding lubricant IDS Pack. Please check your machine configuration.", LogCategory.Error);
+ }
MidTankLubLevel.PressedEvent += MidTankLevel_PressedEvent;
@@ -505,7 +510,7 @@ namespace Tango.PPC.UI.ViewModels
foreach (var item in status.IDSPacksLevels)
{
JerricanLevelModel model = null;
- if (item.Index == MidTankLubLevel.IDSPack.PackIndex)//lub
+ if (MidTankLubLevel.IDSPack != null && item.Index == MidTankLubLevel.IDSPack.PackIndex)//lub
{
model = MidTankLubLevel;
}
@@ -608,7 +613,7 @@ namespace Tango.PPC.UI.ViewModels
_totalProductionDataMeters += (delta * 4);
}
else
- {
+ {
_totalProductionDataMeters += delta;
}