Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

LastStepQUsedDoor

Contains the serial (ID) of the door that was opened during the last StepQ call, or 0 if no door was opened.

This is a read-only variable in practice — it is reset to 0 at the start of each StepQ call and set to the door’s ID if moveOpenDoor is enabled and a door was opened during the step.

In Python, use GetLastStepQUsedDoor().

Содержит serial (ID) двери, которая была открыта во время последнего вызова StepQ, или 0 если дверь не открывалась.

Фактически переменная только для чтения — сбрасывается в 0 в начале каждого вызова StepQ и устанавливается в ID двери, если moveOpenDoor включён и дверь была открыта.

В Python используйте GetLastStepQUsedDoor().

Pascal

var LastStepQUsedDoor: Integer;

Python

def GetLastStepQUsedDoor() -> int: ...

Pascal Example

var
  Res: Integer;
begin
  moveOpenDoor := True;
  Res := StepQ(0, True);
  if LastStepQUsedDoor > 0 then
    AddToSystemJournal('Opened door: $' + IntToHex(LastStepQUsedDoor, 8));
end.

Python Example

SetMoveOpenDoor(True)
StepQ(0, True)
door = GetLastStepQUsedDoor()
if door > 0:
    AddToSystemJournal(f'Opened door: ${door:08X}')

See Also

StepQ, moveOpenDoor