From 17124e5a5100dc2243badc5f546d2715c0861768 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 29 Aug 2018 11:19:00 -0500 Subject: mts-io init script adjusted for MTCDTIPHP with no GPS capability flag --- recipes-bsp/multitech/mts-io.inc | 2 +- recipes-bsp/multitech/mts-io/mts-io.init | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/recipes-bsp/multitech/mts-io.inc b/recipes-bsp/multitech/mts-io.inc index 3ac5201..75544ad 100644 --- a/recipes-bsp/multitech/mts-io.inc +++ b/recipes-bsp/multitech/mts-io.inc @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://io-module/COPYING;md5=94d55d512a9ba36caa9b7df079bae19 file://io-tool/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ " DEPENDS = "virtual/kernel" -INC_PR = "r0" +INC_PR = "r1" SRCREV = "${PV}" diff --git a/recipes-bsp/multitech/mts-io/mts-io.init b/recipes-bsp/multitech/mts-io/mts-io.init index ee127a5..c3c3216 100644 --- a/recipes-bsp/multitech/mts-io/mts-io.init +++ b/recipes-bsp/multitech/mts-io/mts-io.init @@ -184,10 +184,13 @@ mfser_init() { set_gpslink() { hw=$(${SYSFS} show hw-version) + # hw_name is the hw-version before the hyphen. hw_name=(${hw//-/ }) gpscap=$(cat ${sysdir}/capability/gps) - - if ((gpscap == 0)) ; then + + # 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 @@ -201,10 +204,6 @@ set_gpslink() { return fi - if [[ ${hw} == MTCDT ]] && [[ ${HWLVL} == 0.0 ]] ; then - # No GPS - return - fi if [[ ${hw_name} == MTCDTIPHP ]] ; then NEED_I2C_RESET=1 ln -sf /dev/ttyXRUSB0 /dev/gps0 -- cgit v1.2.3