Commit b155108e by Oleksandr Barabash

receiver exception now doesnt reset the active receiver

parent 8cc454f9
......@@ -120,8 +120,22 @@ class receiver:
except KeyboardInterrupt:
finish()
except Exception as ex:
# TODO(s1z): This is a bullshit handler!
# Has to be changed to appropriate actions depend on
# exception we get.
# It doesn't make any sense to turn off a receiver if
# there was something wrong with the data/network/etc!
# So i've added check. If we have isActive == True, then
# we do nothing with the receiver.
# TODO(s1z): I've left this line just to show
# that there's something wrong with the receiver!
if first_run:
self.station_id = "Unknown"
if self.isActive:
return
self.latitude = 0.0
self.longitude = 0.0
self.heading = 0.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment