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:
Jon Trulson
2016-08-25 13:54:49 -06:00
committed by Noel Eck
parent 46460e20d9
commit a040f51cda
19 changed files with 152 additions and 155 deletions

View File

@ -274,7 +274,7 @@ add_example (l3gd20)
add_example (l3gd20-i2c)
add_example (bmx055)
add_example (ms5611)
add_example (vk2828u7)
add_example (nmea_gps)
add_example (mma7361)
add_example (bh1750)

View File

@ -26,7 +26,7 @@
#include <iostream>
#include <signal.h>
#include "vk2828u7.hpp"
#include "nmea_gps.hpp"
using namespace std;
@ -46,9 +46,9 @@ int main()
//! [Interesting]
// Instantiate a VK2828U7 sensor on uart 0 at 9600 baud with enable
// pin on D3
upm::VK2828U7 *sensor = new upm::VK2828U7(0, 9600, 3);
// Instantiate a NMEA_GPS sensor on uart 0 at 9600 baud with enable
// pin on D3. If you do not need an enable pin, you can specify -1.
upm::NMEAGPS *sensor = new upm::NMEAGPS(0, 9600, 3);
// loop, dumping NMEA data out as fast as it comes in
while (shouldRun && sensor->dataAvailable(5000))

View File

@ -87,7 +87,7 @@ link_directories (${MRAA_LIBDIR})
# mq? will use module gas
# grove* will use module grove
add_example (dfrph)
add_example (vk2828u7)
add_example (nmea_gps)
add_example (mma7361)
add_example (bh1750)
add_example (urm37)

View File

@ -25,7 +25,7 @@
#include <unistd.h>
#include <signal.h>
#include "vk2828u7.h"
#include "nmea_gps.h"
bool shouldRun = true;
@ -43,13 +43,13 @@ int main()
//! [Interesting]
// Instantiate a VK2828U7 sensor on uart 0 at 9600 baud with enable
// pin on D3
vk2828u7_context sensor = vk2828u7_init(0, 9600, 3);
// Instantiate a NMEA_GPS sensor on uart 0 at 9600 baud with enable
// pin on D3. If you do not need an enable pin, you can specify -1.
nmea_gps_context sensor = nmea_gps_init(0, 9600, 3);
if (!sensor)
{
printf("vk2828u7_init() failed.\n");
printf("nmea_gps_init() failed.\n");
return 1;
}
@ -57,9 +57,9 @@ int main()
int rv = 0;
// loop, dumping NMEA data out as fast as it comes in
while (shouldRun && vk2828u7_data_available(sensor, 5000))
while (shouldRun && nmea_gps_data_available(sensor, 5000))
{
if ((rv = vk2828u7_read(sensor, buffer, bufferLength)) >= 0)
if ((rv = nmea_gps_read(sensor, buffer, bufferLength)) >= 0)
{
int i;
for (i=0; i<rv; i++)
@ -74,7 +74,7 @@ int main()
printf("Exiting\n");
vk2828u7_close(sensor);
nmea_gps_close(sensor);
return 0;
}

View File

@ -131,7 +131,7 @@ add_example(VCAP_Example vcap)
add_example(BMP280_Example bmp280)
add_example(BNO055_Example bno055)
add_example(BMX055_Example bmx055)
add_example(VK2828U7_Example vk2828u7)
add_example(NMEAGPS_Example nmea_gps)
add_example(MMA7361_Example mma7361)
add_example(BH1750_Example bh1750)

View File

@ -22,18 +22,18 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
import upm_vk2828u7.VK2828U7;
import upm_nmea_gps.NMEAGPS;
public class VK2828U7_Example
public class NMEAGPS_Example
{
public static void main(String[] args) throws InterruptedException
{
// ! [Interesting]
System.out.println("Initializing...");
// Instantiate a VK2828U7 sensor on uart 0 at 9600 baud with
// Instantiate a NMEAGPS sensor on uart 0 at 9600 baud with
// enable pin on D3
VK2828U7 sensor = new VK2828U7(0, 9600, 3);
NMEAGPS sensor = new NMEAGPS(0, 9600, 3);
// loop, dumping NMEA data out as fast as it comes in
while (sensor.dataAvailable(5000))

View File

@ -25,11 +25,11 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
var sensorObj = require('jsupm_vk2828u7');
var sensorObj = require('jsupm_nmea_gps');
// 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
var sensor = new sensorObj.VK2828U7(0, 9600, 3);
var sensor = new sensorObj.NMEAGPS(0, 9600, 3);
// loop, dumping NMEA data out as fast as it comes in
while (sensor.dataAvailable(5000))

View File

@ -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)):