diff --git a/IO_DFPlayer.h b/IO_DFPlayer.h index 575668b..c60d116 100644 --- a/IO_DFPlayer.h +++ b/IO_DFPlayer.h @@ -161,7 +161,7 @@ protected: uint8_t pin = vpin - _firstVpin; // Validate parameter. - volume = min(30,volume); + volume = min((uint8_t)30,volume); if (pin == 0) { // Play track diff --git a/IO_HCSR04.h b/IO_HCSR04.h index d56dda3..e7b5622 100644 --- a/IO_HCSR04.h +++ b/IO_HCSR04.h @@ -138,7 +138,7 @@ private: // void read_HCSR04device() { // uint16 enough to time up to 65ms - uint16_t startTime, waitTime, currentTime, maxTime; + uint16_t startTime, waitTime = 0, currentTime, maxTime; // If receive pin is still set on from previous call, abort the read. if (ArduinoPins::fastReadDigital(_echoPin)) @@ -186,4 +186,4 @@ private: }; -#endif //IO_HCSR04_H \ No newline at end of file +#endif //IO_HCSR04_H