Skip to content

✨ #174: Auto-sleep, LED, field of view, mirror, audio, gestures and factory reset - #176

Closed
nofuturekid wants to merge 7 commits into
OpenFoxes:mainfrom
nofuturekid:feature/#174-lite-settings
Closed

nofuturekid wants to merge 7 commits into
OpenFoxes:mainfrom
nofuturekid:feature/#174-lite-settings

Conversation

@nofuturekid

@nofuturekid nofuturekid commented Oct 23, 2026 •

Copy link
Copy Markdown

Fixes #174

Builds on #175 (its commit is the first one here; review that one first or merge it before this).

New CLI subcommands: auto-sleep, sleep-background, led, fov, mirror, invert, audio noise-reduction|auto-gain|pickup-distance|mic-in-sleep|mic, gesture target-lock|zoom|dynamic-zoom|direction|zoom-ratio and factory-reset (asks unless --yes). info shows the new fields the camera reports. English and German strings, docs in docs/cli.md.

Bytes and status offsets are from captures of OBSBOT Center on a Tiny 2 Lite, see https://github.com/nofuturekid/obsbot-tiny2-lite-protocol. The offsets were measured on the Lite only (noted in the code); the tracking speed offset is left to #173.

Tested on a Tiny 2 Lite: every setting that has a status byte was set and read back. Not run on the hardware: audio mic off and factory-reset (both restart the camera; the factory reset frame matches the capture byte for byte). Gestures other than target lock and invert are accepted but the camera does not report them back.

Written with Claude Code (AI).

🤖 Generated with Claude Code

nofuturekid and others added 6 commits October 23, 2026 23:36
Framed commands on unit 2, selector 2 carry two CRC-16/USB checksums
(reflected polynomial 0xA001, init and final XOR 0xFFFF): one over the
12-byte header and one over the data block, each with its own field
zeroed. Until now every command replayed a captured checksum together
with its captured sequence number, so no new command could be added
without a capture.

The new frame builder takes receiver, command id and data and computes
both checksums. Each camera hands out its own sequence numbers, seeded
from the clock, because the camera drops a frame that repeats the
previous sequence number.

Sleep, tracking speed, exposure mode type and preset recall now use the
builder. Their tests build with the captured sequence numbers and check
that the captured frames come out byte for byte, which proves the
checksums.

Thanks to gnacho for working out the checksum in #171.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New CLI commands:

- `auto-sleep off|30s|2m|10m|<seconds>` sets the time after which the
  camera falls asleep on its own (short command `0b 02 <i16 seconds>`).
  `off` sends the current time negated, as OBSBOT Center does, so the
  camera keeps the time for when auto-sleep is turned on again.
- `sleep-background black|image [--mirror on|off]` chooses what the
  camera shows while asleep (`0e 02 00 <v>`) and mirrors it
  (`0e 02 02 <v>`).

`info` shows the auto-sleep time (status 0x0a, i16, negative = off), the
sleep background (0x1b) and its mirroring (0x1d). The offsets were
measured on a Tiny 2 Lite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New CLI commands:

- `led off|1|2|3` sets the status LED brightness (short command
  `1a 01 <v>`).
- `fov wide|medium|narrow` sets the field of view (`04 01 <v>`).
- `mirror on|off` mirrors the image (`14 01 <v>`).
- `invert on|off` turns view and gimbal upside down (framed command
  0x3b84 to receiver 4). The camera does not report it back.

`info` shows the field of view (status 0x11), mirroring (0x13) and the
LED brightness (0x21). The offsets were measured on a Tiny 2 Lite, where
0x21 is the LED and not the tracking speed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New CLI command `audio` with these settings (short commands
`<cmd> 01 <v>`):

- `noise-reduction off|weak|medium|strong` (0x0a)
- `auto-gain on|off` (0x17)
- `pickup-distance near|standard|far` (0x1b)
- `mic-in-sleep on|off` keeps the microphone on while asleep (0x13)
- `mic on|off` enables or disables the microphone (0x1c). Disabling it
  makes the camera restart, so the CLI prints a warning.

`info` shows noise reduction (status 0x08), automatic gain (0x19), the
pickup distance (low bits of 0x22 on top of 0x10) and the microphone
while asleep (0x10). The offsets were measured on a Tiny 2 Lite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New CLI command `gesture` with these settings (framed commands to
receiver 4):

- `target-lock on|off` (0x30c4)
- `zoom on|off` (0x3144)
- `dynamic-zoom on|off` (0x3344)
- `direction on|off`, the mirrored gesture direction (0x33c4)
- `zoom-ratio <1.0-4.0>`, f32 (0x3244)

`info` shows the target lock (status 0x01, measured on a Tiny 2 Lite).
The camera does not report the other switches or the zoom ratio.

The command tests reproduce frames captured from OBSBOT Center byte for
byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New CLI command `factory-reset` resets the camera to its factory
settings (framed command 0xa802 to receiver 2, data 01). The camera
restarts afterwards. The CLI asks for a confirmation unless `--yes` is
given; without a terminal to ask on, it aborts.

The command test reproduces the frame captured from OBSBOT Center byte
for byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checked in OBSBOT Center: "Invert view and gimbal" only reverses the
gimbal's left/right direction; the image is not turned upside down.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KVMy3W9ATmKdDLXgny8Mv9
@nofuturekid

Copy link
Copy Markdown
Author

Closing this: I moved the Tiny 2 Lite work to a separate tool, obsbot4linux, and won't maintain these changes here. The protocol notes and captures stay public in obsbot-tiny2-lite-protocol in case they help. Thanks for the project! (Written with Claude Code.)

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.

More settings for the Tiny 2 Lite: auto-sleep, LED, field of view, mirror, audio, gestures, factory reset

1 participant