From 80bfc11a8300c7aa9ca98271aff1203bf890a32b Mon Sep 17 00:00:00 2001 From: bsongis Date: Fri, 20 Jan 2012 18:19:58 +0000 Subject: [PATCH] PPM changes pulled from er9x (by Pat Mackenzie) --- src/pulses.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/pulses.cpp b/src/pulses.cpp index 368fadb49..df7c8a229 100644 --- a/src/pulses.cpp +++ b/src/pulses.cpp @@ -94,7 +94,7 @@ ISR(TIMER1_COMPA_vect) //2MHz pulse generation #ifdef DSM2_SERIAL if (g_model.protocol == PROTO_DSM2) { OCR1A = 40000; - sei(); + // sei will be called inside setupPulses() setupPulses(); cli(); UCSR0B |= (1 << UDRIE0); // enable UDRE0 interrupt @@ -142,17 +142,18 @@ ISR(TIMER1_COMPA_vect) //2MHz pulse generation pulsePol = g_model.pulsePol; +// TODO does it exist PCBV3? If no, replace PCBV3 by PCBV4 everywhere #if defined(PCBV3) TIMSK1 &= ~(1<9) rest=p*(1720u*2 + q) + 4000u*2; //for more than 9 channels, frame must be longer for (uint8_t i=0; i