mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_Compass: uavcan: reindent after WITH_SEMAPHORE change (NFC)
This commit is contained in:
parent
5b06d01402
commit
7ab6a5d94d
@ -171,29 +171,29 @@ void AP_Compass_UAVCAN::handle_magnetic_field(AP_UAVCAN* ap_uavcan, uint8_t node
|
|||||||
{
|
{
|
||||||
WITH_SEMAPHORE(_sem_registry);
|
WITH_SEMAPHORE(_sem_registry);
|
||||||
|
|
||||||
Vector3f mag_vector;
|
Vector3f mag_vector;
|
||||||
AP_Compass_UAVCAN* driver = get_uavcan_backend(ap_uavcan, node_id, 0);
|
AP_Compass_UAVCAN* driver = get_uavcan_backend(ap_uavcan, node_id, 0);
|
||||||
if (driver != nullptr) {
|
if (driver != nullptr) {
|
||||||
mag_vector[0] = cb.msg->magnetic_field_ga[0];
|
mag_vector[0] = cb.msg->magnetic_field_ga[0];
|
||||||
mag_vector[1] = cb.msg->magnetic_field_ga[1];
|
mag_vector[1] = cb.msg->magnetic_field_ga[1];
|
||||||
mag_vector[2] = cb.msg->magnetic_field_ga[2];
|
mag_vector[2] = cb.msg->magnetic_field_ga[2];
|
||||||
driver->handle_mag_msg(mag_vector);
|
driver->handle_mag_msg(mag_vector);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AP_Compass_UAVCAN::handle_magnetic_field_2(AP_UAVCAN* ap_uavcan, uint8_t node_id, const Mag2Cb &cb)
|
void AP_Compass_UAVCAN::handle_magnetic_field_2(AP_UAVCAN* ap_uavcan, uint8_t node_id, const Mag2Cb &cb)
|
||||||
{
|
{
|
||||||
WITH_SEMAPHORE(_sem_registry);
|
WITH_SEMAPHORE(_sem_registry);
|
||||||
|
|
||||||
Vector3f mag_vector;
|
Vector3f mag_vector;
|
||||||
uint8_t sensor_id = cb.msg->sensor_id;
|
uint8_t sensor_id = cb.msg->sensor_id;
|
||||||
AP_Compass_UAVCAN* driver = get_uavcan_backend(ap_uavcan, node_id, sensor_id);
|
AP_Compass_UAVCAN* driver = get_uavcan_backend(ap_uavcan, node_id, sensor_id);
|
||||||
if (driver != nullptr) {
|
if (driver != nullptr) {
|
||||||
mag_vector[0] = cb.msg->magnetic_field_ga[0];
|
mag_vector[0] = cb.msg->magnetic_field_ga[0];
|
||||||
mag_vector[1] = cb.msg->magnetic_field_ga[1];
|
mag_vector[1] = cb.msg->magnetic_field_ga[1];
|
||||||
mag_vector[2] = cb.msg->magnetic_field_ga[2];
|
mag_vector[2] = cb.msg->magnetic_field_ga[2];
|
||||||
driver->handle_mag_msg(mag_vector);
|
driver->handle_mag_msg(mag_vector);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AP_Compass_UAVCAN::read(void)
|
void AP_Compass_UAVCAN::read(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user