From ef3a74d57974e7ca328bea94bbeb714a608ddbe6 Mon Sep 17 00:00:00 2001 From: Joseph Coffland Date: Thu, 15 Feb 2018 18:04:13 -0800 Subject: [PATCH] Work on pwr load limits --- CHANGELOG.md | 1 + src/jade/templates/indicators.jade | 34 ++++++++++++++++++++++++++++++ src/pwr/config.h | 2 +- src/stylus/style.styl | 7 +++++- 4 files changed, 42 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d27a69a..e47a4e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ Buildbotics CNC Controller Firmware Change Log ## v0.3.8 - Fixed pwr flags display + - Added pwr fault flags to indicators ## v0.3.7 - Allow blocking error dialog for a period of time diff --git a/src/jade/templates/indicators.jade b/src/jade/templates/indicators.jade index 1231d92..e2182dc 100644 --- a/src/jade/templates/indicators.jade +++ b/src/jade/templates/indicators.jade @@ -107,6 +107,40 @@ script#indicators-template(type="text/x-template") th 21 th Fault + table.pwr_fault + tr + th.header(colspan=5) Power Faults + tr + th Under voltage + td {{state['under_voltage'] ? 'True' : 'False'}} + th.separator + th Over voltage + td {{state['over_voltage'] ? 'True' : 'False'}} + tr + th Over current + td {{state['over_current'] ? 'True' : 'False'}} + th.separator + th Measurement error + td {{state['measurement_error'] ? 'True' : 'False'}} + tr + th Shunt overload + td {{state['shunt_overload'] ? 'True' : 'False'}} + th.separator + th Motor overload + td {{state['motor_overload'] ? 'True' : 'False'}} + tr + th Load 1 over temp + td {{state['load1_overtemp'] ? 'True' : 'False'}} + th.separator + th Load 2 over temp + td {{state['load2_overtemp'] ? 'True' : 'False'}} + tr + th Load 1 limiting + td {{state['load1_limiting'] ? 'True' : 'False'}} + th.separator + th Load 2 limiting + td {{state['load2_limiting'] ? 'True' : 'False'}} + table.measurements tr th.header(colspan=5) Measurements diff --git a/src/pwr/config.h b/src/pwr/config.h index 740065d..1494514 100644 --- a/src/pwr/config.h +++ b/src/pwr/config.h @@ -81,7 +81,7 @@ enum { #define VOLTAGE_MAX 39 #define CURRENT_MAX 25 #define LOAD_CURRENT_MAX 10.5 -#define CURRENT_OVERTEMP 14 // Should read ~21A but over 11.86A is faulty +#define CURRENT_OVERTEMP 19 // Should read ~21A but over 11.86A is faulty #define LOAD_LIMIT_TICKS 10 #define VOLTAGE_SETTLE_COUNT 5 #define VOLTAGE_SETTLE_PERIOD 20 // ms diff --git a/src/stylus/style.styl b/src/stylus/style.styl index 06a0d8a..ab85243 100644 --- a/src/stylus/style.styl +++ b/src/stylus/style.styl @@ -316,7 +316,6 @@ body .tabs section min-height 250px - max-height 610px overflow-x hidden overflow-y auto padding 0 @@ -435,6 +434,12 @@ body border 1px solid #ccc padding 1px + &.pwr_fault th:nth-child(1) + text-align left + + &.pwr_fault tr:nth-child(1) th + text-align center + .logic-lo color black -- 2.27.0