Skip to content

Commit 0ff578e

Browse files
committed
removed redundant lib files
Signed-off-by: addrian-77 <lunguadrian30@gmail.com>
1 parent 943ec9c commit 0ff578e

29 files changed

Lines changed: 65 additions & 67 deletions

File tree

process-console/src/legacy/lib.rs

Lines changed: 0 additions & 4 deletions
This file was deleted.

process-console/src/legacy/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
pub mod lib;
1+
pub fn run() {
2+
// TODO
3+
panic!();
4+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

process-console/src/pconsole/lib.rs

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,34 @@
1-
pub mod lib;
1+
// Licensed under the Apache License, Version 2.0 or the MIT License.
2+
// SPDX-License-Identifier: Apache-2.0 OR MIT
3+
// Copyright OXIDOS AUTOMOTIVE 2024.
4+
5+
mod board;
6+
mod state_store;
7+
mod termination;
8+
mod ui_management;
9+
10+
use state_store::StateStore;
11+
use termination::{create_terminator, Interrupted};
12+
use ui_management::UiManager;
13+
14+
pub async fn run() -> anyhow::Result<()> {
15+
let (terminator, mut interrupt_reader) = create_terminator();
16+
let (state_store, state_reader) = StateStore::new();
17+
let (ui_manager, action_reader) = UiManager::new();
18+
19+
tokio::try_join!(
20+
state_store.main_loop(terminator, action_reader, interrupt_reader.resubscribe()),
21+
ui_manager.main_loop(state_reader, interrupt_reader.resubscribe(),)
22+
)?;
23+
24+
if let Ok(reason) = interrupt_reader.recv().await {
25+
match reason {
26+
Interrupted::UserRequest => println!("Exited per user request"),
27+
Interrupted::OsSignal => println!("Exited because of os signal"),
28+
}
29+
} else {
30+
println!("Exited due to an unexpected error");
31+
}
32+
33+
Ok(())
34+
}
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)