-
Notifications
You must be signed in to change notification settings - Fork 6
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
rework drivers #83
rework drivers #83
Conversation
3f000a2
to
b2285fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick-tests were changed to run on self-hosted CI, it's feature that's only available inside BR, and takes from 20~30 minutes to a rpi compile it from zero.
Some features were removed: self_test, read_all.
Benchmark output is different from the shown on PR.
The newer structure still can't handle the case where we have multiple PeripheralClasses, such the second Magnetometer, PWM0 (rpi one) and BR bars
if approx::relative_eq!(duty_cycle, 1.0) { | ||
self.pwm.set_channel_full_on(channel.into(), 0).unwrap(); | ||
return; | ||
fn get_magnetometer_sensor(&mut self) -> Option<&mut dyn MagnetometerSensor> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How the newer API will handle the second Magnetometer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'll return a vector of an option
|
||
self.set_led(select, !state) | ||
} | ||
devices: Vec<Box<dyn AnyHardware>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep in mind to investigate map in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't go into the details of each sensor, but the architecture seems good.
646e981
to
2806c56
Compare
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
2806c56
to
6c5ef57
Compare
@RaulTrombin all comments are fixed. |
Major rework that: