Commit Graph

4037 Commits

Author SHA1 Message Date
Andrew Tridgell 1518217952 HAL_FLYMAPLE: removed unused backend console code 2013-10-05 22:03:58 +10:00
Andrew Tridgell de4d505f62 HAL_AVR: fixed examples build 2013-10-05 22:03:42 +10:00
Andrew Tridgell 487caea3a5 AP_Baro: added update_calibration() method
used for auto baro calibration when disarmed
2013-10-05 18:44:00 +10:00
Andrew Tridgell 7cab8cb3bb HAL_PX4: removed Console driver 2013-10-05 18:33:07 +10:00
Andrew Tridgell b30f652cec HAL_Linux: removed Console driver 2013-10-05 18:32:57 +10:00
Andrew Tridgell 21f0086647 HAL_FLYMAPLE: removed Console driver 2013-10-05 18:32:46 +10:00
Andrew Tridgell 8e7d9bb464 HAL_Empty: removed Console driver 2013-10-05 18:32:35 +10:00
Andrew Tridgell 930d664677 AVR_SITL: removed Console driver 2013-10-05 18:32:23 +10:00
Andrew Tridgell 7072c52b57 HAL_AVR: removed Console driver 2013-10-05 18:32:12 +10:00
Andrew Tridgell 9f24c45502 AP_HAL: removed separate Console class
the idea of a separate console class was never really used, and just
added confusion in a HAL port. It also consumes some much needed ram
and flash space on APM2
2013-10-05 18:32:00 +10:00
Andrew Tridgell 39bfd809c2 APM_Control: disable integrator below minimum speed
this reduces the impact on initial takeoff
2013-10-05 18:11:35 +10:00
Andrew Tridgell ad30f8effa HAL_PX4: try to reopen UARTs if safety switch is disarmed
this allows attaching to the USB port after power on

Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-10-05 15:47:28 +10:00
Andrew Tridgell 34a328f66d AP_HAL: added safety_switch_state() function in hal.util
will be used by copter to check safety switch is set
2013-10-05 15:46:35 +10:00
Andrew Tridgell 58187ea449 APM_Control: change minspeed on steering controller to 1.0 2013-10-05 12:56:28 +10:00
Andrew Tridgell 5abf060c41 APM_Control: enable integrator in ACRO rate controller
this work better for unlocked mode
2013-10-05 07:42:48 +10:00
Andrew Tridgell d27f5e89d7 APM_Control: remove public AP_PitchController::get_coordination_rate_of|cat() 2013-10-05 07:42:48 +10:00
Andrew Tridgell bd848a6a7f APM_Control: added rate and angle steering controllers 2013-10-05 07:42:48 +10:00
Mike McCauley 72aa8a18ab AP_HAL_FLYMAPLE: update documentation in FlymaplePortingNotes.txt
Added info about where to get my patched version of libmaple.
2013-10-04 07:21:56 +10:00
Mike McCauley 6b003ae551 AP_HAL_FLYMAPLE: Fixed problem with tx buffer that caused slow parameter
delivery
2013-10-04 07:21:56 +10:00
Mike McCauley c90c1b9998 AP_InertialSensor: Improvements to Flymaple sensors
Fix a bug that caused hang after 71 minutes. Use I2CDriver semaphore.
Remove test for in_accumulate: not needed.
2013-10-04 07:21:55 +10:00
Mike McCauley 39f9b7bbc9 AP_HAL_FLYMAPLE: Add test for correct version of libmaple
Patched version of libmapl is required for Flymaple I2Driver to work.
2013-10-04 07:21:55 +10:00
Mike McCauley 1f7272978c AP_HAL_FLYMAPLE: fix compile error in example AP_Baro_BMP085_test.pde
due to need for new library AP_Notify
2013-10-04 07:21:55 +10:00
Mike McCauley 2d3c86ee80 AP_HAL_FLYMAPLE: I2CDriver now uses low level hardware i2c librray from
libmaple

