Ozgenur / arducopter

Automatically exported from code.google.com/p/arducopter
0 stars 0 forks source link

More informal GPS leds #67

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
better visualization on GPS status LEDs. 

Happykillmore had this proposal:

                // GPS Fix indication
                if(GPS.fix>=1) {  
                    digitalWrite(6,HIGH);  //Turn Blue LED when gps is fixed. 
                } else if (GPS.new_data == 1){
                                         toggleMode = abs(toggleMode-1); // Toggle blue light on and off to indicate NMEA sentences exist, but no GPS fix lock
                                         if (toggleMode==0){
                                               digitalWrite(6, LOW); // Blue light off
                                         } else {
                                               digitalWrite(6, HIGH); // Blue light on
                                         }
                                } else {
                    digitalWrite(6,LOW);
                }
                break;

Original issue reported on code.google.com by jphelirc on 16 Oct 2010 at 4:52

GoogleCodeExporter commented 9 years ago

Original comment by jphelirc on 16 Oct 2010 at 4:52

GoogleCodeExporter commented 9 years ago
One other "gotcha" is the fact that I'm using the new_data bit which is reset 
every cycle when BINARY is enabled (ArduIMU). This means the blinky doesn't 
happen because the new_data bit is reset before the code above can run (4 
cycles later).

My proposition would be to add

"if (GPS.fix >= 1)" to the line before "GPS.new_data = 0;" in the binary output 
routine. Either that or create a new bit just for this function.

Additionally, there is no timer to clear the lock bit if the GPS diesor is 
unplugged after lock. 

Original comment by paulbmather@gmail.com on 16 Oct 2010 at 8:50

GoogleCodeExporter commented 9 years ago

Original comment by jasonshort on 8 May 2011 at 7:25