Skip to content

Commit 78d5a10

Browse files
committed
rename data_receiver
1 parent 24f7659 commit 78d5a10

5 files changed

Lines changed: 10 additions & 13 deletions

File tree

crates/behavior/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pub mod data_receiver;
1+
pub mod timer;
22
pub mod walk_to_ball;
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
use std::time::{Duration, SystemTime, UNIX_EPOCH};
1+
use std::{thread::sleep, time::{Duration, SystemTime, UNIX_EPOCH}};
22

33
use color_eyre::Result;
44
use context_attribute::context;
55
use framework::MainOutput;
66
use hardware::TimeInterface;
77
use serde::{Deserialize, Serialize};
8-
use tokio::time::sleep;
98
use types::cycle_time::CycleTime;
109

1110
#[derive(Deserialize, Serialize)]
12-
pub struct DataReceiver {
11+
pub struct Timer {
1312
last_cycle_start: SystemTime,
1413
}
1514

@@ -26,7 +25,7 @@ pub struct MainOutputs {
2625
pub cycle_time: MainOutput<CycleTime>,
2726
}
2827

29-
impl DataReceiver {
28+
impl Timer {
3029
pub fn new(_context: CreationContext) -> Result<Self> {
3130
Ok(Self {
3231
last_cycle_start: UNIX_EPOCH,

crates/hulk_manifest/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,18 +118,17 @@ pub fn collect_hulk_cyclers(root: impl AsRef<Path>) -> Result<Cyclers, Error> {
118118
name: "Behavior",
119119
kind: CyclerKind::Perception,
120120
instances: vec![""],
121-
setup_nodes: vec!["behavior::data_receiver"],
121+
setup_nodes: vec!["behavior::timer"],
122122
nodes: vec!["behavior::walk_to_ball"],
123123
execution_time_warning_threshold: Some(Duration::from_secs_f32(1.0 / 83.0)),
124124
},
125125
CyclerManifest {
126126
name: "World_state",
127127
kind: CyclerKind::Perception,
128128
instances: vec![""],
129-
setup_nodes: vec!["world_state::data_receiver"],
129+
setup_nodes: vec!["world_state::timer"],
130130
nodes: vec![
131131
"world_state::ball_filter",
132-
"world_state::ball_state_composer",
133132
],
134133
execution_time_warning_threshold: Some(Duration::from_secs_f32(1.0 / 83.0)),
135134
},

crates/world_state/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
pub mod ball_filter;
2-
pub mod data_receiver;
2+
pub mod timer;
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
use std::time::{Duration, SystemTime, UNIX_EPOCH};
1+
use std::{thread::sleep, time::{Duration, SystemTime, UNIX_EPOCH}};
22

33
use color_eyre::Result;
44
use context_attribute::context;
55
use framework::MainOutput;
66
use hardware::TimeInterface;
77
use serde::{Deserialize, Serialize};
8-
use tokio::time::sleep;
98
use types::cycle_time::CycleTime;
109

1110
#[derive(Deserialize, Serialize)]
12-
pub struct DataReceiver {
11+
pub struct Timer {
1312
last_cycle_start: SystemTime,
1413
}
1514

@@ -26,7 +25,7 @@ pub struct MainOutputs {
2625
pub cycle_time: MainOutput<CycleTime>,
2726
}
2827

29-
impl DataReceiver {
28+
impl Timer {
3029
pub fn new(_context: CreationContext) -> Result<Self> {
3130
Ok(Self {
3231
last_cycle_start: UNIX_EPOCH,

0 commit comments

Comments
 (0)