philrandal / gpsctl

GPS control and configuration for U-Blox GPS on Raspberry Pi 3B...
MIT License
44 stars 4 forks source link

Add a gpsctl.conf file for more control #3

Closed philrandal closed 5 years ago

philrandal commented 5 years ago

Add a gpsctl.conf file for more configurability.

Rather than multiplying command line options, get options from a .conf file.

This is a work in progress.

The plan is to set program defaults in a [gpsctl] section of gpsctl.conf. This will always be obeyed.

Other sections will be used to configure the u-blox device only if --configure_for_timing or --galileo are selected.

philrandal commented 5 years ago

Current status: --port parameter can now be specified in /etc/gpsctl.conf

The commandline parameter will take precedence, if present.

For example:

[gpsctl] port = /dev/ttyAMA0

philrandal commented 5 years ago

Release 0.7 supports specification of nmea version and satellites via the config file.

Enjoy!

philrandal commented 5 years ago

All done - every parameter which was configured in the original now has a corresponding gpsctl.conf entry

For completeness, we probably need and nmea:enabled flag and process as the current -n option

philrandal commented 5 years ago

nmea:enabled now implemented gpsctl:verbosity also implemented

The baud rate stuff can stay on the command line for now, it's simpler and clearer