Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardise Params #362

Merged
merged 13 commits into from
Mar 6, 2025
Merged

Standardise Params #362

merged 13 commits into from
Mar 6, 2025

Conversation

jay-oswald
Copy link
Collaborator

@jay-oswald jay-oswald commented Feb 27, 2025

Initial version of standard params.

The idea is we define a list of params we have and want to use, then different profiles use those params. This removes lots of the duplication from profiles, e.g. SOC will always be a battery % between 0 and 100, no need to repeat that over and over. This also allows us to start to know for sure what different paramaters are, e.g. the HA integration can provide a translation for SOC to State Of Charge in mutliple languages, something that we need standard params to do

This generates identical vehicle_profiles.json as the end result, no need for FW/processing changes, thats all dealt with in the generation of the final json file.

ATM this test is limited to just the bmw profile, to merge would need to un-limit it from only BMW, as well as update all existing profiles.

  • params.json
    • description - this is just a human frieldly description, to help people find/confirm the correct param for profiles
    • Settings all the various settings that go into the profile. Have kept this as a seperate area, incase we add more things to params.
  • Updated Schema Validator that gets dynamically updated with the list of params, this enforces the use of known params, and intentionally will NOT allow ad-hoc creation of params.
  • Vehicle profile pid list can be much simplier, rather than needing to declare all the values over and over, its now just an object with keys being the param, and value of the expression

TODO

  • Update all profiles to new format
  • Confirm validator is working
  • Add Schema for params.json
  • Fix Schema for profiles to now allow extra unknown paramaters
  • Add auto linter for profiles and params json files

@jay-oswald jay-oswald marked this pull request as ready for review March 6, 2025 14:54
@meatpiHQ meatpiHQ merged commit ef040b6 into main Mar 6, 2025
1 check passed
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