This is stylistically more correct in C++ and lets the compiler do better error checking.
There were a couple of instances where I used non-scoped enums because the use of bitfields is woven deeply into the GCode parser – and C++ enums really don’t like bitfields.
#1 – MitchBradley 于 2020-08-31
Before we take this patch we should do some serious testing, perhaps by dumping the GCode parser state at the end of each line of text, then running a GCode test program that exercises pretty much every command there is, on both the existing and new code. The output should be identical.