Skip to content

ctt-server: camera and sensor mode selection on the Preview tab#12

Open
Kletternaut wants to merge 1 commit into
raspberrypi:mainfrom
Kletternaut:main
Open

ctt-server: camera and sensor mode selection on the Preview tab#12
Kletternaut wants to merge 1 commit into
raspberrypi:mainfrom
Kletternaut:main

Conversation

@Kletternaut

Copy link
Copy Markdown

Add camera dropdown (switch between multiple cameras) and resolution dropdown (sensor mode selection) to the capture page's info bar.

  • camera.py: add list_cameras(), set_mode(); cache sensor modes per model; _apply_mode() now adopts the mode's maximum framerate so the FPS field starts at the correct rate instead of a hardcoded 30.
  • app.py: add GET /api/cameras, POST /api/camera endpoints.
  • capture.html: camera + resolution dropdowns in caminfo row; resolution cell spans 2 columns so long mode labels like 4056 × 3040 · 10‑bit · 10 fps aren't clipped.
  • app.js: switchCamera(), switchMode() with await loadControls() so the FPS field updates to the selected mode's maximum on both initial load and mode switch.
  • app.css: mode-sel dropdown styling.

Add camera dropdown (switch between multiple cameras) and resolution
dropdown (sensor mode selection) to the capture page's info bar.

- camera.py: add list_cameras(), set_mode(); cache sensor modes per model;
  _apply_mode() now adopts the mode's maximum framerate so the FPS field
  starts at the correct rate instead of a hardcoded 30.
- app.py: add GET /api/cameras, POST /api/camera endpoints.
- capture.html: camera + resolution dropdowns in caminfo row; resolution
  cell spans 2 columns so long mode labels aren't clipped.
- app.js: switchCamera(), switchMode() with await loadControls() so the
  FPS field updates to the selected mode's maximum.
- app.css: mode-sel dropdown styling.
@naushir

naushir commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Really sorry, ive not had a chance to look at your change yet. I'll try to look through next week hopef

@Kletternaut

Copy link
Copy Markdown
Author

No need to apologize at all! I completely understand that you are busy, and there is absolutely no pressure.

To be honest, the long silence on the other PR (rpicam-apps/#917) just made me a bit insecure about whether I was technically completely on the wrong track with my approach. So I'm actually relieved to hear it's just a matter of time!

Take all the time you need, both for that one and for this new CTT PR whenever you get around to it. Thanks for the heads-up!

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