public void get_button_from_raw_value_backward_directional_not_multi_action() { var map = new HOTASAxis(); map.IsDirectional = true; map.IsMultiAction = false; map.CalculateSegmentRange(4); map.SetAxis(800); map.SetAxis(800); map.SetAxis(800); map.SetAxis(800); map.SetAxis(800); map.SetAxis(800); map.SetAxis(800); map.SetAxis(800); map.SetAxis(800); map.SetAxis(800); map.SetAxis(700);//set direction backward Assert.Equal("Reverse Axis Button 1", map.GetButtonMapFromRawValue(16383).MapName); Assert.Equal("Reverse Axis Button 1", map.GetButtonMapFromRawValue(32766).MapName); Assert.Equal("Reverse Axis Button 1", map.GetButtonMapFromRawValue(49149).MapName); Assert.Equal("Reverse Axis Button 1", map.GetButtonMapFromRawValue(65535).MapName); }
public void get_button_from_raw_value_forward_directional_is_multi_action() { var map = new HOTASAxis(); map.IsDirectional = true; map.IsMultiAction = true; map.CalculateSegmentRange(4); Assert.Equal("Axis Button 1", map.GetButtonMapFromRawValue(16383).MapName); Assert.Equal("Axis Button 2", map.GetButtonMapFromRawValue(32766).MapName); Assert.Equal("Axis Button 3", map.GetButtonMapFromRawValue(49149).MapName); Assert.Equal("Axis Button 4", map.GetButtonMapFromRawValue(65535).MapName); }