From 2bb2654e052a13ae2549b3e64dab4b70bac7ea67 Mon Sep 17 00:00:00 2001 From: "gruvin@gmail.com" Date: Sun, 26 Aug 2012 10:38:13 +0000 Subject: [PATCH] Revised some of my code comment is all. No code changes. --- src/pulses_avr.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pulses_avr.cpp b/src/pulses_avr.cpp index 18ce6805f..848c9dba0 100644 --- a/src/pulses_avr.cpp +++ b/src/pulses_avr.cpp @@ -90,7 +90,8 @@ void startPulses() #define PULSES_SIZE 144 uint8_t pulses2MHz[PULSES_SIZE] = {0}; // TODO check this length, pulled from er9x, perhaps too big. - // G: Yes, too big -- unless we keep the problematic DSM2=PPM code, which will need this size. + // G: Yes, too big. The PPM DSM2 code doesn't even use this any more, far as I can see. + // I'm pretty sure the original code put DSM2 bit bang data into here. But not any more? uint8_t *pulses2MHzRPtr = pulses2MHz; #if defined(DSM2) || defined(PXX) || defined(IRPROTOS) @@ -451,7 +452,7 @@ FORCEINLINE void setupPulsesDsm2() for (uint8_t i=0; i>5)+512,1023); - *ptr++ = (i<<2) | ((pulse>>8)&0x03); // high nyble (4-bits) channel encoded + *ptr++ = (i<<2) | ((pulse>>8)&0x03); // encoded channel + upper 2 bits pulse width *ptr++ = pulse & 0xff; // low byte } @@ -556,7 +557,7 @@ void setupPulsesDsm2() for (uint8_t i=0; i>5)+512,1023); - dsmDat[2+2*i] = (i<<2) | ((pulse>>8)&0x03); // high nyble (4-bits) channel encoded + dsmDat[2+2*i] = (i<<2) | ((pulse>>8)&0x03); // encoded channel + upper 2 bits pulse width dsmDat[3+2*i] = pulse & 0xff; // low byte }