From ad00b93bc3175e16ad3c3b37f7fd9b0b47331c03 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 27 Feb 2019 18:39:07 -0600 Subject: Add new file /var/run/config/gpstype --- recipes-bsp/multitech/mts-io/mts-io.init | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'recipes-bsp/multitech') diff --git a/recipes-bsp/multitech/mts-io/mts-io.init b/recipes-bsp/multitech/mts-io/mts-io.init index 3919fcf..3988932 100644 --- a/recipes-bsp/multitech/mts-io/mts-io.init +++ b/recipes-bsp/multitech/mts-io/mts-io.init @@ -12,6 +12,7 @@ . /etc/default/mts-io i2c=/sys/bus/i2c/devices/ +GPSCONFIGTYPE="/var/run/config/gpstype" ((fail=0)) # To log debug, set LOGDBG to /usr/bin/LOGGER @@ -213,6 +214,7 @@ mfser_init() { } set_gpslink() { + [[ -d /var/run/config ]] || mkdir /var/run/config gpscap=$(cat ${sysdir}/capability/gps) # For all hardware except MTCDTIPHP, the gpscapability @@ -224,11 +226,13 @@ set_gpslink() { # Oldest MTRV1 uses venuse on ttyS1. if [[ ${hw_name} == MTRV1 ]] && [[ ${hw} != MTRV1-0.0 ]] ; then ln -sf /dev/ttyXRUSB0 /dev/gps0 + echo "u-blox" >"$GPSCONFIGTYPE" return fi if [[ ${hw_name} == MTR ]] || [[ ${hw_name} == MTRV1 ]] || [[ ${hw_name} == MTHS ]] ; then ln -sf /dev/ttyS1 /dev/gps0 + echo "venus" >"$GPSCONFIGTYPE" return fi @@ -242,6 +246,7 @@ set_gpslink() { return fi # Default MTCDT-0.1 + echo "u-blox" >"$GPSCONFIGTYPE" ln -sf /dev/ttyXRUSB2 /dev/gps0 } -- cgit v1.2.3