diff --git a/README.md b/README.md index 403a774..5b5e1f3 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Pat Menu is an easy to use menu system for Pat Winlink. It is designed to make it easier to get all of the needed componets loaded and ready to make a connection using Pat. It will also aid in finding ARDOP stations to connect to and shut down the modems once you wrap up along with many other features. # Install +The preferred method of installation is with [Build a Pi](https://github.com/km4ack/pi-build). However, manual installation can be achieved by running the following command. + git clone https://github.com/km4ack/patmenu2.git $HOME/patmenu2 && bash $HOME/patmenu2/setup # Video diff --git a/cat-functions b/cat-functions index 1ed8908..ffbeda5 100644 --- a/cat-functions +++ b/cat-functions @@ -106,13 +106,19 @@ exit fi if [ "$WEATHER" = 'GPS Weather' ]; then -echo "Need GPS weather" - GPSDATA=$(gpspipe -r -n 10 | grep G\.GGA) #Thanks K4KDR! - LAT=$(echo $GPSDATA | awk -F"," '{ print $3 }'| sed 's/\.//' | sed 's/./&./2') - LON=$(echo $GPSDATA | awk -F"," '{ print $5 }'| sed 's/\.//' | sed 's/./&./3') +TMPFILE=/run/user/$UID/gps-data.txt +gpxlogger > $TMPFILE & +CGPSPID=$(echo $!) +sleep 2 +kill $CGPSPID + +DATA=$(grep lat= $TMPFILE | head -1) +LAT=$(echo $DATA | awk '{print $2}' | sed 's/"//g;s/lat=//') +LONG=$(echo $DATA | awk '{print $3}' | sed 's/"//g;s/lon=//;s/>//') + TO="SMTP:query@saildocs.com" SUBJECT="" - BODY="https://forecast.weather.gov/MapClick.php?lat="$LAT"&lon=-"$LON"&unit=0&lg=english&FcstType=text&TextType=1" + BODY="https://forecast.weather.gov/MapClick.php?lat="$LAT"&lon="$LONG"&unit=0&lg=english&FcstType=text&TextType=1" COMPOSE elif [ "$WEATHER" = 'City Weather' ]; then FILE=$MYPATH/weather.txt diff --git a/changelog b/changelog index 2195be1..2f4236a 100644 --- a/changelog +++ b/changelog @@ -1,7 +1,13 @@ -release=2.6.0 +release=2.6.1 Changelog +2.6.1 improve GPS weather accuracy + update ARDOP modem start + update Packet modem start + update Set ARDOP PTT section + update readme file + use default browser to open inbox instead of hard coding Chromium 2.6.0 add version check add peer to peer alias 2.6.0 does not support version of Pat prior to v0.12.0 diff --git a/manage-pat-functions b/manage-pat-functions index 3a52c72..d16371d 100644 --- a/manage-pat-functions +++ b/manage-pat-functions @@ -279,11 +279,16 @@ CONFIG=$XDG_CONFIG_HOME/pat/config.json WHO=$(whoami) CURRENT=$(cat $CONFIG | grep ptt_ctrl | tail -1 | sed 's/"ptt_ctrl":\ //' | sed 's/,//' | tr -d "[:blank:]") +if [ $CURRENT = 'false' ]; then +CURRENT1="false|true" +elif [ $CURRENT = 'true' ]; then +CURRENT1="true|false" +fi PTT=$(yad --form --width=400 --text="Current Pat ARDOP PTT = $CURRENT" --text-align=center --center --title="Set PTT" --text-align=center \ --separator="|" --item-separator="|" \ --image=$LOGO --window-icon=$LOGO --image-on-top \ ---field="ARDOP PTT":CB "true|false" \ +--field="ARDOP PTT":CB "$CURRENT1" \ --button="Set PTT":2 \ --button="Cancel":1) QUIT=$? diff --git a/start-pat-ardop b/start-pat-ardop index 940d55c..262835f 100755 --- a/start-pat-ardop +++ b/start-pat-ardop @@ -122,8 +122,11 @@ yad --title="ARDOP MODEM" --width=400 --height=100 \ --button=gtk-ok & fi +#restart pat so terminal window correctly reflects rig control +sudo systemctl restart pat@`whoami` + #open pat inbox in browser -export DISPLAY=:0 && chromium-browser http://127.0.0.1:$PORT > /dev/null 2>&1 & +export DISPLAY=:0 && xdg-open http://127.0.0.1:$PORT > /dev/null 2>&1 & diff --git a/start-pat2m b/start-pat2m index c6a61fc..5c0b21f 100755 --- a/start-pat2m +++ b/start-pat2m @@ -148,8 +148,11 @@ yad --title="PACKET MODEM" --width=400 --height=100 \ --button=gtk-ok & fi +#restart pat so terminal window correctly reflects rig control +sudo systemctl restart pat@`whoami` + #open pat inbox in browser -export DISPLAY=:0 && chromium-browser http://127.0.0.1:$PORT > /dev/null 2>&1 & +export DISPLAY=:0 && xdg-open http://127.0.0.1:$PORT > /dev/null 2>&1 & #exit 0