From c3a8debce2375feecc6c7072b1db95e27fc6c40f Mon Sep 17 00:00:00 2001 From: reza0310 Date: Mon, 20 Oct 2025 15:19:32 +0200 Subject: [PATCH 1/3] [README] Typos Patched some typos from the README --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 40faf5e7..9b4a9863 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Please consider this code experimental and beta quality. It is a work in progress and is rapidly changing. Every attempt has been made to comply with the revelant DSP306 and other -standards and esd files from multile sources have been tested for loading and +standards and EDS files from multiple sources have been tested for loading and saving as been (at times) validated for errors using EDS conformance tools. With many thanks to the following contributors for spotting my mistakes and @@ -59,12 +59,12 @@ Library * Save EDS/DCF classes back to EDS file * Export C and H files in CanOpenNode format CO_OD.c and CO_OD.h * EDS/DCF supports modules -* EDS/DCF supports compactPDO (read only) 1* -* EDS/DCF supports implict PDO (read only) 1* -* EDS/DCF supports CompactSubOb (read only) 1* +* EDS/DCF supports compactPDO (read only) *¹ +* EDS/DCF supports implict PDO (read only) *¹ +* EDS/DCF supports CompactSubOb (read only) *¹ * Supports loading/saving of all EDS/DCF module information -1* read only in this context means the EDS/DCF is fully expanded but the compact +*¹ Read only, in this context, means the EDS/DCF is fully expanded but the compact forms is not written back, only the expanded form will be saved. GUI @@ -80,15 +80,15 @@ GUI * Create profiles that can be added to any project (just save the device xml file to the profiles/ directory, only include the minimum number of objects that you want to auto insert) This will auto add to insert menu * Edit Device and File Info sections -* Set RX/TX PDO mappings easily from dropdown lists of avaiable objects +* Set RX/TX PDO mappings easily from dropdown lists of available objects * Add and remove new PDO entries (communication paramaters and mapping) in a single button push -* Save groups of EDS/XML files as a network objects with abality to set concrete node IDs -* View report of all configured PDO across the network +* Save groups of EDS/XML files as a network object with ability to set concrete node IDs +* View report of all configured PDOs across the network * View modules and module details present within EDS files * View/edit actual object values for device configuring/DCF files * Support for loading XDD files (CanOpen offical XML) * Support for saving XDD files (CanOpen offical XML) -* Some module info is displayed in GUI showing avaiable modules (eds) and +* Some module info is displayed in GUI showing available modules (eds) and configured modules (dcf) and what OD entries they reference. Full details such as subobj extension and fixed subobj are not currently displayed and unless there is demand probably will not ever be. From 28cfc87231ab85439a69283d650d106c01dedc15 Mon Sep 17 00:00:00 2001 From: Geoffroy Du Prey Date: Tue, 21 Oct 2025 14:38:23 +0200 Subject: [PATCH 2/3] [FEAT] Suggested better error management PLEASE NOTE: All of this have been tested but only with CLI. I don't really know neither can test the GUI but I hope it doesn't rely on bad error management. --- EDSSharp/Program.cs | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/EDSSharp/Program.cs b/EDSSharp/Program.cs index a8b783a8..1a556520 100644 --- a/EDSSharp/Program.cs +++ b/EDSSharp/Program.cs @@ -66,29 +66,46 @@ static void Main(string[] args) default: + Program.WriteError("Invalid INFILE extension."); + PrintHelpText(); return; } if(eds != null) { Export(outfile, outtype); + Console.WriteLine("Successful conversion"); + } + else + { + Program.WriteError("Invalid XDD INFILE."); + PrintHelpText(); } } else { + Program.WriteError("INFILE or OUTFILE missing."); PrintHelpText(); } } - catch(Exception e) + catch(Exception) { - Console.WriteLine(e.ToString()); + Program.WriteError("Invalid EDS INFILE."); + // Console.WriteLine(e.ToString()); PrintHelpText(); } } + private static void WriteError(string message) + { + Console.ForegroundColor = ConsoleColor.Red; + Console.Error.WriteLine(message); + Console.ResetColor(); + Console.WriteLine(""); + } + private static void openEDSfile(string infile) { - eds.Loadfile(infile); } From 436eac72a70fc7a34aa38925b070e4d417fae332 Mon Sep 17 00:00:00 2001 From: Geoffroy Du Prey Date: Tue, 21 Oct 2025 17:12:32 +0200 Subject: [PATCH 3/3] [FIX] We want to print the error --- EDSSharp/Program.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/EDSSharp/Program.cs b/EDSSharp/Program.cs index 1a556520..d96a48d1 100644 --- a/EDSSharp/Program.cs +++ b/EDSSharp/Program.cs @@ -88,10 +88,11 @@ static void Main(string[] args) PrintHelpText(); } } - catch(Exception) + catch(Exception e) { + Console.WriteLine(e.ToString()); + Console.WriteLine(""); Program.WriteError("Invalid EDS INFILE."); - // Console.WriteLine(e.ToString()); PrintHelpText(); } }