Commit graph

2712 commits

Author SHA1 Message Date
Dominic Clifton
cb63f6e2b5 Remove telemetry_*.c's dependency on mw.h/board.h.
Finally, the only dependency on mw.h/board.h is now mw.c itself.
2014-04-24 01:44:58 +01:00
Dominic Clifton
7af9ca4fdc Cleanup deprecated IMU code by using a union. 2014-04-24 01:13:29 +01:00
Dominic Clifton
a6c22d2115 BUG FIX - Fixes 3d flight mixer so that it uses midrc
Previously it was using a hardcoded value of 1500.

Without this commit it would mean that any midrc configuration was not
being applied to 3d flight.
2014-04-24 00:59:07 +01:00
Dominic Clifton
695db3523a Remove flight_mixer.c's dependency on mw.h/board.h.
This is a large commit, from the commit it is clear that the mixer has
many dependencies, this is expected since it is central to the
application.

To achieve the decoupling many master config and profile members had to
be moved into structures.

Relocated throttle/pitch curves into rc_curves.c/h since it has nothing
to with rx code, this fixed the dependencies inside the rx provider
files.
2014-04-24 00:18:24 +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
aa84439b21 Disambiguate MAX_MOTORS and MAX_SUPPORTED_MOTORS
Achieved by renaming MAX_MOTORS to MAX_PWM_MOTORS

Disambiguate MAX_MOTORS and MAX_SUPPORTED_SERVOS
Achieved by renaming MAX_SERVOS to MAX_PWM_SERVOS

It now shows there is a dependency on the pwm driver if MAX_PWM_* is
used.

Coupled pwm_common and timer_common by using USABLE_TIMER_CHANNEL_COUNT
since the current pwm driver and timer driver is only usable by the
STM32F103.
2014-04-23 21:04:39 +01:00
Dominic Clifton
a5f0999c26 Remove serial_cli.c's dependency on mw.h/board.h.
Rename yawdeadband to yaw_deadband to match other variables/cli
commands.

Fix a couple of usages of MAX_MOTORS where MAX_SUPPORTED_MOTORS should
be used instead.
2014-04-23 20:42:38 +01:00
Dominic Clifton
bcc55abcc8 relocate comment to variable declaratiion 2014-04-23 19:58:39 +01:00
Dominic Clifton
8422723b15 Latest binaries. 2014-04-23 02:39:51 +01:00
Dominic Clifton
e4c9fb585c Merge remote-tracking branch 'multiwii/master'
Conflicts:
	obj/baseflight.hex
	src/config.c
	src/main.c
	src/mw.c
	src/mw.h
	src/serial_cli.c
2014-04-23 02:38:39 +01:00
Dominic Clifton
11863e5c34 Avoid passing a uint8_t to a gyro method that is only used during gyro
calibration.
Conflicts:

	src/config.c
	src/flight_imu.c
	src/mw.h
	src/sensors.c
	src/serial_cli.c
2014-04-23 02:25:46 +01:00
dongie
5a05de5da7 fixing some typos and inconsistencies in cli/set variable naming. 2014-04-23 09:53:05 +09:00
Dominic Clifton
9d56b4a00f Remove sensor_initialisation.c's dependency on mw.h/board.h.
Extracted sensor alignment variables to sensorAlignmentConfig

This commit marks the end of the sensor dependency cleanup.
2014-04-23 00:41:21 +01:00
Dominic Clifton
e963496263 Remove sensor_compass.c's dependency on mw.h/board.h.
Also changed type of magZero from int16_t[3] to
int16_flightDynamicsTrims_t.
2014-04-23 00:15:55 +01:00
Dominic Clifton
1464b7398a Remove sensor_sonar.c's dependency on mw.h/board.h. 2014-04-23 00:05:11 +01:00
Dominic Clifton
53b7edd843 Add the name of the fork to the output of the cli version command. 2014-04-23 00:01:07 +01:00
Dominic Clifton
e2550ee5e1 Remove sensor_barometer.c's dependency on mw.h/board.h.
This also cleans the code - No magic numbers, clearly defines states,
config variables grouped together, avoiding some global variable use.
2014-04-22 23:46:25 +01:00
Dominic Clifton
c08d0ac1b3 BUGFIX - gyro calibration too short when movement detected during
calibration.

When the model is moved during the gyro calibration period too much the
code that detects the movement (gyroMovementCalibrationThreshold aka
'moron threshold') did not restart the calibration correctly and one too
few calibration cycles were used when restarting.

In addition to this there was unnecessary calibration reset code - the
reset of calibration variables is supposed to happen at the start of
calibration; due to the bug the first calibration cycle could not be
detected when restarting so the old reset code was required. 

