-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added inertial sensor consistency checking for LUA access #26162
Added inertial sensor consistency checking for LUA access #26162
Conversation
93ceb66
to
06d1beb
Compare
06d1beb
to
ff2dcf2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing in the threshold is a a little odd because it updates the last_pass_ms
. This means a script could block arming if it kept checking with a smaller threshold.
I think the IMU method should be a const pass/fail with threshold. The caller (arming or scripting) can then do the time consistency bit.
You could always get round the same problem by hard coding the threshold of course.
I think there are enough bindings that this check could be done 100% in the scripting?
fd52c1c
to
a32e2a8
Compare
a32e2a8
to
c880372
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but needs a rebase.
Move the accel_consistent and gyro_consistent methods from AP_Arming to AP_IntertialSensor
Move the accel_consistent and gyro_consistent methods from AP_Arming to AP_IntertialSensor
Added the accels_consistent and gyros_consistent methods to the lua bindings
c880372
to
2b332ac
Compare
Rebased. |
Added ins:gyros_consistent(threshold, consistency_seconds) and ins:accels_consistent(threshold, consistency_seconds) for access to LUA for our testing requirements.
With this i also moved ins_accels_consistent and ins_gyros_consistent from AP_Arming to AP_IntertialSensor as i feel that this makes more sense. If this was still in AP_Arming you would need to pass the ins to the function via scripting which i'm not entirely sure how to do.
I also added the threshold and consistency_seconds to be parameters as they were hard coded previously and we need to be sensitive via scripting.