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

Ability to switch between action/direction button profiles #384

Merged

Conversation

bsstephan
Copy link
Contributor

@bsstephan bsstephan commented Jul 2, 2023

Working:

  • config section defines up to three three alternative action button slots
  • hotkey actions to switch to them
  • the actual application of profiles (2-4 overlay the total core mappings in the base settings, which is profile 1)
  • config option to store selected profile
  • exposing the alt mappings in the API
  • web configurator profile setting page w/i18n
  • actual board saves and intended behavior confirmed and checked with binary-tools
  • above for directionals

@Pelsin
Copy link
Contributor

Pelsin commented Jul 4, 2023

When refreshing the page another request gets trigger and sets loading to false when completed, this happens after getProfileOptions has started.

When navigating from another route the other request that set loading to false has already happen, now the only request that gets trigger is getProfileOptions that never sets loading to false on completion.

In essence this is because we are using one property loading to indicate if any request is inflight. Which can get kinda wonky as it will become a race condition.

When the time present itself i'll rewrite the state handling loading.

@bsstephan bsstephan changed the title WIP: Ability to switch between action button profiles Ability to switch between action button profiles Jul 5, 2023
@bsstephan bsstephan force-pushed the multiple-button-profiles branch 3 times, most recently from e94e13b to 3dd73e4 Compare July 10, 2023 20:32
src/config_legacy.cpp Outdated Show resolved Hide resolved
@bsstephan bsstephan changed the title Ability to switch between action button profiles Ability to switch between action/direction button profiles Jul 26, 2023
up to three alternative pin mappings can be defined to profiles 2-4 (1
is the primary setting) which overlay their mappings on top of the
primary settings. this also defines four hotkey actions for switching
between the four profiles.

all pre-profile configuration works the same and affects the same config
objects, etc. as before. a new configuration page and config memory
section is defined for profiles 2-4 (specifically the alternative pin
mappings). profiles 2-4 default to the board mappings, as well, so users
should be fine to ignore this feature entirely if they want --- normal
function should not changed, and they shouldn't even be able to
accidentally enable this, especially not into a broken configuration
@bsstephan bsstephan marked this pull request as ready for review July 26, 2023 00:27
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.

Looks good!

@arntsonl
Copy link
Contributor

arntsonl commented Aug 3, 2023

Issues were fixed, there is one new issue that we'll make a Issue# for but might be related to react.

@arntsonl arntsonl dismissed mthiesen’s stale review August 3, 2023 19:07

Changes fixed issue, not sure how to "Resolve" someone else's request.

@arntsonl arntsonl merged commit a1ea445 into OpenStickCommunity:main Aug 3, 2023
40 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.

4 participants