Hi,
I finally managed to update altitude measurement with the sonar
module. There was several issues, found first with adc_generic module.
- ADC1 is used on LISA M to bind the spektrum receiver, so I couldn't
use it together with the receiver
- ADC2 never sent any value, maybe this is the one which is used to
measure supply voltage??
- ADC3 worked with index 3:<configure name="ADC_CHANNEL_GENERIC1" value="3"/>
With this module, I was able to see the raw value from the sonar with
the telemetry. So, i tried to do the same with the sonar module.
I added DOWNLINK_SEND_BOOZ2_SONAR in the read function of
sonar_maxbotix.c (I used the old telemetry message BOOZ2_SONAR so it's
good to keep it for debugging ;)). It showed that the sonar module was
working fine as the value sonar_meas was updated.
So the problem was in ins.c, in the function ins_update_sonar. ins_qfe
wasn't updated (I also added ins_qfe to BOOZ2_SONAR). It turned out
that the boolean ins_update_on_agl was FALSE. So i added:
ins_update_on_agl=TRUE in the init function of sonar_maxbotix.c
I'm also suprised by line 110:
#ifdef BOOZ2_SONAR
ins_update_on_agl=FALSE
#endif
BOOZ2_SONAR is defined nowhere and seems to be an old flag?
I suppose a new issue can be opened on github?
Regards
Loïc
_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel