File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,7 @@ impl NavigationManager {
67
67
NavigationManager :: get_instance ( ) . lock ( ) . unwrap ( ) . datalogger = Some (
68
68
thread:: Builder :: new ( )
69
69
. name ( "Datalogger" . into ( ) )
70
- . spawn ( move || {
71
- NavigationManager :: data_logger ( refresh_interval, file_path)
72
- } )
70
+ . spawn ( move || NavigationManager :: data_logger ( refresh_interval, file_path) )
73
71
. expect ( "Error: Navigator service: Datalogger can't setup thread" ) ,
74
72
)
75
73
}
@@ -111,7 +109,7 @@ impl NavigationManager {
111
109
112
110
if refresh_interval_us > time_elapsed {
113
111
let wait = refresh_interval_us. wrapping_sub ( time_elapsed) ;
114
- thread:: sleep ( std:: time:: Duration :: from_micros ( wait as u64 ) ) ;
112
+ thread:: sleep ( std:: time:: Duration :: from_micros ( wait) ) ;
115
113
}
116
114
}
117
115
}
Original file line number Diff line number Diff line change @@ -22,7 +22,11 @@ async fn main() -> std::io::Result<()> {
22
22
log:: info!( "starting datalogger..." ) ;
23
23
hardware_manager:: init_datalogger (
24
24
datalogger_settings. interval ,
25
- format ! ( "{}/{}" , datalogger_settings. directory, datalogger_settings. filename) . into ( )
25
+ format ! (
26
+ "{}/{}" ,
27
+ datalogger_settings. directory, datalogger_settings. filename
28
+ )
29
+ . into ( ) ,
26
30
) ;
27
31
}
28
32
You can’t perform that action at this time.
0 commit comments