mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
fixed printhex
This commit is contained in:
parent
e1a11e9d5c
commit
84cff61f49
3 changed files with 8 additions and 8 deletions
|
@ -63,22 +63,22 @@ void JoystickReportParser::Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t
|
||||||
void JoystickEvents::OnGamePadChanged(const GamePadEventData *evt)
|
void JoystickEvents::OnGamePadChanged(const GamePadEventData *evt)
|
||||||
{
|
{
|
||||||
Serial.print("X: ");
|
Serial.print("X: ");
|
||||||
PrintHex<uint8_t>(evt->X);
|
PrintHex<uint8_t>(evt->X, 0x80);
|
||||||
Serial.print("\tY: ");
|
Serial.print("\tY: ");
|
||||||
PrintHex<uint8_t>(evt->Y);
|
PrintHex<uint8_t>(evt->Y, 0x80);
|
||||||
Serial.print("\tZ: ");
|
Serial.print("\tZ: ");
|
||||||
PrintHex<uint8_t>(evt->Z1);
|
PrintHex<uint8_t>(evt->Z1, 0x80);
|
||||||
Serial.print("\tZ: ");
|
Serial.print("\tZ: ");
|
||||||
PrintHex<uint8_t>(evt->Z2);
|
PrintHex<uint8_t>(evt->Z2, 0x80);
|
||||||
Serial.print("\tRz: ");
|
Serial.print("\tRz: ");
|
||||||
PrintHex<uint8_t>(evt->Rz);
|
PrintHex<uint8_t>(evt->Rz, 0x80);
|
||||||
Serial.println("");
|
Serial.println("");
|
||||||
}
|
}
|
||||||
|
|
||||||
void JoystickEvents::OnHatSwitch(uint8_t hat)
|
void JoystickEvents::OnHatSwitch(uint8_t hat)
|
||||||
{
|
{
|
||||||
Serial.print("Hat Switch: ");
|
Serial.print("Hat Switch: ");
|
||||||
PrintHex<uint8_t>(hat);
|
PrintHex<uint8_t>(hat, 0x80);
|
||||||
Serial.println("");
|
Serial.println("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,4 +92,4 @@ void JoystickEvents::OnButtonDn(uint8_t but_id)
|
||||||
{
|
{
|
||||||
Serial.print("Dn: ");
|
Serial.print("Dn: ");
|
||||||
Serial.println(but_id, DEC);
|
Serial.println(but_id, DEC);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,4 +51,4 @@ public:
|
||||||
virtual void Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf);
|
virtual void Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __HIDJOYSTICKRPTPARSER_H__
|
#endif // __HIDJOYSTICKRPTPARSER_H__
|
||||||
|
|
Loading…
Reference in a new issue