From 095b38a0766f6e7b882fd3e58b9c6b67d38462ec Mon Sep 17 00:00:00 2001 From: bsongis Date: Tue, 3 Jul 2012 18:31:31 +0000 Subject: [PATCH] Around 40bytes saved on stock (from one of the last commits) --- src/open9x.cpp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/open9x.cpp b/src/open9x.cpp index d08aab3ea..8d11c3caa 100644 --- a/src/open9x.cpp +++ b/src/open9x.cpp @@ -1082,21 +1082,21 @@ void checkTrims() bool thro = (idx==THR_STICK && g_model.thrTrim); if (thro) v = 4; // if throttle trim and trim trottle then step=4 int16_t after = (k&1) ? before + v : before - v; // positive = k&1 - - bool beepTrimEnd = false; - bool beepTrimMid = false; +#if defined(PCBARM) + uint8_t beepTrim = 0; +#else + bool beepTrim = false; +#endif for (int16_t mark=TRIM_MIN; mark<=TRIM_MAX; mark+=TRIM_MAX) { if ((mark!=0 || !thro) && ((mark!=TRIM_MIN && after>=mark && beforemark))) { after = mark; - if(mark == 0){ - beepTrimMid = true; - } + beepTrim = (mark == 0 ? 1 : 2); } } if ((beforeTRIM_MAX) || (before>after && after