Skip to content

Commit

Permalink
Use nbr fingers rather than objs
Browse files Browse the repository at this point in the history
  • Loading branch information
1Revenger1 committed Jul 7, 2020
1 parent 6bd9fdf commit b4c7af3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions VoodooRMI/Functions/F12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ bool F12::attach(IOService *provider)

// Skip 6-15 as they do not increase attention size and only gives relative info

setProperty("Number of fingers", sensor->nbr_fingers);
setProperty("Number of fingers", sensor->nbr_fingers, 8);

return super::attach(provider);
}
Expand Down Expand Up @@ -352,7 +352,7 @@ void F12::getReport()

IOLogDebug("F12 Packet");

for (int i = 0; i < objects; i++) {
for (int i = 0; i < sensor->nbr_fingers; i++) {
rmi_2d_sensor_abs_object *obj = &report.objs[i];

switch (data[0]) {
Expand All @@ -376,7 +376,7 @@ void F12::getReport()
}

report.timestamp = timestamp;
report.fingers = objects;
report.fingers = sensor->nbr_fingers;

messageClient(kHandleRMIInputReport, sensor, &report, sizeof(RMI2DSensorReport));
}
Expand Down Expand Up @@ -468,15 +468,15 @@ int F12::rmi_read_register_desc(u16 addr,
++offset;
if (reg_size == 0) {
reg_size = struct_buf[offset] |
(struct_buf[offset + 1] << 8);
(struct_buf[offset + 1] << 8);
offset += 2;
}

if (reg_size == 0) {
reg_size = struct_buf[offset] |
(struct_buf[offset + 1] << 8) |
(struct_buf[offset + 2] << 16) |
(struct_buf[offset + 3] << 24);
(struct_buf[offset + 1] << 8) |
(struct_buf[offset + 2] << 16) |
(struct_buf[offset + 3] << 24);
offset += 4;
}

Expand Down

0 comments on commit b4c7af3

Please sign in to comment.