linguini1 opened a new pull request, #2969:
URL: https://github.com/apache/nuttx-apps/pull/2969

   ## Summary
   
   This PR adds the ability to specify the GPS's serial port in the `gps` 
example, instead of only being able to use `/dev/ttyS1`. It also marks the 
MINMEA library as a dependency for the `gps` example.
   
   ## Impact
   
   Now that MINMEA is marked as a dependency, the `gps` example is 
unfortunately not visible in the list of applications until MINMEA is 
available. However, I wanted to avoid the use of `select` in Kconfig since it 
will not recursively enable dependencies.
   
   The user is now also able to run the `gps` example with a serial port for 
the GPS specified, supporting this example on boards where the serial port is 
different. I have left `/dev/ttyS1` as the default when no port is specified to 
keep backward compatibility.
   
   Closes #2966.
   
   ## Testing
   
   Tested this example with a board that has GPS on `/dev/ttyS0` and it worked 
as expected. I also tried specifying a bad path and the program exited 
gracefully with the error.
   
   ```console
   NuttShell (NSH) NuttX-12.8.0
   nsh> gps /dev/ttyS0
   Fix quality....................: 0
   Altitude.......................: 0
   Tracked satellites.............: 0
   Fixed-point Latitude...........: 0
   Fixed-point Longitude..........: 0
   Fixed-point Speed..............: 0
   Floating point degree latitude.: *float*
   Floating point degree longitude: *float*
   Floating point speed...........: *float*
   ```
   
   ```console
   NuttShell (NSH) NuttX-12.8.0
   nsh> gps /dev/ttyS2
   Unable to open file /dev/ttyS2
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to