mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-30 03:26:13 +01:00
DC via power pin 3rd part
This commit is contained in:
parent
0e36b3b997
commit
802f9c96b4
|
@ -1 +1 @@
|
||||||
#define GITHUB_SHA "devel-202302122239Z"
|
#define GITHUB_SHA "devel-202302131946Z"
|
||||||
|
|
|
@ -155,6 +155,13 @@ void MotorDriver::setPower(POWERMODE mode) {
|
||||||
noInterrupts();
|
noInterrupts();
|
||||||
IODevice::write(powerPin,invertPower ? HIGH : LOW);
|
IODevice::write(powerPin,invertPower ? HIGH : LOW);
|
||||||
interrupts();
|
interrupts();
|
||||||
|
if (DCinuse) {
|
||||||
|
// remember current (DC) speed
|
||||||
|
// but set PWM to zero/stop
|
||||||
|
byte s = curSpeedCode;
|
||||||
|
setDCSignal(128);
|
||||||
|
curSpeedCode = s;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
powerMode=mode;
|
powerMode=mode;
|
||||||
}
|
}
|
||||||
|
@ -239,7 +246,7 @@ void MotorDriver::startCurrentFromHW() {
|
||||||
#if defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP32)
|
||||||
uint16_t taurustones[28] = { 165, 175, 196, 220,
|
uint16_t taurustones[28] = { 165, 175, 196, 220,
|
||||||
247, 262, 294, 330,
|
247, 262, 294, 330,
|
||||||
249, 392, 440, 494,
|
349, 392, 440, 494,
|
||||||
523, 587, 659, 698,
|
523, 587, 659, 698,
|
||||||
494, 440, 392, 249,
|
494, 440, 392, 249,
|
||||||
330, 284, 262, 247,
|
330, 284, 262, 247,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user