Adjust mouse joystick init parameters to suit unit output

circular_ranges
NepEgor 2 months ago
parent 70288ee5c2
commit c28d49a248

@ -16,8 +16,8 @@ class TouchMouseJoystick : public TouchJoystick
float dx;
float dy;
int16_t min_delta;
int32_t min_delta2;
float min_delta;
float min_delta2;
float time0;
@ -31,7 +31,7 @@ class TouchMouseJoystick : public TouchJoystick
void setTrackballFriction(float trackball_friction);
void setMinDelta(int16_t min_delta);
void setMinDelta(float min_delta);
TouchState touch(int8_t fid, int32_t tx, int32_t ty, int32_t tdx, int32_t tdy, uint32_t time);

@ -39,7 +39,7 @@ void TouchMouseJoystick::setTrackballFriction(float trackball_friction)
this->trackball_friction = trackball_friction;
}
void TouchMouseJoystick::setMinDelta(int16_t min_delta)
void TouchMouseJoystick::setMinDelta(float min_delta)
{
this->min_delta = min_delta;
this->min_delta2 = min_delta * min_delta;

@ -135,11 +135,11 @@ namespace InputMapper
tjoystick_right.init(pos_x, pos_y, pos_r);
//tjoystick_right.setDeadZoneInner(dead_zone_inner);
tjoystick_right.setTrackballFriction(1.f / 8000000.f);
tjoystick_right.setTrackballFriction(1.f / 80000000000.f);
//tjoystick_right.setTrackballFriction(0);
tjoystick_right.setDeadZoneOuter(dead_zone_outer);
tjoystick_right.setSensitivity(10);
tjoystick_right.setMinDelta(1000);
tjoystick_right.setSensitivity(10.f);
tjoystick_right.setMinDelta(0.00001f);
tjoystick_right.setMappedId(1);
pos_x = 20.636 * ppmX;

Loading…
Cancel
Save