Skip to content
This repository has been archived by the owner on Aug 27, 2023. It is now read-only.

Misplaced paren in configtool/thermistortablefile.py #246

Closed
drf5n opened this issue Oct 24, 2016 · 3 comments
Closed

Misplaced paren in configtool/thermistortablefile.py #246

drf5n opened this issue Oct 24, 2016 · 3 comments

Comments

@drf5n
Copy link
Collaborator

drf5n commented Oct 24, 2016

https://github.com/Traumflug/Teacup_Firmware/blob/master/configtool/thermistortablefile.py#L169

If you attempt a Steinhart-Hart table in the configtool with parameters (4700, 25, 100000, 209, 475, 256, 201) it fails with a:

...
 File "/Users/drf/2014/RepRap/GIT/Teacup_Firmware/configtool/thermistortablefile.py", line 169, in SteinhartHartTable
    (i, int(t * 4), int(delta * 4 * 256), c, int(t), int(round(r))),
  TypeError: not enough arguments for format string

If you move the last paren from line 169 to line 170, the 'delta' parameter is included in the interpolation list.

Traumflug added a commit that referenced this issue Oct 24, 2016
If you attempt a Steinhart-Hart table in the configtool with
parameters (4700, 25, 100000, 209, 475, 256, 201) it fails with a:

...
 File "/Users/drf/2014/RepRap/GIT/Teacup_Firmware/configtool/
   thermistortablefile.py", line 169, in SteinhartHartTable
   (i, int(t * 4), int(delta * 4 * 256), c, int(t), int(round(r))),
  TypeError: not enough arguments for format string

Catched and fix provided by dr5fn, this should fix issue #246.
@Traumflug
Copy link
Owner

Good catch, confirmed.

Made a commit according to your description and put it on branch issue-246, it fixes the issue here. Can you confirm this to be the right solution?

@drf5n
Copy link
Collaborator Author

drf5n commented Oct 26, 2016

I cherry-picked the commit over to my setup and can confirm that it fixes the error and builds for me.

Traumflug added a commit that referenced this issue Oct 26, 2016
If you attempt a Steinhart-Hart table in the configtool with
parameters (4700, 25, 100000, 209, 475, 256, 201) it fails with a:

...
 File "/Users/drf/2014/RepRap/GIT/Teacup_Firmware/configtool/
   thermistortablefile.py", line 169, in SteinhartHartTable
   (i, int(t * 4), int(delta * 4 * 256), c, int(t), int(round(r))),
  TypeError: not enough arguments for format string

Catched and fix provided by dr5fn, this should fix issue #246.
@Traumflug
Copy link
Owner

Thank you very much for the verification. Picked this commit to experimental and removed issue-246.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants