From 84cff61f49755e8c000bea3761ec80347b895c8f Mon Sep 17 00:00:00 2001 From: Oleg Mazurov Date: Wed, 3 Apr 2013 13:14:25 -0600 Subject: [PATCH] fixed printhex --- .../{USBHIDJoystick.pde => USBHIDJoystick.ino} | 0 .../HID/USBHIDJoystick/hidjoystickrptparser.cpp | 14 +++++++------- examples/HID/USBHIDJoystick/hidjoystickrptparser.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) rename examples/HID/USBHIDJoystick/{USBHIDJoystick.pde => USBHIDJoystick.ino} (100%) diff --git a/examples/HID/USBHIDJoystick/USBHIDJoystick.pde b/examples/HID/USBHIDJoystick/USBHIDJoystick.ino similarity index 100% rename from examples/HID/USBHIDJoystick/USBHIDJoystick.pde rename to examples/HID/USBHIDJoystick/USBHIDJoystick.ino diff --git a/examples/HID/USBHIDJoystick/hidjoystickrptparser.cpp b/examples/HID/USBHIDJoystick/hidjoystickrptparser.cpp index 324c2f48..78993682 100644 --- a/examples/HID/USBHIDJoystick/hidjoystickrptparser.cpp +++ b/examples/HID/USBHIDJoystick/hidjoystickrptparser.cpp @@ -63,22 +63,22 @@ void JoystickReportParser::Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t void JoystickEvents::OnGamePadChanged(const GamePadEventData *evt) { Serial.print("X: "); - PrintHex(evt->X); + PrintHex(evt->X, 0x80); Serial.print("\tY: "); - PrintHex(evt->Y); + PrintHex(evt->Y, 0x80); Serial.print("\tZ: "); - PrintHex(evt->Z1); + PrintHex(evt->Z1, 0x80); Serial.print("\tZ: "); - PrintHex(evt->Z2); + PrintHex(evt->Z2, 0x80); Serial.print("\tRz: "); - PrintHex(evt->Rz); + PrintHex(evt->Rz, 0x80); Serial.println(""); } void JoystickEvents::OnHatSwitch(uint8_t hat) { Serial.print("Hat Switch: "); - PrintHex(hat); + PrintHex(hat, 0x80); Serial.println(""); } @@ -92,4 +92,4 @@ void JoystickEvents::OnButtonDn(uint8_t but_id) { Serial.print("Dn: "); Serial.println(but_id, DEC); -} \ No newline at end of file +} diff --git a/examples/HID/USBHIDJoystick/hidjoystickrptparser.h b/examples/HID/USBHIDJoystick/hidjoystickrptparser.h index 055dbaca..c9aad9d4 100644 --- a/examples/HID/USBHIDJoystick/hidjoystickrptparser.h +++ b/examples/HID/USBHIDJoystick/hidjoystickrptparser.h @@ -51,4 +51,4 @@ public: virtual void Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf); }; -#endif // __HIDJOYSTICKRPTPARSER_H__ \ No newline at end of file +#endif // __HIDJOYSTICKRPTPARSER_H__