Configtool: some code prettifications.
Pure whitespace changes.
This commit is contained in:
parent
2436ac2865
commit
ee8f5f9170
|
|
@ -245,6 +245,7 @@ class ConfigFrame(wx.Frame):
|
||||||
def loadConfigFile(self, fn):
|
def loadConfigFile(self, fn):
|
||||||
if not self.pgPrinter.confirmLoseChanges("load config"):
|
if not self.pgPrinter.confirmLoseChanges("load config"):
|
||||||
return
|
return
|
||||||
|
|
||||||
if not self.pgBoard.confirmLoseChanges("load config"):
|
if not self.pgBoard.confirmLoseChanges("load config"):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
@ -377,6 +378,7 @@ class ConfigFrame(wx.Frame):
|
||||||
dlg.Destroy()
|
dlg.Destroy()
|
||||||
if rc != wx.ID_YES:
|
if rc != wx.ID_YES:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.onSavePrinterConfig(None)
|
self.onSavePrinterConfig(None)
|
||||||
|
|
||||||
if self.pgBoard.isModified():
|
if self.pgBoard.isModified():
|
||||||
|
|
@ -388,6 +390,7 @@ class ConfigFrame(wx.Frame):
|
||||||
dlg.Destroy()
|
dlg.Destroy()
|
||||||
if rc != wx.ID_YES:
|
if rc != wx.ID_YES:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.onSaveBoardConfig(None)
|
self.onSaveBoardConfig(None)
|
||||||
|
|
||||||
if not self.verifyConfigLoaded():
|
if not self.verifyConfigLoaded():
|
||||||
|
|
@ -409,12 +412,14 @@ class ConfigFrame(wx.Frame):
|
||||||
dlg.ShowModal()
|
dlg.ShowModal()
|
||||||
dlg.Destroy()
|
dlg.Destroy()
|
||||||
return
|
return
|
||||||
|
|
||||||
if not f_cpu:
|
if not f_cpu:
|
||||||
dlg = wx.MessageDialog(self, "Unable to determine CPU clock rate.",
|
dlg = wx.MessageDialog(self, "Unable to determine CPU clock rate.",
|
||||||
"CPU clock rate error", wx.OK | wx.ICON_ERROR)
|
"CPU clock rate error", wx.OK | wx.ICON_ERROR)
|
||||||
dlg.ShowModal()
|
dlg.ShowModal()
|
||||||
dlg.Destroy()
|
dlg.Destroy()
|
||||||
return
|
return
|
||||||
|
|
||||||
if not baud:
|
if not baud:
|
||||||
# TODO: It looks like serial port baud rate is confused with bootloader
|
# TODO: It looks like serial port baud rate is confused with bootloader
|
||||||
# baud rate here. These two can be the same, but don't have to.
|
# baud rate here. These two can be the same, but don't have to.
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ class AddSensorDlg(wx.Dialog):
|
||||||
|
|
||||||
csz.Add(lsz)
|
csz.Add(lsz)
|
||||||
|
|
||||||
csz.AddSpacer((10,10))
|
csz.AddSpacer((10, 10))
|
||||||
|
|
||||||
bsz = wx.BoxSizer(wx.HORIZONTAL)
|
bsz = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ class Build(wx.Dialog):
|
||||||
cmdpath = "avr-gcc"
|
cmdpath = "avr-gcc"
|
||||||
|
|
||||||
cfiles = [f for f in os.listdir(self.root)
|
cfiles = [f for f in os.listdir(self.root)
|
||||||
if isfile(join(self.root,f)) and f.endswith(".c")]
|
if isfile(join(self.root,f)) and f.endswith(".c")]
|
||||||
for f in cfiles:
|
for f in cfiles:
|
||||||
basename = f[:-2]
|
basename = f[:-2]
|
||||||
ofile = basename + ".o"
|
ofile = basename + ".o"
|
||||||
|
|
@ -202,8 +202,8 @@ class Build(wx.Dialog):
|
||||||
cmdpath = "avr-gcc"
|
cmdpath = "avr-gcc"
|
||||||
|
|
||||||
ofiles = ["\"" + join(self.root, "build", f) + "\""
|
ofiles = ["\"" + join(self.root, "build", f) + "\""
|
||||||
for f in os.listdir(join(self.root, "build"))
|
for f in os.listdir(join(self.root, "build"))
|
||||||
if isfile(join(self.root, "build", f)) and f.endswith(".o")]
|
if isfile(join(self.root, "build", f)) and f.endswith(".o")]
|
||||||
opath = " ".join(ofiles)
|
opath = " ".join(ofiles)
|
||||||
elfpath = "\"" + join(self.root, "build", "teacup.elf") + "\""
|
elfpath = "\"" + join(self.root, "build", "teacup.elf") + "\""
|
||||||
hexpath = "\"" + join(self.root, "teacup.hex") + "\""
|
hexpath = "\"" + join(self.root, "teacup.hex") + "\""
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ class MiscellaneousPage(wx.Panel, Page):
|
||||||
sbox.Add(tc)
|
sbox.Add(tc)
|
||||||
sbox.AddSpacer((5, 5))
|
sbox.AddSpacer((5, 5))
|
||||||
|
|
||||||
sz.Add(sbox, pos = (8,3), flag = wx.ALIGN_CENTER_HORIZONTAL)
|
sz.Add(sbox, pos = (8, 3), flag = wx.ALIGN_CENTER_HORIZONTAL)
|
||||||
|
|
||||||
labelWidth = 190;
|
labelWidth = 190;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ class SensorsPage(wx.Panel, Page):
|
||||||
self.sensorTypeKeys = {'TT_MAX6675': 'TEMP_MAX6675',
|
self.sensorTypeKeys = {'TT_MAX6675': 'TEMP_MAX6675',
|
||||||
'TT_THERMISTOR': 'TEMP_THERMISTOR',
|
'TT_THERMISTOR': 'TEMP_THERMISTOR',
|
||||||
'TT_AD595': 'TEMP_AD595', 'TT_PT100': 'TEMP_PT100',
|
'TT_AD595': 'TEMP_AD595', 'TT_PT100': 'TEMP_PT100',
|
||||||
'TT_INTERCOM': 'TEMP_INTERCOM' }
|
'TT_INTERCOM': 'TEMP_INTERCOM'}
|
||||||
self.labels = {'TEMP_MAX6675': "MAX6675", 'TEMP_THERMISTOR': "Thermistor",
|
self.labels = {'TEMP_MAX6675': "MAX6675", 'TEMP_THERMISTOR': "Thermistor",
|
||||||
'TEMP_AD595': "AD595", 'TEMP_PT100': "PT100",
|
'TEMP_AD595': "AD595", 'TEMP_PT100': "PT100",
|
||||||
'TEMP_INTERCOM': "Intercom"}
|
'TEMP_INTERCOM': "Intercom"}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue