Skip to content
Snippets Groups Projects
Commit 6f25736a authored by Davide Mor's avatar Davide Mor
Browse files

[RIG] Changes for the test on 22/11/2023

parent efdf0627
No related branches found
No related tags found
No related merge requests found
...@@ -46,7 +46,7 @@ Actuators::Actuators(TaskScheduler* sched) : scheduler(sched) ...@@ -46,7 +46,7 @@ Actuators::Actuators(TaskScheduler* sched) : scheduler(sched)
Config::Servos::MAX_PULSE, Config::Servos::MIN_PULSE); Config::Servos::MAX_PULSE, Config::Servos::MIN_PULSE);
servo4 = servo4 =
new Servo(Config::Servos::SERVO4_TIMER, Config::Servos::SERVO4_PWM_CH, new Servo(Config::Servos::SERVO4_TIMER, Config::Servos::SERVO4_PWM_CH,
Config::Servos::MIN_PULSE, Config::Servos::MAX_PULSE); Config::Servos::MAX_PULSE, Config::Servos::MIN_PULSE);
servo5 = servo5 =
new Servo(Config::Servos::SERVO5_TIMER, Config::Servos::SERVO5_PWM_CH, new Servo(Config::Servos::SERVO5_TIMER, Config::Servos::SERVO5_PWM_CH,
Config::Servos::MAX_PULSE, Config::Servos::MIN_PULSE); Config::Servos::MAX_PULSE, Config::Servos::MIN_PULSE);
......
...@@ -60,7 +60,7 @@ constexpr uint32_t DEFAULT_RELEASE_OPENING_TIME = 10000; // 10s ...@@ -60,7 +60,7 @@ constexpr uint32_t DEFAULT_RELEASE_OPENING_TIME = 10000; // 10s
constexpr uint32_t DEFAULT_DISCONNECT_OPENING_TIME = 10000; // 10s constexpr uint32_t DEFAULT_DISCONNECT_OPENING_TIME = 10000; // 10s
constexpr float DEFAULT_FILLING_MAXIMUM_APERTURE = 0.97f; constexpr float DEFAULT_FILLING_MAXIMUM_APERTURE = 0.97f;
constexpr float DEFAULT_VENTING_MAXIMUM_APERTURE = 0.40f; constexpr float DEFAULT_VENTING_MAXIMUM_APERTURE = 0.80f;
constexpr float DEFAULT_MAIN_MAXIMUM_APERTURE = 0.87f; constexpr float DEFAULT_MAIN_MAXIMUM_APERTURE = 0.87f;
constexpr float DEFAULT_RELEASE_MAXIMUM_APERTURE = 0.97f; constexpr float DEFAULT_RELEASE_MAXIMUM_APERTURE = 0.97f;
constexpr float DEFAULT_DISCONNECT_MAXIMUM_APERTURE = 0.110f; constexpr float DEFAULT_DISCONNECT_MAXIMUM_APERTURE = 0.110f;
......
...@@ -141,7 +141,8 @@ void GroundModeManager::state_igniting(const Event& event) ...@@ -141,7 +141,8 @@ void GroundModeManager::state_igniting(const Event& event)
oxidantTimeoutEventId = EventBroker::getInstance().postDelayed( oxidantTimeoutEventId = EventBroker::getInstance().postDelayed(
MOTOR_OPEN_OXIDANT, TOPIC_MOTOR, ignitionTime); MOTOR_OPEN_OXIDANT, TOPIC_MOTOR, ignitionTime);
return logStatus(GroundModeManagerState::IGNITING); logStatus(GroundModeManagerState::IGNITING);
break;
} }
case MOTOR_OPEN_OXIDANT: case MOTOR_OPEN_OXIDANT:
{ {
...@@ -152,6 +153,18 @@ void GroundModeManager::state_igniting(const Event& event) ...@@ -152,6 +153,18 @@ void GroundModeManager::state_igniting(const Event& event)
break; break;
} }
case MOTOR_CLOSE_FEED_VALVE: case MOTOR_CLOSE_FEED_VALVE:
{
// Shut down the igniter
miosix::relays::ignition::high();
// Close all the valves
modules.get<Actuators>()->closeAllServo();
EventBroker::getInstance().removeDelayed(oxidantTimeoutEventId);
transition(&GroundModeManager::state_ready);
break;
}
case TMTC_DISARM: case TMTC_DISARM:
{ {
// Shut down the igniter // Shut down the igniter
...@@ -173,7 +186,8 @@ void GroundModeManager::state_igniting(const Event& event) ...@@ -173,7 +186,8 @@ void GroundModeManager::state_igniting(const Event& event)
miosix::relays::nitrogen::high(); miosix::relays::nitrogen::high();
} }
return transition(&GroundModeManager::state_ready); transition(&GroundModeManager::state_ready);
break;
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment