Skip to main content

FLAG PEEK

Syntax​

FLAG PEEK <n>

Description​

Reads event flag n (1–64) without clearing it. To consume the flag, use FLAG TAKE.

Response​

FLAG <n> <0|1>

1 = raised, 0 = not raised.

Errors​

ReplyCondition
ERR FLAG PEEK bad_argMissing argument or flag outside 1–64.

Example​

flag_peek.py
from hmcls_udp import Board

board = Board("192.168.1.11")
raised = board.query("FLAG PEEK 3")[0].split()[2] == "1"
print("flag 3 raised:", raised)