-
Notifications
You must be signed in to change notification settings - Fork 111
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
Add power to base and style #1767
Add power to base and style #1767
Conversation
Tested and works as expected. :) |
@@ -92,19 +94,19 @@ const digestInput = () => { | |||
for (const item of pressed) { | |||
switch (item) { | |||
case Keymap.FORWARD: { | |||
linearValue += 1; | |||
linearValue += Number(0.01 * power); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linearValue += Number(0.01 * power); | |
linearValue += Number.parseFloat(0.01 * power); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, just noticing, why do we need casting here at all? both power and 0.01 are numbers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just limiting the number of decimal places but we don't have to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! That sounds good!
@pointerup="handlePointerUp(key)" | ||
@pointerleave="handlePointerUp(key)" | ||
> | ||
{{ key.toUpperCase() }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we use text-transform: uppercase
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes will do
|
This adds a power slider to the base card, rather than always using 100% power.
RSDK-938