Skip to content

Conversation

@philmoz
Copy link
Collaborator

@philmoz philmoz commented Jan 25, 2026

Add the display related settings to the hwdefs files.
Update companion to use the settings from the hwdefs files.

@elecpower please check the Companion changes to make sure I've done it correctly.

@philmoz philmoz added this to the 3.0 milestone Jan 25, 2026
@philmoz philmoz added companion Related to the companion software compilation Related to compiling the firmware and firmware options house keeping 🧹 Cleanup of code and house keeping labels Jan 25, 2026
@elecpower
Copy link
Collaborator

@philmoz looks good.

FunctionSwitchGroups - I haven't dug around so just pointing out you changed the logic.

Housekeeping: could you please alphabetise the capability enum and cases. Also checked and MaxAnalogs is redundant so can go. Its last use was for binary import and conversion.

Love your work!

@philmoz
Copy link
Collaborator Author

philmoz commented Jan 25, 2026

FunctionSwitchGroups - I haven't dug around so just pointing out you changed the logic.

Based on all the existing cases. Settings for custom switches need to go into JSON at some point (e.g. has RGB leds) so this could also go in the JSON if needed.

Housekeeping: could you please alphabetise the capability enum and cases. Also checked and MaxAnalogs is redundant so can go. Its last use was for binary import and conversion.

Done.

@elecpower
Copy link
Collaborator

Based on all the existing cases. Settings for custom switches need to go into JSON at some point (e.g. has RGB leds) so this could also go in the JSON if needed.

I was 99.9% sure you knew what you were doing but hey doesn't hurt to double check. Anything and everything needs to go in hwdef files then Companion should only require maintenance when a new attribute type is added. I can dream can't I...

@philmoz
Copy link
Collaborator Author

philmoz commented Jan 25, 2026

Is it safe to remove FactoryInstalledPots and FactoryInstalledSwitches - don't appear to be used?

@elecpower
Copy link
Collaborator

Is it safe to remove FactoryInstalledPots and FactoryInstalledSwitches - don't appear to be used?

From memory these are from conversion so if you delete and things compile go for it.

There is a lot of housekeeping post removal of binary support and it is scattered everywhere. So to avoid monster PRs I just keep cleaning up in the areas I'm working on.

@philmoz
Copy link
Collaborator Author

philmoz commented Jan 26, 2026

I've added some more settings to the JSON files for custom switches and miscellaneous hardware settings.

There are a few more that will take more time to figure out (HasIMU, HasTrainerModuleCPPM and HasTrainerModuleSBUS).

@elecpower
Copy link
Collaborator

Can you also look at the hacks in post load hwdefs in boardsjson which should not be required if hwdefs are complete.

Fantastic work so far. I personally appreciate how this will make life easier maintaining Companion.

@philmoz
Copy link
Collaborator Author

philmoz commented Jan 26, 2026

Can you also look at the hacks in post load hwdefs in boardsjson which should not be required if hwdefs are complete.

I don't think those can go just yet - looks to still be some gaps in the other sections of the JSON files.

@elecpower
Copy link
Collaborator

I also need to check firmware capabilities in case any hardware related are still hiding out there.

@philmoz philmoz force-pushed the philmoz/hwdefs-lcd branch from df96495 to f697321 Compare January 27, 2026 07:15
@elecpower
Copy link
Collaborator

Reviewed OpenTxFirmware::getCapability and there are lots of hardware items that at a minimum need to be moved to Boards as a housekeeping task. I can foresee multiple PRs for the moves to Boards to keep the merges manageable.

From there you can progressively add to hwdefs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

companion Related to the companion software compilation Related to compiling the firmware and firmware options house keeping 🧹 Cleanup of code and house keeping

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants