Align Web XYZAC command gates with LinuxCNC

This commit is contained in:
2026-08-28 21:33:11 +08:00
parent 78d884bc67
commit cbd0bc1003
30 changed files with 337 additions and 150 deletions

View File

@@ -456,7 +456,6 @@ int sim_io_set_estop(sim_io *io, uint32_t estop) {
int sim_io_set_power(sim_io *io, uint32_t active) {
if (!valid_io(io) || active > 1U) return SIM_IO_ERR_ARGUMENT;
if (io->state.estop) { set_last(io, SIM_IO_ERR_ESTOP); return SIM_IO_ERR_ESTOP; }
if (!active) {
io->state.ready = 0;
io->state.tool_prepare = 0;
@@ -470,6 +469,7 @@ int sim_io_set_power(sim_io *io, uint32_t active) {
io->state.spindles[index].brake = 1;
}
} else {
if (io->state.estop) { set_last(io, SIM_IO_ERR_ESTOP); return SIM_IO_ERR_ESTOP; }
if (io->state.fault || io->state.toolchanger_fault) { set_last(io, SIM_IO_ERR_FAULT); return SIM_IO_ERR_FAULT; }
if (!spindle_stopped(io)) { set_last(io, SIM_IO_ERR_BUSY); return SIM_IO_ERR_BUSY; }
io->state.ready = 1;