1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00
Commit graph

17 commits

Author SHA1 Message Date
Dominic Clifton
3b1801cacd CHEBUZZF3 - Update makefile and sensor initialisation code to support
ChebuzzF3 target.
2014-05-07 22:11:38 +01:00
Dominic Clifton
ee2140d324 Merge remote-tracking branch 'multiwii/master'
Conflicts:
	src/board.h
	src/drivers/adc_common.c
	src/drivers/pwm_common.c
	src/drivers/pwm_common.h
	src/main.c
	src/mw.c
	src/mw.h
	src/sensors.c
	src/utils.h
2014-05-03 22:50:57 +01:00
Dominic Clifton
9b672791f4 Cleanup Fake GYRO and Fake ACC support. 2014-05-02 21:31:06 +01:00
Dominic Clifton
7e79a245c2 Cobbled together some bits of code to read and format the gyro data from
the L3GD29 gyro.  Some code borrowed again from AQ32PlusF3 and the
existing MPU6050 driver.
2014-04-28 22:29:51 +01:00
Dominic Clifton
4febeb3969 Ported some I2C code from AQ32PlusF3 which itself looked ported from the
STM32 examples.
2014-04-28 19:18:57 +01:00
Dominic Clifton
cde26ac1a2 Fix eeprom writing. Update some clocks. Add fake implementation of acc
and gyro to allow the main loop to run.
2014-04-25 03:50:33 +01:00
Dominic Clifton
0598704872 First commit of port to STM32F3DISCOVERY board.
work-in-progress, it does compile and run though but hangs early on in
main() because of unimplemented features.
2014-04-25 01:09:19 +01: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
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
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
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
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
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
2baf385b99 Remove mpu6050_scale from core_t by providing a sensor independent way
of determining a revision code.  Previously there was mpu6050 specific
code in cli.c (the status command).

Finally this commit has removed all non-serial port configuration
settings from core_t so that a future commit can refactor core_t to
reduce dependencies on serial port code.

In doing this I also noted from other source code that the MPU6050
accelerometer trim for some revisions appeared to be incorrectly set to
255 * 8 instead of 256 * 8.
2014-04-18 23:32:48 +01:00
Dominic Clifton
64d16e1987 Relocated used code from board.h into appropriate headers, deleted
unused code.
2014-04-17 15:02:41 +01:00
Dominic Clifton
3bd4cd2ed2 Use slightly flatter directory structure since some developers did not
like too many folders.
Extracted code from some files into separate files to fit with the new
layout.
2014-04-08 22:07:37 +01:00