fix float errors in _lcd_update()
This commit is contained in:
parent
58aa8673f8
commit
1058892564
1 changed files with 4 additions and 2 deletions
|
@ -113,6 +113,8 @@ class LCD_HD44780(octoprint.plugin.StartupPlugin,
|
|||
if self._lcd_updating:
|
||||
return
|
||||
|
||||
bytes_per_send_cycle = int(self.cols*(self.rows/2))
|
||||
|
||||
self._lcd_updating = True
|
||||
|
||||
line1 = self._line1.ljust(self.cols, ' ')
|
||||
|
@ -122,12 +124,12 @@ class LCD_HD44780(octoprint.plugin.StartupPlugin,
|
|||
|
||||
message = line1 + line3
|
||||
self._lcd_send_byte(self._lcd_line1, self._lcd_cmd)
|
||||
for i in range(self.cols*self.rows/2):
|
||||
for i in range(bytes_per_send_cycle):
|
||||
self._lcd_send_byte(ord(message[i]), self._lcd_chr)
|
||||
|
||||
message = line2 + line4
|
||||
self._lcd_send_byte(self._lcd_line2, self._lcd_cmd)
|
||||
for i in range(self.cols*self.rows/2):
|
||||
for i in range(bytes_per_send_cycle):
|
||||
self._lcd_send_byte(ord(message[i]), self._lcd_chr)
|
||||
|
||||
self._lcd_updating = False
|
||||
|
|
Loading…
Reference in a new issue