gpio-motors: read the pin list from ptz_gpio, keep gpio_motors working - #2341
Conversation
The WebUI's PTZ configuration moved to explicit ptz_* names (majestic-webui#227): ptz_control picks the method, and ptz_gpio is the documented home for this utility's pin list. The utility was the one place still demanding the old name, which forced every new gpio setup to set gpio_motors anyway and left the rename half-done. ptz_gpio is read first; gpio_motors stays as the fallback, because it is what every camera configured before the rename has — including the maintainer's published recipes. `grep .` turns an empty first answer into a failure so the || actually falls through rather than handing an empty line to the parser.
PR Summary by QodoPrefer ptz_gpio with legacy gpio_motors fallback
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. ptz_gpio lacks hardware evidence
|
Completes the PTZ variable rename from OpenIPC/majestic-webui#227 on the utility side.
The WebUI now uses explicit
ptz_*names (ptz_controlpicks the method;ptz_gpiois the documented pin list) and already accepts either name for detection — butgpio-motorsitself was the one place still demandinggpio_motors, forcing every new setup to use the legacy name and leaving the rename half-done.ptz_gpiois read first;gpio_motorsremains the fallback (every camera configured before the rename has it, including the published recipes).grep .turns an empty first answer into a failure so the||genuinely falls through instead of handing an empty line to the parser.cc @flyrouter — this is the "one hunk in the firmware repo" from the #227 reply.