Commit graph

2638 commits

Author SHA1 Message Date
Michael Hope 77f2ae63d5 libs: use the internal versions of sqrtf, powf, atan2f, and acosf.
Newlib calls the __ieee754_* versions and then sets errno based on any
domain errors, which causes the float -> double functions to be pulled
in.  Call them directly instead.

Signed-off-by: Michael Hope <mlhx@google.com>
2015-05-14 22:08:57 +02:00
Michael Hope 7e1fb81228 serial_cli: use the reentrant version of strtok().
Newlib's strtok() allocates memory and causes malloc() to be linked
in.  Use the explicitly reentrant version instead.

Signed-off-by: Michael Hope <mlhx@google.com>
2015-05-14 22:07:21 +02:00
Michael Hope 17bbf7d442 autotune: switch from round to roundf.
Prevents a extra promotion to double.

Signed-off-by: Michael Hope <mlhx@google.com>
2015-05-14 22:06:19 +02:00
Michael Hope ba9f272f1c build: use __ieee754_sqrtf instead of the Newlib sqrtf.
To be compliant, Newlib's sqrtf calls __ieee754_sqrtf and then sets
errno if there's an argument error.  This test also casts the value to
double causing more of the double support functions to be linked in.

Skip the extra tests and call __ieee754_sqrtf directly.

Signed-off-by: Michael Hope <mlhx@google.com>
2015-05-14 20:47:48 +02:00
Michael Hope f53c9abd6e various: mark constants as float.
This patch fixes three cases where a constant is silently promoted to
double.  Saves 132 bytes.

Signed-off-by: Michael Hope <mlhx@google.com>
2015-05-14 20:38:11 +02:00
Michael Hope 813d756ee8 build: build with -ffast-math
-ffast-math lets the compiler perform extra optimisations such a
 converting *float / constant) to the very similar but not bitwise exact
 (float * (1 / constant)).

This saves 136 bytes.

Signed-off-by: Michael Hope <mlhx@google.com>
2015-05-14 20:32:24 +02:00
Dominic Clifton e69e999bdc Merge pull request #862 from borisbstyle/tpa-feature
PID1 and PID2 TPA Support Added
2015-05-14 19:24:10 +01:00
Dominic Clifton 77217f23a7 Merge pull request #816 from DaTwo/RSSI-Invert-Patch
Inverted RSSI PPM / PWM (EZUHF) CLI Option
2015-05-14 19:20:28 +01:00
Dominic Clifton b0a5264df0 Merge branch 'sherlockflight-tricopter-yaw-docs' 2015-05-14 19:19:14 +01:00
Dominic Clifton f12d5806a0 Merge branch 'tricopter-yaw-docs' of git://github.com/sherlockflight/cleanflight-dev into sherlockflight-tricopter-yaw-docs
Conflicts:
	docs/Controls.md
2015-05-14 19:18:55 +01:00
Dominic Clifton 004f44108e Merge pull request #839 from SteveAmor/MPU6050_PLL_Settling_Time
Added MPU6050 PLL Settling Time delay
2015-05-14 19:12:50 +01:00
Nicholas Sherlock b739a57ea2 Fix array bounds overrun in Blackbox logging 2015-05-14 13:11:58 +12:00
borisbstyle f1a490b6ba Added PIDweight to header file 2015-05-12 23:39:51 +02:00
Nicholas Sherlock e6a40d732d Add logging for raw sonar data 2015-05-12 18:37:56 +12:00
Dominic Clifton 948d39a20c Merge pull request #871 from SteveAmor/yaw_expo_curve_correction
Corrected YAW_LOOKUP_LENGTH
2015-05-11 11:39:21 +01:00
Steveis 57735857b4 Corrected YAW_LOOKUP_LENGTH 2015-05-11 11:18:16 +01:00
borisbstyle 4ec28b8cce Removed TPA from Yaw axis and Changed variable name
PIDscaler changed to PIDweight as it suits better and is more
understandable as it is percentage of the PID's used.
Yaw TPA is removed as I don't find it necessary after more testing
2015-05-11 09:18:05 +02:00
borisbstyle 174cf545b1 Simplify errorGyroIf[axis] formula 2015-05-09 12:31:03 +02:00
borisbstyle 5dee66fee9 More commented 2015-05-09 02:08:52 +02:00
borisbstyle d6cb6a34e7 Added comment 2015-05-09 02:05:44 +02:00
borisbstyle 2d66191db1 PID Tuning DOC adjusted 2015-05-09 01:42:19 +02:00
borisbstyle 573146788b PID1 and PID2 TPA Implementation
PIDscaler is used to scale down the pids conforming TPA calculation
2015-05-09 00:52:18 +02:00
Dominic Clifton fe40472050 Remove magic number from MSP_SERVO_CONF. 2015-05-08 18:54:20 +01:00
Dominic Clifton 834347f1a7 Merge pull request #863 from MJ666/AlienWii_VBAT
AlienWii F1 VBAT fix
2015-05-08 16:13:05 +01:00
Michael Jakob e2f43a4339 AlienWii F1 VBAT fix
AlienWii F1 variants don't have an voltage divider. Disable feature
VBAT.
2015-05-08 17:03:53 +02:00
borisbstyle 7f69537f86 PID1 TPA Implementation 2015-05-08 15:20:53 +02:00
DaTwo 7530fe0f4a Update Rssi.md 2015-05-07 07:11:09 -07:00
Dominic Clifton 69292fc966 FrSky GPS code size and de-duplication improvements.
I noticed this after merging 593db0ce1e.

