mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-30 20:48:33 -04:00
AP_UAVCAN: non-functional change - fix style
non-functional change - fix style
This commit is contained in:
parent
2a34593ed3
commit
1db04772b2
@ -1093,9 +1093,11 @@ void AP_UAVCAN::update_mag_state(uint8_t node, uint8_t sensor_id)
|
||||
to assign our sensor_id to this listener*/
|
||||
if ((_mag_listener_sensor_ids[j] == 0) && (sensor_id != 0)) {
|
||||
bool already_taken = false;
|
||||
for (uint8_t k = 0; k < AP_UAVCAN_MAX_LISTENERS; k++)
|
||||
if (_mag_listener_sensor_ids[k] == sensor_id)
|
||||
for (uint8_t k = 0; k < AP_UAVCAN_MAX_LISTENERS; k++) {
|
||||
if (_mag_listener_sensor_ids[k] == sensor_id) {
|
||||
already_taken = true;
|
||||
}
|
||||
}
|
||||
if (!already_taken) {
|
||||
debug_uavcan(2, "AP_UAVCAN: Compass: sensor_id updated to %d for listener %d\n", sensor_id, j);
|
||||
_mag_listener_sensor_ids[j] = sensor_id;
|
||||
|
Loading…
Reference in New Issue
Block a user