Skip to content

Commit

Permalink
2024 wdr3 fix (#55)
Browse files Browse the repository at this point in the history
* Swap fill-dump and vent valve switch location

* Bring back second ignition relay board

* Add tank heating status display on clientside
  • Loading branch information
JasonBrave authored Jul 13, 2024
1 parent 1fdca61 commit 91ae3e7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/clientside/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ ActuatorMessage build_command_message() {
.ov102 = digitalRead(pinout::MISSILE_SWITCH_2),
.nv201 = digitalRead(pinout::MISSILE_SWITCH_3),
.nv202 = digitalRead(pinout::MISSILE_SWITCH_4),
.vent_valve = digitalRead(pinout::MISSILE_SWITCH_5),
.vent_valve = digitalRead(pinout::MISSILE_SWITCH_6),
.injector_valve = digitalRead(pinout::MISSILE_SWITCH_INJECTOR),
.fill_dump_valve = digitalRead(pinout::MISSILE_SWITCH_6),
.fill_dump_valve = digitalRead(pinout::MISSILE_SWITCH_5),
.fill_disconnect = digitalRead(pinout::MISSILE_SWITCH_7),
.tank_heating_1 = digitalRead(pinout::MISSILE_SWITCH_8),
.tank_heating_2 = digitalRead(pinout::MISSILE_SWITCH_8),
Expand Down
18 changes: 15 additions & 3 deletions src/clientside/lcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ void setup() {
/* Layout:
----------------------
|O1:OPN O2:CLS N1:UNK|
|V1:CLS IP:412 IS:456| Those current are in hundredth(increment 0.01)
|EC:000 CON:Y ARM:Y |
|N2:CLS IP:412 IS:456| Those current are in hundredth(increment 0.01)
|E:000 CON:Y ARM:Y tH|
|TM:123 TA:118 CB:126| Those voltage are in tenth(increment 0.1)
----------------------
*/
Expand All @@ -80,7 +80,7 @@ void update(SensorMessage msg) {
print_decimal_value(msg.ignition_secondary_ma / 10);

liquid_crystal.setCursor(0, 2);
liquid_crystal.print("EC:");
liquid_crystal.print("E:");
print_decimal_value(msg.error_code);

liquid_crystal.print(" CON:");
Expand All @@ -89,6 +89,18 @@ void update(SensorMessage msg) {
liquid_crystal.print(" ARM:");
liquid_crystal.print(msg.towerside_armed ? "Y" : "N");

if(msg.heater_kelvin_high_mv_1 >= 16000) {
liquid_crystal.print(" T");
}else{
liquid_crystal.print(" t");
}

if(msg.heater_kelvin_high_mv_2 >= 16000) {
liquid_crystal.print("H");
}else{
liquid_crystal.print("h");
}

liquid_crystal.setCursor(0, 3);
liquid_crystal.print("TM:");
print_decimal_value(msg.towerside_main_batt_mv / 100);
Expand Down
6 changes: 3 additions & 3 deletions src/common/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ struct ActuatorMessage {
bool ov102; // Ox Drain
bool nv201; // N2 Fill
bool nv202; // N2 Drain
bool vent_valve; // To DAQ laptop only
bool injector_valve; // To DAQ laptop only
bool fill_dump_valve; // To DAQ laptop only
bool vent_valve; // OV-302, To DAQ laptop only
bool injector_valve; // IJV-301, To DAQ laptop only
bool fill_dump_valve; // OV-301, To DAQ laptop only
bool fill_disconnect;
bool tank_heating_1;
bool tank_heating_2;
Expand Down
7 changes: 3 additions & 4 deletions src/towerside/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct Actuators {
actuator::I2C nv202{4};
actuator::I2C fill_disconnect{5};
actuator::Ignition ignition_primary{6};
//actuator::Ignition ignition_secondary{7};
actuator::Ignition ignition_secondary{7};
actuator::Heater heater_1{16};
actuator::Heater heater_2{17};
} ACTUATORS;
Expand All @@ -24,7 +24,7 @@ void apply(const ActuatorMessage &command) {
ACTUATORS.nv202.set(command.nv202);
ACTUATORS.fill_disconnect.set(command.fill_disconnect);
ACTUATORS.ignition_primary.set(command.ignition_primary);
//ACTUATORS.ignition_secondary.set(command.ignition_primary); // fire both ignitions in response to ignition_primary
ACTUATORS.ignition_secondary.set(command.ignition_primary); // fire both ignitions in response to ignition_primary
ACTUATORS.heater_1.set(command.tank_heating_1);
ACTUATORS.heater_2.set(command.tank_heating_2);
}
Expand All @@ -37,8 +37,7 @@ SensorMessage build_sensor_message() {
.towerside_armed = sensors::is_armed(),
.has_contact = sensors::has_contact(),
.ignition_primary_ma = ACTUATORS.ignition_primary.get_current_ma(1),
//.ignition_secondary_ma = ACTUATORS.ignition_secondary.get_current_ma(1),
.ignition_secondary_ma = 0,
.ignition_secondary_ma = ACTUATORS.ignition_secondary.get_current_ma(1),
.ov101_state = ACTUATORS.ov101.get_state(),
.ov102_state = ACTUATORS.ov102.get_state(),
.nv201_state = ACTUATORS.nv201.get_state(),
Expand Down

0 comments on commit 91ae3e7

Please sign in to comment.