diff --git a/kiln-logger.py b/kiln-logger.py index 99bcb33..71660ee 100755 --- a/kiln-logger.py +++ b/kiln-logger.py @@ -127,7 +127,7 @@ def logger(hostname, csvfile, noprofilestats, pidstats, stdout): time_rem = msg['totaltime'] - msg['runtime'] hours = round(time_rem // 3600) minutes = round((time_rem - (hours * 3600)) // 60) - seconds = round((time_rem - (hours * 3600) - (minutes * 60))) - 1 + seconds = round((time_rem - (hours * 3600) - (minutes * 60))) seg.text = f"{hours:2.0f}-{minutes:2.0f}-{seconds:2.0f}TEMP{temp:4.0f}" # END ADD TEMP @@ -137,7 +137,7 @@ if __name__ == "__main__": parser = argparse.ArgumentParser(description='Log kiln data for analysis.') parser.add_argument('--hostname', type=str, default="localhost:8081", help="The kiln-controller hostname:port") # parser.add_argument('--csvfile', type=str, default="/tmp/kilnstats.csv", help="Where to write the kiln stats to") - parser.add_argument('--csvfile', type=str, default=f"/tmp/kilnstats-{datetime.today().strftime("%Y_%m_%d-%I_%M")}.csv", help="Where to write the kiln stats to") + parser.add_argument('--csvfile', type=str, default=f"/tmp/kilnstats-{datetime.today().strftime('%Y_%m_%d-%I_%M')}.csv", help="Where to write the kiln stats to") parser.add_argument('--pidstats', action='store_true', help="Include PID stats") parser.add_argument('--noprofilestats', action='store_true', help="Do not store profile stats (default is to store them)") parser.add_argument('--stdout', action='store_true', help="Also print to stdout")