pytec: Add hardware testing script #148

Merged
sb10q merged 1 commits from atse/thermostat:test_script into master 2024-11-18 10:38:50 +08:00
Contributor

Eases the process of testing the hardware.

See #143.

Eases the process of testing the hardware. See #143.
atse added 1 commit 2024-11-11 17:04:18 +08:00
Eases the process of testing the hardware.

See #143.
morgan reviewed 2024-11-11 17:18:20 +08:00
pytec/test.py Outdated
@ -0,0 +21,4 @@
"-d",
"--deviation",
default=100,
help="Allowed deviation of resistance in Ohms",
Owner

Change this to tolerance in % and calculate the deviation in main

Change this to tolerance in % and calculate the deviation in `main`
Author
Contributor

Done in force-push to bc02819fca.

Done in force-push to bc02819fca.
atse marked this conversation as resolved
pytec/test.py Outdated
@ -0,0 +41,4 @@
sens_resistance = thermostat.get_report()[channel]["sens"]
if sens_resistance is not None:
print(sens_resistance, "Ω")
if min_allowed_resistance < sens_resistance < max_allowed_resistance:
Owner

<= since it's allowed_resistance or rename the variable

`<=` since it's `allowed_resistance` or rename the variable
Author
Contributor

Done in force-push to bc02819fca.

Done in force-push to bc02819fca.
atse marked this conversation as resolved
pytec/test.py Outdated
@ -0,0 +46,4 @@
else:
print("FAILED")
else:
print("Floating SENS pin(s) detected! Is the channel connected?")
Owner

remove the bracket (s) like above

remove the bracket `(s)` like above
Author
Contributor

Removed the "pins" nomenclature entirely and replaced it with "input" in the force-push to bc02819fca.

Removed the "pins" nomenclature entirely and replaced it with "input" in the force-push to bc02819fca.
atse marked this conversation as resolved
atse force-pushed test_script from 53c2f804d0 to bc02819fca 2024-11-11 17:36:57 +08:00 Compare
sb10q reviewed 2024-11-16 13:10:35 +08:00
pytec/test.py Outdated
@ -0,0 +10,4 @@
parser = argparse.ArgumentParser(description="Thermostat hardware testing script")
parser.add_argument("HOST", metavar="host", default="192.168.1.26", nargs="?")
parser.add_argument("PORT", metavar="port", default=23, nargs="?")
Owner

Capitalizations of metavar and argument name are the opposite of what they should be.

Capitalizations of metavar and argument name are the opposite of what they should be.
Author
Contributor

Fixed in force-push to adc25c9b2a.

Fixed in force-push to adc25c9b2a.
atse marked this conversation as resolved
atse force-pushed test_script from bc02819fca to adc25c9b2a 2024-11-18 10:36:11 +08:00 Compare
sb10q merged commit adc25c9b2a into master 2024-11-18 10:38:50 +08:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/thermostat#148
No description provided.