File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -293,13 +293,17 @@ bool AP_NavEKF_Source::usingGPS() const
293
293
}
294
294
295
295
// true if some parameters have been configured (used during parameter conversion)
296
- bool AP_NavEKF_Source::any_params_configured_in_storage () const
296
+ bool AP_NavEKF_Source::configured_in_storage () const
297
297
{
298
- return _source_set[0 ].posxy .configured_in_storage () ||
299
- _source_set[0 ].velxy .configured_in_storage () ||
300
- _source_set[0 ].posz .configured_in_storage () ||
301
- _source_set[0 ].velz .configured_in_storage () ||
302
- _source_set[0 ].yaw .configured_in_storage ();
298
+ // first source parameter is used to determine if configured or not
299
+ return _source_set[0 ].posxy .configured_in_storage ();
300
+ }
301
+
302
+ // mark parameters as configured in storage (used to ensure parameter conversion is only done once)
303
+ void AP_NavEKF_Source::mark_configured_in_storage ()
304
+ {
305
+ // save first parameter's current value to mark as configured
306
+ return _source_set[0 ].posxy .save (true );
303
307
}
304
308
305
309
// returns false if we fail arming checks, in which case the buffer will be populated with a failure message
Original file line number Diff line number Diff line change @@ -82,8 +82,11 @@ class AP_NavEKF_Source
82
82
// true if any source is GPS
83
83
bool usingGPS () const ;
84
84
85
- // true if any primary source parameters have been configured (used for parameter conversion)
86
- bool any_params_configured_in_storage () const ;
85
+ // true if source parameters have been configured (used for parameter conversion)
86
+ bool configured_in_storage () const ;
87
+
88
+ // mark parameters as configured in storage (used to ensure parameter conversion is only done once)
89
+ void mark_configured_in_storage ();
87
90
88
91
// returns false if we fail arming checks, in which case the buffer will be populated with a failure message
89
92
bool pre_arm_check (char *failure_msg, uint8_t failure_msg_len) const ;
You can’t perform that action at this time.
0 commit comments