From cc9e7a7ff4322112bf9357c89506d3475de47079 Mon Sep 17 00:00:00 2001 From: Dennis Frett Date: Wed, 7 Sep 2022 22:04:26 +0200 Subject: [PATCH] Fix build --- MiniDSP.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/MiniDSP.cpp b/MiniDSP.cpp index 0a3299d6..d612d55f 100644 --- a/MiniDSP.cpp +++ b/MiniDSP.cpp @@ -30,14 +30,12 @@ void MiniDSP::ParseHIDData(USBHID *hid __attribute__ ((unused)), bool is_rpt_id if(buf[1] == 0x17){ // Response is of format [ length ] [ 0x17 ] [ muted ] muted = (bool)buf[2]; - Serial.println("Muted was set to: " + String(muted)); } // Check if this is a requested volume change. if(buf[1] == 0x42){ // Response is of format [ length ] [ 0x42 ] [ volume ] volume = buf[2]; - Serial.println("Volume was set to: " + String(volume)); } @@ -185,13 +183,13 @@ void MiniDSP::setVolumeDB(float volumeDB) const { return; } - uint8_t SetVolumeCommand[] = {0x42, (int)-2*volumedB}; + uint8_t SetVolumeCommand[] = {0x42, (int)-2*volumeDB}; SendCommand(SetVolumeCommand, sizeof(SetVolumeCommand)); } void MiniDSP::setMuted(bool muted) const { - uint8_t SetMutedommand[] = {0x17, muted ? 0x01 : 0x00}; + uint8_t SetMutedommand[] = {0x17, muted ? (uint8_t)0x01 : (uint8_t)0x00}; SendCommand(SetMutedommand, sizeof(SetMutedommand)); } \ No newline at end of file