Skip to content

Task/283 use classes to reduce extern and globals - #598

Open
nk25719 wants to merge 21 commits into
mainfrom
task/283-use-classes-to-reduce-extern-and-globals
Open

Task/283 use classes to reduce extern and globals#598
nk25719 wants to merge 21 commits into
mainfrom
task/283-use-classes-to-reduce-extern-and-globals

Conversation

@nk25719

@nk25719 nk25719 commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Objective of this PR: examine changes done in branch.

TheBakedPotato and others added 21 commits December 7, 2025 20:02
- Necessary libraries have been added and are tracked in the 'platform.ini' file
- Moved WiFiManager and ElegantOTA libraries to the bottom of the list
- Clean builds failed during first compilation due to libraries
  depending on other libraries not build yet
- The baud rate with PlatformIO defaults to 9800
- The correct baud rate for the serial connection with the ESP32-WROOM is 115200
- The defines in `gpad_utility.h` are still defined in the file for completeness
- The values are empty since the values are now fed in via a pre-build script
- The benefit of this is that to change the values of the defines does not require modifying a source file
- The values, like the firmware version and product name, can now be provided programmatically
  - Like pulling a version from git tag
  - A static config file with the values
- Changes include linking to instructions for installing the PIO
  CLI tools and setting up the shell commands
- Instructions for building the LittleFS filesystem
- The project can now be openned in the Arduino IDE by opening the
  GPAD_API.ino file
- PlatformIO recommends listing a specific version for packages
  (and platforms) and preceding the '@' with a '^' (caret) so
  the latest compatible version will be used
- The "tip" is in a blue box under this section:
  https://docs.platformio.org/en/latest/core/userguide/pkg/cmd_install.html#id17
- Added a char enum which maps the chars used to indicate the
  commands to actual enum variants
- The main switch statement in GPAD_HAL.cpp now switches over the
  Command enum instead of the hardcoded chars
- GPAD_API_VERSION is now defined as a preprocessor directive, like
  FIRMWARE_VERSION
- The value is published via MQTT just like the FIRMWARE_VERSION
…ment

- The GPAD API version is now hardcoded as an actual value
- It is not something that should be able to be changed by a compilation flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants