diff --git a/src/board_ersky9x.cpp b/src/board_ersky9x.cpp index 3d2be8d29..8d2e4ea89 100644 --- a/src/board_ersky9x.cpp +++ b/src/board_ersky9x.cpp @@ -1141,7 +1141,7 @@ uint32_t txPdcPending() pUsart->US_PTCR = US_PTCR_TXTDIS ; // Freeze DMA x = pUsart->US_TNCR ; // Total x += pUsart->US_TCR ; // Still to send - pUsart->US_PTCR = US_PTCR_TXTEN ; // DMA active again + pUsart->US_PTCR = US_PTCR_TXTEN ; // DMA active again __enable_irq() ; return x ; diff --git a/src/frsky.cpp b/src/frsky.cpp index f5900deda..bc8d5e9f9 100644 --- a/src/frsky.cpp +++ b/src/frsky.cpp @@ -1202,7 +1202,7 @@ void menuProcFrsky(uint8_t event) } } if (fields_count == 0) { - // No bars at all! + // No custom fields at all! putEvent(event == EVT_KEY_BREAK(KEY_UP) ? event : EVT_KEY_BREAK(KEY_DOWN)); } lcd_status_line(); diff --git a/src/open9x.cpp b/src/open9x.cpp index 14b17d8f6..501e0964d 100644 --- a/src/open9x.cpp +++ b/src/open9x.cpp @@ -31,6 +31,8 @@ * */ +// Here Franck you write this line "#define FRANCK" (without the "") + #if defined(PCBARM) && !defined(SIMU) extern "C" { #include @@ -478,9 +480,11 @@ int16_t applyLimits(uint8_t channel, int32_t value) if (ofs > lim_p) ofs = lim_p; if (ofs < lim_n) ofs = lim_n; +#ifndef FRANCK if (value) value = (value > 0) ? value * ((int32_t) lim_p - ofs) / 100000 : -value * ((int32_t) lim_n - ofs) / 100000; //div by 100000 -> output = -1024..1024 +#endif value += calc1000toRESX(ofs); lim_p = calc1000toRESX(lim_p); @@ -2052,7 +2056,10 @@ void perOut(uint8_t tick10ms) swOn[i] = true; if (md->delayUp) { if (swTog) { - sDelay[i] = md->delayUp * 50; + if (sDelay[i]) + sDelay[i] = 0; + else + sDelay[i] = md->delayUp * 50; } if (sDelay[i] > 0) { // perform delay sDelay[i] -= tick10ms; @@ -2073,7 +2080,10 @@ void perOut(uint8_t tick10ms) swOn[i] = false; if (md->delayDown) { if (swTog) { - sDelay[i] = md->delayDown * 50; + if (sDelay[i]) + sDelay[i] = 0; + else + sDelay[i] = md->delayDown * 50; } if (sDelay[i] > 0) { // perform delay sDelay[i] -= tick10ms; @@ -3661,11 +3671,11 @@ int main(void) sei(); // interrupts needed for FRSKY_Init and eeReadAll. -#if defined (FRSKY) and !defined (DSM2_SERIAL) +#if defined(FRSKY) and !defined(DSM2_SERIAL) FRSKY_Init(); #endif -#if defined (DSM2_SERIAL) and !defined (FRSKY) +#if defined(DSM2_SERIAL) and !defined(FRSKY) DSM2_Init(); #endif