Implement HAL 0.0.00 search kill, expand CLAUDE.md with firmware reference
HAL 0.0.00 kills the search task via the OS task manager (os -> kill Search) rather than the ngsearch submenu used by HAL 2.05. Boot signal is NoGPS only. Source: saveitforparts/Travler_Rotor upstream repo. CLAUDE.md now includes firmware variant comparison table, full command reference, NVS indices, RS-485 pinout, and cable wiring notes.
This commit is contained in:
parent
2c28b0edc2
commit
780de4fe2b
2 changed files with 86 additions and 18 deletions
|
|
@ -178,19 +178,20 @@ class HAL205Protocol(FirmwareProtocol):
|
|||
|
||||
|
||||
class HAL000Protocol(FirmwareProtocol):
|
||||
"""HAL 0.0.00 firmware.
|
||||
"""HAL 0.0.00 firmware (older Trav'ler units).
|
||||
|
||||
Uses shorter command names and a different init sequence.
|
||||
Boot signal: "NoGPS"
|
||||
Motor submenu: "mot"
|
||||
Search kill: os -> kill Search -> q (OS task manager approach)
|
||||
|
||||
Source: github.com/saveitforparts/Travler_Rotor (v2.0, HAL 0.0.00 branch)
|
||||
"""
|
||||
|
||||
BOOT_SIGNALS = ("NoGPS",)
|
||||
MOTOR_COMMAND = "mot"
|
||||
|
||||
def initialize(self, callback: Callable[[str], None] | None = None) -> None:
|
||||
# HAL 0.0.00 has a different boot sequence — the exact signals
|
||||
# are not documented in the upstream repo. This is a best-effort
|
||||
# implementation that should be validated against real hardware.
|
||||
logger.info("Waiting for HAL 0.0.00 boot...")
|
||||
logger.info("Waiting for HAL 0.0.00 boot (ensure IDU is powered on)...")
|
||||
|
||||
while True:
|
||||
line = self._readline()
|
||||
|
|
@ -201,20 +202,22 @@ class HAL000Protocol(FirmwareProtocol):
|
|||
callback(line)
|
||||
logger.debug("Boot: %s", line)
|
||||
|
||||
# HAL 0.0.00 boot detection — adjust if hardware reveals
|
||||
# different signals
|
||||
if "NoGPS" in line or "ready" in line.lower():
|
||||
logger.info("Boot complete")
|
||||
if any(signal in line for signal in self.BOOT_SIGNALS):
|
||||
logger.info("Boot complete — homing finished")
|
||||
break
|
||||
|
||||
self.kill_search()
|
||||
self.reset_to_root()
|
||||
|
||||
def kill_search(self) -> None:
|
||||
# HAL 0.0.00 may have a different search-kill sequence.
|
||||
# Falling back to root-menu reset as a safe default.
|
||||
self.reset_to_root()
|
||||
logger.info("Search task cancelled (HAL 0.0.00)")
|
||||
self._write("os")
|
||||
time.sleep(0.2)
|
||||
self._write("kill Search")
|
||||
time.sleep(0.2)
|
||||
self._write("q")
|
||||
self._write("")
|
||||
logger.info("Search task cancelled via OS task manager")
|
||||
|
||||
def enter_motor_menu(self) -> None:
|
||||
self.reset_to_root()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue