Since the move to the HAL version of the ardupilot code the IR sensor sonar function is no longer functioning and constantly returns a value of 715 no matter what distance an object is from the sensor.
I suspect that the problem may be in these two snippets of code:
Since the move to the HAL version of the ardupilot code the IR sensor sonar function is no longer functioning and constantly returns a value of 715 no matter what distance an object is from the sensor. I suspect that the problem may be in these two snippets of code:
ModeFilterInt16_Size5 sonar_mode_filter(2);
if CONFIG_SONAR == ENABLED
endif
if CONFIG_SONAR == ENABLED
if CONFIG_SONAR_SOURCE == SONAR_SOURCE_ADC
elif CONFIG_SONAR_SOURCE == SONAR_SOURCE_ANALOG_PIN
else
warning "Invalid CONFIG_SONAR_SOURCE"
endif
endif