Skip to content

Commit

Permalink
Break up long formatting string
Browse files Browse the repository at this point in the history
  • Loading branch information
sindrehan committed Oct 11, 2024
1 parent 8f0cbf2 commit ae0557e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/nmea_publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ def nmea_sentence(lat: float, lon: float, valid: bool) -> str:
now = datetime.datetime.now(datetime.timezone.utc)
utc_time = now.strftime("%H%M%S") + f".{now.microsecond // 10000:02d}"

return f"GPGLL,{lat_deg:02d}{lat_min:07.4f},{lat_hemisphere},{lon_deg:03d}{lon_min:07.4f},{lon_hemisphere},{utc_time},{is_valid}"
return (
f"GPGLL,{lat_deg:02d}{lat_min:07.4f},{lat_hemisphere},"
f"{lon_deg:03d}{lon_min:07.4f},{lon_hemisphere},"
f"{utc_time},{is_valid}"
)


def callback_position_estimate(
Expand Down

0 comments on commit ae0557e

Please sign in to comment.