paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Edit PPM mode value


From: Christophe De Wagter
Subject: Re: [Paparazzi-devel] Edit PPM mode value
Date: Wed, 30 Nov 2011 13:37:01 +0100

sorry, I forgot that you also need to change the define in ./sw/airborne/firmware/fixedwing/main_fbw.h line 39.

normally:
in fbw there is only: manual or automatic (no difference between auto1 and auto2) so if you had just swapped auto1 and auto2 in autopilot.h (and possible reverse the mode channel in the rc.xml) then main_fbw.h would have been ok. 

In any case main_fbw.h (FBW mode) and autopilot.h (AP mode) need to correspond. So if your MANUAL is in the middle switch position you need to change: 

#define FBW_MODE_OF_PPRZ(mode) ((mode) < TRESHOLD_MANUAL_PPRZ ? FBW_MODE_MANUAL : FBW_MODE_AUTO)

into:

#define FBW_MODE_OF_PPRZ(mode) (((mode) > (MIN_PPRZ / 2)) && ((mode) < (MAX_PPRZ / 2)) ? FBW_MODE_MANUAL : FBW_MODE_AUTO)

in main_fbw.h

-Christophe 



On Wed, Nov 30, 2011 at 1:19 PM, Jochen Rieger <address@hidden> wrote:
I have changed

#define PPRZ_MODE_OF_PULSE(pprz, mega8_status) \
  (pprz > TRESHOLD2 ? PPRZ_MODE_AUTO2 : \
        (pprz > TRESHOLD1 ? PPRZ_MODE_AUTO1 : PPRZ_MODE_MANUAL))


to


#define PPRZ_MODE_OF_PULSE(pprz, mega8_status) \
  (pprz > TRESHOLD2 ? PPRZ_MODE_MANUAL : \
        (pprz > TRESHOLD1 ? PPRZ_MODE_AUTO2 : PPRZ_MODE_AUTO1))


but i believed that would be to easy. After flashing, when i select the mode positions, in GCS the right modes are shown, but if i want to control the servos, it seems that the modes are not correctly changed. No controlling in MANUAL mode.

-Jochen


2011/11/30 Christophe De Wagter <address@hidden>
For rotorcraft that is simply defined in the airframe.xml in the autopilot block. 
I'm affraid that for fixedwing what you want needs some hacking of  ./sw/airborne/firmware/fixedwing/autopilot.h lines 52-53

-Christophe 



On Wed, Nov 30, 2011 at 10:21 AM, Jochen Rieger <address@hidden> wrote:
Hello, I want to edit the mode selection of the different PPM values . Currently, the low PPM value of the mode channel is Manual, middle AUTO1 and high AUTO2.
It is clear, when i changing the min with max value, then i swap the Manual with AUTO2. But how and where can i change the middle position of mode channel?

<channel ctl="5" function="MODE"     min="950" neutral="1500" max="2050" average="1"/>

I want that, low = AUTO1, middle= AUTO2 and high= MANUAL.

Best regards.
-Jochen

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



reply via email to

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