[Git][NTPsec/ntpsec][master] makeheat: seat of the pants parameter tweaks.
Gary E. Miller
gitlab at mg.gitlab.com
Wed Feb 1 22:41:00 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
3487f0f3 by Gary E. Miller at 2017-02-01T14:40:15-08:00
makeheat: seat of the pants parameter tweaks.
needs a bit more automation of magic constants.
- - - - -
1 changed file:
- contrib/makeheat
Changes:
=====================================
contrib/makeheat
=====================================
--- a/contrib/makeheat
+++ b/contrib/makeheat
@@ -26,7 +26,7 @@ parser.add_argument('-t', '--temp',
nargs=1,
type=float)
parser.add_argument('-w', '--wait',
- default=[0.01],
+ default=[0.001],
dest='wait',
help="Set delay time in seconds, default is 0.1",
nargs=1,
@@ -43,7 +43,7 @@ m = hashlib.md5()
temp = 0
max_cnt = args.wait[0] * 200000
# on a RasPi 3 the temp steps seem to be about 0.537 to 0.539C
-temp_gate = args.target_temp[0] - 0.6
+temp_gate = args.target_temp[0] - 1.2
while True:
# on a RasPi 3, 200,000 of the m.update() can be one second
@@ -54,7 +54,11 @@ while True:
else:
cnt = max_cnt
# cools off slower than it heats up.
- time.sleep(args.wait[0] * 20.0 * -delta)
+ # undocumented Pythong 'feature', no sleep less than 1 milli Sec
+ sleep = args.wait[0] * 10.0 * -delta
+ if 0.001 > sleep:
+ sleep = 0.001
+ time.sleep(sleep)
cnt += 1
# read the temperature every max_cnt
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/3487f0f323ec4a9c1268ad00364cc6edbb4a959a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170201/e5487939/attachment.html>
More information about the vc
mailing list