Skip to content

Majestic to Waybeam conversion - #132

Draft
Lupinixx wants to merge 2 commits into
OpenIPC:masterfrom
Lupinixx:majestic-to-waybeam
Draft

Majestic to Waybeam conversion#132
Lupinixx wants to merge 2 commits into
OpenIPC:masterfrom
Lupinixx:majestic-to-waybeam

Conversation

@Lupinixx

@Lupinixx Lupinixx commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

In this (draft) PR I compile a list of everything that needs to change to make PixelPilot compatible with waybeam_venc instead of Majestic, and track progress on the implementation.
If anything is missing, let me know and I'll add it to the list.


Sensor / Mode

  • Replace separate Size, FPS, and Video Mode dropdowns with a single Mode dropdown backed by GET /api/v1/modes

Recording

  • get air camera rec_enable — query recording state via GET /api/v1/record/status
  • set air camera rec_enable — start/stop via GET /api/v1/record/start|stop with retry-and-status-check loop (no Majestic CLI fallback)

Infrastructure helpers (gsmenu.sh)

  • waybeam_api_get(endpoint) — base curl wrapper
  • waybeam_record_active() — checks /record/status for "active": true
  • waybeam_record_start() / waybeam_record_stop()
  • waybeam_record_set_with_retry_bg(on|off) — retry loop with status verification, background subshell
  • waybeam_set_config(key, value) — calls /api/v1/set?key=value; returns 1 and logs to stderr on failure
  • waybeam_mode_options() / waybeam_mode_index_from_label() — mode dropdown helpers
  • waybeam_get_config(key)GET /api/v1/get?key, replaces get_majestic_value()
  • waybeam_get_iq(param) — query a single ISP IQ parameter from GET /api/v1/iq
  • waybeam_set_iq(param, value) — set a single ISP IQ parameter via GET /api/v1/iq/set
  • waybeam_restart()GET /api/v1/restart (needed after setting RESTART-mutability fields)

Image settings — get side

  • get air camera mirrorGET /api/v1/get?image.mirror
  • get air camera flipGET /api/v1/get?image.flip
  • get air camera contrastGET /api/v1/iqcontrast param
  • get air camera hue → renamed to get air camera brightnessGET /api/v1/iqbrightness param
  • get air camera saturationGET /api/v1/iqsaturation param
  • get air camera luminace → renamed to get air camera lightnessGET /api/v1/iqlightness param
  • get air camera sharpness (new)GET /api/v1/iqsharpness param
  • get air camera hsv (new)GET /api/v1/iqhsv param

Image settings — set side

  • set air camera mirrorGET /api/v1/set?image.mirror= + restart
  • set air camera flipGET /api/v1/set?image.flip= + restart
  • set air camera contrastGET /api/v1/iq/set?param=contrast&value= (LIVE)
  • set air camera hue → renamed to set air camera brightnessGET /api/v1/iq/set?param=brightness&value= (LIVE)
  • set air camera saturationGET /api/v1/iq/set?param=saturation&value= (LIVE)
  • set air camera luminace → renamed to set air camera lightnessGET /api/v1/iq/set?param=lightness&value= (LIVE)
  • set air camera sharpness (new)GET /api/v1/iq/set?param=sharpness&value= (LIVE)
  • set air camera hsv (new)GET /api/v1/iq/set?param=hsv&value= (LIVE)

Video encoding — get side

  • get air camera bitrateGET /api/v1/get?video0.bitrate
  • get air camera gopsizeGET /api/v1/get?video0.gopSize
  • get air camera rc_modeGET /api/v1/get?video0.rcMode (added qvbr option)
  • get air camera codec → returns h265 statically; control hidden in UI (Waybeam is H.265-only on star6e)

Video encoding — set side

  • set air camera bitrateGET /api/v1/set?video0.bitrate= (LIVE)
  • set air camera gopsizeGET /api/v1/set?video0.gopSize= (LIVE)
  • set air camera rc_modeGET /api/v1/set?video0.rcMode= + restart
  • set air camera codec → no-op; control hidden in UI

