mcu: Write initial config commands when in file output mode

When doing serial file output debugging, write the config commands as
they are often useful to inspect.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2016-09-10 20:26:52 -04:00
parent 33a48d926c
commit 1bbcb51066
1 changed files with 4 additions and 2 deletions

View File

@ -304,9 +304,11 @@ class MCU:
self.output_file_mode = True self.output_file_mode = True
self.serial.connect_file(debugoutput, dictionary) self.serial.connect_file(debugoutput, dictionary)
self._mcu_freq = float(self.serial.msgparser.config['CLOCK_FREQ']) self._mcu_freq = float(self.serial.msgparser.config['CLOCK_FREQ'])
def dummy_build_config(): def dummy_send_config():
for c in self._config_cmds:
self.send(self.create_command(c))
self._init_steppersync(500) self._init_steppersync(500)
self.build_config = dummy_build_config self._send_config = dummy_send_config
if not pace: if not pace:
def dummy_set_print_start_time(eventtime): def dummy_set_print_start_time(eventtime):
pass pass