CAUTION: requires a patched version of libmaple, to be provided by mikem.
2013-10-04 07:21:55 +10:00
Mike McCauley 68a7cac9a2 AP_HAL_FLYMAPLE: Improvements to FLYMAPLEStorage
Fix a number of bugs and expand storage to an emulated 4kb, as needed by AP.
2013-10-04 07:21:55 +10:00
Mike McCauley 29707f4401 AP_HAL_FLYMAPLE: Modest speed improvements to I2CDriver
Can now achieve about 285kHz using bitbanging.
Proper low-level hardware I2C support has been written and stashed,
but has to wait until a bug in libmaple is addressed.
Ref: http://forums.leaflabs.com/topic.php?id=13458
2013-10-04 07:21:55 +10:00
Mike McCauley 9ea1108d4e AP_InertialSensor: Flymaple filter constructor arguments non non-zero 2013-10-04 07:21:55 +10:00
Randy Mackay ecd4ed2277 GCS_MAVLink: generate mavlink includes 2013-10-03 22:12:58 +09:00
Randy Mackay 8aec70af1d GCS_MAVLink: add SYS_STATUS_SENSOR enum 2013-10-03 22:12:48 +09:00
Randy Mackay 688dd5374e ToshibaLED: flashing green if disarmed with GPS lock
solid blue if armed without GPS lock
2013-10-03 14:33:39 +09:00
Andrew Tridgell 7a9ed0a5a1 AP_GPS: fixed warning 2013-10-03 12:21:08 +10:00
Andrew Tridgell 86b58314c4 AP_Common: pack the RallyLocation structure
so it can be written as a single binary block
2013-10-03 12:21:08 +10:00
Michael Day 823a40c203 AP_Common: Added RallyLocation struct. 2013-10-03 12:21:08 +10:00
Michael Day 1777db91cb GCS_MAVLink: import latest upstream.
This add rally points.
2013-10-03 12:21:08 +10:00
Andrew Tridgell 99a8ba4634 DataFlash: fixed display of last page of flash logs 2013-10-03 12:21:08 +10:00
Andrew Tridgell 89f121ea77 DataFlash: wait for blocks to finish writing to flash on log read 2013-10-03 12:21:08 +10:00
Andrew Tridgell 8e0a136d78 HAL_AVR: mark some examples as not building 2013-10-03 12:21:08 +10:00
Andrew Tridgell a250c13c79 HAL_PX4: fixed build 2013-10-03 12:21:08 +10:00
Andrew Tridgell 1440c8cebd HAL_Linux: implement a dummy console buffered write() 2013-10-03 12:21:08 +10:00
Andrew Tridgell 9624821493 HAL_FLYMAPLE: implement a dummy buffered write 2013-10-03 12:21:08 +10:00
Andrew Tridgell a8c97f99d1 HAL_Empty: implement a dummy buffered write 2013-10-03 12:21:08 +10:00
Andrew Tridgell c035eef845 HAL_SITL: implement a dummy buffered write 2013-10-03 12:21:07 +10:00
Andrew Tridgell a59f505d25 HAL_AVR: implement an efficient buffer write() call for AVR
this saves some cycles in the telemetry code
2013-10-03 12:21:07 +10:00
Andrew Tridgell efe1e01700 AP_HAL: require a buffer write() function in all ports
this makes a sufficient performance difference that it is worth it
2013-10-03 12:21:07 +10:00
Andrew Tridgell 5489097476 AP_GPS: update the UBLOX rates async from the start
this saves a bit of startup time
2013-10-03 12:21:07 +10:00
Andrew Tridgell cee8a017ab AP_GPS: added UBLOX_FAKE_3DLOCK debugging option
useful when unable to get 3D lock
2013-10-03 12:21:07 +10:00
Andrew Tridgell f1e120113c AP_Common: added OPTIMIZE() macro
this can be used to change the compiler optimization level of
individual functions

Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-10-03 12:21:07 +10:00
Andrew Tridgell fb19dbb404 AP_Math: cope with large values passed into the wrap functions
this uses modulus if the function would loop too many times

Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-10-03 12:21:07 +10:00
Andrew Tridgell 34f7f88190 AP_GPS: check for corret GPS solution rates in flight and fix
if the GPS is giving us data at less than 300ms intervals then re-send
the configuration messages to try to kick it into the right rates

Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-10-03 12:21:07 +10:00
Randy Mackay db2975901d AP_HAL_AVR_SITL: use SIM_BATT_VOLTAGE parameter 2013-10-03 11:16:36 +09:00
Randy Mackay 8d1d8c78b5 SITL: add SIM_BATT_VOLTAGE 2013-10-03 11:16:35 +09:00
Randy Mackay f1309ed63f BattMonitor: bug fix for current_total_mah 2013-10-03 11:16:24 +09:00
Randy Mackay 7d73e62a23 BattMonitor: add exhausted method
Current total calculations changed to use micros instead of millis for
improved accuracy
Removed unused pack_capacity accessor
Initialise private members
2013-10-03 11:16:19 +09:00
Randy Mackay d9fe099885 BattMonitor: update comments and defaults 2013-10-03 11:16:17 +09:00
Andrew Tridgell 366d73124a AP_Battery: fixed parameter name and default voltage ratio
also setup SITL with right pins
2013-10-03 11:16:15 +09:00
Andrew Tridgell c7df0eaf2a SITL: added battery voltage and current
assume 3DR brick
2013-10-03 11:16:14 +09:00
Andrew Tridgell 88777beab0 AP_BattMonitor: minor cleanups
cleanup name to be multiplier not div ratio, and make 2 variables
non-static
2013-10-03 11:16:10 +09:00
Randy Mackay 8b06a12fa4 BattMonitor: initial draft lib 2013-10-03 11:16:01 +09:00
Andrew Tridgell 42bc8b12df SITL: added a SIM_GPS_HZ option
this allows simulation of slow GPS updates (for example, the 1Hz GPS
problem)
2013-10-01 16:39:16 +10:00
Andrew Tridgell c9fea2c706 HAL_Linux: fixed scheduling priorities
need to be between 1 and 99
2013-10-01 13:05:04 +10:00
Andrew Tridgell 134bf5a5c9 AP_Menu: be friendly to multi-tasking OSes in menus 2013-10-01 13:04:40 +10:00
Andrew Tridgell 2819dd99fa AP_Menu: copy with newline from console
helps debugging on HAL_Linux
2013-10-01 13:00:48 +10:00
Andrew Tridgell bbac3265b2 HAL_Linux: default to hal.console on stdout 2013-10-01 12:49:58 +10:00
Andrew Tridgell bcc9cdbf43 HAL_Linux: make I2CDriver more portable
this allows it to build on the Beaglebone
2013-10-01 12:37:13 +10:00
Andrew Tridgell 51c19331a6 HAL_Linux: fixed build 2013-10-01 12:11:48 +10:00
Andrew Tridgell e60d5d4f33 AP_Airspeed: fixed some warnings 2013-09-30 21:06:43 +10:00
Andrew Tridgell d83dbb38b4 AP_ADC: updates for AP_HAL::MemberProc 2013-09-30 21:06:42 +10:00
Andrew Tridgell 2095b2a2d7 AP_Airspeed: updates for AP_HAL::MemberProc 2013-09-30 21:06:42 +10:00
Andrew Tridgell c04d9b0c03 AP_Baro: updates for AP_HAL::MemberProc 2013-09-30 21:06:42 +10:00
Andrew Tridgell a86bb15a05 DataFlash: updates for AP_HAL::MemberProc 2013-09-30 21:06:42 +10:00
Andrew Tridgell b178ad7344 AP_OpticalFlow: updates for AP_HAL::MemberProc 2013-09-30 21:06:42 +10:00
Andrew Tridgell dda68bddcb AP_InertialSensor: updates for AP_HAL::MemberProc 2013-09-30 21:06:42 +10:00
Andrew Tridgell 942ae70651 HAL_PX4: updates for AP_HAL::MemberProc 2013-09-30 21:06:42 +10:00
Andrew Tridgell f2ebb2ca87 HAL_Linux: updates for AP_HAL::MemberProc 2013-09-30 20:56:15 +10:00
Andrew Tridgell 82fe40224b HAL_AVR_SITL: updates for AP_HAL::MemberProc 2013-09-30 20:56:15 +10:00
Andrew Tridgell a2b879493d HAL_Empty: updates for AP_HAL::MemberProc 2013-09-30 20:56:15 +10:00
Andrew Tridgell c27a61f210 HAL_FLYMAPLE: updates for AP_HAL::MemberProc 2013-09-30 20:56:15 +10:00
Andrew Tridgell 6d58f5e188 HAL_AVR: updates for AP_HAL::MemberProc 2013-09-30 20:51:20 +10:00
Andrew Tridgell f2de4bb7b0 AP_HAL: implement AP_HAL::MemberProc via FastDelegate.h
this provides a more portable way to encapsulate member functions in
variables
2013-09-30 20:51:13 +10:00
Andrew Tridgell 0784c01f19 APM_Control: added STEER2SRV_MINSPD
this is the assumed min speed when in STEERING or AUTO mode
2013-09-30 09:05:37 +10:00
Andrew Tridgell 53f66b23f4 AP_HAL_Linux: fixed APM2 build 2013-09-29 14:24:55 +10:00
Andrew Tridgell 1698e1800c HAL_Linux: timer calls may block on HAL_Linux
timer calls can do SPI transfers, which can block
2013-09-29 10:48:22 +10:00
Andrew Tridgell 5102f1511b HAL_Linux: fixed callbacks from delay() 2013-09-29 10:32:51 +10:00
Andrew Tridgell a1ef1a9318 HAL_Linux: tweak the scheduling priorities 2013-09-29 12:04:37 +10:00
Andrew Tridgell d3fe625742 HAL_Linux: make the SPI driver much more efficient
use a single transaction for multiple bytes. This makes the APM1
Oilpan driver generate only 2 interrupts per sensor read
2013-09-29 12:04:36 +10:00
Andrew Tridgell 7067569103 HAL_PX4: fixed end() on UARTs 2013-09-29 12:04:36 +10:00
Andrew Tridgell 1e786b3e20 HAL_Linux: added buffering on the UARTs 2013-09-29 12:04:36 +10:00
Andrew Tridgell 605e6c3cf7 HAL_Linux: use pthread mutexes for semaphores 2013-09-29 07:49:30 +10:00
Andrew Tridgell 30b6b23b10 AP_ADC: enable APM1 ADC on Linux 2013-09-29 00:57:13 +10:00
Andrew Tridgell 1191607036 AP_InertialSensor: enable Oilpan on Linux 2013-09-29 00:57:13 +10:00
Andrew Tridgell 884af71ef6 HAL_Linux: added SPI support 2013-09-29 00:57:13 +10:00
Andrew Tridgell 8a699f6189 AP_Baro: enable BMP085 on Linux 2013-09-28 22:04:15 +10:00
Andrew Tridgell 8ee848a788 AP_AHRS: update for Stub -> HIL 2013-09-28 22:04:15 +10:00
Andrew Tridgell 350af4d92f HAL_AVR_SITL: updates for InertialSensor 2013-09-28 22:04:15 +10:00
Andrew Tridgell cf726c6642 AP_InertialSensor: rename Stub to HIL
more consistent with other drivers
2013-09-28 22:04:15 +10:00
Andrew Tridgell dd081ab23b AP_Notify: enable toshibaled on all I2C capable platforms 2013-09-28 22:04:15 +10:00
Andrew Tridgell 291369db7f AP_Airspeed: split up airspeed driver
this gives us separate backends for PX4, analog and I2C. This allows
the MS airspeed sensor to work on Linux, and it should work on APM2 as well.
2013-09-28 21:24:03 +10:00
Andrew Tridgell f03315237a HAL_Linux: fixed timer scheduler 2013-09-28 21:24:03 +10:00
Andrew Tridgell 20b1131059 AP_Baro: use new scheduler API 2013-09-28 21:24:03 +10:00
Andrew Tridgell 6134d9d0d7 AP_ADC: use new scheduler API 2013-09-28 21:24:03 +10:00
Andrew Tridgell 19e9c95983 DataFlash: use new scheduler API 2013-09-28 21:24:03 +10:00
Andrew Tridgell f53afaa5ac AP_OpticalFlow: use new scheduler API 2013-09-28 21:24:03 +10:00
Andrew Tridgell 03036c632d AP_InertialSensor: use new scheduler API 2013-09-28 21:24:03 +10:00
Andrew Tridgell 7ec242146d HAL_PX4: update for new scheduler API 2013-09-28 21:24:03 +10:00
Andrew Tridgell cca59ce3c9 HAL_Linux: update for new scheduler API 2013-09-28 21:24:02 +10:00
Andrew Tridgell 1d820761be HAL_FLYMAPLE: updates for new scheduler API 2013-09-28 21:24:02 +10:00
Andrew Tridgell 6bc4a830ac HAL_Empty: updates for new scheduler API 2013-09-28 21:24:02 +10:00
Andrew Tridgell c08f29fca6 HAL_AVR_SITL: updates for new scheduler API 2013-09-28 21:24:02 +10:00
Andrew Tridgell 0ade02a624 HAL_AVR: updates for new scheduler API 2013-09-28 21:24:02 +10:00
Andrew Tridgell f0f5761e8d AP_HAL: make timed processes take void *argument
this allows the class to be passed in, meaning that drivers that use
register_timer_process() and register_io_process() don't need to use
static members. That results in simpler, easier to read code
2013-09-28 21:24:02 +10:00
Andrew Tridgell 49d3d624d7 DataFlash: enabled DataFlash_File for Linux 2013-09-28 21:24:02 +10:00
Andrew Tridgell bcf4f48e65 HAL_Linux: switched to pthread based scheduling 2013-09-28 21:24:02 +10:00
Andrew Tridgell da14ad2e2d AP_Compass: neaten up HMC5883 debug 2013-09-28 21:24:02 +10:00
Andrew Tridgell ce7d458855 AP_Compass: added Linux support to the compass test 2013-09-28 21:24:02 +10:00
Andrew Tridgell 6fc5b06043 AP_Compass: fixed some old Serial.print calls 2013-09-28 21:24:02 +10:00
Andrew Tridgell 58a31318ee AP_HAL_Linux: initial I2C driver implementation
this works sufficiently for the HMC5883
2013-09-28 21:24:02 +10:00
Andrew Tridgell 6b95d870ad AP_Progmem: only AVR uses progmem
no need to list all other boards
2013-09-28 21:24:02 +10:00
Andrew Tridgell 1f3a051e7b AP_Progmem: Linux doesn't use progmem 2013-09-28 21:24:02 +10:00
Andrew Tridgell 018b8fde95 AP_Notify: blank Linux LED defines 2013-09-28 21:24:02 +10:00
Andrew Tridgell 1243ab9e63 AP_Compass: added HAL_Linux support 2013-09-28 21:24:02 +10:00
Andrew Tridgell 296417a228 AP_HAL: added AP_HAL_LINUX define 2013-09-28 21:24:01 +10:00
Andrew Tridgell 4ba044c441 AP_HAL_Linux: initial Linux AP_HAL 2013-09-28 21:24:01 +10:00
Andrew Tridgell 096660c4f9 AP_InertialSensor: mark flymaple as nobuild
won't build with build_examples.sh script
2013-09-27 16:57:13 +10:00
Mike McCauley e4eef61ec3 AP_InertialSensor: Flymaple sensors improvements
Flymaple sensors are now raw sampled at 800Hz, and LowPassFilter2p is used
to filter to the desired filter cutoff frequency.
Flymaple sensor polling is done in the main thread NOT in the timer
interrupts.
2013-09-27 15:45:59 +10:00
Mike McCauley 23429b6b9c AP_InertialSensor: Flymaple now polls sensors at 800Hz. More changes to
come...
2013-09-27 15:45:57 +10:00
Mike McCauley 29bced05bd AP_InertialSensor: Added examples/Flymaple for testing 2013-09-27 15:45:54 +10:00
Mike McCauley d11f952ef1 AP_InertialSensor: Formalise and document Flymaple Gyro scaling factor 2013-09-27 15:45:52 +10:00
Mike McCauley db2b7ed4e3 AP_HAL_FLYMAPLE: UARTDriver libmaple internal ring buffers enlarge on demand 2013-09-27 15:45:49 +10:00
Mike McCauley adfcdca074 AP_HAL_FLYMAPLE: Sensor reading improvements
I2C speed increased to 400kHz
Accelerometer 8g max, Normal power, 800Hz bandwidth
Gyros: 2000 degrees/sec, 256Hz LPF, 8kHz internal sample rate
2013-09-27 15:45:47 +10:00
Randy Mackay f7ba0438ef InertialSensor: remove DMP
this saves 3K of flash
2013-09-27 10:43:33 +09:00
Randy Mackay 8306d74da0 AHRS: remove DMP as an ahrs 2013-09-27 10:42:46 +09:00
Andrew Tridgell 14636e1cdf AP_InertialSensor: changed num_samples_available() to sample_available()
this makes the interface clearer. It also fixes a 3D accel cal bug.
2013-09-27 10:49:00 +10:00
Andrew Tridgell 99da118faa Filter: added in Leonards LowPassFilter2p filter
this is a backport from PX4
2013-09-26 22:38:32 +10:00
Andrew Tridgell 3c86fceed9 AP_Progmem: removed SMACCM support 2013-09-26 22:38:32 +10:00
Andrew Tridgell 2469dcf8e6 AP_Notify: removed SMACCM support 2013-09-26 22:38:31 +10:00
Andrew Tridgell 1ec5cbed81 AP_InertialSensor: removed SMACCM support 2013-09-26 22:38:31 +10:00
Andrew Tridgell 60f3a8b6cf AP_HAL: removed SMACCM support 2013-09-26 22:38:31 +10:00
Andrew Tridgell 3f0f8dfa62 AP_Compass: removed SMACCM support 2013-09-26 22:38:31 +10:00
Andrew Tridgell 13cdc56a5a AP_Common: removed SMACCM support 2013-09-26 22:38:31 +10:00
Andrew Tridgell 58f9349af4 HAL_SMACCM: removed SMACCM HAL port
this port is no longer maintained or used. Pat asked me to remove it
2013-09-26 22:38:31 +10:00
Randy Mackay f144de21b4 AC_Fence: fix example sketch 2013-09-26 17:52:13 +09:00
Randy Mackay e5c5084e76 InertialNav: fix example sketch 2013-09-26 14:40:32 +09:00
Mike McCauley 708c603420 AP_HAL_FLYMAPLE: UARTDriver now has correct implementation of txspace that looks at HardwareSerial ring buffer 2013-09-25 15:46:07 +10:00
Mike McCauley e4b5d0a3d6 AP_InertialSensor: Final Flymaple orientation fixes 2013-09-25 15:46:07 +10:00
Mike McCauley 276068356e AP_InertialSensor: Further Flymaple orientation fixes 2013-09-25 15:46:07 +10:00
Mike McCauley 06478bde52 AP_HAL_FLYMAPLE: Console is now a thin wrapper around uartA, consistent with AVR 2013-09-25 15:46:07 +10:00
Mike McCauley b02dbca9d4 AP_InertialSensor: fix orientation of Flymaple sensors 2013-09-25 15:46:07 +10:00
Mike McCauley 4cd952446d AP_HAL_FLYMAPLE: added documentation about safety of noInterrupts()/interrupts() 2013-09-25 15:46:07 +10:00
Randy Mackay ab71f2e535 AP_Camera: remove unused methods
throttle_pic, distance_pic and transistor_pic were not defined nor
called
2013-09-24 23:25:54 +09:00
Randy Mackay cddbaf0459 GPS_Glitch: make accessor functions const 2013-09-24 21:41:56 +09:00
Randy Mackay 55c94b3b41 GPS_Glitch: bug fix for enable/disable parameter 2013-09-24 21:41:54 +09:00