Skip to content

Commit

Permalink
proof of concept constant force correction
Browse files Browse the repository at this point in the history
  • Loading branch information
MmAaXx500 committed Jun 16, 2024
1 parent 3af1e61 commit eca42d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tmt300rs/hid-tmt300rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ static int t300rs_update_constant(struct t300rs_device_entry *t300rs,
int16_t level;

level = (constant.level * fixp_sin16(effect.direction * 360 / 0x10000)) / 0x7fff;
level = level / 2;

if ((constant.level != constant_old.level) || (effect.direction != old.direction)) {

Expand Down Expand Up @@ -948,6 +949,7 @@ static int t300rs_upload_constant(struct t300rs_device_entry *t300rs,
int ret;

level = (constant.level * fixp_sin16(effect.direction * 360 / 0x10000)) / 0x7fff;
level = level / 2;
duration = effect.replay.length - 1;

offset = effect.replay.delay;
Expand Down

0 comments on commit eca42d5

Please sign in to comment.