Avoid duplicate temperature compensation in EAHRS #30863
+78
−24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As explained in issue #25792, there is an issue where EAHRS performs duplicate temperature compensation for certain sensors.
The enum
TempCalibration
of the typeTempCal
is adjusted to see if the sensors is of the MicroStrain7 type (as mentioned in the issue) and set the enum asIsTempCalibrated
. Else the enum is set asIsNotTempCalibrated
.In the inertial sensor section, this enum, which was sent by the message
ins_data_message_t
, is checked, and if there is temperature compensation, a new boolIsTempCalibrated
is set totrue
. This bool then checked at places where temperature compensation due toHAL_INS_TEMPERATURE_CAL_ENABLE
occurs and the code inside is executed if the bool isfalse
.