1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-24 08:36:14 +01:00

Compare commits

..

1 Commits

Author SHA1 Message Date
Sergei Kotlyachkov
63d551b951
Merge a30311caed into 387ea019bd 2023-11-10 02:16:25 +00:00

View File

@ -65,7 +65,7 @@ protected:
addDevice(this, controlledDevice); addDevice(this, controlledDevice);
} }
else { else {
DIAG(F("ScheduledPin Controlled device not found for VPIN:%d"), pin); DIAG(F("ScheduledPin Controlled device not found for pin:%d"), pin);
_deviceState = DEVSTATE_FAILED; _deviceState = DEVSTATE_FAILED;
} }
} }
@ -88,7 +88,7 @@ protected:
return; return;
} }
#ifdef DIAG_IO #ifdef DIAG_IO
DIAG(F("ScheduledPin Write VPIN:%u Value:%d Micros:%l"), vpin, value, micros()); DIAG(F("ScheduledPin Write VPIN:%u Value:%d"), vpin, value);
#endif #endif
unsigned long currentMicros = micros(); unsigned long currentMicros = micros();
delayUntil(currentMicros + _durationMicros); delayUntil(currentMicros + _durationMicros);
@ -99,7 +99,7 @@ protected:
void _loop(unsigned long currentMicros) { void _loop(unsigned long currentMicros) {
if (_deviceState == DEVSTATE_FAILED) return; if (_deviceState == DEVSTATE_FAILED) return;
#ifdef DIAG_IO #ifdef DIAG_IO
DIAG(F("ScheduledPin Bounce VPIN:%u Value:%d Micros:%l"), _firstVpin, _scheduledValue, micros()); DIAG(F("ScheduledPin Write VPIN:%u Value:%d"), _firstVpin, _scheduledValue);
#endif #endif
ArduinoPins::fastWriteDigital(_firstVpin, _scheduledValue); ArduinoPins::fastWriteDigital(_firstVpin, _scheduledValue);
delayUntil(currentMicros + 0x7fffffff); // Largest time in the future! Effectively disable _loop calls. delayUntil(currentMicros + 0x7fffffff); // Largest time in the future! Effectively disable _loop calls.
@ -107,8 +107,8 @@ protected:
// Display information about the device, and perhaps its current condition (e.g. active, disabled etc). // Display information about the device, and perhaps its current condition (e.g. active, disabled etc).
void _display() { void _display() {
DIAG(F("ScheduledPin Configured:%u Value:%d Duration:%l"), (int)_firstVpin, DIAG(F("ScheduledPin Configured:%u value=%d duration=%ld"), (int)_firstVpin,
_scheduledValue, _durationMicros); (int)_firstVpin, _scheduledValue, _durationMicros);
} }
}; };