mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-30 03:26:13 +01:00
ESP32 set frequency after DC speed
This commit is contained in:
parent
7b77d4ce1e
commit
f581d56bdc
|
@ -347,9 +347,9 @@ void MotorDriver::setDCSignal(byte speedcode, uint8_t frequency /*default =0*/)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
//DIAG(F("Brake pin %d freqency %d"), brakePin, f);
|
//DIAG(F("Brake pin %d value %d freqency %d"), brakePin, brake, f);
|
||||||
DCCTimer::DCCEXanalogWriteFrequency(brakePin, f); // set DC PWM frequency
|
|
||||||
DCCTimer::DCCEXanalogWrite(brakePin, brake, invertBrake);
|
DCCTimer::DCCEXanalogWrite(brakePin, brake, invertBrake);
|
||||||
|
DCCTimer::DCCEXanalogWriteFrequency(brakePin, f); // set DC PWM frequency
|
||||||
#else // all AVR here
|
#else // all AVR here
|
||||||
DCCTimer::DCCEXanalogWriteFrequency(brakePin, frequency); // frequency steps
|
DCCTimer::DCCEXanalogWriteFrequency(brakePin, frequency); // frequency steps
|
||||||
analogWrite(brakePin, invertBrake ? 255-brake : brake);
|
analogWrite(brakePin, invertBrake ? 255-brake : brake);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user