AP_TemperatureSensor: Support Servo_Telem sources #31616
Merged
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.
Add support for updating motor and PCB temperatures in
Servo_TelemfromAP_TemperatureSensorbackends.Supports integrating temperature reports from DroneCAN servos using
ActuatorStatus, as that message does not include a temperature field.Testing
Tools/scripts/build_all.shcompletes successfully.Tested by sending
uavcan.equipment.device.Temperaturemessages from DroneCAN GUI's interactive console to SITL initially configured with:DroneCAN temperature messages were sent with a temperature of approximately 23 C and were recorded as battery temperature (BAT[0].Temp) in the log.
TEMP1_SRC was then modified to a value of 7 (ServoMotor), added in this PR. Temperature messages were sent with a value of approximately 100 C and were recorded as servo motor temperature (CSRV[0].MotT) in the log.
Finally, TEMP1_SRC was then modified to a value of 8 (ServoPCB), also added in this PR. Temperature messages were sent with a value of approximately -100 C and were recorded as servo PCB temperature (CSRV[0].PCBT) in the log.
Graph of the log from MissionPlanner:
Queries
AP_Servo_Telem::get_singleton. Running that for every report feels like a waste. This could be done in the switch case.