Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to gpioMappings migration and webconfig #610

Merged
merged 4 commits into from
Nov 5, 2023

Conversation

bsstephan
Copy link
Contributor

This addresses the following identified issues:

  • gpioMappings losing mappings on GPIO 0 and 1 due to erroneous detection of enabled addons
  • being unable to un-ASSIGNED_TO_ADDON the PLED pins when setting them to -1 in webconfig
  • (re)initializing the deprecated buttonMappings for no reason

It does not address:

  • the fact PLEDs are migrated as ASSIGNED_TO_ADDON when not in use because some BoardConfig.h files nevertheless enabled them
  • the large growth of fsdata.c

once the migration has ran, getting either old protobuf config or
BoardConfig.h values, we have no need for deprecatedPinMappings anymore,
so don't even bother populating them in the config
the gpioMappings migration was apparently setting pins 0 and 1 to
ASSIGNED_TO_ADDON greedily, mostly because it was confused by situations
when the protobuf value was its default, 0, because it actually hadn't
been initialized in protobuf or via BoardConfig.h yet

I could add a gazillion checks to the migration, for all known addons
and possible BoardConfig.h definitions, but I am pretty convinced at the
moment that I can just let initUnset... do its thing, and then rely on
that to have initialized most values (after which I can migrate what I
need to gpioMappings)
Copy link
Contributor

@arntsonl arntsonl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good little fixes

@arntsonl arntsonl merged commit e012458 into OpenStickCommunity:main Nov 5, 2023
62 checks passed
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.

2 participants