If the telemetry screen shows no fix when the fix is lost then perhaps
the intention was to make localGPS_coord static in the original code,
but if GPS_coord retains it's value when a fix is lost then this is ok,
please test!
2015-05-07 13:51:03 +01:00
Dominic Clifton 4f752ea946 Merge pull request #854 from samcook/no-gps-define-fix
Fix compilation errors when GPS is not #defined
2015-05-07 13:42:49 +01:00
DaTwo 38308020a1 Update rx.c 2015-05-07 04:47:03 -07:00
DaTwo 862169807f Update Cli.md
Updated CLI command in docs.
2015-05-07 04:46:59 -07:00
DaTwo ce3b5c0984 Update config.c 2015-05-07 04:46:54 -07:00
DaTwo ade7887f7a Update serial_cli.c 2015-05-07 04:20:33 -07:00
DaTwo 278a682f98 Update rx.h 2015-05-07 04:20:27 -07:00
DaTwo 98a9826bdf Update rx.c 2015-05-07 04:20:20 -07:00
ProDrone 54ef6f68a9 Fix AlienWiiF3 target
Copied the missing #define block from /src/main/drivers/serial_uart_stm32f30x.c to target.h
Please check if i did it right.
2015-05-07 10:30:57 +01:00
Dominic Clifton a3a51c561a Merge pull request #857 from borisbstyle/api-version
Bump API version to 1.10 due to RC Yaw Expo
2015-05-07 10:26:13 +01:00
borisbstyle 083a534273 Bump API version to 1.10 due to RC Yaw Expo 2015-05-07 10:59:34 +02:00
Dominic Clifton 80beb9c8d8 SPRacingF3/Naze32 Rev 5 - Add support for MAG data ready EXTI handler. 2015-05-07 09:40:35 +01:00
Sam Cook 593db0ce1e Fix compilation errors when GPS is not #defined 2015-05-07 02:16:21 +01:00
Dominic Clifton 4a22227b60 Bump config storage version need for new yaw expo setting.
See da8bb6f6fc.
2015-05-06 22:46:13 +01:00
Dominic Clifton b8312f8678 Fix unused variable compiler warnings for Olimexino and SPRacingF3
targets - warning introduced in e0af5f41ef
2015-05-06 22:34:05 +01:00
Dominic Clifton cfb55516fc Fix sparky build, also broken in
c0aec95e14
2015-05-06 22:32:16 +01:00
Dominic Clifton f5bfe1ce83 Fix MSP_RC_TUNING and MSP_SET_RC_TUNING to cater for rcYawExpo 2015-05-06 22:27:48 +01:00
borisbstyle da8bb6f6fc Yaw Expo Feature 2015-05-06 22:23:40 +01:00
Dominic Clifton 5bf687a150 Fix CheBuzzF3 target, broken in c0aec95e14 2015-05-06 22:20:51 +01:00
Dominic Clifton e0af5f41ef Merge pull request #697 from Supersopp/sonar_and_ADC_current_sensor
Updates sonar so that it can be used together with ADC current meter
2015-05-06 22:14:52 +01:00
Dominic Clifton 62e2b557b5 SPRacingF3 - Enable Blackbox feature and use on-board flash by default.
Ensures that every maiden flight is logged unless user specifically
disables blackbox logging.
2015-05-06 22:02:14 +01:00
Dominic Clifton ee1d5a9a38 SPRacingF3 - Swapping RC3/4 for production boards. 2015-05-06 21:39:16 +01:00
Dominic Clifton b04be157b1 SPRacingF3 - Allow Sonar and Parallel PWM (drops 2 input channels).
Naze32 - Fix initialisation of outputs 5/6 when Parallel PWM and
Sonar are used together with a mixer that needs more than 4 motors.
2015-05-06 21:33:34 +01:00