Page 343 - 2
P. 343

#endif


              #if defined(POWERMETER)
                analog.intPowerMeterSum = (pMeter[PMOTOR_SUM]/PLEVELDIV);
                intPowerTrigger1 = conf.powerTrigger1 * PLEVELSCALE;
              #endif


              #ifdef LCD_TELEMETRY_AUTO
                static char telemetryAutoSequence [] = LCD_TELEMETRY_AUTO;
                static uint8_t telemetryAutoIndex = 0;
                static uint16_t telemetryAutoTimer = 0;
                if ( (telemetry_auto) && (! (++telemetryAutoTimer % LCD_TELEMETRY_AUTO_FREQ) ) ){
                  telemetry = telemetryAutoSequence[++telemetryAutoIndex % strlen(telemetryAutoSequenc
            e)];
                  LCDclear(); // make sure to clear away remnants
                }
              #endif
              #ifdef LCD_TELEMETRY
                static uint16_t telemetryTimer = 0;
                if (! (++telemetryTimer % LCD_TELEMETRY_FREQ)) {
                  #if (LCD_TELEMETRY_DEBUG+0 > 0)
                    telemetry = LCD_TELEMETRY_DEBUG;
                  #endif
                  if (telemetry) lcd_telemetry();
                }
              #endif


              #if GPS & defined(GPS_LED_INDICATOR)            // modified by MIS to use STABLEPIN LED fo
            r number of sattelites indication
                static uint32_t GPSLEDTime;                // - No GPS FIX -> LED blink at speed of incomi
            ng GPS frames
                static uint8_t blcnt;                  // - Fix and sat no. bellow 5 -> LED off
                if(currentTime > GPSLEDTime) {              // - Fix and sat no. >= 5 -> LED blinks, one bli
            nk for 5 sat, two blinks for 6 sat, three for 7 ...
                  if(f.GPS_FIX && GPS_numSat >= 5) {
                    if(++blcnt > 2*GPS_numSat) blcnt = 0;
                    GPSLEDTime = currentTime + 150000;
                    if(blcnt >= 10 && ((blcnt%2) == 0)) {STABLEPIN_ON;} else {STABLEPIN_OFF;}
                  }else{
                    if((GPS_update == 1) && !f.GPS_FIX) {STABLEPIN_ON;} else {STABLEPIN_OFF;}
                    blcnt = 0;
                  }
                }
              #endif




                                                         - 343 -
   338   339   340   341   342   343   344   345   346   347   348