[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Paparazzi-devel] Sonar module

From: Loic Drumettaz
Subject: [Paparazzi-devel] Sonar module
Date: Thu, 15 Mar 2012 13:42:22 +0100


I have tried to use the index directly without success. I tried 0 to 4, looking at the messages in INS_Z. No evidence that the baro measurement has been replaced by the sonar measurement. Is there any way to see the sonar (raw or scaled) value in the telemetry?

So I have tried to use adc_generic.xml module, together with the telemetry message ADC_GENERIC. Then, this message is not supported during compliation:

firmwares/rotorcraft/main.c: In function 'main_periodic':
firmwares/rotorcraft/main.c:144: warning: implicit declaration of function 'PERIODIC_SEND_ADC_GENERIC'
firmwares/rotorcraft/main.c:144: warning: nested extern declaration of 'PERIODIC_SEND_ADC_GENERIC'
firmwares/rotorcraft/main.c:144: error: 'PprzTransport' undeclared (first use in this function)
firmwares/rotorcraft/main.c:144: error: (Each undeclared identifier is reported only once
firmwares/rotorcraft/main.c:144: error: for each function it appears in.)



ah, yes... on lisa we are currently missing some convenience defines for the ADCs, opened an issue for it:

So right now have to use the index directly:
0 for ADC_1, 1 for ADC_2, etc.... ADC_3 (so index 2) is already used for measuring supply voltage and not available anymore...
 <modules main_freq="512">
    <load name="sonar_maxbotix_booz.xml">
      <configure name="ADC_SONAR" value="0"/>
You will also end up with a stupid USE_0 define in that case, but that doesn't matter much.

Also the message BOOZ2_SONAR has nothing to do whith this module and in fact can probably be deleted.... it basically just contained 4 adc values...

Beware that if you use that module it will update your altitude estimate based on the sonar measurement... if you just want to read the sonar for testing, you are better of using the adc_generic module which will send the ADC_GENERIC message down.

Cheers, Felix

reply via email to

[Prev in Thread] Current Thread [Next in Thread]