@@ -74,6 +74,18 @@ struct Options {
7474 #[ arg( long, conflicts_with = "history_expire" ) ]
7575 no_history_expire : Option < bool > ,
7676
77+ /// How long to keep aircraft visible in interactive mode (in seconds), 0 for no expiration
78+ #[ arg(
79+ long,
80+ default_value = "30" ,
81+ conflicts_with = "no_interactive_expire"
82+ ) ]
83+ interactive_expire : Option < u64 > ,
84+
85+ /// Disable interactive mode aircraft expiration
86+ #[ arg( long, conflicts_with = "interactive_expire" ) ]
87+ no_interactive_expire : Option < bool > ,
88+
7789 /// Downlink formats to select for stdout, file output and history in REST API (keep empty to select all)
7890 #[ arg( long, value_name = "DF" ) ]
7991 df_filter : Option < Vec < u16 > > ,
@@ -194,6 +206,17 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
194206 options. history_expire = Some ( history_expire) ;
195207 }
196208 }
209+ if cli_options. no_interactive_expire . is_some_and ( |x| x) {
210+ options. interactive_expire = Some ( 0 ) ;
211+ } else if let Some ( interactive_expire) = cli_options. interactive_expire {
212+ if interactive_expire == 30
213+ && cli_options. no_interactive_expire . is_some_and ( |x| x)
214+ {
215+ options. interactive_expire = Some ( 0 ) ;
216+ } else {
217+ options. interactive_expire = Some ( interactive_expire) ;
218+ }
219+ }
197220 if cli_options. df_filter . is_some ( ) {
198221 options. df_filter = cli_options. df_filter ;
199222 }
@@ -341,6 +364,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
341364 width,
342365 is_search_mode : false ,
343366 search_query : "" . to_string ( ) ,
367+ interactive_expire : options. interactive_expire . unwrap_or ( 30 ) ,
344368 } ) ) ;
345369 let app_dec = app_tui. clone ( ) ;
346370 let app_web = app_tui. clone ( ) ;
@@ -583,6 +607,7 @@ pub struct Jet1090 {
583607 width : u16 ,
584608 is_search_mode : bool ,
585609 search_query : String ,
610+ interactive_expire : u64 ,
586611}
587612
588613#[ derive( Debug , Default , PartialEq ) ]
0 commit comments