Skip to content

Commit

Permalink
float problem
Browse files Browse the repository at this point in the history
  • Loading branch information
TedSjoblom committed Oct 24, 2022
1 parent 1270e72 commit 7e83ba4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ def pars_nmea(nmea_str):

elif msg.sentence_type == "MWV":
MWV = {
"wind_angle": float(msg.wind_angle),
"wind_angle": msg.wind_angle,
"reference": msg.reference,
"wind_speed": float(msg.wind_speed),
"wind_speed": msg.wind_speed,
"wind_speed_units": msg.wind_speed_units,
"status": msg.status,
}
Expand Down
11 changes: 9 additions & 2 deletions nmea_parser_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,17 @@
nmea_parameters.update(GST)

elif msg.sentence_type == "MWV":

# for idx, item in enumerate(PASHR_items):
# try:
# PASHR_items[idx] = float(PASHR_items[idx])
# except:
# pass

MWV = {
"wind_angle": float(msg.wind_angle),
"wind_angle": msg.wind_angle,
"reference": msg.reference,
"wind_speed": float(msg.wind_speed),
"wind_speed": msg.wind_speed,
"wind_speed_units": msg.wind_speed_units,
"status": msg.status
}
Expand Down

0 comments on commit 7e83ba4

Please sign in to comment.