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

Custom analog error rate #1136

Merged
merged 8 commits into from
Sep 25, 2024

Conversation

NickGuyver
Copy link
Contributor

Add the ability to set a custom circularity error rate % for analog sticks.

NickGuyver and others added 6 commits September 15, 2024 11:14
Functionally working, web is broken in the following ways:
1 - Error Rate title shows regardless of Forced Circularity being checked, but the selection box hides as expected
2 - Selecting a value saves, but when reloading the webpage there is an error and it thinks it's set to 0%
Improve formSelect to handle hidden prop
@Pelsin
Copy link
Contributor

Pelsin commented Sep 16, 2024

After saving with the value 9, getAddonsOptions returns
Screenshot 2024-09-16 at 22 15 18
Meaning it wont match any of the options and show the error:
Screenshot 2024-09-16 at 22 17 20

@@ -69,6 +69,10 @@
#define SMOOTHING_FACTOR 5
#endif

#ifndef ANALOG_ERROR
#define ANALOG_ERROR 0
Copy link
Contributor

@Pelsin Pelsin Sep 16, 2024

Choose a reason for hiding this comment

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

If the default value is zero we need to modify form validation
As zero does not exist as any value here: https://github.com/OpenStickCommunity/GP2040-CE/pull/1136/files#diff-1dc51191c1aed5b94ed7849f6d8458038a17ed0c47da979dd4de7e7adc3a8c99R25

Otherwise we will get the error:
Screenshot 2024-09-16 at 22 09 03

When toggling the switch the first time.

@NickGuyver NickGuyver marked this pull request as ready for review September 17, 2024 15:40
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 great! More stuff converted to tsx is better

@arntsonl arntsonl merged commit 245e15e into OpenStickCommunity:main Sep 25, 2024
44 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.

3 participants