From 42002e3fa490f36bd0f1a462646dcb1c47def15c Mon Sep 17 00:00:00 2001 From: Michal Buzik Date: Mon, 27 Oct 2025 11:49:42 +0100 Subject: [PATCH] iPerl Fixes --- .../RegisterReaders/PoseidonCmdStartStop/SerialPortData.cs | 4 ++++ TBF/Rig/TestMethods/iPerlCommunication/TestMethodCfg_IPerl.cs | 1 + TBF/Rig/TestMethods/iPerlCommunication/TestMethodFactory.cs | 2 ++ TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/Factory.cs | 3 +++ TBF/UI/MainWnd.cs | 2 +- 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/TBF/Rig/RegisterReaders/PoseidonCmdStartStop/SerialPortData.cs b/TBF/Rig/RegisterReaders/PoseidonCmdStartStop/SerialPortData.cs index 32201d172..123273e24 100644 --- a/TBF/Rig/RegisterReaders/PoseidonCmdStartStop/SerialPortData.cs +++ b/TBF/Rig/RegisterReaders/PoseidonCmdStartStop/SerialPortData.cs @@ -14,7 +14,11 @@ namespace TBF.Rig.RegisterReaders.PoseidonCmdStartStop return _cliExists.Value; } } public string SerialPortCmdClientPath { +#if DEBUG + get { return Path.Combine("C:\\","TBF","Cli", CmdClientName);} +#else get { return Path.Combine("..","Cli", CmdClientName);} +#endif } public string CmdClientName { get; set; } = "HalCli.exe"; public string PortName { get; set; } diff --git a/TBF/Rig/TestMethods/iPerlCommunication/TestMethodCfg_IPerl.cs b/TBF/Rig/TestMethods/iPerlCommunication/TestMethodCfg_IPerl.cs index 50db92795..a25357a88 100644 --- a/TBF/Rig/TestMethods/iPerlCommunication/TestMethodCfg_IPerl.cs +++ b/TBF/Rig/TestMethods/iPerlCommunication/TestMethodCfg_IPerl.cs @@ -12,6 +12,7 @@ using TBF.Rig.RegisterReaders.CommonRR.IPerl; namespace TBF.Rig.TestMethods.iPerlCommunication { + [XmlRoot("TestMethodCfg")] // Add this attribute to match the XML root public class TestMethodCfg_IPerl : ComponentCfgBase, IiPerlTestMethodCfg { public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TestMethodCfg_IPerl) })[0]; diff --git a/TBF/Rig/TestMethods/iPerlCommunication/TestMethodFactory.cs b/TBF/Rig/TestMethods/iPerlCommunication/TestMethodFactory.cs index aaf8f9ea8..437c86575 100644 --- a/TBF/Rig/TestMethods/iPerlCommunication/TestMethodFactory.cs +++ b/TBF/Rig/TestMethods/iPerlCommunication/TestMethodFactory.cs @@ -9,6 +9,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication public class TestMethodFactory : IComponentFactory { public string ClassName { get { return GetType().Namespace.Substring(8); } } + + public override string ToString() { return ClassName; } public IComponent DummyComponent() { return new TestMethod(); } diff --git a/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/Factory.cs b/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/Factory.cs index eb2bff000..503e193f1 100644 --- a/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/Factory.cs +++ b/TBF/Rig/TestMethods/iPerlCommunication/iPerlHead/Factory.cs @@ -9,6 +9,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead public class Factory : IComponentFactory { public string ClassName { get { return "RegisterReader for iPerl"; } } + + //TODO BuMi to the future, now has class name as 'Factory' ! + //public override string ToString() { return ClassName; } public IComponent DummyComponent() { return new IperlHead(); } diff --git a/TBF/UI/MainWnd.cs b/TBF/UI/MainWnd.cs index 2b3b70686..8a046c81e 100644 --- a/TBF/UI/MainWnd.cs +++ b/TBF/UI/MainWnd.cs @@ -163,7 +163,7 @@ namespace TBF.UI Rig.StateMachine.MachineState = TBF.DB.CurrentBench.IsRealBench ? Rig.MachineState.StartingUp : Rig.MachineState.Disabled; #if DEBUG - //define alvays valid for printer test - BUMI + //define always valid for printer test - BUMI Rig.StateMachine.MachineState = Rig.MachineState.StartingUp; #endif