1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-23 16:25:26 +03:00
Commit graph

86 commits

Author SHA1 Message Date
Konstantin Sharlaimov (DigitalEntity)
9b5acb70a9 Fix bug in acc and mag calibration flag logic 2016-12-14 19:31:00 +10:00
Konstantin Sharlaimov (DigitalEntity)
5e95d7d055 Make sensor calibration flags system STATEs; Check for calibration values for ACC and MAG; Block arming if calibration is not done for available sensor; Indicate ARMing blockers in armingFlags; Report armingFlags via MSP_STATUS_EX 2016-12-14 17:41:46 +10:00
Martin Budden
32786b318d Sensor switch statement whitespace fixup 2016-12-13 10:59:38 +00:00
Martin Budden
22ddc2ccf9 Made mpuDetectionResult and mpuConfiguration gyro and acc instance variables 2016-12-12 17:20:37 +00:00
Martin Budden
115b1e76f9 Changed accRead to use accDev_t parameter 2016-12-12 16:04:58 +00:00
Martin Budden
19e2876148 Moved sensor detection into respective sensor module 2016-12-12 11:50:57 +00:00
Konstantin Sharlaimov (DigitalEntity)
15cb87fc0f Basic functions to check if sensors are healthy 2016-12-11 19:07:05 +10:00
Martin Budden
ec70fcae49 Rearranged sensor data into different structs 2016-12-09 16:46:42 +00:00
Martin Budden
14ec437311 Converted to using gyroDev_t and accDev_t as in betaflight 2016-12-06 22:26:42 +00:00
Martin Budden
edf1ef6347 Removed trailing whitespace from .c and .h files 2016-12-01 08:01:46 +00:00
Martin Budden
036810bd46 Optimised alignSensors function 2016-11-29 08:32:46 +00:00
Martin Budden
d9f35dfc79 Reduced and rationalised #includes 2016-11-03 15:56:14 +00:00
Martin Budden
daf9ba7dde Added notch filter from betaflight (#592) 2016-09-14 19:20:55 +03:00
Martin Budden
b45737d3b2 Improved gyro initialisation (#456)
* Improved gyro initialisation
* Fixed acc filter initialisation. Improved detection routines
* Fixed biquad filter initialisation
* Changed gyroSoftLpfHz from int8_t to uint8_t
2016-08-29 13:44:49 +03:00
Martin Budden
944adb06f8 Minor changes to directory structure to reflect changes in Cleanflight and betaflight 2016-08-09 08:19:15 +01:00
Martin Budden
dd770a0fb9 For discussion - updated filters to be more consistent and more efficient (#330)
* Made filters more consistent
* Added pT1 init function. Made FIR filters consistent.
2016-07-06 17:03:27 +10:00
Konstantin Sharlaimov (DigitalEntity)
cf46cf6098 ACC/GYRO: Cleanups. Thanks to @martinbudden for the idea and most of the code 2016-05-09 10:50:47 +10:00
Konstantin Sharlaimov (DigitalEntity)
1ee9e1251d SENSORS: Gyro/accel aligmnet fix 2016-04-12 09:55:22 +10:00
borisbstyle
591c8870cd Fix sensors saturation by converting to int32_t 2016-02-19 14:09:57 +10:00
Konstantin Sharlaimov (DigitalEntity)
11cc82cf41 FILTER: Replace FIR by BiQuad by @borisbstyle. First implementation. Kept PT1 filter as it's used in navigation
FILTER: BiQuad filter optimisations

FILTER: BiQuad filtering fix for REWRITE PID controller. Divide delta by dT before filtering to reduce delta noise caused by dT jitter and make things more correct from DSP point of view
2016-02-17 22:39:07 +10:00
digitalentity
34046169c7 An implenentaion of nav-rewrite (squashed commit, November 17th).
Automatic magnetic declination from GPS coordinates (approximate to 1-2 degrees) (disabled)
Accelerometer bias compensation
Quaternion-based Mahony's DCM IMU (implementation by S. Madgwick)
Ability to lock heading to GPS cource for airplanes
Faster acquisition by initial attitude by using higher DCM kP gain on powerup
Changes to mag calibration algorithm (@HaukeRa's code). Compass calibration now independent from align_mag.
Changed acc calibration to proper 3-axis offset calculation code (same code as for mag). Changed board alignment angles to decidegrees (configurator incompatibility). Removed accelerometer trims (values passed thru MSP are ignored). Accel trim stick combo now adjusts board alignment directly (real-time, without reboot). Removed inflight acc calibration.
FIR filter implementation for different looptimes. Option gyro_cut_hz replaced with gyro_fir_enable (default gyro_soft_filter=3 preset - a very pessimistic filter with fairly large delay but low cutoff frequency for large or very noisy copters)
iNav-related PIDs renamed in CLI to avoid re-usage of old values when restoring config dumps.
PID with back-calculation and I-term anti-windup. Smarter max acceleration and jerk limiting
Initial support for airplane navigation. ALTHOLD, POSHOLD (circular loiter around the waypoint) and RTH should work. UNTESTED! RTH altitude probably needs some work. Autolanding will NOT function at the moment - the AUTOLAND phase will never complete. Absolutely no throttle control at the moment (fully manual control).
Increase delay for bmp085 baro detection. Resolves an issue with bmp085 not being detected sometimes on powerup
Fixed the missing checks for MIXER_CUSTOM_AIRPLANE
Lots of small fixes
2015-11-17 15:19:46 +10:00
Dominic Clifton
c6f5b98a79 Improve failure LED status flashing. Now users can identify and report
hardware failures by counting the number of long flashes.

Fix up sensor read API so that code that uses sensors can detect
malfunctions.

If a failure mode occurs in a debug mode the code reboots the system
rather than rebooting to the bootloader.
2015-09-12 01:33:19 +01:00
E Thomas
f02d7403af Port of refactored beeper code 181_1
This the "Port of refactored beeper code #669" modification applied to
version 1.8.1 (4/4/2015) of the code.
2015-04-04 17:54:44 -04:00
Dominic Clifton
1de72b11ce Update the cli status command to show all detected sensors (Except on
CJMCU).

Further cleanup of sensor initialisation.
2015-02-19 21:08:30 +00:00
Dominic Clifton
c45efac812 Cleanup sensor detection. Less code required and a similar pattern is used for each type of sensor. 2015-02-19 16:15:14 +00:00
Dominic Clifton
53406a7ac7 Relocate some structures and code to the right places.
This cleans up the include file order somewhat and fixes a couple of
dependencies.

The goal of this is to rename flight.c/flight.h to pid.c/pid.h.
2015-01-31 23:47:51 +01:00
Dominic Clifton
183c5f8e16 Add MPU9150 mag support and mag autodetection. Add AK8975 mag driver.
Note: not working on the sparky, MPU9150 needs passthough enabling but
when enabled the mag and gyro won't ack on the default addresses.  Needs
further investigation.
2014-12-21 23:40:48 +00:00
Dominic Clifton
367eb79bd0 Add battery warning beeper. Update MSP_MISC/MSP_SET_MISC.
Note the old beeper was essentially 'battery critical'.
2014-12-19 22:16:47 +00:00
Dominic Clifton
b2db6b3b80 Beep when adjustments are made. (very short = adjust downwards, short =
adjust upwards).
2014-10-24 18:48:55 +01:00
Dominic Clifton
a92b148557 update some comment typos in sensors/acceleration.c 2014-10-24 18:35:59 +01:00
Dominic Clifton
d60183d91d Normalize all the line endings 2014-09-15 23:40:17 +01:00
Dominic Clifton
8ebdb245c2 Instead of copying a profile from the master config into memory again,
just use it in-place.  This saves ~308bytes of memory.

Prior to this there were 4 profiles in ram all the time, the 3 main
profiles and a copy of one of them.

This commit was aided by a side effect of the work done to clean up the
output of the cli dump command since it is now easy to conditionally
apply the changes to the memory addressed used to read/write cli
variables.  See 8c3a869251.
2014-08-22 21:53:23 +01:00
Dominic Clifton
9afcb20b7e Cleanup mismatch of buzzer/beeper terminology. Beep and Beeper should
be used from now on.
2014-06-21 23:32:58 +01:00
Dominic Clifton
e867af8c4b Correct project name in GPL notices. 2014-06-05 00:47:47 +01:00
Dominic Clifton
0bbcd6570f Updated source files to include the GPL v3 notices. Include a copy of
the GPL v3.
2014-06-04 16:48:23 +01:00
Dominic Clifton
d19a5e7046 Cleanup project structure. Update unit test Makefile to place object
files in obj/test
2014-05-31 22:43:06 +01:00
Renamed from src/sensors_acceleration.c (Browse further)