File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -338,10 +338,6 @@ Sensors::~Sensors()
338
338
sub.unregisterCallback ();
339
339
}
340
340
341
- for (auto &sub : _sensor_hall_subs) {
342
- sub.unregisterCallback ();
343
- }
344
-
345
341
_vehicle_acceleration.Stop ();
346
342
_vehicle_angular_velocity.Stop ();
347
343
@@ -658,9 +654,7 @@ void Sensors::hall_poll()
658
654
// messages and that would mess with the updated flags of the subscribers
659
655
660
656
// find the AoA hall sensor index if not set yet
661
- if ((_parameters.CAL_AV_AOA_ID >= 0 ) && (_parameters.CAL_AV_AOA_ID < MAX_SENSOR_COUNT) &&
662
- ((_av_aoa_hall_sub_index < 0 ) || (_av_aoa_hall_sub_index >= MAX_SENSOR_COUNT))) {
663
-
657
+ if (_parameters.CAL_AV_AOA_ID >= 0 && _av_aoa_hall_sub_index < 0 ) {
664
658
_av_aoa_hall_sub_index = getHallSubIndex (_parameters.CAL_AV_AOA_ID );
665
659
666
660
if (_av_aoa_hall_sub_index >= 0 ) {
@@ -669,9 +663,7 @@ void Sensors::hall_poll()
669
663
}
670
664
671
665
// find the Slip hall sensor index if not set yet
672
- if ((_parameters.CAL_AV_SLIP_ID >= 0 ) && (_parameters.CAL_AV_SLIP_ID < MAX_SENSOR_COUNT) &&
673
- ((_av_slip_hall_sub_index < 0 ) || (_av_slip_hall_sub_index >= MAX_SENSOR_COUNT))) {
674
-
666
+ if (_parameters.CAL_AV_SLIP_ID >= 0 && _av_slip_hall_sub_index < 0 ) {
675
667
_av_slip_hall_sub_index = getHallSubIndex (_parameters.CAL_AV_SLIP_ID );
676
668
677
669
if (_av_slip_hall_sub_index >= 0 ) {
You can’t perform that action at this time.
0 commit comments