File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1818# 20140911 BL adapt to changes at kernel 3.16.1-2
1919# 20140826 BL Add script header
2020# 20150105 BL Add servo-motor
21+ # 20150115 BL Simplify search for the motorpath
2122# ============================================================================
2223#
2324#
3031# /sys/class/tacho-motor/motor*/port_name is the link between motor# and port
3132#
3233#
33- IFS=$' \n ' read -a tachoPath <<< " `echo /sys/class/tacho-motor/motor*/ /sys/class/dc-motor/motor*/ /sys/class/servo-motor/motor*/`"
34+ # IFS=$' \n' read -a tachoPath <<< "`echo /sys/class/tacho-motor/motor*/ /sys/class/dc-motor/motor*/ /sys/class/servo-motor/motor*/`"
35+ IFS=$' \n ' read -a tachoPath <<< " `echo /sys/class/*motor/motor*/`"
3436#
35- for i in ${! tachoPath[@]} # ! walk the index
37+ for i in ${! tachoPath[@]} # ! walk the index
3638do
3739 echo -e " process $i ${tachoPath[$i]} "
3840 if [ -e ${tachoPath[$i]} ]; then
You can’t perform that action at this time.
0 commit comments