ISP / exposure — get side

  • get air camera antiflickerGET /api/v1/iqae_flicker param
  • get air camera exposureGET /api/v1/iqae_ev_comp (EV compensation, range -4 to 4); UI label renamed to "EV Compensation"
  • get air camera sensor_fileGET /api/v1/get?isp.sensorBin

ISP / exposure — set side

  • set air camera antiflickerGET /api/v1/iq/set?param=ae_flicker&value=
  • set air camera exposureGET /api/v1/iq/set?param=ae_ev_comp&value= (LIVE)
  • set air camera sensor_fileGET /api/v1/set?isp.sensorBin= + restart

FPV / ROI — get side

  • get air camera fpv_enableGET /api/v1/get?fpv.roiEnabled
  • get air camera noiselevelGET /api/v1/get?fpv.noiseLevel (range 0–7)

FPV / ROI — set side

  • set air camera fpv_enableGET /api/v1/set?fpv.roiEnabled= (LIVE)
  • set air camera noiselevelGET /api/v1/set?fpv.noiseLevel= + restart

Recording config (drone-side) — get side

  • get air camera rec_splitGET /api/v1/get?record.maxSeconds (range 0–300)
  • get air camera rec_maxusageGET /api/v1/get?record.maxMB (range 0–10000)

Recording config (drone-side) — set side

  • set air camera rec_splitGET /api/v1/set?record.maxSeconds= + restart
  • set air camera rec_maxusageGET /api/v1/set?record.maxMB= + restart

Additional fixes

  • set air wfbng adaptivelink — removed majestic CLI calls; uses waybeam_set_config for video0.qpDelta
  • reload_switch_value — fix callback double-fire bug (remove/re-add event cb around lv_obj_set_state)
  • bitrate visibility — no longer toggled by gsmenu_toggle_rxmode

Infrastructure cleanup

  • Remove get_majestic_value() (all camera reads now use Waybeam API)
  • Remove MAJESTIC_YAML variable
  • Remove majestic.yaml from refresh_cache() SCP
  • wfb.yaml / alink.conf SCP cache retained — still needed for WFB-ng and alink settings

Out of scope for this PR

  • WFB-ng wireless settings (channel, MCS, STBC, LDPC, FEC) — controlled via wifibroadcast cli, not Majestic/waybeam
  • Telemetry settings — controlled via wifibroadcast cli
  • Alink drone feature — separate process, separate scope

@Lupinixx

Copy link
Copy Markdown
Contributor Author

I've bench tested it and it all works. Will keep this as draft as long as the main VTX images does not yet implement waybeam_venc yet.

Lupinixx and others added 2 commits August 3, 2026 16:00
Document the Majestic-to-Waybeam conversion context for AI coding agents.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reapplies the majestic-to-waybeam camera changes on top of the Miller
column menu rework (colmenu_pages.c), which replaced the old imperative
air_camera.c/gs_system.c widget builders with data-driven page tables.

- Video: replace WFB-specific Size/FPS (Majestic resolution/fps) with a
  single Mode dropdown (Waybeam fixed-mode selector), gated to WFB via
  mode_mask. APFPV keeps its existing Video Mode item unchanged.
- Video: drop the Codec dropdown — the Waybeam/star6e encoder is
  H.265-only.
- Image: rename Hue -> Brightness and Luminance -> Lightness (Waybeam IQ
  param names), add new Sharpness and HSV sliders.
- ISP: rename Exposure -> EV Compensation (Waybeam ae_ev_comp IQ param).

The gsmenu.sh side of this conversion (Waybeam API helpers, get/set
bodies for mode/brightness/lightness/sharpness/hsv/exposure, etc.) is
not carried into this repo: upstream master turned gsmenu.sh into a
generic no-op boilerplate template. That real implementation needs to
be ported into ~/sbc-groundstations/package/pixelpilot/files/gsmenu.sh
instead, which is where the actual air/ground station logic now lives.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Lupinixx
Lupinixx force-pushed the majestic-to-waybeam branch from 3af0943 to be35aec Compare August 3, 2026 14:10
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.

1 participant