Miscellanious fixes #32

Merged
sebgab merged 74 commits from seb-fixes into main 2026-03-08 10:14:20 +00:00
Owner
No description provided.
Make get_floor_destination not spammy
All checks were successful
/ build_and_test (push) Successful in 25s
/ Static Release Build (push) Has been skipped
e4647ebd43
Revert helle's magic number as it doesn't work on real elevators
All checks were successful
/ build_and_test (push) Successful in 25s
/ Static Release Build (push) Has been skipped
c159fb8c6a
Change order of operations
Some checks failed
/ build_and_test (push) Failing after 23s
/ Static Release Build (push) Has been skipped
02d4964f96
Move mutable changes out of loop
All checks were successful
/ build_and_test (push) Successful in 25s
/ Static Release Build (push) Has been skipped
6ab8b13d16
Move stuff out of loops
All checks were successful
/ build_and_test (push) Successful in 25s
/ Static Release Build (push) Has been skipped
007c3a2661
Print notification value
All checks were successful
/ build_and_test (push) Successful in 25s
/ Static Release Build (push) Has been skipped
f0684f1677
Clarify log message
All checks were successful
/ build_and_test (push) Successful in 26s
/ Static Release Build (push) Has been skipped
547518413c
Change update order of operations
All checks were successful
/ build_and_test (push) Successful in 26s
/ Static Release Build (push) Has been skipped
cc6cf86792
Remove unwrap that caused the program to crash
All checks were successful
/ build_and_test (push) Successful in 25s
/ Static Release Build (push) Has been skipped
af4a35e248
Remove TTL options?
All checks were successful
/ build_and_test (push) Successful in 26s
/ Static Release Build (push) Has been skipped
548f0cc930
Different receive in tx
Some checks failed
/ build_and_test (push) Failing after 23s
/ Static Release Build (push) Has been skipped
fe4352bcd3
Remember to actually return when no message
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
200052d250
Remove spammy log
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
b094df5744
Skip updating calls if we are the source
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
727089c101
Use system time for sync
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
457892f7e0
Do not delete calls
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
fa1bed3f28
Correct error message
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
705739dc47
Make equal time window closer
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
9b233dcca2
Change call deletion logic
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
ef27b4e83c
Add some logging
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
8b9575864a
Change deletion log level
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
c57ede4b23
Change equal window for time
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
68c1ffc65a
Slightly improve call selection logic
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
4b43c8ae59
Fix divide by zero error
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
f11902ef1b
Only look at size of applicable calls
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
ec4c5b8b60
Add recently deleted system
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
466cf39701
It is _time_ to try again
Some checks failed
/ build_and_test (push) Failing after 16s
/ Static Release Build (push) Has been skipped
057e91dde4
Tihi, make it actually build
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
29cc347c4b
Make deleteable more lenient
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
2509d6bade
Extend time equality window
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
723cec062d
More logging
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
c02bf9d3ee
Add potentially missing return
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
aa2938feb2
Change the time sorting
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
7f48c34d47
Yield TX handler
Some checks failed
/ build_and_test (push) Failing after 23s
/ Static Release Build (push) Has been skipped
d2ca84a08c
Chagne update log
Some checks failed
/ build_and_test (push) Failing after 23s
/ Static Release Build (push) Has been skipped
36e10366cd
Set some very optimistic timeSet some very optimistic time
Some checks failed
/ build_and_test (push) Failing after 24s
/ Static Release Build (push) Has been skipped
30b59e93ae
Make sure it's gone
Some checks failed
/ build_and_test (push) Failing after 23s
/ Static Release Build (push) Has been skipped
41b2e1242e
Better logging
Some checks failed
/ build_and_test (push) Failing after 24s
/ Static Release Build (push) Has been skipped
bf183420d6
Change some log levels
Some checks failed
/ build_and_test (push) Failing after 24s
/ Static Release Build (push) Has been skipped
96c0a2eee9
Remove calls when they are serviced if they meet the criteria
Some checks failed
/ build_and_test (push) Failing after 24s
/ Static Release Build (push) Has been skipped
117e18fb32
Don't skip update just because it is from ourself
Some checks failed
/ build_and_test (push) Failing after 25s
/ Static Release Build (push) Has been skipped
d8ea28366d
Re-introduce rule about all elevators must see call before delete
Some checks failed
/ build_and_test (push) Failing after 24s
/ Static Release Build (push) Has been skipped
9ab31d49c1
Change order of operations
Some checks failed
/ build_and_test (push) Failing after 24s
/ Static Release Build (push) Has been skipped
482fa807f4
Some different logging
Some checks failed
/ build_and_test (push) Failing after 25s
/ Static Release Build (push) Has been skipped
2de3056036
More logging detailign deletion criteria
Some checks failed
/ build_and_test (push) Failing after 24s
/ Static Release Build (push) Has been skipped
11f94dfd2e
Make TX handler less cooperative
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
0f0f52cdf1
Add some deletion delay
Some checks failed
/ build_and_test (push) Has been cancelled
/ Static Release Build (push) Has been cancelled
8149644c44
No notifications :c
Some checks failed
/ build_and_test (push) Failing after 25s
/ Static Release Build (push) Has been skipped
3fae060e16
Get as mut ref when updating
Some checks failed
/ build_and_test (push) Failing after 25s
/ Static Release Build (push) Has been skipped
af87f6db63
Wrap in get as mut ref for update
Some checks failed
/ build_and_test (push) Failing after 24s
/ Static Release Build (push) Has been skipped
4ab736e8ba
Change last update for call to only change for notable updates
Some checks failed
/ build_and_test (push) Failing after 27s
/ Static Release Build (push) Has been skipped
c9dc3734ba
Change some time logic
Some checks failed
/ build_and_test (push) Failing after 25s
/ Static Release Build (push) Has been skipped
855290bb95
Lotsa loggin
Some checks failed
/ build_and_test (push) Failing after 24s
/ Static Release Build (push) Has been skipped
9030752224
Add auhorotiy check to call updates
Some checks failed
/ build_and_test (push) Failing after 25s
/ Static Release Build (push) Has been skipped
da1205ae34
Re-introduce the waiting before deleting a call
Some checks failed
/ build_and_test (push) Failing after 23s
/ Static Release Build (push) Has been skipped
78d35f7ad5
Update time window
Some checks failed
/ build_and_test (push) Failing after 23s
/ Static Release Build (push) Has been skipped
8e5647cd04
Change newer than comparison
Some checks failed
/ build_and_test (push) Failing after 23s
/ Static Release Build (push) Has been skipped
cd27e749b7
Make TX self notify to re-try on failure
Some checks failed
/ build_and_test (push) Failing after 21s
/ Static Release Build (push) Has been skipped
9cce575bfb
Change TX handler sync notification
Some checks failed
/ build_and_test (push) Failing after 21s
/ Static Release Build (push) Has been skipped
7679b8c487
Change sending interval delay
Some checks failed
/ build_and_test (push) Failing after 21s
/ Static Release Build (push) Has been skipped
f16353a957
Change applicable call logic to take "not done" calls
Some checks failed
/ build_and_test (push) Failing after 20s
/ Static Release Build (push) Has been skipped
da649b3b0f
Prioritize new calls
Some checks failed
/ build_and_test (push) Failing after 21s
/ Static Release Build (push) Has been skipped
1d627732e3
Remove spammy log
Some checks failed
/ build_and_test (push) Failing after 20s
/ Static Release Build (push) Has been skipped
c18a96da00
Create is_valid function in CallView
Some checks failed
/ build_and_test (push) Failing after 17s
/ Static Release Build (push) Has been skipped
ca88f5b3a8
Fix failing tests
All checks were successful
/ build_and_test (push) Successful in 25s
/ Static Release Build (push) Has been skipped
21eb580117
Merge branch 'main' into seb-fixes
All checks were successful
/ build_and_test (push) Successful in 25s
/ Static Release Build (push) Has been skipped
19ff744d33
Remove todo
All checks were successful
/ build_and_test (push) Successful in 26s
/ Static Release Build (push) Has been skipped
0e9b78b89c
Remove memory leak
All checks were successful
/ build_and_test (push) Successful in 26s
/ Static Release Build (push) Has been skipped
0c5699ac71
Remove extranoius comments
All checks were successful
/ build_and_test (push) Successful in 26s
/ Static Release Build (push) Has been skipped
d8c3bfa3e4
sebgab changed title from WIP: Miscellanious fixes to Miscellanious fixes 2026-03-08 09:24:45 +00:00
Author
Owner

