Skip to content

Majestic to Waybeam conversion#132

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

Majestic to Waybeam conversion#132
Lupinixx wants to merge 6 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 and others added 5 commits June 8, 2026 14:47
- Add waybeam_get_config(), waybeam_get_iq(), waybeam_set_iq(),
  waybeam_restart() helpers in gsmenu.sh
- waybeam_set_config() now logs to stderr and returns 1 on failure
- Migrate all image get/set: mirror, flip, contrast, saturation,
  lightness, antiflicker, sensor_file — using Waybeam API
- Rename 'hue' control to 'brightness' (maps to brightness IQ param)
- Rename 'luminace' control to 'lightness' (maps to lightness IQ param)
- Add new IQ controls: sharpness and hsv (get + set sides)
- Migrate all video encoding get/set: bitrate, gopsize, rc_mode
  (added qvbr as valid rcMode option); hide codec (H.265-only on star6e)
- Migrate FPV/ROI get/set: fpv_enable, noiselevel (range now 0-7)
- Migrate recording config get/set: rec_split (record.maxSeconds,
  range 0-300), rec_maxusage (record.maxMB, range 0-10000)
- Hide exposure control in UI (pending investigation)
- Fix adaptivelink handler to use waybeam_set_config for qpDelta
- Fix reload_switch_value double-fire: remove/re-add event cb around
  lv_obj_set_state so programmatic reload doesn't trigger set command
- Remove bitrate visibility toggle from gsmenu_toggle_rxmode
- Add forward declarations for trigger_drone_recording and
  is_drone_record_follow_enabled in gs_system.c

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove MAJESTIC_YAML variable (no longer needed)
- Remove get_majestic_value() function (all callers migrated)
- Remove majestic.yaml from refresh_cache() SCP; wfb.yaml,
  alink.conf, aalink.conf, txprofiles.conf still cached as before
- get/set air camera codec: no-op + static 'h265' (Waybeam is
  H.265-only on star6e; control is hidden in UI)
- get/set air camera exposure: stub (pending IQ AE investigation;
  control is hidden in UI)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- get/set air camera exposure → waybeam_get_iq/set_iq 'ae_ev_comp'
- Range: -4 to 4 (EV compensation steps)
- Rename slider label to 'EV Compensation' in ISP menu
- Unhide the exposure control in air_camera.c ISP menu

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@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.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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