node-red-nodes/hardware/PiSrf/nrsrf

7 lines
203 B
Plaintext
Raw Normal View History

#!/bin/bash
python_cmd='python3'
# Fallback to Python 2, if Python 3 is not available
command -v python3 > /dev/null || python_cmd=`python`
BASEDIR=$(dirname $0)
PiSrf: Added decimal places option + stop bugfix + more keywords (#816) * Added decimal places option + bugfix + keywords Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility. Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then. Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node. * Added decimal places option + bugfix + keywords Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility. Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then. Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node. * Added decimal places option + bugfix + keywords Added option to output more decimal places. When no decimal places are configured output stays the same for full backward compatibility. Fixed bug that on restart flows error "Error stopping node: Close timed out" occured. Also removed sudo, because no need to run code with root rights. On systems where you need password for sudo it wouldn't run then. Added Keywords for "HC-SR04" and "SR04", because this module is fully compatible with this node.
2021-07-08 09:32:55 +02:00
exec $python_cmd -u $BASEDIR/nrsrf.py $@