Skip to content

Commit

Permalink
Simplify percentage to F key calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
TrojanerHD committed Jan 19, 2024
1 parent 3fa87d4 commit a9d9cf7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/logitube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ void set_keys(double percent, std::string service) {
for (unsigned int i = 1; i <= 12; i++) {
// 100. / 12 because we map 0-100 to 1-12
if (percent < 100. / 12) {
percent = percent / (8 + 1. / 3) * 100;
set_key(i, percent * 2.55, service);
set_key(i, percent * 12 * 2.55, service);
break;
}
set_key(i, 255, service);
Expand Down

0 comments on commit a9d9cf7

Please sign in to comment.