@@ -20,7 +20,7 @@ Board::Board()
2020 can(),
2121 stlib(" 00:80:e1:00:02:16" ,
2222 HVSCU ::Communication::Ethernet::local_ip.string_address,
23- " 255.255.255 .0" , " 192.168.2.1" ),
23+ " 255.255.0 .0" , " 192.168.2.1" ),
2424 ethernet(
2525 &can.module_can.system.total_voltage_volts, &state_of_charge,
2626 can.module_can.system.all_cells_voltage[0 ],
@@ -53,8 +53,8 @@ Board::Board()
5353 read_sensors_1khz = true ;
5454 });
5555
56- Time::register_low_precision_alarm (
57- 1 , [&]() { protection_manager.update_low_frequency (); });
56+ // Time::register_low_precision_alarm(
57+ // 1, [&]() { protection_manager.update_low_frequency(); });
5858}
5959
6060void Board::update () {
@@ -90,29 +90,29 @@ void Board::update() {
9090 ess_voltage = can.module_can .system .total_voltage_volts ;
9191 state_of_charge = ess_voltage * 100 .0f / MAX_ESS_VOLTAGE ;
9292 for (uint8_t i = 0 ; i < 3 ; i++) {
93- if (*can.module_can .system .all_module_voltage [0 ][i] >= 148 .8f ) {
94- ProtectionManager::fault_and_propagate ();
95- break ;
96- }
93+ // if (*can.module_can.system.all_module_voltage[0][i] >= 148.8f) {
94+ // ProtectionManager::fault_and_propagate();
95+ // break;
96+ // }
9797
98- if (*can.module_can .system .all_max_temperature [0 ][i] >= 60.0 ) {
99- ProtectionManager::fault_and_propagate ();
100- break ;
101- }
98+ // if (*can.module_can.system.all_max_temperature[0][i] >= 60.0) {
99+ // ProtectionManager::fault_and_propagate();
100+ // break;
101+ // }
102102
103- if (*can.module_can .system .all_min_temperature [0 ][i] <= 5.5 ) {
104- ProtectionManager::fault_and_propagate ();
105- break ;
106- }
103+ // if (*can.module_can.system.all_min_temperature[0][i] <= 5.5) {
104+ // ProtectionManager::fault_and_propagate();
105+ // break;
106+ // }
107107
108108 bool protection_triggered = false ;
109- for (uint8_t j = 0 ; j < 48 ; j++) {
110- if (*can.module_can .system .all_cells_voltage [0 ][i][j] >= 3 .1f ) {
111- ProtectionManager::fault_and_propagate ();
112- protection_triggered = true ;
113- break ;
114- }
115- }
109+ // for (uint8_t j = 0; j < 48; j++) {
110+ // if (*can.module_can.system.all_cells_voltage[0][i][j] >= 3.1f) {
111+ // ProtectionManager::fault_and_propagate();
112+ // protection_triggered = true;
113+ // break;
114+ // }
115+ // }
116116 if (protection_triggered) break ;
117117 }
118118
@@ -130,7 +130,9 @@ void Board::update() {
130130 imd_fault = imd.ever_got_ok && *imd.get_ok_state () == PinState::OFF ;
131131 protection_manager.update_high_frequency ();
132132 general_state_machine.check_transitions ();
133+ [[maybe_unused]] Actuators::Contactors::State pruebas = *(contactors.get_state_pointer ());
133134 stlib.update ();
135+
134136}
135137
136138void Board::update_connecting () {}
0 commit comments