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

Add ability to see developer-defined 'name' and 'unit' fields #6

Open
richardbrodie opened this issue Jul 8, 2019 · 1 comment
Open

Comments

@richardbrodie
Copy link
Owner

No description provided.

@Libbum Libbum mentioned this issue Jul 9, 2019
@richardbrodie
Copy link
Owner Author

All field names and units are ordinarily defined in the SDK document, so don't need to be provided by this crate. But developer-defined fields are by definition not in the SDK so the user needs to know what the field is.

For example, currently a developer field is parsed to the following struct:

DevDataField {
    data_index: 1,
    field_num: 0,
    value: U8(87)
}

Which means basically nothing on its own. What is 87? Who knows?

The data provided in the developer definition, which we do not yet expose to the user, is as follows:

DeveloperFieldDescription {
    developer_data_index: 1,
    field_definition_number: 0,
    fit_base_type: 2,
    field_name: "charge",
    units: "%"
}

We can see that 87 is in fact 87% charge, which makes more sense.

We need some way to expose, at a minimum, "charge" and "%" to the user in some useful way.

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

No branches or pull requests

1 participant