chore: centralize board manufacturer/model/USB identity in hw_defs JSON (#7786)

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Peter Feerick
2026-09-25 13:46:09 +10:00
committed by GitHub
co-authored by Claude Sonnet 5
parent 598255e1d1
commit 425944bff2
95 changed files with 460 additions and 610 deletions
+7 -1
View File
@@ -127,6 +127,11 @@ class BoardJson
std::string cpu_type = "";
};
struct IdentityDefn {
std::string manufacturer = "";
std::string model = "";
};
typedef std::vector<TrimDefn> TrimsTable;
explicit BoardJson(Board::Type board, QString hwdefn);
@@ -202,6 +207,7 @@ private:
DisplayDefn m_display;
CustomSwitchesDefn m_cfs;
HardwareDefn m_hardware;
IdentityDefn m_identity;
bool m_hasKeyLockCombo = false;
struct InputCounts {
@@ -228,7 +234,7 @@ private:
static bool loadFile(Board::Type board, QString hwdefn, InputsTable * inputs, SwitchesTable * switches,
KeysTable * keys, TrimsTable * trims, DisplayDefn & lcd, CustomSwitchesDefn & cfs,
HardwareDefn & hardware, bool & hasKeyLockCombo);
HardwareDefn & hardware, IdentityDefn & identity, bool & hasKeyLockCombo);
static void afterLoadFixups(Board::Type board, InputsTable * inputs, SwitchesTable * switches,
KeysTable * keys, TrimsTable * trims);