Teacup_Firmware
Teacup_Firmware copied to clipboard
Can't save printer with Configtool
Hi. I'm trying to save loaded and edited printer configurations. This error message is printed in terminal whenever I save, no matter if it is editted or not.
Traceback (most recent call last):
File "/home/chinga/Dropbox/Teacup_Firmware-master/configtool/gui.py", line 246, in onSavePrinterConfig
rc = self.pgPrinter.onSaveConfig(evt)
File "/home/chinga/Dropbox/Teacup_Firmware-master/configtool/printerpanel.py", line 198, in onSaveConfig
return self.saveConfigFile(path)
File "/home/chinga/Dropbox/Teacup_Firmware-master/configtool/printerpanel.py", line 246, in saveConfigFile
v1 = pg.getValues()
File "/home/chinga/Dropbox/Teacup_Firmware-master/configtool/mechanicalpage.py", line 242, in getValues
result['HOMING_STEP4'] = self.getHomingValue('HOMING_STEP4', result)
File "/home/chinga/Dropbox/Teacup_Firmware-master/configtool/mechanicalpage.py", line 231, in getHomingValue
return (self.labels.keys()[self.labels.values().index(result[name][0])], True) ValueError: 'n' is not in list
I can confirm this issue. Looks like the button with '-' will return something different than expected. Also for other homing-keys if they are '-'. E.g. for Step 4 it is 'n'. For Step 2 it is 'y'.
Ok, I found what happened.
I load printer.mendel.h. Want to save it as e.g. printer.test.h. Now the DEFINE_HOMING looks like:
/** \def DEFINE_HOMING
Order (and number) of homing movements.
*/
#ifndef DEFINE_HOMING
#define DEFINE_HOMING(...)
#endif
//DEFINE_HOMING_START
DEFINE_HOMING(('x', False), ('y_negative', True), ('z_negative', True), ('n', False))
//DEFINE_HOMING_END
Uff... Lot's of work. Please check https://github.com/Traumflug/Teacup_Firmware/tree/configtool_homing Feedback is welcome.
Homing is fixed. Also this should work with Python3 now.
I'm currently not very happy, with the double defines of homingKeys in mechanicalpage.py and printer.py. But I don't have any good idea for this.
With python 2.7.13 on Debian, I can not run configtool at all.
$ ./configtool.py
Traceback (most recent call last):
File "./configtool.py", line 191, in
I've currently not much time to do any support but probably this issue was already fixed in https://github.com/Traumflug/Teacup_Firmware/tree/python_upgrade .
Can you please check?
On Sat, 2019-04-06 at 11:12 -0700, Nico Tonnhofer wrote:
I've currently not much time to do any support but probably this issue was already fixed in https://github.com/Traumflug/Teacup_Firmware/tree/python_upgrade . Can you please check?
Same behavior ....
$ git checkout python_upgrade
Branch python_upgrade set up to track remote branch python_upgrade from
origin.
Switched to a new branch 'python_upgrade'
$ ./configtool.py
Traceback (most recent call last):
File "./configtool.py", line 191, in
On Sat, 2019-04-06 at 11:12 -0700, Nico Tonnhofer wrote:
I've currently not much time to do any support but probably this issue was already fixed in https://github.com/Traumflug/Teacup_Firmware/tree/python_upgrade . Can you please check? —
Started with a new/clean repo and now I have this:
$ git checkout configtool_homing
Branch configtool_homing set up to track remote branch
configtool_homing from origin.
Switched to a new branch 'configtool_homing'
$ ./configtool.py
Traceback (most recent call last):
File "./configtool.py", line 191, in
Please install the latest wxpython: https://wxpython.org/pages/downloads/index.html wx3.0 is not supported with python_upgrade-branch.
Everything now in the experimental branch.