1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 05:15:25 +03:00
Commit graph

11 commits

Author SHA1 Message Date
Lukas S
cffdfb782c new Baseflight PID
full gyro scale is used now
and a new pid with float calculations was added based on PIDrewrite
eeprom size was also increased from 1kB to 2kB

Conflicts:

	src/config.c
	src/drivers/accgyro_l3g4200d.c
	src/drivers/accgyro_mpu3050.c
	src/drivers/accgyro_mpu6050.c
	src/flight_imu.c
	src/mw.c
	src/mw.h
	src/serial_cli.c
	src/serial_msp.c
	src/utils.c
	src/utils.h
2014-05-25 15:31:30 +01:00
Dominic Clifton
d6c1ce323d BUGFIX - Warning LED / arm prevention code fixes.
The old code was using f.ACC_CALIBRATED to mean 'flash the warning led'
and 'prevent arming'
There was another flag called f.OK_TO_ARM which really meant 'prevent
arming after failsafe unless using a switch to arm' - this meant the
comment in the code was incorrect since it did not mention the switch.
There was code which every ~71 minutes would set f.ACC_CALIBRATED to
FALSE and would toggle the LED, even when flying.
There was code that was run during every cycle that did not need to be
run when armed.
There was code that was run during every cycle which did not need to be
run when waiting for calibration to finish.
The warning light was toggled regardless of actual accelerometer
calibration state.

This commit fixes all that and prevents the user from arming after a
failsafe landing until the system is reset, regardless of wether a
switch is used to arm or not.

This commit also flashes the warning led during barometer calibration
and will not let you arm until it has completed.

Add a 5 second delay on startup to failsafe to prevent failsafe from
activating in the case of TX/RX gear with long bind procedures before
they send out valid data.

Failsafe now only prevents re-arming if a landing was forced.

In the case when you power on your RX without your TX on the beeper
sounds and failsafe warning ligts are activated.  When the FC then
detects a signal the lights go off and you can then arm.
2014-05-22 22:46:54 +01:00
Dominic Clifton
d352c68c9b Renaming angleInclination_t to rollAndPitchInclination. renamed angle
to inclination.
2014-05-05 17:45:46 +01:00
Dominic Clifton
ddd322fb9f Adding test for the downwards thrust direction logic added in
495c6b8f73.
2014-05-05 17:06:20 +01:00
Dominic Clifton
7af9ca4fdc Cleanup deprecated IMU code by using a union. 2014-04-24 01:13:29 +01:00
Dominic Clifton
bb91b1f560 Remove serial_msp.c's dependency on mw.h/board.h. 2014-04-23 21:38:03 +01:00
Dominic Clifton
fbfb75b24a Remove sensor_acceleration.c's dependency on mw.h/board.h.
In doing so accelerometer sensor and trim code had to be cleaned.
Added a new method to buzzer.c to avoid exposing toggleBeep.
Renamed current_profile to current_profile_index to avoid confusion.
2014-04-22 19:41:46 +01:00
Dominic Clifton
fe89d40fa0 Remove main.c's dependency on mw.h/board.h.
Moved pidControllers out of mw.c into flight_common.c/h.
Moved appropriate code into rc_controls.c/h.
2014-04-22 01:58:23 +01:00
Dominic Clifton
2c80094b0e Remove gps_common.c's dependencies on the mw.h/board.h.
Moved some GPS code from mw.c into gps_common.c.
Moved pid values into a pidProfile_t structure; this was done so that
gps_common.c does not have a dependency on config_profile.h.
pidProfile_t lives in flight_common.h now.
Moved gps profile settings from profile_t into gpsProfile_t for the same
reason.
Removed gps_common.c's dependency on masterConfig_t by passing needed
variables into gpsInit().
2014-04-22 00:37:35 +01:00
Dominic Clifton
e969d184e6 decouple failsafe from the rest of the system.
Note: the pwm_common driver has a dependency on the main failsafe code,
the solution is probably to move some of the code into rx_pwm.
2014-04-21 00:46:16 +01:00
Dominic Clifton
38ec0b6080 Update gpio/ledring drivers so they do not include "board.h". It is now
clear what all gpio/ledring drivers need to compile and what was
unnecessarily included before.
 
In attempting this it was clear that ledring had a dependency on the
multiwii code, this was removed by passing the led status update method
the values it needs.

It also turned out that the ROLL/PITCH defines were coming from
rc_alias_e and much unrelated code is coupled to these defines.  This
commit also includes some cleanups relating to that problem.
2014-04-17 13:56:23 +01:00