1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 20:35:33 +03:00
Commit graph

56 commits

Author SHA1 Message Date
Dominic Clifton
4a12d00d1e Moving mixer config out of the profile. It doesn't really make sense. 2015-03-09 23:00:44 +00:00
Dominic Clifton
ed434fe47b Use a positive named setting and variable instead of a negative one to
simplify the logic and aid understanding.
2015-03-09 22:50:27 +00:00
Dominic Clifton
acabbf41db Previously, at minimum throttle, the quad would do absolutely no self-leveling
and simply run the motors at constant minthrottle.  This allowed the chance
for the quad to lose control during flight if the throttle was set to minimum,
say, to drop from a high altitude to a lower one.

With this edit, the quad will still self-level at minimum throttle when armed,
allowing for safe decents from altitude.  To prevent motors spinning when
arming/disarming, the yaw input is ignored if the throttle is at minimum and
we're using the sticks to arm/disarm.

Conflicts:
	src/main/flight/mixer.c
2015-03-09 23:44:53 +01:00
Dominic Clifton
1b1163da10 Previously, at minimum throttle, the quad would do absolutely no self-leveling
and simply run the motors at constant minthrottle.  This allowed the chance
for the quad to lose control during flight if the throttle was set to minimum,
say, to drop from a high altitude to a lower one.

With this edit, the quad will still self-level at minimum throttle when armed,
allowing for safe decents from altitude.  To prevent motors spinning when
arming/disarming, the yaw input is ignored if the throttle is at minimum and
we're using the sticks to arm/disarm.

Conflicts:
	src/main/flight/mixer.c

added cli command disable_pid_at_min_throttle

(same as previous)
2015-03-09 23:42:42 +01:00
Dominic Clifton
5e3734946e # This is a combination of 2 commits.
# The first commit's message is:

Previously, at minimum throttle, the quad would do absolutely no self-leveling
and simply run the motors at constant minthrottle.  This allowed the chance
for the quad to lose control during flight if the throttle was set to minimum,
say, to drop from a high altitude to a lower one.

With this edit, the quad will still self-level at minimum throttle when armed,
allowing for safe decents from altitude.  To prevent motors spinning when
arming/disarming, the yaw input is ignored if the throttle is at minimum and
we're using the sticks to arm/disarm.

Conflicts:
	src/main/flight/mixer.c

# This is the 2nd commit message:

added cli command disable_pid_at_min_throttle
2015-03-09 23:36:54 +01:00
Dominic Clifton
b595b49ca8 Decouple roll and pitch rates. MSP clients take note of updated
MSP_RC_TUNING/MSP_SET_RC_TUNING commands.
2015-03-07 15:11:20 +00:00
Dominic Clifton
26bb86898e Updating comment in mixer.c 2015-03-07 14:15:38 +00:00
Ben Hitchcock
97fae94053 Bugfix for 3D inverted flight using a tricopter. The yaw servo now should reverse when the throttle is lower than the midpoint. 2015-03-03 11:47:35 +08:00
Dominic Clifton
05b1b5a9b2 Ensure motor[0] is used, see 46a0054d78 2015-02-26 12:15:15 +00:00
Dominic Clifton
8282bc76d2 Mixer code readability and code size improvement.
Naze target size before: 113412, after: 113388

Closes #551
2015-02-26 12:05:03 +00:00
Dominic Clifton
b9e1283809 Ensure motors are stopped before a reboot. Ensure hard fault handler
doesn't use potentially unitialised data to update the motors.  Pause
for 50ms before rebooting after updating disabling the motors to ensure
the timer hardware and ESCs havea chance to react.

This commit might help with #123
2015-02-23 14:02:47 +00:00
Dominic Clifton
9057d70410 Allow excluding of servo code at compilation time.
This is in preparation for backbox on CJMCU/64k.

Flight tested on CJMCU.
2015-02-22 16:21:03 +00:00
Dominic Clifton
debd72485b Avoid updating servos to servo middle every loop iteration. 2015-02-22 15:21:21 +00:00
Dominic Clifton
a1b01807cf Merge branch 'lowpass' of https://github.com/fusterjj/cleanflight into fusterjj-lowpass
Conflicts:
	src/main/flight/mixer.c
