From 9960e84d2d4d22f907fe33a835f6495a1f353798 Mon Sep 17 00:00:00 2001 From: bsongis Date: Mon, 27 Aug 2012 09:49:00 +0000 Subject: [PATCH] Some parts reverted in pulses_avr.cpp Bryan would you confirm it's ok on v4? --- src/pulses_avr.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/pulses_avr.cpp b/src/pulses_avr.cpp index b3aadbc2f..f7f438a0e 100644 --- a/src/pulses_avr.cpp +++ b/src/pulses_avr.cpp @@ -61,20 +61,19 @@ void set_timer3_ppm( void ) ; void startPulses() { -#ifdef DSM2_SERIAL +#if defined(PCBV4) +#if defined(DSM2_SERIAL) if (g_model.protocol != PROTO_DSM2) #endif - { -#if defined(PCBV4) // TODO g: There has to be a better place for this bug fix OCR1B = 0xffff; /* Prevent any PPM_PUT pin toggle before the TCNT1 interrupt fires for the first time and sets up the pulse period. *** Prevents WDT reset loop. */ -#endif } +#endif -#ifdef SIMU +#if defined(SIMU) s_current_protocol = g_model.protocol; #else setupPulses(); @@ -110,7 +109,7 @@ ISR(TIMER1_COMPA_vect) //2MHz pulse generation (BLOCKING ISR) OCR1A = 40000; // sei will be called inside setupPulses() setupPulses(); // will call sei() - cli(); // this blocking ISR will autmoatically issue sei at exit + cli(); // this blocking ISR will automatically issue sei at exit UCSR0B |= (1 << UDRIE0); // enable UDRE0 interrupt } else @@ -153,7 +152,6 @@ ISR(TIMER1_COMPA_vect) //2MHz pulse generation (BLOCKING ISR) pulsePol = g_model.pulsePol; - #if defined(PCBV4) TIMSK1 &= ~(1<