Files
Blanton_TTL_Script/src/Script_ABC_Blanton/utils/wait_init.ttl
T
etwenandClaude Opus 5 4ed283d0ca feat(ttl): Wait for thermal sensors before taking baseline data
New utils/wait_init.ttl polls `show platform temperature` every 10 s
until it stops reporting "Thermal Not detected", so Script A does not
record a baseline while pmon is still coming up. Script A calls it right
after `show boot` and bumps to V1.0.3.

The include pointed at utils/wait_thermal.ttl while the file is
wait_init.ttl -- as Script A's own V1.0.3 history line says. Corrected;
Tera Term aborts the macro when an include cannot be opened, so this
would have stopped Script A at line 59 on the first run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RetWKFZFG1ZHcitQAyhwM
2026-08-21 09:17:50 +08:00

31 lines
904 B
Turtle

; =============================================================================
; File : utils/wait_init.ttl
; Version : V1.0.0
; Date : 2026-08-21
; Author : ETWen
; =============================================================================
; Wait until "show platform temperature" is not "Thermal Not detected".
; Enter : prompt of the previous command is NOT consumed.
; Exit : "show platform temperature" is sent, prompt NOT consumed.
;
; Version History:
; V1.0.0 2026-08-21 Initial Version
; =============================================================================
wt_interval = 10
timeout = 30
wait prompt_sonic_root
:WAIT_THERMAL
sendln "show platform temperature"
wait "Thermal Not detected" prompt_sonic_root
if result = 2 then
goto THERMAL_OK
endif
wait prompt_sonic_root
pause wt_interval
goto WAIT_THERMAL
:THERMAL_OK
timeout = 0
sendln "show platform temperature"