-
Notifications
You must be signed in to change notification settings - Fork 39
Convert types and indices in special sensor specification to lists #169
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
Conversation
This allows to correctly work with modes that have several values. See ddemidov/ev3dev-lang-cpp/issues#10
Change template for special sensor types to account for the fact that types and value indices are now lists in the specification. Refs #10, depends on ev3dev/ev3dev-lang#169
Change template for special sensor types to account for the fact that types and value indices are now lists in the specification. Refs #10, depends on ev3dev/ev3dev-lang#169
Sorry I haven't been involved in that thread so far. Although this looks good code-wise, I am wondering why we need it. Is there an advantage to doing this over just always using the |
Give me some time to look through this more closely (I want to understand the C++ template you have); right now I don't think I properly understand the use case. |
Sure. Compare the result of the template here: https://github.com/ddemidov/ev3dev-lang-cpp/blob/858c0cb77b43f4e265fc571783986f5da51db556/ev3dev.h#L481-L491 The first method is generated from a type/indices list with single entry, and the second is generated from two entries. The template just checks if the |
By the way, I haven't forgotten about this; I just haven't had a time to read through and understand the changes and their implications. If you want to merge this before I can take a look, go ahead; I trust your judgment. |
Change template for special sensor types to account for the fact that types and value indices are now lists in the specification. Refs #10, depends on ev3dev/ev3dev-lang#169
OK, I understand this now. LGTM. |
Change template for special sensor types to account for the fact that types and value indices are now lists in the specification. Refs #10, depends on ev3dev/ev3dev-lang#169
Change template for special sensor types to account for the fact that types and value indices are now lists in the specification. Refs #10, depends on ev3dev/ev3dev-lang#169
This allows to correctly work with modes that have several values.
The immediate example is
GYRO-G&A
mode that is added togyroSensor
with this PR.❗ Requires rewriting templates for special sensor types.
See ddemidov/ev3dev-lang-cpp#10