Allow pinsDebug "Analog in" long int

This commit is contained in:
Scott Lahteine 2018-03-28 20:40:28 -05:00
parent 7b8bb2519e
commit a97624dd81

View file

@ -152,7 +152,7 @@ inline void report_pin_state_extended(pin_t pin, bool ignore, bool extended = fa
#endif
{
if (!GET_ARRAY_IS_DIGITAL(x)) {
sprintf_P(buffer, PSTR("Analog in = %5d"), analogRead(DIGITAL_PIN_TO_ANALOG_PIN(pin)));
sprintf_P(buffer, PSTR("Analog in = %5ld"), analogRead(DIGITAL_PIN_TO_ANALOG_PIN(pin)));
SERIAL_ECHO(buffer);
}
else {
@ -214,7 +214,7 @@ inline void report_pin_state_extended(pin_t pin, bool ignore, bool extended = fa
}
else {
if (IS_ANALOG(pin)) {
sprintf_P(buffer, PSTR(" Analog in = %5d"), analogRead(DIGITAL_PIN_TO_ANALOG_PIN(pin)));
sprintf_P(buffer, PSTR(" Analog in = %5ld"), analogRead(DIGITAL_PIN_TO_ANALOG_PIN(pin)));
SERIAL_ECHO(buffer);
SERIAL_ECHOPGM(" ");
}