mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-22 23:56:13 +01:00
compiler warning fixes and stupid cast for ESP toolchain
This commit is contained in:
parent
56ed6ab6dc
commit
f56a9a2c43
|
@ -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
|
||||
|
|
|
@ -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
|
||||
#endif //IO_HCSR04_H
|
||||
|
|
Loading…
Reference in New Issue
Block a user