- Add `forceTurnOffMachineRelay` method for superuser/emergency operations to bypass gating restrictions. - Enforce `toggle_after = 0` to prevent auto-toggle behavior. - Update routes to explicitly reflect relay state when modifying MACHINE relay. - Extend Shelly device switch handling with optional `skip_toggle_after` parameter.
26 lines
1021 B
PHP
26 lines
1021 B
PHP
<?php
|
|
|
|
namespace modules\selfserve\helpers;
|
|
|
|
enum selfserve_lane_state
|
|
{
|
|
case ENTRANCE_PORT_OPEN_QUEUED; // The wash is queued
|
|
case ENTRANCE_PORT_OPEN; // The entrance gate is open
|
|
case MACHINE_RELAY_ON_QUEUED; // The machine relay is queued to turn on. (applies to supported lanes)
|
|
case MACHINE_RELAY_ON; // The machine relay is on. (applies to supported lanes)
|
|
case MACHINE_RELAY_OFF_QUEUED; // The machine relay is queued to turn off. (applies to supported lanes)
|
|
case MACHINE_RELAY_OFF; // The machine relay is off. (applies to supported lanes)
|
|
case IN_WASH; // The vehicle is in the wash
|
|
case EXIT_PORT_OPEN_QUEUED; // The exit gate is queued
|
|
case EXIT_PORT_OPEN; // The exit gate is open
|
|
case IDLE; // The lane is idle
|
|
case FAULT; // The lane is in a fault state
|
|
case MAINTENANCE; // The lane is under maintenance
|
|
case CLOSED; // The lane is closed
|
|
|
|
public function equals(selfserve_lane_state $state): bool
|
|
{
|
|
return $this === $state;
|
|
}
|
|
}
|