Re: New OCS developments

Howard Dutton

I've started work on the OCS update, it's on Github as the master branch.

The last stable OCS is now release-2.3 and the default branch, which is a good thing as this new version 3 of the OCS will take a fair bit of time to become stable and actually work well I'm sure.

The main features it has integrated at this point...

  • Much easier code to work on (using Visual Studio) and still compiles in the Arduino IDE as usual.
  • Uses tasks for better/smoother concurrent operation.
  • All code I had for weather sensors was given a good once over then integrated in a consistent manor.  You simply select the sensors you want in the Config.h file and they are activated, no need to edit the source code as before.
    • When more than one sensor for a given feature (temperature for instance) are present the first one gets ownership of that feature and the others are denied.
      • They may fail to init. in this case OR if they provide other features (humidity for instance) they may still init and handle just those other features.
  • The (serial and IP) command processing code is now unified (leaning on the work done in OnStepX.)  It has (untested) code for both Wifi (ESP32) and Ethernet (W5100/W5500) IP command channels.  Basic testing of the serial command processing seems to show at least that works.
  • The functions that create the web-page content were broken down and logically grouped together, and have better naming.  Much easier to see what they are doing now.  This paves the way for expansion of features without the whole thing becoming ungainly.
  • The web-page design was changed to allow use with either ESP32/Wifi or Ethernet (just not both at once.)  The Wifi web server is not implemented yet.
  • Analog inputs are now numbered (1 to 16) instead of being specified directly by the pin.
  • There are now per processor pin maps.
  • Pin initialization and logic states can be specified by adding #defines to the Config.h file.  You can invert the logic (LOW is ON) and control the initialization (pullups, etc.) using this capability.
    • Note that this control is not by the pin# but rather by sense# input# or analog# that's associated with the pin# in the pin map.

Join to automatically receive all group messages.