Skip to content

Commit

Permalink
plugins/remote-actions-extra: Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulosousadias committed Nov 8, 2023
1 parent 0d92665 commit aa3da88
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
public class RemoteActionsExtra extends ConsolePanel implements MainVehicleChangeListener {

static final boolean defaultAxisDecimalVal = false;
private static final int DECIMAL_HOUSES_FOR_DECIMAL_AXIS = 6;

enum ActionTypeEnum {
BUTTON,
Expand Down Expand Up @@ -276,7 +277,7 @@ private boolean isActionMotion(String action) {

private String adjustAxisValue(double value) {
if (curState.decimalAxis) {
return String.valueOf(MathMiscUtils.round(value, 6));
return String.valueOf(MathMiscUtils.round(value, DECIMAL_HOUSES_FOR_DECIMAL_AXIS));
}
else {
return String.valueOf(Math.round(value * 127));
Expand Down

0 comments on commit aa3da88

Please sign in to comment.