1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-07-21 04:18:55 +02:00

make diag messages conditional

This commit is contained in:
Harald Barth 2025-07-16 14:50:46 +02:00
parent 143c62d6a6
commit 844dac8e3c
2 changed files with 4 additions and 2 deletions

View File

@ -203,7 +203,9 @@ void DCCTimer::DCCEXanalogWriteFrequencyInternal(uint8_t pin, uint32_t frequency
}
void DCCTimer::DCCEXledcDetachPin(uint8_t pin) {
DIAG(F("Clear pin %d channel"), pin);
#ifdef DIAG_IO
DIAG(F("Clear pin %d from ledc channel"), pin);
#endif
pin_to_channel[pin] = 0;
pinMatrixOutDetach(pin, false, false);
}

View File

@ -242,7 +242,7 @@ void MotorDriver::setPower(POWERMODE mode) {
// when switching a track On, we need to check the crrentOffset with the pin OFF
if (powerMode==POWERMODE::OFF && currentPin!=UNUSED_PIN) {
senseOffset = ADCee::read(currentPin);
DIAG(F("Track %c sensOffset=%d"),trackLetter,senseOffset);
if (Diag::ACK) DIAG(F("Track %c sensOffset=%d"),trackLetter,senseOffset);
}
IODevice::write(powerPin,invertPower ? LOW : HIGH);