AP_Temperature: Add DroneCAN source

This commit is contained in:
Gone4Dirt 2024-01-12 02:50:37 +00:00 committed by Andrew Tridgell
parent e772012e01
commit 6e4ce35fca
3 changed files with 5 additions and 1 deletions

View File

@ -90,6 +90,9 @@ void AP_TemperatureSensor_Backend::update_external_libraries(const float tempera
AP::battery().set_temperature_by_serial_number(temperature, _params.source_id);
break;
#endif
case AP_TemperatureSensor_Params::Source::DroneCAN:
// Label only, used by AP_Periph
break;
case AP_TemperatureSensor_Params::Source::None:
case AP_TemperatureSensor_Params::Source::Pitot_tube:

View File

@ -58,7 +58,7 @@ const AP_Param::GroupInfo AP_TemperatureSensor_Params::var_info[] = {
// @Param: SRC
// @DisplayName: Sensor Source
// @Description: Sensor Source is used to designate which device's temperature report will be replaced by this temperature sensor's data. If 0 (None) then the data is only available via log. In the future a new Motor temperature report will be created for returning data directly.
// @Values: 0: None, 1:ESC, 2:Motor(not implemented yet), 3:Battery Index, 4:Battery ID/SerialNumber, 5: CAN based Pitot tube
// @Values: 0: None, 1:ESC, 2:Motor, 3:Battery Index, 4:Battery ID/SerialNumber, 5:CAN based Pitot tube, 6:DroneCAN-out on AP_Periph
// @User: Standard
AP_GROUPINFO("SRC", 4, AP_TemperatureSensor_Params, source, (float)Source::None),

View File

@ -43,6 +43,7 @@ public:
Battery_Index = 3,
Battery_ID_SerialNumber = 4,
Pitot_tube = 5,
DroneCAN = 6,
};
AP_Enum<Type> type; // 0=disabled, others see frontend enum TYPE