General: Correct fmt specifiers

Corrects a few fmt calls to use fmt's specifiers. This also converts
instances of printf over to fmt::print
This commit is contained in:
Lioncash
2019-08-24 16:54:11 -04:00
parent b0c246abc7
commit f1ad7e5ef0
12 changed files with 101 additions and 78 deletions

View File

@@ -43,16 +43,20 @@ void DualshockPad::deviceDisconnected() {
void DualshockPad::initialCycle() {
#if 0
uint8_t setupCommand[5] = {0xF4, 0x42, 0x0c, 0x00, 0x00}; //Tells controller to start sending changes on in pipe
if (!sendHIDReport(setupCommand, 5, HIDReportType::Feature, 0xF4))
{
deviceError("Unable to send complete packet! Request size %x\n", sizeof(setupCommand));
return;
}
uint8_t btAddr[8];
receiveHIDReport(btAddr, sizeof(btAddr), HIDReportType::Feature, 0xF5);
for (int i = 0; i < 6; i++)
m_btAddress[5 - i] = btAddr[i + 2]; // Copy into buffer reversed, so it is LSB first
// Tells controller to start sending changes on in pipe
uint8_t setupCommand[5] = {0xF4, 0x42, 0x0c, 0x00, 0x00};
if (!sendHIDReport(setupCommand, 5, HIDReportType::Feature, 0xF4)) {
deviceError("Unable to send complete packet! Request size {:x}\n", sizeof(setupCommand));
return;
}
uint8_t btAddr[8];
receiveHIDReport(btAddr, sizeof(btAddr), HIDReportType::Feature, 0xF5);
for (int i = 0; i < 6; i++) {
// Copy into buffer reversed, so it is LSB first
m_btAddress[5 - i] = btAddr[i + 2];
}
#endif
}