Closes #8 #4 #28

Closes #8 #4 #28
Athamantis requested changes 2026-03-08 09:49:36 +00:00
Dismissed
@ -30,4 +36,2 @@
move_elevator(system_state.clone(), &mut elevator.clone(), direction).await;
current_floor_option = {
let state = system_state.read().unwrap();
Owner

image

![image](/attachments/64c99ca8-8124-4eaa-b723-0de98a588401)
1.3 MiB
sebgab marked this conversation as resolved
@ -176,3 +202,3 @@
match system_state.write().unwrap().start_servicing_call() {
Ok(_) => {
debug!("Succsessfully started servicing call");
trace!("Successfully started servicing call");
Owner

ah! at du våger!
(trenger ikke å endres)

ah! at du våger! (trenger ikke å endres)
Author
Owner

image

![image](/attachments/3afae622-796a-4f3a-b40b-14f72f63b3f5)
767 KiB
sebgab marked this conversation as resolved
@ -52,3 +52,3 @@
let elev_num_floors = 4;
let elevator = elev::Elevator::init("localhost:3113", elev_num_floors)
let elevator = elev::Elevator::init("localhost:15657", elev_num_floors)
Owner

02cry

02cry
Author
Owner

image

![image](/attachments/46829392-002a-48fb-8060-e8e5e60586c1)
1.4 MiB
sebgab marked this conversation as resolved
@ -29,0 +28,4 @@
tokio::task::yield_now().await;
match sync_notification_rx.try_recv() {
Ok(_) => return,
Err(_) => {}
Owner

ignoring error?

ignoring error?
Author
Owner

Added explanatory comment.

try_recv() errors if there is nothing to receive, which is the most common case. As such we just retry agiain.

Added explanatory comment. `try_recv()` errors if there is nothing to receive, which is the most common case. As such we just retry agiain.
sebgab marked this conversation as resolved
@ -29,0 +37,4 @@
// of time has passed.
tokio::select! {
_ = recv(sync_notification_rx) => {
trace!("TX due to notification");
Owner

TX -> transmitting packets due to ---

TX -> transmitting packets due to ---
Author
Owner

Changed TX to "Transmitting"

Changed TX to "Transmitting"
sebgab marked this conversation as resolved
@ -49,3 +49,3 @@
doorstate_reciever: &mut mpsc::UnboundedReceiver<DoorState>,
) {
trace!("INFO: Awating message.");
trace!("Awating message.");
Owner

og du lurte på hvorfor jeg endret dine kommentar leveler...

og du lurte på hvorfor jeg endret dine kommentar leveler...
Author
Owner

image

![image](/attachments/f5179b67-4355-4cee-9b68-d2b650700158)
165 KiB
sebgab marked this conversation as resolved
@ -56,0 +84,4 @@
.duration_since(v.to_owned())
.unwrap();
if should_dete {}
Owner

?
nothing here
and plz should_dete??
add docks comment, and does this do anything?

? nothing here and plz should_dete?? add docks comment, and does this do anything?
sebgab marked this conversation as resolved
Add explanatory comment
All checks were successful
/ build_and_test (push) Successful in 25s
/ Static Release Build (push) Has been skipped
70fd91e176
Remove TX shorthand in logging
All checks were successful
/ build_and_test (push) Successful in 26s
/ Static Release Build (push) Has been skipped
5d6ca57cf2
Fix clean_up_recently_deleted implementation
All checks were successful
/ build_and_test (push) Successful in 26s
/ Static Release Build (push) Has been skipped
323153697c
Athamantis approved these changes 2026-03-08 10:13:02 +00:00
Athamantis left a comment
Owner

lgtm
image

lgtm ![image](/attachments/9056d169-872b-4832-a7ab-92220baa167e)
754 KiB
sebgab merged commit 7381da4c28 into main 2026-03-08 10:14:20 +00:00
sebgab deleted branch seb-fixes 2026-03-08 10:14:20 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 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!32
No description provided.