From 36f54adb7ff3598a820be8387020326fd55e0925 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Mon, 24 Oct 2016 12:44:24 +0200 Subject: [PATCH] thermistortablefile.py: fix output parameter list. 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. --- configtool/thermistortablefile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configtool/thermistortablefile.py b/configtool/thermistortablefile.py index 2da2631..88fd264 100644 --- a/configtool/thermistortablefile.py +++ b/configtool/thermistortablefile.py @@ -166,8 +166,8 @@ def SteinhartHartTable(ofp, params, names, settings, finalTable): delta = (t - thrm.temp(prev)) / (prev - i) if i != prev else 0 ofp.output(" {%4d, %5d, %5d}%s // %4d C, %6d ohms, m = %6.3f" % - (i, int(t * 4), int(delta * 4 * 256), c, int(t), int(round(r))), - delta) + (i, int(t * 4), int(delta * 4 * 256), c, int(t), int(round(r)), + delta)) prev = i if finalTable: