Skip to content

Commit

Permalink
Merge pull request #13 from ichiro-its/hotfix/fix-set-val
Browse files Browse the repository at this point in the history
[Hotfix] - Fix Value Change Assignment
  • Loading branch information
FaaizHaikal authored May 19, 2024
2 parents 8c5b552 + 9e04fc0 commit 51d6a9b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/NumberField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ function NumberField(props) {
function setValue(val) {
let value_change;
if (type === 'main') {
value_change *= 10;
value_change = val * 10;
setMainValue(keys, value + value_change);
} else if (type === 'walking') {
switch (name) {
case 'balance':
value_change /= 10;
value_change = val / 10;
break;
case 'pid':
value_change *= 10;
value_change = val * 10;
break;
default:
value_change = val;
Expand All @@ -62,7 +62,7 @@ function NumberField(props) {
case 'x_offset':
case 'y_offset':
case 'z_offset':
value_change *= 10;
value_change = val * 10;
break;
default:
value_change = val;
Expand All @@ -74,10 +74,10 @@ function NumberField(props) {
switch (keys) {
case 'foot_height':
case 'period_time':
value_change *= 10;
value_change = val * 10;
break;
default:
value_change /= 10;
value_change = val / 10;
break;
}
break;
Expand Down

0 comments on commit 51d6a9b

Please sign in to comment.