Limit i_set within range of MAX1968 chip #102

Merged
sb10q merged 1 commits from atse/thermostat:limit-i_set into master 2024-04-24 18:05:20 +08:00
Contributor

Fixes #99, where i_set was allowed to be set with no constraints. The limit of ±3A is from the MAX1968 TEC chip's capabilities.

Fixes #99, where i_set was allowed to be set with no constraints. The limit of ±3A is from the MAX1968 TEC chip's capabilities.
atse force-pushed limit-i_set from 509b53d67d to cb4d5b737e 2024-04-03 17:28:14 +08:00 Compare
esavkin reviewed 2024-04-08 10:16:59 +08:00
src/channels.rs Outdated
@ -133,0 +136,4 @@
if i_set < min {
i_set = min;
}
if i_set > max {
Owner

else if would be slightly better, though I would prefer min(max(value, LOWER_LIMIT), UPPER_LIMIT)

`else if` would be slightly better, though I would prefer min(max(value, LOWER_LIMIT), UPPER_LIMIT)
atse force-pushed limit-i_set from cb4d5b737e to e1e5a8a71c 2024-04-10 15:32:39 +08:00 Compare
sb10q merged commit 00d5feaa8d into master 2024-04-24 18:05:20 +08:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 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#102
No description provided.