@@ -104,6 +104,7 @@ impl StatusBar {
104
104
heartbeat_data. reset ( ) ;
105
105
heartbeat_data. set_port ( shared_state. connection ( ) . name ( ) ) ;
106
106
heartbeat_data. set_version ( shared_state. console_version ( ) ) ;
107
+ heartbeat_data. set_conn_is_file ( shared_state. connection ( ) . is_file ( ) ) ;
107
108
StatusBar { heartbeat_data }
108
109
}
109
110
@@ -291,6 +292,7 @@ pub struct HeartbeatInner {
291
292
ant_status : String ,
292
293
baseline_display_mode : String ,
293
294
baseline_solution_mode : u8 ,
295
+ conn_is_file : bool ,
294
296
current_time : Instant ,
295
297
data_rate : f64 ,
296
298
dgnss_enabled : bool ,
@@ -323,6 +325,7 @@ impl HeartbeatInner {
323
325
ant_status : String :: from ( EMPTY_STR ) ,
324
326
baseline_display_mode : String :: from ( EMPTY_STR ) ,
325
327
baseline_solution_mode : 0 ,
328
+ conn_is_file : false ,
326
329
current_time : Instant :: now ( ) ,
327
330
data_rate : 0.0 ,
328
331
dgnss_enabled : false ,
@@ -374,13 +377,13 @@ impl HeartbeatInner {
374
377
}
375
378
376
379
pub fn pos_llh_update ( & mut self ) {
380
+ self . llh_display_mode = String :: from ( EMPTY_STR ) ;
377
381
if let Some ( last_stime_update) = self . last_stime_update {
378
382
if ( self . current_time - last_stime_update) . as_secs_f64 ( ) < UPDATE_TOLERANCE_SECONDS {
379
- let llh_display_mode = GnssModes :: from ( self . llh_solution_mode ) ;
380
- self . llh_display_mode = llh_display_mode. pos_mode ( ) ;
383
+ self . llh_display_mode = GnssModes :: from ( self . llh_solution_mode ) . pos_mode ( ) ;
381
384
self . llh_is_rtk = RTK_MODES . contains ( & ( self . llh_solution_mode as i32 ) ) ;
382
385
if self . ins_used && ( self . llh_solution_mode as i32 ) != DR_MODE {
383
- self . llh_display_mode = format ! ( "{}{}" , llh_display_mode, INS_POSTFIX ) ;
386
+ self . llh_display_mode = format ! ( "{}{}" , self . llh_display_mode, INS_POSTFIX ) ;
384
387
}
385
388
}
386
389
}
@@ -389,7 +392,7 @@ impl HeartbeatInner {
389
392
pub fn baseline_ned_update ( & mut self ) {
390
393
self . baseline_display_mode = String :: from ( EMPTY_STR ) ;
391
394
if let Some ( last_btime_update) = self . last_btime_update {
392
- if self . dgnss_enabled
395
+ if ( self . dgnss_enabled || self . conn_is_file )
393
396
&& ( self . current_time - last_btime_update) . as_secs_f64 ( ) < UPDATE_TOLERANCE_SECONDS
394
397
{
395
398
if let Some ( bsoln_mode) = rtk_mode_dict. get ( & ( self . baseline_solution_mode as i32 ) ) {
@@ -527,6 +530,11 @@ impl Heartbeat {
527
530
. expect ( HEARTBEAT_LOCK_MUTEX_FAILURE )
528
531
. dgnss_enabled = dgnss_enabled;
529
532
}
533
+ pub fn set_conn_is_file ( & self , conn_is_file : bool ) {
534
+ self . lock ( )
535
+ . expect ( HEARTBEAT_LOCK_MUTEX_FAILURE )
536
+ . conn_is_file = conn_is_file;
537
+ }
530
538
pub fn set_version ( & self , version : String ) {
531
539
self . lock ( ) . expect ( HEARTBEAT_LOCK_MUTEX_FAILURE ) . version = version;
532
540
}
0 commit comments