This commit also cleans up the Gyro code so the it is in a similar style
to the recently cleaned acceleration code.
2014-04-22 20:39:44 +01:00
Dominic Clifton
db9042757d Remove sensor_gyro.c's dependency on mw.h/board.h. 2014-04-22 20:18:33 +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
treymarc
b14b058fa0 add msp telemtry 2014-04-22 13:48:57 +02:00
Dominic Clifton
1092fa5b40 Latest binaries. 2014-04-22 02:47:08 +01:00
Dominic Clifton
56dc59722a Adding FIXME regarding content of flags_t. 2014-04-22 02:46:14 +01:00
Dominic Clifton
9f26018abd Cleanup baro/mag/gyro/acc method names from old sensors.c 2014-04-22 02:43:39 +01:00
Dominic Clifton
7e76fd6995 Fix OLIMEXINO build (no-baro) 2014-04-22 02:07:11 +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
f8d0dd98f7 Split config_storage.h into config_master.h and config_profile.h to
separate concerns and help reduce and clarify dependencies.

cfg and mcfg are too similarly named and are not obvious.  Renamed cfg
to currentProfile and mcfg to masterConfig.  This will increase source
code line length somewhat but that's ok; lines of code doing too much
are now easier to spot.
2014-04-21 23:08:25 +01:00
Dominic Clifton
dab04de35e Fix typo in readme. 2014-04-21 20:50:09 +01:00
Dominic Clifton
05cce3a87b Latest binaries. 2014-04-21 20:37:33 +01:00
Dominic Clifton
3813c5027f Allow user provided sensor alignment to override NAZE defaults.
This should have been in 297609d4c3.
2014-04-21 16:16:28 +01:00
Dominic Clifton
c6a482b3e0 Latest binaries. 2014-04-21 14:43:26 +01:00
Dominic Clifton
6c4caabfae Fixing failsafe initialisation, failsafe work as it did before
e969d184e6
2014-04-21 14:42:25 +01:00
Dominic Clifton
297609d4c3 Decouple sensor alignment from all acc/gyro/mag drivers.
This resulted in the removal of duplicate logic, duplicate code and the
removal of a temporary buffer per-driver.

The NAZE specific sensor alignment is now contained within the core code
instead of in the drivers.
The sensor alignment is determines by the sensor initialisation code.
The alignment of sensor readings is now performed once and only by the
appropriate sensor code, see usages of alignSensors().

The acc/gyro/compass driver code is now more reusable since it has no
dependencies on the main code.
2014-04-21 14:14:14 +01:00
Dominic Clifton
0f3e4add48 Latest binaries. 2014-04-21 12:44:04 +01:00
Dominic Clifton
3805af7821 fix FY90Q build (acc_t/gyro_t changes) 2014-04-21 12:43:28 +01:00
Dominic Clifton
a3d2a3df2d Merge remote-tracking branch 'multiwii/master'
Conflicts:
	obj/baseflight.hex
	src/config.c
	src/drivers/system_common.c
	src/main.c
	src/mw.h
	src/serial_cli.c
2014-04-21 12:35:44 +01:00
Dominic Clifton
12d4603edd Removing unused temperature member from acc_t. 2014-04-21 12:08:24 +01:00
Dominic Clifton
8875aad776 rename sensor_t to acc_t and gyro_t and remove unused variables from
each.  relocated acc_t/gyro_t from sensors_common.h into
drivers/accgyro_common.h since they define an interface and the
dependency was pointing the wrong way from the drivers.
baro_t/acc_t/gyro_t dependences are all now pointing the right way.
2014-04-21 12:02:02 +01:00
dongie
b07ca4b4a1 building hex for recent changes; including EMF avoidance. 2014-04-21 19:49:29 +09:00
dongie
9f107545e2 Merge pull request #78 from schugabe/overclock
Added overclock feature
2014-04-21 19:47:11 +09:00
Dominic Clifton
b3430ae1be Remove flight_imu and flight_common.c's dependencies on the mw.h/board.h
files.  Move baro calibration code into sensors_barometer.c.  Move other
sensor variables into appropriate files.
2014-04-21 11:29:01 +01:00
Dominic Clifton
51f2487cf5 Update readme formatting. 2014-04-21 03:40:12 +01:00
Dominic Clifton
9b8a10a09f Updating makefile so the binaries are build with the name of the fork,
in this case 'cleanflight'.  Updating binaries to reflect this change.  

Also renamed the 'startup' folder from 'baseflight_startups'.
2014-04-21 03:34:29 +01:00
Dominic Clifton
06b3e46b8b Updating the project readme. 2014-04-21 03:27:28 +01:00
Dominic Clifton
68b9b9062f Latest binaries. 2014-04-21 03:13:25 +01:00
Dominic Clifton
5cf5785848 Update failsafe in FY90Q pwm driver. 2014-04-21 03:12:43 +01:00
Dominic Clifton
ca73413c72 Remove incorrect compiler warning about unused variable. 2014-04-21 03:05:46 +01:00
Dominic Clifton
007bc58859 de-duplicate EEPROM checksum calculation routines to reduce code size
and improve code maintainability.
2014-04-21 02:43:51 +01:00
Dominic Clifton
299d062e73 Replace local variables with better named ones in writeEEPROM. 2014-04-21 02:11:09 +01:00