Implement functionality to survive the elevetor server dying #46

Merged
sebgab merged 7 commits from feature/elevator-server-crash-resilience into main 2026-03-18 15:53:34 +00:00
Owner

The program should now tolerate the ElevatorServer/Simulator program being killed while our elevator controller is running.
Once the ElevtorServer/Simulator is restored the elevator should continue where it left off.

Closes #36

The program should now tolerate the ElevatorServer/Simulator program being killed while our elevator controller is running. Once the ElevtorServer/Simulator is restored the elevator should continue where it left off. Closes #36
Implement functionality to survive the elevetor server dying
Some checks failed
/ build_and_test (push) Failing after 32s
/ Static Release Build (push) Has been skipped
df0d75a901
Fix broken tests due to changed datatype in function singature
All checks were successful
/ build_and_test (push) Successful in 37s
/ Static Release Build (push) Has been skipped
2274a84c40
Fix cargo warnings
All checks were successful
/ build_and_test (push) Successful in 37s
/ Static Release Build (push) Has been skipped
6d9c19b89c
Athamantis requested changes 2026-03-17 20:39:34 +00:00
Dismissed
Athamantis left a comment
Owner

one thing.
else if it works i am happy

one thing. else if it works i am happy
@ -0,0 +85,4 @@
}
// TODO: Make it better
let dirn = elev::DIRN_DOWN;
Owner

i have made it better! u need to merge in main, and move it here

i have made it better! u need to merge in main, and move it here
Author
Owner

Made better by merging in main.

Made better by merging in main.
sebgab marked this conversation as resolved
Hemmily requested changes 2026-03-17 21:37:33 +00:00
Dismissed
@ -190,3 +190,3 @@
debug!("No calls found, closing door");
{
let mut state = system_state.write().unwrap();
let _state = system_state.write().unwrap();
Owner

This can probably be fully deleted if we're not closing doors here

This can probably be fully deleted if we're not closing doors here
Author
Owner

Got deleted when merging in main.

Got deleted when merging in main.
sebgab marked this conversation as resolved
Merge branch 'main' into feature/elevator-server-crash-resilience
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
841ff8d69c
Remove make it better comment
All checks were successful
/ build_and_test (push) Successful in 38s
/ Static Release Build (push) Has been skipped
e49e662399
Athamantis requested changes 2026-03-18 09:22:32 +00:00
Dismissed
@ -190,4 +190,3 @@
// Check if obstructed
wait_for_not_obstructed(system_state.clone(), elevator.clone()).await;
Owner

looks like close_door was removed, it can be added under wait for door to be closed

looks like close_door was removed, it can be added under wait for door to be closed
Author
Owner

Won't wait_for_door_to_be_closed close the door?

Won't `wait_for_door_to_be_closed` close the door?
Owner

hmmm yes probably

hmmm yes probably
Athamantis marked this conversation as resolved
@ -0,0 +86,4 @@
while elevator.floor_sensor().is_none() {
elevator.motor_direction(elev::DIRN_DOWN);
}
Owner

ehhh you need to stop the elevator afterwards....

ehhh you need to stop the elevator afterwards....
Author
Owner

Good point...

Good point...
Author
Owner

Added in ba928b3

Added in ba928b3
Owner

nice

nice
Athamantis marked this conversation as resolved
Hemmily approved these changes 2026-03-18 09:44:06 +00:00
Dismissed
Stop the elevator
All checks were successful
/ build_and_test (push) Successful in 38s
/ Static Release Build (push) Has been skipped
ba928b3673
Athamantis approved these changes 2026-03-18 13:22:50 +00:00
Hemmily approved these changes 2026-03-18 15:43:19 +00:00
Re-implement old tx recv mechanism
Some checks failed
/ Static Release Build (push) Has been cancelled
/ build_and_test (push) Has been cancelled
25f18b3fd4
Closes #42
sebgab merged commit 6241331df8 into main 2026-03-18 15:53:34 +00:00
sebgab deleted branch feature/elevator-server-crash-resilience 2026-03-18 15:53:34 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
TTK4145/elevator!46
No description provided.