2015-02-22 14:55:04 +00:00
Dominic Clifton
55cac2bdeb Finally rename flight.c/.h to pid.c/.h. Cleanup some dependencies.
Relocate more code.
2015-02-01 00:39:38 +01: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
Joel Fuster
ec946ea7d5 Split filter into separate file for future reuse 2015-01-31 11:46:44 -05:00
Joel Fuster
4f0af41e79 Merge remote-tracking branch 'upstream/master' into lowpass 2015-01-31 10:47:39 -05:00
Dominic Clifton
a2b232e805 Detach midrc (input) from servo center (output).
This fixes incorrect servo center position when midrc was not 1500.
Most likely only experienced by futaba plane or servo/tilt users.
2015-01-27 23:04:41 +01:00
Pierre Hugo
be03ed95fa Renamed min, max and abs macros to MIN MAX and ABS. 2015-01-23 22:40:00 -08:00
Joel Fuster
f5afb74126 motorCount needs to be global 2015-01-10 14:33:52 -05:00
Joel Fuster
62147736b2 Remove unnecessary cast 2015-01-06 20:26:09 -05:00
Joel Fuster
c853f20d75 Disable mixer debug 2015-01-04 22:25:13 -05:00
Joel Fuster
06ce23951b Rename freq parameter; remove UT warnings 2015-01-04 22:15:09 -05:00
Joel Fuster
dc3271255c More unit tests 2015-01-04 22:10:20 -05:00
Joel Fuster
de7fa3f31a Fixed point passes initial unit test 2015-01-04 21:11:40 -05:00
Joel Fuster
fc218ebebc Merge in benchmark changes 2015-01-03 15:01:47 -05:00
Joel Fuster
596da65a87 Interim dev checkin 2015-01-03 14:56:50 -05:00
Joel Fuster
d019fa181d time filter execution 2015-01-03 13:10:05 -05:00
Joel Fuster
64a78f82f8 Interim checkin 2015-01-03 12:25:46 -05:00
Joel Fuster
654c614380 Fix rounding; drive unused servos 2015-01-02 17:47:00 -05:00
Joel Fuster
4bcedab3e9 Clean up lowpass patch 2015-01-02 17:16:55 -05:00
Joel Fuster
a3cc92347b Lowpass filter tested 2015-01-02 16:59:42 -05:00
Joel Fuster
3eee9eb079 Lowpass testing 2015-01-01 19:24:35 -05:00
Joel Fuster
cf40e3231a Add configuration of notch filter
More fine-grained filter freqs
2015-01-01 15:03:40 -05:00
Joel Fuster
ceb4690bef Servo filtering test 2015-01-01 11:56:56 -05:00
Nicholas Sherlock
dfd8e5b2b0 Merge branch 'master' of https://github.com/cleanflight/cleanflight 2014-12-26 11:56:00 +13:00
Dominic Clifton
5e573c4071 Minor mixup cleanups. 2014-12-24 14:52:58 +00:00
Dominic Clifton
ee19c1f071 Rename multiType to mixerMode. Rename MULTITYPE_* to MIXER_*.
'Type' is a noise word.

'Multi' is a mis-nomer - there is nothing 'multi' about a gimbal or
fixed wing.
2014-12-24 11:58:57 +00:00
Dominic Clifton
b123b4ef03 Cleanup disabling of mixers for CJMCU, this might be usefulfor the
AlienWii32 target too.

Deleted old out of date comments.  Various other minor cleanups.
2014-12-24 11:33:14 +00:00
Nicholas Sherlock
1b1a285b4a Syncing with Cleanflight upstream 2014-12-22 23:23:26 +13:00
Dominic Clifton
13305dd2e4 Disable mixer configuration on CJMCU to save flash size. 2014-12-21 23:40:48 +00:00
Dominic Clifton
d605ded161 Adding ATAIL support.
See https://github.com/multiwii/baseflight/pull/192
2014-12-21 14:58:46 +00:00
Nicholas Sherlock
8c41772584 Add Blackbox 0.1.0 2014-12-08 22:06:57 +13:00
Dominic Clifton
e802e2d032 Remove usage of feature() from pwm driver code so that driver code does
not have a dependency on config.c.
2014-12-06 11:39:31 +00:00
Ben Hitchcock
94c5573c39 Allowing oneshot125 functionality to work on a Naze board.
This code has been flight tested, but will have problems on a CC3D board, and also when the looptime is longer than 8200 uS.
2014-11-29 14:06:35 +08:00
Kyle Manna
c806046181 perms: Remove execute bit on source files
* Remove the execute bit on source files.
* No functional change.
2014-11-26 10:13:29 -06:00
Dominic Clifton
c0fd0c1f33 Replace profile.activate and rcOptions with
profile.modeActivationCondition and rcModeActivationMask.

Implementation of using and setting modeActivationConditions is missing.
2014-10-12 10:40:38 +01:00
Dominic Clifton
d60183d91d Normalize all the line endings 2014-09-15 23:40:17 +01:00
Dominic Clifton
3f0754d295 Replace global flags with stateFlags, flightModeFlags and armingFlags.
Each flag was previously a whole byte, now all of the flags only take up
4 bytes as they are represented by bit masks.

This is cleaner because the different kind of flags are now separated.

Additionally this changes the behaviour of arming slightly.  When using
a switch to arm the aircraft will not arm unless the switch has been in
the off state once.  This prevents arming if you power the aircraft with
a low throttle and the switch in the on position.
2014-08-24 12:11:30 +01:00