Skip to content

Commit

Permalink
implement new API profile settings (#21)
Browse files Browse the repository at this point in the history
steering axis, invert horizontal or vertical axis
  • Loading branch information
Valkirie authored Jan 21, 2022
1 parent af5af1a commit d6a8dd8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ControllerHelper/CmdParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ private bool CmdProfile(ProfileOption option)
profile.whitelisted = option.whitelist;
profile.umc_trigger = (GamepadButtonFlags)option.trigger;
profile.umc_input = (InputStyle)option.input;
profile.steering = option.steering;
profile.inverthorizontal = option.inverthorizontal;
profile.invertvertical = option.invertvertical;

helper.ProfileManager.UpdateProfile(profile);
helper.ProfileManager.SerializeProfile(profile);
Expand Down
9 changes: 9 additions & 0 deletions ControllerHelper/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ public class ProfileOption

[Option("trigger", Required = false)]
public int trigger { get; set; }

[Option("steering", Required = false)]
public int steering { get; set; } // 0 = Roll, 1 = Yaw

[Option("inverthorizontal", Required = false)]
public bool inverthorizontal { get; set; } // if true, invert horizontal axis

[Option("invertvertical", Required = false)]
public bool invertvertical { get; set; } // if false, invert vertical axis
}

public enum ProfileServiceAction
Expand Down

0 comments on commit d6a8dd8

Please sign in to comment.