mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-26 17:46:14 +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;
|
uint8_t pin = vpin - _firstVpin;
|
||||||
|
|
||||||
// Validate parameter.
|
// Validate parameter.
|
||||||
volume = min(30,volume);
|
volume = min((uint8_t)30,volume);
|
||||||
|
|
||||||
if (pin == 0) {
|
if (pin == 0) {
|
||||||
// Play track
|
// Play track
|
||||||
|
|
|
@ -138,7 +138,7 @@ private:
|
||||||
//
|
//
|
||||||
void read_HCSR04device() {
|
void read_HCSR04device() {
|
||||||
// uint16 enough to time up to 65ms
|
// 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 receive pin is still set on from previous call, abort the read.
|
||||||
if (ArduinoPins::fastReadDigital(_echoPin))
|
if (ArduinoPins::fastReadDigital(_echoPin))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user