Bonjour Alex,
malgrés une boite de doliprane je ne parvient pas a comprendre comment la valeur de la voie passe de l'interruption dans
rcValue[currentChannel] via (diff<=2200 && diff>=900) rcValue[currentChannel] = diff;
a: rcCommand[chan] qui est dans la boucle scuter regulierement?
void computeRC() {
static uint8_t rc4ValuesIndex = 0;
uint8_t chan,a;
rc4ValuesIndex++;
for (chan = 0; chan < 5; chan++) {
rcData4Values[chan][rc4ValuesIndex%4] = readRawRC(chan); je me doute que c'est ici mais comment trasite la valeur depuis l'interruption
rcData[chan] = 0;
for (a = 0; a < 4; a++)
rcData[chan] += rcData4Values[chan][a];
rcData[chan]/= 4;
if ( rcData[chan] < rcHysteresis[chan] -4) rcHysteresis[chan] = rcData[chan]+2;
if ( rcData[chan] > rcHysteresis[chan] +4) rcHysteresis[chan] = rcData[chan]-2;
rcCommand[chan] = rcHysteresis[chan]-1500;
}
rcCommand[ROLL] = rcCommand[ROLL] * (rcFactor2 + rcFactor1*square(rcCommand[ROLL]));
rcCommand[PITCH] = rcCommand[PITCH] * (rcFactor2 + rcFactor1*square(rcCommand[PITCH]));
rcCommand[THROTTLE] = (MAXCOMMAND-MINTHROTTLE)/(2000.0-1100.0) * (rcCommand[THROTTLE]+400) + MINTHROTTLE-1500;
}
Si vous pourriez eclairer ma lanterne.
Merci
Sorry for English user but i can't say the same think in english
Question about PPM serie use in soft
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: Question about PPM serie use in soft
rcValue[] is fed automatically via the RC interrupt
-> then readRawRC -- array of 4 ---> rcData4Values -- mean of 4 and /4 --> rcData[] --- 4 units hysteresis -> rcHyteresis[] --expo and rate--> rcCommand[]
-> then readRawRC -- array of 4 ---> rcData4Values -- mean of 4 and /4 --> rcData[] --- 4 units hysteresis -> rcHyteresis[] --expo and rate--> rcCommand[]
Last edited by Alexinparis on Thu Feb 24, 2011 9:59 pm, edited 1 time in total.
Re: Question about PPM serie use in soft
merci
a+Franck
a+Franck
- fr3d
- Posts: 97
- Joined: Sun Feb 06, 2011 11:21 am
- Location: Cappelle la grande near the ch'ti village
- Contact:
Re: Question about PPM serie use in soft
dis franck...
si tu veux il me reste qqs cartons d'efferalgents...
ok
si tu veux il me reste qqs cartons d'efferalgents...
ok
