-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
Avoid including AP_InertialSensor.h in headers #28933
Open
peterbarker
wants to merge
18
commits into
ArduPilot:master
Choose a base branch
from
peterbarker:pr/ahrs-no-ins-header
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+56
−32
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
b5461d4
AC_PrecLand: avoid including AP_InertialSensor.h in headers
peterbarker 7c25d68
AP_AHRS: avoid including AP_InertialSensor.h in headers
peterbarker 815c9f9
AP_GyroFFT: avoid including AP_InertialSensor.h in headers
peterbarker 0c9ff58
AP_InertialSensor: avoid including AP_InertialSensor.h in headers
peterbarker 54543f7
APM_Control: avoid including AP_InertialSensor.h in headers
peterbarker ae7d65e
AP_Mount: avoid including AP_InertialSensor.h in headers
peterbarker e99a59f
AP_NavEKF3: avoid including AP_InertialSensor.h in headers
peterbarker fbfc83b
AP_NMEA_Output: avoid including AP_InertialSensor.h in headers
peterbarker 28d8dc3
AP_Soaring: avoid including AP_InertialSensor.h in headers
peterbarker 979fb25
AP_TECS: avoid including AP_InertialSensor.h in headers
peterbarker 775166d
AP_TempCalibration: avoid including AP_InertialSensor.h in headers
peterbarker 551d57c
GCS_MAVLink: avoid including AP_InertialSensor.h in headers
peterbarker c53c01a
RC_Channel: avoid including AP_InertialSensor.h in headers
peterbarker aa40fd7
ArduCopter: avoid including AP_InertialSensor.h in headers
peterbarker 0c780a8
ArduPlane: avoid including AP_InertialSensor.h in headers
peterbarker 21bec4b
ArduSub: avoid including AP_InertialSensor.h in headers
peterbarker dbd5b1d
Blimp: avoid including AP_InertialSensor.h in headers
peterbarker aea6ba4
AP_Module: avoid including AP_InertialSensor.h in headers
peterbarker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,6 @@ | |
#include <AP_HAL/utility/RingBuffer.h> | ||
#include <AP_Param/AP_Param.h> | ||
#include <AP_Math/AP_Math.h> | ||
#include <AP_InertialSensor/AP_InertialSensor.h> | ||
#include <Filter/LowPassFilter.h> | ||
#include <Filter/FilterWithBuffer.h> | ||
|
||
|
@@ -221,9 +220,7 @@ class AP_GyroFFT | |
// whether analysis can be run again or not | ||
bool start_analysis(); | ||
// return samples available in the gyro window | ||
uint16_t get_available_samples(uint8_t axis) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please don't do this, this is in the hot path and inlining helps |
||
return _sample_mode == 0 ?_ins->get_raw_gyro_window(axis).available() : _downsampled_gyro_data[axis].available(); | ||
} | ||
uint16_t get_available_samples(uint8_t axis); | ||
void update_parameters(bool force); | ||
// semaphore for access to shared FFT data | ||
HAL_Semaphore _sem; | ||
|
@@ -358,7 +355,7 @@ class AP_GyroFFT | |
AP_Int8 _num_frames; | ||
// mask of IMUs to record gyro frames after the filter bank | ||
AP_Int32 _options; | ||
AP_InertialSensor* _ins; | ||
class AP_InertialSensor* _ins; | ||
#if DEBUG_FFT | ||
uint32_t _last_output_ms; | ||
EngineState _debug_state; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Simply un-inlining things requires a fair amount of testing, I suggest you don't do that in this PR