projects
/
bbctrl-firmware
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
305e516
)
Load limit duty cycle w/ lockout
author
Joseph Coffland
<joseph@cauldrondevelopment.com>
Fri, 16 Feb 2018 05:20:30 +0000
(21:20 -0800)
committer
Joseph Coffland
<joseph@cauldrondevelopment.com>
Fri, 16 Feb 2018 05:20:30 +0000
(21:20 -0800)
src/pwr/main.c
patch
|
blob
|
history
diff --git
a/src/pwr/main.c
b/src/pwr/main.c
index 9ad0648bebf10709ad068d93a1fddc1c78ff8c4a..0db219a743e4303924104d121a6208b516c8b8a7 100644
(file)
--- a/
src/pwr/main.c
+++ b/
src/pwr/main.c
@@
-180,11
+180,11
@@
static void measure_nominal_voltage() {
static void check_load(load_t *load) {
bool overtemp = CURRENT_OVERTEMP * 100 < regs[load->reg];
if (overtemp && !load->lockout) {
- load->lockout =
210; // About 1s
+ load->lockout =
true;
if (load->limit < LOAD_LIMIT_TICKS) load->limit++;
}
- if (
load->lockout) load->lockout--
;
+ if (
!overtemp) load->lockout = false
;
}