diff --git a/devices/ssc338q_fpv_openipc-urllc-aio/general/package/sigmastar-osdrv-infinity6e/files/script/load_sigmastar b/devices/ssc338q_fpv_openipc-urllc-aio/general/package/sigmastar-osdrv-infinity6e/files/script/load_sigmastar index e23284a..d4c8276 100755 --- a/devices/ssc338q_fpv_openipc-urllc-aio/general/package/sigmastar-osdrv-infinity6e/files/script/load_sigmastar +++ b/devices/ssc338q_fpv_openipc-urllc-aio/general/package/sigmastar-osdrv-infinity6e/files/script/load_sigmastar @@ -46,7 +46,7 @@ insert_ko() { echo isproot /etc/firmware > /dev/ispmid } -if [ ! -e /sys/module/mhal ]; then +if [ ! -e /sys/module/mi_common ]; then insert_ko fi @@ -56,13 +56,14 @@ detect_sensor if [ -z "$SENSOR" ]; then echo -e "\n\e[1;31mSensor parameter MISSING\e[0m\n" | logger -s -t OpenIPC exit 1 -else - echo -e "\n\e[1;32mSensor assigned - $SENSOR\e[0m\n" | logger -s -t OpenIPC - DRIVER=$(ls /sys/module | grep $SENSOR) - if [ -n "$DRIVER" ]; then - rmmod $DRIVER - fi - set_sensor fi +DRIVER=$(ls /sys/module | grep $SENSOR) +if [ -n "$DRIVER" ]; then + rmmod $DRIVER +fi + +echo -e "\n\e[1;32mSensor assigned - $SENSOR\e[0m\n" | logger -s -t OpenIPC +set_sensor + exit 0