Weitere NMEA0183 Daten verarbeiten
This commit is contained in:
@@ -77,9 +77,9 @@ class Anchor(Page):
|
||||
self.anchor_set = True
|
||||
else:
|
||||
self.anchor_set = False
|
||||
if self.buttonid == 5:
|
||||
if buttonid == 5:
|
||||
# Bei aktivem Alarm kann mit dieser Taste der Alarm zurückgesetzt
|
||||
# werden
|
||||
# werden. Die Tastenbeschriftung wechselt zwischen ALARM und OFF.
|
||||
if self.alarm:
|
||||
self.alarm = False
|
||||
self.buttonlabel[5] = 'ALARM'
|
||||
@@ -87,6 +87,7 @@ class Anchor(Page):
|
||||
self.alarm_enabled = False
|
||||
self.buttonlabel[5] = 'ALARM'
|
||||
else:
|
||||
self.alarm_enabled = True
|
||||
self.buttonlabel[5] = 'OFF'
|
||||
return False
|
||||
|
||||
@@ -114,7 +115,11 @@ class Anchor(Page):
|
||||
|
||||
ctx.set_font_size(16)
|
||||
ctx.move_to(2, 70)
|
||||
ctx.show_text("Alarm: off")
|
||||
ctx.show_text("Alarm: ")
|
||||
if self.alarm_enabled:
|
||||
ctx.show_text("On")
|
||||
else:
|
||||
ctx.show_text("Off")
|
||||
ctx.move_to(320, 70)
|
||||
ctx.show_text(f"{self.chain} m")
|
||||
ctx.stroke()
|
||||
@@ -138,11 +143,10 @@ class Anchor(Page):
|
||||
|
||||
|
||||
# Windpfeil zeichnen
|
||||
# TWD / TWS
|
||||
# boatdata.value(TWD)
|
||||
p = ((cx, cy - r + 25), (cx - 12, cy - r - 4), (cx, cy - r + 6), (cx + 12, cy - r - 4), (cx, cy - r + 25))
|
||||
wind = self.rotate((cx, cy), p, 62)
|
||||
ctx.move_to(*wind[0])
|
||||
for point in wind[1:]:
|
||||
ctx.line_to(*point)
|
||||
ctx.fill()
|
||||
if self._bd.awa.value:
|
||||
p = ((cx, cy - r + 25), (cx - 12, cy - r - 4), (cx, cy - r + 6), (cx + 12, cy - r - 4), (cx, cy - r + 25))
|
||||
wind = self.rotate((cx, cy), p, self._bd.awa.value)
|
||||
ctx.move_to(*wind[0])
|
||||
for point in wind[1:]:
|
||||
ctx.line_to(*point)
|
||||
ctx.fill()
|
||||
|
||||
Reference in New Issue
Block a user