Skip to content

Commit

Permalink
Print wheel range changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Laurendeau committed Dec 9, 2016
1 parent 08d9250 commit cb86bb0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/haptic/ff_lg.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ static void set_wheel_range(int device, unsigned short range) {
full_range = 200;
}
process_extended(device, report1, 1);
ncprintf("wheel range adjusted to %hu degrees\n", full_range);
if (range != full_range) {
static int warn = 1;
if (warn == 1) {
Expand Down Expand Up @@ -311,6 +312,7 @@ static void set_wheel_range(int device, unsigned short range) {
range >> 8
};
process_extended(device, change_wheel_range, 0);
ncprintf("wheel range adjusted to %hu degrees\n", range);
}
}

Expand All @@ -330,7 +332,6 @@ int ff_lg_init(int device, unsigned short src_pid, unsigned short dst_pid) {
if (src_range != 0 && ff_lg_device[device].dst.range == 0) {
// source wheel range is fixed and dest wheel supports adjusting the range
set_wheel_range(device, src_range);
ncprintf("wheel range adjusted to %hu degrees\n", src_range);
}

return 0;
Expand Down

0 comments on commit cb86bb0

Please sign in to comment.