GPS messup

Post Reply
User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

GPS messup

Post by Plüschi »

Could we change the setup code

Code: Select all

  #if defined(GPS_SERIAL)
    GPS_SerialInit();
    for(uint8_t j=0;j<=5;j++){
      GPS_NewData();
      LEDPIN_ON
      delay(20);
      LEDPIN_OFF
      delay(80);
    }
    if(!GPS_Present){
      SerialEnd(GPS_SERIAL);
      SerialOpen(0,SERIAL0_COM_SPEED);
    }
    #if !defined(GPS_PROMINI)
      GPS_Present = 1;
    #endif
    GPS_Enable = GPS_Present;   
  #endif

so it does NOT prevent a slow booting 57kbaud gps from working on 32u4 and 2560 boards ?

I use this

Code: Select all

  #if defined(GPS_SERIAL)
    GPS_SerialInit();
    for(uint8_t j=0;j<=5;j++){
      GPS_NewData();
      LEDPIN_ON
      delay(20);
      LEDPIN_OFF
      delay(80);
    }
    #if defined(GPS_PROMINI)
      if(!GPS_Present){
        SerialEnd(GPS_SERIAL);
        SerialOpen(0,SERIAL0_COM_SPEED);
      }
    #else
      GPS_Present = 1;
    #endif
    GPS_Enable = GPS_Present;   
  #endif

but throwing out promini-gps completely would be the far better idea.

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: GPS messup

Post by Alexinparis »

yes we can.
I will do it.
but throwing out promini-gps completely would be the far better idea.

is there still some users, Patrik ?

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: GPS messup

Post by PatrikE »

I'm using it for sure!
On both Copters and Planes.
I know it's used by FixedWing flyers.
The for loop is just for buffering gps data at boot.
It should be possible to set everything inside a #if defined(GPS_PROMINI).

It's just nice to be able to switch between GPS & FTDI without reflashing FW.

Post Reply