Skip to content

Commit

Permalink
Force pressure to always be at least 1 greater than the pressure dead…
Browse files Browse the repository at this point in the history
…zone
  • Loading branch information
Kuuuube committed May 9, 2023
1 parent 87c49d0 commit 1257eaf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Pressure_Emulation/Pressure_Emulation_Line.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ private uint calc_pressure_change(uint input_pressure) {
}

uint output_pressure_uint = (uint)output_pressure_double / pressure_divisor * pressure_divisor;
if (output_pressure_uint == 0) {
output_pressure_uint = (uint)(pressure_deadzone_percent / 100 * max_pressure_resolution) + 1;
}
return output_pressure_uint;
}
public IDeviceReport Resolution(IDeviceReport input)
Expand Down

0 comments on commit 1257eaf

Please sign in to comment.