sticky Re: Encoders

John Petterson

OK I choose option 1, each time that server.arg() is called the next line (or in some cases a line shortly afterwards if there are multiple calls to server.arg together) I test the returned value(s) for "**" and reset to "" if it is that.  It is conditioned on the Teensy4.0 being the device you are building for, so it should not impact any other builds for Ethernet devices using any other devices.  And if the library is ever fixed we can eliminate it by deleting 1 line in constants.h:

  #define Teensy40

This code also includes the fix to the code that strips leading spaces from the string if there are nothing but spaces in the string.  This is also a Teensy4.0 library caused crash defect.

Note that I have made one other change not related to the crashes.  I was working on this prior to Howard releasing the new style debug print capability so I had to fix the older style debug messages to find the issues.  Howard left the original (non-working) debug code in ithe current release, so I corrected that to work. (That code sent the debug messages out to the serial connection with the OnStep where they got sort of in the way of the other communications to the OnStep.)  I modified that so the other debug messages actually go out on the Ethernet device's USB port if you enable it.  So this has both the new style and old style debug available.  Old style uses DebugSer.print().  New style uses the macros that Howard recently added.

My revised Ethernet code is attached.  Anyone who has time is invited to build and test it (after editing the config.h for your environment - it has my values there now), and let me know if you see any issues.  This is based on the current Master release 2.2c.



Join to automatically receive all group messages.