Commit graph

2704 commits

Author SHA1 Message Date
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
Dominic Clifton
54424bf3fb Cleanup EEPROM writing code.
Avoid goto/label usage by using a loop instead, remove nesting, improve
and simplify logic, use 8 bit type for attempt counter.
2014-04-21 01:56:14 +01:00
Dominic Clifton
bd95c38ff0 Cleanup EEPROM reset and validation methods so that it is obvious what
the code is doing.  There are now no EEPROM read/write/reset/verify
methods that take any arguments which removes magic boolean variables
from method signatures.

This also removes duplicate code in the cliDefaults and cliSave commands
which results in smaller code also also due to the deduplication of a
reboot message.
2014-04-21 01:36:06 +01:00
Dominic Clifton
a012cb1c82 Decouple reading EEPROM from writing EEPROM. Now writeEEPROM() does
only what it's name implies and it's method takes no arguments.  This
avoids the 0/1 magic numbers which was a flag to decide whether the user
should be notified after the EEPROM has been read (!).

Introduced a method called readEEPROMAndNotify() which is used in all
cases where writeEEPROM(1) was previously called.

Additionally this avoid re-reading the profile when the reboot command
is issued which speeds up reboots.

Finally this avoid needless comments because the code tells you now what
it is going to do.
2014-04-21 01:18:15 +01:00
Dominic Clifton
3daaf66b14 Removed profile storage code from writeEEProm() to remove the boolean
flag from the method signature.  Now it is clear when the current
profile needs to be stored.
2014-04-21 01:02:53 +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
aef28c1c08 latest binaries with changes from multiwii/master merged in. 2014-04-19 01:13:27 +01:00
Dominic Clifton
c7efcc0521 Merge remote-tracking branch 'multiwii/master' into project-structure-alternative 2014-04-19 01:12:13 +01:00
dongie
63aff7566d Merge pull request #89 from treymarc/bf/msp_write_reboot
Bf/msp write reboot
2014-04-19 09:11:23 +09:00