mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 09:21:12 +03:00
nmea_gps: renamed vk2828u7 to nmea_gps
This driver will serve as a generic module for grabbing NMEA data from various GPS devices via a serial interface. ublox6 will also be removed in favor of using this driver going forward. Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
@ -22,11 +22,11 @@
|
||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
import time, sys, signal, atexit
|
||||
import pyupm_vk2828u7 as sensorObj
|
||||
import pyupm_nmea_gps as sensorObj
|
||||
|
||||
# Instantiate a VK2828U7 sensor on uart 0 at 9600 baud with enable
|
||||
# Instantiate a NMEAGPS sensor on uart 0 at 9600 baud with enable
|
||||
# pin on D3
|
||||
sensor = sensorObj.VK2828U7(0, 9600, 3)
|
||||
sensor = sensorObj.NMEAGPS(0, 9600, 3)
|
||||
|
||||
## Exit handlers ##
|
||||
# This function stops python from printing a stacktrace when you hit control-C
|
||||
@ -42,7 +42,7 @@ def exitHandler():
|
||||
atexit.register(exitHandler)
|
||||
signal.signal(signal.SIGINT, SIGINTHandler)
|
||||
|
||||
# Every second, sample the VK2828U7 and output the measured lux value
|
||||
# Every second, sample the NMEAGPS and output the measured lux value
|
||||
|
||||
# loop, dumping NMEA data out as fast as it comes in
|
||||
while (sensor.dataAvailable(5000)):
|
Reference in New Issue
Block a user