Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions bin/oref0-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ DIR=""
directory=""
EXTRAS=""
radio_locale="US"
explorer1="NO"

#this makes the confirmation echo text a color when you use echocolor instead of echo
function echocolor() { # $1 = string
Expand Down Expand Up @@ -186,7 +185,6 @@ if [[ -z "$DIR" || -z "$serial" ]]; then
read -p "Are you using an Explorer Board? y/[N] " -r
if [[ $REPLY =~ ^[Yy]$ ]]; then
ttyport=/dev/spidev5.1
explorer1="YES"
echocolor "Ok, yay for Explorer Board! "
echo
else
Expand Down Expand Up @@ -874,7 +872,7 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
sudo sysctl -p

# Install EdisonVoltage
if explorer1 == "YES"; then
if [[ "$ttyport" =~ "spidev5.1" ]]; then
if egrep -i "edison" /etc/passwd 2>/dev/null; then
echo "Checking if EdisonVoltage is already installed"
if [ -d "$HOME/src/EdisonVoltage/" ]; then
Expand Down Expand Up @@ -1038,7 +1036,7 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
if [[ ! -z "$BT_PEB" || ! -z "$BT_MAC" ]]; then
(crontab -l; crontab -l | grep -q "oref0-bluetoothup" || echo '* * * * * ps aux | grep -v grep | grep -q "oref0-bluetoothup" || oref0-bluetoothup >> /var/log/openaps/network.log' ) | crontab -
fi
if explorer1 == "YES"; then
if [[ "$ttyport" =~ "spidev5.1" ]]; then
# proper shutdown once the EdisonVoltage very low (< 3050mV; 2950 is dead)
if egrep -i "edison" /etc/passwd 2>/dev/null; then
(crontab -l; crontab -l | grep -q "cd $directory && openaps battery-status" || echo "*/15 * * * * cd $directory && openaps battery-status; cat $directory/monitor/edison-battery.json | json batteryVoltage | awk '{if (\$1<=3050)system(\"sudo shutdown -h now\")}'") | crontab -
Expand Down