Skip to content

Commit

Permalink
Merge pull request #23 from hokus15/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
hokus15 authored Mar 26, 2024
2 parents f40df20 + f45f0a3 commit 56de091
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions iotconnect/monitors/gps/gps_mon.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ def monitor(self):
"""Monitor the gps."""
monitor_result = {}
# It may take some poll calls to get good data
if (fix.mode == 1 or fix.mode == 'na'):
if (fix.mode == 1 or fix.mode == 'n/a'):
self._handle_no_fix('Position not fixed')

latitude_error = 100000
if fix.epx != 'na':
if fix.epx != 'n/a':
latitude_error = fix.epx

longitude_error = 1000
if fix.epy != 'na':
longitude_error = 100000
if fix.epy != 'n/a':
longitude_error = fix.epy

fix_accuracy = max(latitude_error,
Expand Down
4 changes: 3 additions & 1 deletion scripts/update-iotconnect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ echo 'Stopping IOTConnect service...'
sudo service iotconnect stop
echo 'done!'
cd /opt/IOTConnect
tag=$(git describe --tags `git rev-list --tags --max-count=1`)
git fetch --tags
tag=$(git tag -l | tail -n 1)
echo "Updating IOTConnect to ${tag}..."
git reset --hard
git checkout master
git branch --delete latest
git checkout "$tag" -b latest
echo 'done!'
cp iotconnect/logging.live.conf iotconnect/logging.conf
sudo chown -R pi /opt/IOTConnect
sudo systemctl daemon-reload
echo 'Starting IOTConnect service...'
sudo service iotconnect start
Expand Down

0 comments on commit 56de091

Please sign in to comment.