Skip to content

Commit

Permalink
correct no controller display
Browse files Browse the repository at this point in the history
  • Loading branch information
seandepagnier committed Nov 27, 2019
1 parent c5c1749 commit eb2be28
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lcd/lcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,11 +858,6 @@ def nr(x):

mode = self.last_val('ap.mode')

if self.last_val('servo.controller') == 'none':
if self.control['heading_command'] != 'no controller':
self.fittext(rectangle(0, .4, 1, .35), _('WARNING no motor controller'), True, black)
self.control['heading_command'] = 'no controller'

# display warning about any servo faults
flags = self.last_val('servo.flags').split()
warning = ''
Expand All @@ -881,6 +876,10 @@ def nr(x):
if self.control['heading_command'] != 'no wind':
self.fittext(rectangle(0, .4, 1, .4), _('WIND not detected'), True, black)
self.control['heading_command'] = 'no wind'
elif self.last_val('servo.controller') == 'none':
if self.control['heading_command'] != 'no controller':
self.fittext(rectangle(0, .4, 1, .35), _('WARNING no motor controller'), True, black)
self.control['heading_command'] = 'no controller'
else:
# no warning, display the desired course or 'standby'
if self.last_val('ap.enabled') != True:
Expand Down

0 comments on commit eb2be28

Please sign in to comment.