-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Better ADC sensor integration #3251
Conversation
Thanks for the comments! Everything should be solved now. |
@@ -26,6 +26,7 @@ | |||
#ifndef WING_ROTATION_ADC_SENSOR_H | |||
#define WING_ROTATION_ADC_SENSOR_H | |||
|
|||
extern float skew_adc_sensor; |
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.
Why did you add this? This should not be needed as it is published in the ABI message.
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.
The mapped ADC to Radians value is published in the ABI message, not the raw ADC value. This is dependent on the scaling and offset value that is provided. When determining the mapping between ADC and radians (or deg) the first time the sensor is installed it is usefull to have directly the adc output without having to convert it. In addition, in rotwing state we have in the same message both the skew command as well as the ADC reading, therefore facilitating the estimation of the mapping parameters.
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 prefer not to make this accessible externally as it is not needed and not used. If you want to do that just add a publisher which publishes the generic ADC message from this module, but you could also just set the scalings to 1 to read out the value on calibration.
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 understand, I removed it.
@@ -26,6 +26,7 @@ | |||
#ifndef WING_ROTATION_ADC_SENSOR_H | |||
#define WING_ROTATION_ADC_SENSOR_H | |||
|
|||
extern float skew_adc_sensor; |
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 prefer not to make this accessible externally as it is not needed and not used. If you want to do that just add a publisher which publishes the generic ADC message from this module, but you could also just set the scalings to 1 to read out the value on calibration.
* Make adc sensor mappable from the airframe. Better interface for adc in the rotwing state. * Added parameters to v3b airframe * Addressed the comments * Removed external variable
Make adc sensor mappable from the airframe. Easier to then use this module on different platform with diferent ADC sensors.
Better interface for adc in the rotwing state.