rename psu current fault levels

This commit is contained in:
Oskar Weigl
2020-05-01 16:37:20 -07:00
parent c6bb191457
commit d002a74d24
5 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -174,11 +174,11 @@ bool Axis::do_checks() {
}
}
if (Ibus_sum > board_config.power_supply_max_current) {
if (Ibus_sum > board_config.dc_max_positive_current) {
error_ |= ERROR_DC_BUS_OVER_CURRENT;
}
if (Ibus_sum < board_config.power_supply_min_current) {
error_ |= ERROR_DC_BUS_UNDER_CURRENT;
if (Ibus_sum < board_config.dc_max_negative_current) {
error_ |= ERROR_DC_BUS_OVER_REGEN_CURRENT;
}
// Sub-components should use set_error which will propegate to this error_
+1 -1
View File
@@ -24,7 +24,7 @@ public:
ERROR_MIN_ENDSTOP_PRESSED = 0x1000,
ERROR_MAX_ENDSTOP_PRESSED = 0x2000,
ERROR_ESTOP_REQUESTED = 0x4000,
ERROR_DC_BUS_UNDER_CURRENT = 0x8000, // too much current pushed into the power supply
ERROR_DC_BUS_OVER_REGEN_CURRENT = 0x8000, // too much current pushed into the power supply
ERROR_DC_BUS_OVER_CURRENT = 0x10000, // too much current pulled out of the power supply
ERROR_HOMING_WITHOUT_ENDSTOP = 0x20000, // the min endstop was not enabled during homing
};
+2 -2
View File
@@ -101,8 +101,8 @@ struct BoardConfig_t {
//!< The closer the voltage approaches dc_bus_overvoltage_trip_level,
//!< the more power is sunk into the resistor.
//!< This feature is disabled if dc_bus_overvoltage_trip_level <= nominal_voltage.
float power_supply_max_current = INFINITY; // Max current [A] the power supply can source
float power_supply_min_current = -INFINITY; // Max current [A] the power supply can sink
float dc_max_positive_current = INFINITY; // Max current [A] the power supply can source
float dc_max_negative_current = -INFINITY; // Max current [A] the power supply can sink
PWMMapping_t pwm_mappings[GPIO_COUNT];
PWMMapping_t analog_mappings[GPIO_COUNT];
};
+2 -2
View File
@@ -167,8 +167,8 @@ static inline auto make_obj_tree() {
make_protocol_property("enable_ascii_protocol_on_usb", &board_config.enable_ascii_protocol_on_usb),
make_protocol_property("dc_bus_undervoltage_trip_level", &board_config.dc_bus_undervoltage_trip_level),
make_protocol_property("dc_bus_overvoltage_trip_level", &board_config.dc_bus_overvoltage_trip_level),
make_protocol_property("power_supply_min_current", &board_config.power_supply_min_current),
make_protocol_property("power_supply_max_current", &board_config.power_supply_max_current),
make_protocol_property("dc_max_negative_current", &board_config.dc_max_negative_current),
make_protocol_property("dc_max_positive_current", &board_config.dc_max_positive_current),
#if HW_VERSION_MAJOR == 3 && HW_VERSION_MINOR >= 3
make_protocol_object("gpio1_pwm_mapping", make_protocol_definitions(board_config.pwm_mappings[0])),
make_protocol_object("gpio2_pwm_mapping", make_protocol_definitions(board_config.pwm_mappings[1])),
+1 -1
View File
@@ -32,7 +32,7 @@ class errors:
ERROR_MIN_ENDSTOP_PRESSED = 0x1000
ERROR_MAX_ENDSTOP_PRESSED = 0x2000
ERROR_ESTOP_REQUESTED = 0x4000
ERROR_DC_BUS_UNDER_CURRENT = 0x8000
ERROR_DC_BUS_OVER_REGEN_CURRENT = 0x8000
ERROR_DC_BUS_OVER_CURRENT = 0x10000
ERROR_HOMING_WITHOUT_ENDSTOP = 0x20000