Disable all drives in an emergency. Called from emergency stop and the tick ISR. This is only called in an emergency, so we don't update the driver status
| 481 | // Disable all drives in an emergency. Called from emergency stop and the tick ISR. |
| 482 | // This is only called in an emergency, so we don't update the driver status |
| 483 | void Move::EmergencyDisableDrivers() noexcept |
| 484 | { |
| 485 | for (size_t drive = 0; drive < GetNumActualDirectDrivers(); drive++) |
| 486 | { |
| 487 | if (!inInterrupt()) // on the Duet 06/085 we need interrupts running to send the I2C commands to set motor currents |
| 488 | { |
| 489 | UpdateMotorCurrent(drive, 0.0); |
| 490 | } |
| 491 | DisableOneLocalDriver(drive); |
| 492 | } |
| 493 | } |
| 494 | |
| 495 | void Move::DisableAllDrivers() noexcept |
| 496 | { |
no outgoing calls
no test coverage detected