build: Cleanup whitespace errors

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-06-28 12:59:47 -04:00
parent e11851276d
commit efb27f095c
5 changed files with 13 additions and 13 deletions

View File

@ -43,7 +43,7 @@ position_max: 200
step_pin: P2.0 step_pin: P2.0
dir_pin: P0.5 dir_pin: P0.5
enable_pin: !P0.4 enable_pin: !P0.4
step_distance: .0011365 step_distance: .0011365
nozzle_diameter: 0.400 nozzle_diameter: 0.400
filament_diameter: 1.750 filament_diameter: 1.750
heater_pin: P2.5 heater_pin: P2.5

View File

@ -144,7 +144,7 @@ class PrinterLCD:
lcd_chip.write_text(0, 3, self.message) lcd_chip.write_text(0, 3, self.message)
if self.msg_time: if self.msg_time:
# Screen updates every .5 seconds # Screen updates every .5 seconds
self.msg_time -= .5 self.msg_time -= .5
if self.msg_time <= 0.: if self.msg_time <= 0.:
self.message = None self.message = None
self.msg_time = None self.msg_time = None
@ -219,7 +219,7 @@ class PrinterLCD:
self.lcd_chip.write_text(0, 3, self.message) self.lcd_chip.write_text(0, 3, self.message)
if self.msg_time: if self.msg_time:
# Screen updates every .5 seconds # Screen updates every .5 seconds
self.msg_time -= .5 self.msg_time -= .5
if self.msg_time <= 0.: if self.msg_time <= 0.:
self.message = None self.message = None
self.msg_time = None self.msg_time = None

View File

@ -12,8 +12,8 @@
# Font comes from fntcol16.zip package found at: # Font comes from fntcol16.zip package found at:
# ftp://ftp.simtel.net/pub/simtelnet/msdos/screen/fntcol16.zip # ftp://ftp.simtel.net/pub/simtelnet/msdos/screen/fntcol16.zip
# (c) Joseph Gil # (c) Joseph Gil
# #
# Indivdual fonts are public domain # Indivdual fonts are public domain
###################################################################### ######################################################################
VGA_FONT = [ VGA_FONT = [

View File

@ -33,7 +33,7 @@ class UC1701:
self.mcu.add_config_object(self) self.mcu.add_config_object(self)
self.glyph_buffer = [] self.glyph_buffer = []
self.spi_xfer_cmd = self.set_pin_cmd = None self.spi_xfer_cmd = self.set_pin_cmd = None
self.vram = ([bytearray(128) for i in range(8)], self.vram = ([bytearray(128) for i in range(8)],
[bytearray('~'*128) for i in range(8)]) [bytearray('~'*128) for i in range(8)])
def build_config(self): def build_config(self):
self.mcu.add_config_cmd( self.mcu.add_config_cmd(
@ -68,7 +68,7 @@ class UC1701:
0x81, # Set Electronic Volume 0x81, # Set Electronic Volume
0x28, # Electronic volume value (40) 0x28, # Electronic volume value (40)
0xAC, # Set static indicator off 0xAC, # Set static indicator off
0x00, # NOP 0x00, # NOP
0xA6, # Disable Inverse 0xA6, # Disable Inverse
0xAF] # Set display enable 0xAF] # Set display enable
self.send(init_cmds) self.send(init_cmds)
@ -122,7 +122,7 @@ class UC1701:
self.glyph_buffer.append((glyph_id, data)) self.glyph_buffer.append((glyph_id, data))
self.glyph_buffer.sort(key=lambda x: x[0]) self.glyph_buffer.sort(key=lambda x: x[0])
def write_glyph(self, x, y, glyph_id): def write_glyph(self, x, y, glyph_id):
pix_x = x*8 pix_x = x*8
pix_y = y*16 pix_y = y*16
data = self.glyph_buffer[glyph_id][1] data = self.glyph_buffer[glyph_id][1]
for bits in data: for bits in data:
@ -171,4 +171,4 @@ class UC1701:
def clear(self): def clear(self):
zeros = bytearray(128) zeros = bytearray(128)
for page in self.vram[self.CURRENT_BUF]: for page in self.vram[self.CURRENT_BUF]:
page[:] = zeros page[:] = zeros

View File

@ -197,10 +197,10 @@ static const struct config_s {
.bLength = sizeof(cdc_config_descriptor.config), .bLength = sizeof(cdc_config_descriptor.config),
.bDescriptorType = USB_DT_CONFIG, .bDescriptorType = USB_DT_CONFIG,
.wTotalLength = cpu_to_le16(sizeof(cdc_config_descriptor)), .wTotalLength = cpu_to_le16(sizeof(cdc_config_descriptor)),
.bNumInterfaces = 2, .bNumInterfaces = 2,
.bConfigurationValue = 1, .bConfigurationValue = 1,
.bmAttributes = 0xC0, .bmAttributes = 0xC0,
.bMaxPower = 50, .bMaxPower = 50,
}, },
.iface0 = { .iface0 = {
.bLength = sizeof(cdc_config_descriptor.iface0), .bLength = sizeof(cdc_config_descriptor.iface0),