diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-10-04 21:29:17 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-10-04 21:29:17 +0300 |
| commit | 28c4fc4c82cf3539f4e49a558db014f0f3f711b5 (patch) | |
| tree | 22babbcf036c3d3f0a79b1533550cde419b303e1 /hid-tminit.h | |
| parent | dd575faa00717cf2c3be28ee55a3cb609be6e32c (diff) | |
| download | hid-tminit-28c4fc4c82cf3539f4e49a558db014f0f3f711b5.tar.gz hid-tminit-28c4fc4c82cf3539f4e49a558db014f0f3f711b5.zip | |
Initialize with base info, not attachment
Diffstat (limited to 'hid-tminit.h')
| -rw-r--r-- | hid-tminit.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/hid-tminit.h b/hid-tminit.h index 04d55df..286fe3d 100644 --- a/hid-tminit.h +++ b/hid-tminit.h @@ -27,7 +27,8 @@ static const unsigned int setup_arr_sizes[] = { * and vice-versa */ struct tm_wheel_info { - uint16_t wheel_type; + uint8_t model; + uint8_t attachment; /** * See when the USB control out packet is prepared... @@ -43,14 +44,15 @@ struct tm_wheel_info { * Note: TMX does not work as it requires 2 control packets */ static const struct tm_wheel_info tm_wheels_infos[] = { - {0x0306, 0x0006, "Thrustmaster T150RS"}, - {0x0206, 0x0005, "Thrustmaster T300RS"}, - {0x0204, 0x0005, "Thrustmaster T300 Ferrari Alcantara Edition"}, - {0x0002, 0x0002, "Thrustmaster T500RS"}, - {0x0407, 0x0001, "Thrustmaster TMX"} + {0x03, 0x06, 0x0006, "Thrustmaster T150RS"}, + {0x02, 0x06, 0x0005, "Thrustmaster T300RS"}, + {0x02, 0x03, 0x0005, "Thrustmaster T300RS (F1 attachment)"}, + {0x02, 0x04, 0x0005, "Thrustmaster T300 Ferrari Alcantara Edition"}, + {0x00, 0x02, 0x0002, "Thrustmaster T500RS"}, + {0x04, 0x07, 0x0001, "Thrustmaster TMX"} }; -static const uint8_t tm_wheels_infos_length = 5; +static const uint8_t tm_wheels_infos_length = 6; /** * This structs contains (in little endian) the response data @@ -77,7 +79,8 @@ struct __packed tm_wheel_response * Seems to be the model code of the wheel * Read table thrustmaster_wheels to values */ - uint16_t model; + uint8_t attachment; + uint8_t model; uint16_t field2; uint16_t field3; @@ -87,7 +90,8 @@ struct __packed tm_wheel_response struct __packed { uint16_t field0; uint16_t field1; - uint16_t model; + uint8_t attachment; + uint8_t model; } b; } data; }; |
