Configtool: save target candidate pins, not the metadata ones.

Previously, all the cancicates were replaced with the ones from
board.metadata, messing things up. Appears to work fine now,
candidates are preserved.
This commit is contained in:
Markus Hitter 2015-07-14 18:37:02 +02:00
parent 6b866e8c85
commit 25c502d68b
1 changed files with 32 additions and 0 deletions

View File

@ -532,6 +532,10 @@ class BoardPanel(wx.Panel):
skipToSensorEnd = False
skipToHeaterEnd = False
tempTables = {}
candThermPinsWritten = False
candHeatPinsWritten = False
candProcessorsWritten = False
candCPUClocksWritten = False
for ln in self.cfgBuffer:
m = reStartSensors.match(ln)
if m:
@ -590,6 +594,34 @@ class BoardPanel(wx.Panel):
skipToHeaterEnd = False
continue
if reCandThermPins.match(ln):
if not candThermPinsWritten:
for pin in self.candThermPins:
fp.write("//#define TEMP_SENSOR_PIN " + pin + "\n")
candThermPinsWritten = True
continue
if reCandHeatPins.match(ln):
if not candHeatPinsWritten:
for pin in self.candHeatPins:
fp.write("//#define HEATER_PIN " + pin + "\n")
candHeatPinsWritten = True
continue
if reCandProcessors.match(ln):
if not candProcessorsWritten:
for pin in self.candProcessors:
fp.write("//#define CPU_TYPE " + pin + "\n")
candProcessorsWritten = True
continue
if reCandCPUClocks.match(ln):
if not candCPUClocksWritten:
for pin in self.candClocks:
fp.write("//#define F_CPU_OPT " + pin + "\n")
candCPUClocksWritten = True
continue
m = reDefBoolBL.match(ln)
if m:
t = m.groups()