diff options
author | John Klug <john.klug@multitech.com> | 2019-02-27 18:39:07 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2019-07-03 11:22:01 -0500 |
commit | 51452f220b8d861e9f36e4de4532decb87128abe (patch) | |
tree | 6069ffea23403217b8733b0a9f168edd4b61f462 /recipes-bsp/multitech/mts-io | |
parent | d756a673faabf065f0819a4a12a6a01675a9c7e6 (diff) | |
download | meta-multitech-51452f220b8d861e9f36e4de4532decb87128abe.tar.gz meta-multitech-51452f220b8d861e9f36e4de4532decb87128abe.tar.bz2 meta-multitech-51452f220b8d861e9f36e4de4532decb87128abe.zip |
Add new file /var/run/config/gpstype
Diffstat (limited to 'recipes-bsp/multitech/mts-io')
-rw-r--r-- | recipes-bsp/multitech/mts-io/mts-io.init | 5 |
1 files changed, 5 insertions, 0 deletions
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 } |