summaryrefslogtreecommitdiff
path: root/recipes-bsp/multitech/mts-io/mts-io.init
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/multitech/mts-io/mts-io.init')
-rwxr-xr-xrecipes-bsp/multitech/mts-io/mts-io.init33
1 files changed, 21 insertions, 12 deletions
diff --git a/recipes-bsp/multitech/mts-io/mts-io.init b/recipes-bsp/multitech/mts-io/mts-io.init
index 3aa76af..ed0475e 100755
--- a/recipes-bsp/multitech/mts-io/mts-io.init
+++ b/recipes-bsp/multitech/mts-io/mts-io.init
@@ -250,34 +250,43 @@ set_links() {
[[ -d /var/run/config ]] || mkdir /var/run/config
gpscap=$(cat ${sysdir}/capability/gps)
- # For all hardware except MTCDTIPHP, the gpscapability
- # flag indicates whether or not we have a GPS.
- if ! [[ ${hw_name} =~ ^MTCDTIPHP$ ]] && ((gpscap == 0)) ; then
- return
- fi
-
+
# Oldest MTRV1 uses venus on ttyS1.
# Newest MTRV1 usus U-Blox on ttyS1.
if [[ ${hw_name} == MTRV1 ]] ; then
case "${hw}" in
MTRV1-0.0)
- ln -sf /dev/ttyS1 /dev/gps0
- echo "venus" >"$GPSCONFIGTYPE"
+ if ((gpscap == 1)) ; then
+ ln -sf /dev/ttyS1 /dev/gps0
+ echo "venus" >"$GPSCONFIGTYPE"
+ fi
return
;;
MTRV1-0.1|MTRV1-0.2|MTRV1-0.3)
- ln -sf /dev/ttyXRUSB0 /dev/gps0
- echo "u-blox" >"$GPSCONFIGTYPE"
+ if ((gpscap == 1)) ; then
+ ln -sf /dev/ttyXRUSB0 /dev/gps0
+ echo "u-blox" >"$GPSCONFIGTYPE"
+ fi
return
;;
*)
- ln -sf /dev/ttyS1 /dev/gps0
+ if ((gpscap == 1)) ; then
+ ln -sf /dev/ttyS1 /dev/gps0
+ echo "u-blox" >"$GPSCONFIGTYPE"
+ fi
ln -sf /dev/ttyS4 /dev/ext_serial
- echo "u-blox" >"$GPSCONFIGTYPE"
return
;;
esac
fi # MTRV1 hardware version name
+
+ # Continue with non-MTRV1 hardware.
+
+ # For all other hardware except MTCDTIPHP, the gpscapability
+ # flag indicates whether or not we have a GPS.
+ if ! [[ ${hw_name} =~ ^MTCDTIPHP$ ]] && ((gpscap == 0)) ; then
+ return
+ fi
case ${hw_name} in
MTR|MTHS)