Skip to content

Propose a revision of the NewSwitch device config schema - #37

Merged
ethanjli merged 8 commits into
mainfrom
newswitch-config-revision
Oct 28, 2026
Merged

ethanjli merged 8 commits into
mainfrom
newswitch-config-revision

Conversation

@ethanjli

@ethanjli ethanjli commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

This PR proposes to simplify the NewSwitch device config schema by unifying some redundant concepts related to connections between different devices (some of which were called "connections", and others of which were called "mappings").

The specific changes are as follows:

  • Add a "root" controller which has mappings to cameras, the standalone board or HAT+, etc. Then we basically have something like a "device tree".
  • Move the connection struct from the controller device into <parentControllerDeviceKey>.connections.<controllerDeviceKey>.
  • Conceptually merge the concept of a "mapping" into the concept of a "connection", and merge mapping.<deviceKey>.type into connection.<deviceKey>.protocol. In other words, a controller lists the connections to other devices; they may be usb3-vision, serial, can-bus, canopen, direct (or direct-pwm, direct-stepper, etc., if you find that you need to be more specific), etc.
  • Group "selector"-related fields into a connection.<deviceKey>.selector struct, for readability.

@beniroquai

Copy link
Copy Markdown

Maybe we can meet and talk about the relevant updates for me, too?
Maybe include @manuelFragata ?

@ethanjli
ethanjli marked this pull request as ready for review October 27, 2026 16:04
@ethanjli
ethanjli merged commit 906ce52 into main Oct 28, 2026
2 checks passed
@ethanjli
ethanjli deleted the newswitch-config-revision branch October 28, 2026 10:40
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