From 7de38b71a81428698c2f0be07958c9150e64e06a Mon Sep 17 00:00:00 2001 From: David Crocker Date: Sat, 19 Mar 2022 09:20:55 +0000 Subject: Event names use '_' in the enum but '-' externally --- src/GCodes/GCodes3.cpp | 1 + src/Platform/Event.cpp | 2 +- src/Version.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/GCodes/GCodes3.cpp b/src/GCodes/GCodes3.cpp index 05b0dea1..8530975f 100644 --- a/src/GCodes/GCodes3.cpp +++ b/src/GCodes/GCodes3.cpp @@ -1880,6 +1880,7 @@ GCodeResult GCodes::RaiseEvent(GCodeBuffer& gb, const StringRef &reply) THROWS(G String temp; gb.MustSee('E'); gb.GetQuotedString(temp.GetRef(), false); + temp.ReplaceAll('-', '_'); const EventType et(temp.c_str()); if (!et.IsValid()) { diff --git a/src/Platform/Event.cpp b/src/Platform/Event.cpp index 7e4c965e..1892c4a8 100644 --- a/src/Platform/Event.cpp +++ b/src/Platform/Event.cpp @@ -94,7 +94,7 @@ inline Event::Event(Event *_ecv_null p_next, EventType et, uint16_t p_param, uin if (ep != nullptr && ep->isBeingProcessed) { fname.copy(ep->type.ToString()); - fname.Replace('_', '-'); // ths only replaces the first instance, but there should not be more than one underscore in the event type name + fname.ReplaceAll('_', '-'); fname.cat(".g"); } } diff --git a/src/Version.h b/src/Version.h index bea09868..268bad38 100644 --- a/src/Version.h +++ b/src/Version.h @@ -10,7 +10,7 @@ #ifndef VERSION // Note: the complete VERSION string must be in standard version number format and must not contain spaces! This is so that DWC can parse it. -# define MAIN_VERSION "3.4.0" +# define MAIN_VERSION "3.4.1beta1" # ifdef USE_CAN0 # define VERSION_SUFFIX "(CAN0)" # else -- cgit v1.2.3