Skip to content

kc110-board-support: keep the WebUI's PTZ controls - #198

Open
widgetii wants to merge 1 commit into
masterfrom
feat/ptz-opt-in
Open

widgetii wants to merge 1 commit into
masterfrom
feat/ptz-opt-in

Conversation

@widgetii

Copy link
Copy Markdown
Member

OpenIPC/firmware#2583 makes the WebUI's PTZ controls a build option, BR2_PACKAGE_MAJESTIC_WEBUI_PTZ. It defaults on only where BR2_PACKAGE_GPIO_MOTORS or BR2_PACKAGE_MAJESTIC_AF is enabled; images without a driver lose the pad's code and get an empty p/motor.cgi.

The TP-Link Kasa KC110 drives its steppers through this package's own /usr/bin/gpio-motors shim instead of the gpio-motors package, so that default can't see it. The package now selects the option, guarded by if BR2_PACKAGE_MAJESTIC_WEBUI.

Ordering

This PR is safe on its own. Until firmware#2583 lands the symbol is undefined, and buildroot's Kconfig ignores a select of an undefined symbol silently: no error, no warning, exit 0. I checked that with the conf tool from a buildroot 2024.02.10 build. The line does nothing until the option exists, and then keeps the KC110's PTZ controls.

Verification

  • Kconfig behaviour: on a firmware tree with #2583, the option resolves y for a majestic-af board (hi3516ev300_lite) and a gpio-motors board (gk7205v500_lite), and stays unset for hi3516av300_lite. The select is what covers the KC110.
  • Images built against #2583:
    • A board with a driver (zenointel-sd-2n-4g) keeps the PTZ files; pan steps move the head.
    • One without (hi3516av300 lite) gets the empty stub and a working Live page.
  • Not built: a KC110 image. I have no KC110 here to flash it on.

The firmware now ships the PTZ controls only where gpio-motors or majestic-af
is built in, and the KC110 drives its steppers through its own gpio-motors
shim instead, so the package selects the option itself.
@openipc-ai

Copy link
Copy Markdown
Contributor

/review

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can turn these tips off under Display > Comment parts

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants