Skip to content

Commit

Permalink
punt validation of lat/lon
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewwall committed Jul 4, 2024
1 parent 99c414f commit 491a2a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pkg/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
weewx (5.1.0-3) unstable; urgency=low
* do not try to validate lat/lon
-- Matthew Wall <mwall.weewx@gmail.com> Thu, 04 Jul 2024 15:59:00 -0400
weewx (5.1.0-2) unstable; urgency=low
* fix is_num for lat/lon check
-- Matthew Wall <mwall.weewx@gmail.com> Thu, 04 Jul 2024 15:36:00 -0400
Expand Down
6 changes: 4 additions & 2 deletions pkg/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,10 @@ install_weewxconf() {
db_get weewx/latlon
lat=$(echo $RET | cut -d, -f1 | sed 's/^ //g' | sed 's/ $//g')
lon=$(echo $RET | cut -d, -f2 | sed 's/^ //g' | sed 's/ $//g')
if [ ! is_num $lat ]; then lat=0.0; fi
if [ ! is_num $lon ]; then lon=0.0; fi
# lat=$(is_num $lat)
# lon=$(is_num $lon)
# if [ "$lat" = "" ]; then lat=0.0; fi
# if [ "$lon" = "" ]; then lon=0.0; fi

db_get weewx/altitude
altitude=$(echo $RET | cut -d, -f1 | sed 's/^ //g' | sed 's/ $//g')
Expand Down

0 comments on commit 491a2a0

Please sign in to comment.