From 2f7f0806dc5344117b1d752f8135b46f8347aa58 Mon Sep 17 00:00:00 2001 From: "gruvin@gmail.com" Date: Sun, 26 Aug 2012 23:18:44 +0000 Subject: [PATCH] IMPORTANT: PPM/DSM2 protocols BROKEN for several revisioins before this one. WARNING: All protocols shoul dbe testing on stock board again. Fixed a number of problems relating to the (dis)enabling of hardware switched PPM_OUT for the G9XV4 board. I also broke a lot of stuff along the way over several previous commits, as I slowly learned how all the code went together and the 'whys' for some stuff. My bad. In other words, this commit finally has DSM2=PPM mode working on the G9XV4 board without breaking a bunch of other stuff -- hopefully. !! STOCK BOARD TESTING NEEDED !! I am pretty sure I have not broken anything for the stock board code -- BUT it MUST be tested before the next release, because I have made quite a few changes in and around that code. --- src/pulses_avr.cpp | 180 ++++++++++++++++++++++----------------------- 1 file changed, 88 insertions(+), 92 deletions(-) diff --git a/src/pulses_avr.cpp b/src/pulses_avr.cpp index 848c9dba0..b3aadbc2f 100644 --- a/src/pulses_avr.cpp +++ b/src/pulses_avr.cpp @@ -61,37 +61,29 @@ void set_timer3_ppm( void ) ; void startPulses() { -#ifdef SIMU - s_current_protocol = g_model.protocol; -#else - setupPulses(); - #ifdef 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. */ - // TCCR1A |= (1<