Commit Graph

2941 Commits

Author SHA1 Message Date
Pat Hickey
0db60464f7 AP_HAL_Empty: add semaphore to I2CDriver 2013-01-04 16:19:51 -08:00
Pat Hickey
4c31cc0c2b AP_HAL_AVR: add semaphore to I2CDriver 2013-01-04 16:19:38 -08:00
Pat Hickey
3da864499d AP_HAL Semaphore: don't use limits, they don't work on c++ 2013-01-04 16:19:15 -08:00
James Bielman
bb4474fa6d AP_HAL_SMAACM: Add timeout for SPI transfers.
- Detects lockup in the lower level SPI driver.
- Add scheduler task tags for FreeRTOS debugging.
2013-01-04 15:44:21 -08:00
James Bielman
eca1417858 AP_HAL: Add semaphores to I2C driver.
- Guard I2C transactions with this semaphore in the MS5611 and
  HMC5843 drivers.
2013-01-04 15:43:43 -08:00
Andrew Tridgell
30447018d5 HAL_PX4: handle %S in format strings 2013-01-05 08:10:07 +11:00
Andrew Tridgell
c16db01395 HAL_SITL: add pragma pack
may be needed on some systems
2013-01-05 08:01:30 +11:00
Andrew Tridgell
08d518e07f HAL_PX4: switch to libc vdprintf()
vdprintf has now been added to NuttX
2013-01-05 08:01:10 +11:00
Andrew Tridgell
c15bf95e19 AP_Baro: fixed example build on AVR 2013-01-04 22:45:02 +11:00
Andrew Tridgell
84bd10d279 HAL_PX4: minor cleanups 2013-01-04 22:27:04 +11:00
Andrew Tridgell
aa64a41512 AP_Baro: removed debug line 2013-01-04 22:26:51 +11:00
Andrew Tridgell
5829d44a22 HAL_PX4: disable failsafe handler
this won't work until we can set RC output values in timers
2013-01-04 22:26:16 +11:00
Andrew Tridgell
0fcc6d7389 HAL_PX4: added an RC Output driver 2013-01-04 22:25:36 +11:00
Andrew Tridgell
4fe7ad6267 AP_Baro: added averaging to PX4 baro driver 2013-01-04 21:08:20 +11:00
Andrew Tridgell
26bc278181 AP_Compass: use queue length 10 in PX4 driver
and remove unnecessary poll() call
2013-01-04 20:12:03 +11:00
Andrew Tridgell
dbcaa4cf3c AP_Baro: average over multiple samples in PX4 baro driver 2013-01-04 20:11:30 +11:00
Andrew Tridgell
44837a11f2 HAL_PX4: added baudrate support to UART driver 2013-01-04 19:42:30 +11:00
Andrew Tridgell
965fc8a9d1 HAL_PX4: enable uartB as GPS port 2013-01-04 19:41:50 +11:00
Andrew Tridgell
2f111b857b AP_GPS: ported test code for PX4 2013-01-04 19:41:36 +11:00
Andrew Tridgell
f701d0cc85 AP_GPS: a couple more places where we should restart
this prevents us losing a byte
2013-01-04 19:40:49 +11:00
Andrew Tridgell
3bfff4bd6d AP_GPS: pragma pack is needed on ARM
we rely on GPS data structures having byte alignment. Luckily GCC can
cope with this.
2013-01-04 19:39:15 +11:00
Andrew Tridgell
741174f5d5 AP_Compass: first cut at a PX4 compass driver 2013-01-04 16:21:24 +11:00
Andrew Tridgell
2ac6541526 AP_Baro: added PX4 barometer driver 2013-01-04 14:58:24 +11:00
Andrew Tridgell
cf5d102912 AP_Common: added board ID for PX4 2013-01-04 14:26:28 +11:00
Andrew Tridgell
fd23f6bd33 InertialSensor: added PX4 example sketch 2013-01-04 14:26:14 +11:00
Andrew Tridgell
ae09b31176 AP_InertialSensor: added PX4 gyro/accel driver 2013-01-04 14:25:57 +11:00
Andrew Tridgell
9f423a24ad HAL_PX4: yield CPU in delay()
this allows other apps to run
2013-01-04 12:34:35 +11:00
Pat Hickey
bc3b6fcb9f AP_HAL_AVR_SITL: remove begin/end atomic, adjust timer procs 2013-01-03 17:33:14 -08:00
Pat Hickey
688ec864dc AP_HAL_AVR: deprecate begin/end atomic, timer procs run on resume 2013-01-03 17:33:14 -08:00
Pat Hickey
ea2a03344e AP_HAL Scheduler: remove begin_atomic and end_atomic from api
* application-level atomic operations can now only be defined in
  terms of suspend/resume_timer_procs
2013-01-03 17:33:14 -08:00
James Bielman
8f4a2e4c0e AP_HAL_SMACCM: Scheduler timer process implemented correctly.
- Use "g_atomic" for suspend/resume timer procs.
2013-01-03 17:33:13 -08:00
James Bielman
d84ba8ef59 Use HAL suspend/resume timer procs rather than atomic.
- Preparation for removing begin/end atomic.
2013-01-03 17:33:13 -08:00
James Bielman
578c4859e4 AP_HAL_SMACCM: Update to new semaphore interface.
- Renamed files to match AVR HAL.
2013-01-03 17:33:13 -08:00
Andrew Tridgell
155fca8a4b HAL_PX4: make APM sketches into daemons
this also moves uartA onto UART5, allowing ttyS0 for nsh
2013-01-04 11:14:35 +11:00
Pat Hickey
8503f3e2ae Optflow: uses new Semaphore 2013-01-03 13:48:07 -08:00
Pat Hickey
d808c19c10 AP_InertialSensor_MPU6000: uses new semaphores
* some refactoring to fix differences between timerprocess
  and non-timerprocess usage
2013-01-03 13:48:07 -08:00
Pat Hickey
5d91f342bb AP_Baro_MS5611: uses new semaphore lib 2013-01-03 13:48:07 -08:00
Pat Hickey
a556a95565 AP_ADC: uses new semaphore interface 2013-01-03 13:48:07 -08:00
Pat Hickey
390e96311e DataFlash: change to new style Semaphore library 2013-01-03 13:48:07 -08:00
Pat Hickey
f178d1bd02 AP_HAL_Empty: implement new Semaphore interface 2013-01-03 13:48:07 -08:00
Pat Hickey
2d6b649aa4 AP_HAL_AVR: Semaphore unit test 2013-01-03 13:48:07 -08:00
Pat Hickey
0029148b3a AP_HAL_AVR: Implements new Semaphore interface 2013-01-03 13:48:07 -08:00
Pat Hickey
74e2ba2168 AP_HAL_AVR Scheduler: _in_timer_proc is volatile protected
* and AVRSemaphore is a friend, so it can read _in_timer_proc
  to know the current context.
2013-01-03 13:48:07 -08:00
Pat Hickey
81d77d4a70 AP_HAL: New semaphore interface
* it now looks like a semaphore!
2013-01-03 13:48:07 -08:00
James Bielman
acf05a29ee AP_InertialSensor_MPU6000: Poll status register if there is no data ready pin. 2013-01-03 13:48:06 -08:00
James Bielman
264db3670e AP_Baro: Add CONFIG_MS5611_SERIAL option to choose between SPI and I2C.
- Update ArduCopter and ArduPlane modules to pass the correct serial
  driver to the MS5611 driver.
- Update barometer examples, assuming SPI.
2013-01-03 13:48:06 -08:00
James Bielman
5753ae5692 AP_Baro: Add I2C support to MS5611 driver. 2013-01-03 13:48:06 -08:00
James Bielman
a4af314b57 Add AP_HAL_SMACCM implementation.
- Add a board definition for SMACCMPilot.
- Support the SMACCM HAL in required utility libraries.
2013-01-03 13:48:06 -08:00
Andrew Tridgell
1fc95a2d45 HAL_PX4: support PPM RC Input
HIL flying now works properly
2013-01-04 08:31:23 +11:00
Andrew Tridgell
e729a8b277 AP_HAL: rename Semaphores cpp file to match header 2013-01-03 21:36:48 +11:00
Andrew Tridgell
38bccee230 HAL_PX4: initial RCInput driver (overrides only) 2013-01-03 21:30:35 +11:00
Andrew Tridgell
85007cb766 HAL_Empty: fixed throttle in Empty RCInput 2013-01-03 21:14:00 +11:00
Andrew Tridgell
d492b72a2c HAL_PX4: use /dev/ttyS0 for uartA
this also changes txspace and available to use FIONWRITE and FIONREAD
2013-01-03 21:12:10 +11:00
Andrew Tridgell
1e69b88261 HAL_PX4: use write() in panic()
this allows panic from the UARTDriver
2013-01-03 21:11:37 +11:00
Andrew Tridgell
ac7117245a HAL_PX4: added a storage driver
stores 'eeprom' to a sdcard file
2013-01-03 19:35:05 +11:00
Andrew Tridgell
b30fa6535b HAL_PX4: support reboot 2013-01-03 19:34:36 +11:00
Andrew Tridgell
c6c336a6e8 HAL_PX4: implement peek() and available()
keep a 1 byte buffer
2013-01-03 17:27:53 +11:00
Andrew Tridgell
cc7f4353b4 HAL_PX4: update simple example 2013-01-03 13:17:32 +11:00
Andrew Tridgell
b0f1ceb76b HAL_PX4: removed some files not needed any more 2013-01-03 13:17:11 +11:00
Andrew Tridgell
d9d5eb52bf HAL_PX4: use fd IO instead of stdio
this allows for hal console output from within timers, which is very
handy for debugging
2013-01-03 13:16:41 +11:00
Andrew Tridgell
c6305b5876 HAL_PX4: rework Scheduler using hrt calls
thanks to Julian Oes for the suggestion
2013-01-03 13:15:57 +11:00
Andrew Tridgell
9373a4e5b3 HAL_PX4: added a uartA driver
uses stdin/stdout for IO
2013-01-03 11:03:05 +11:00
Andrew Tridgell
2294acc652 AC_PID: fixed build on ARM 2013-01-02 22:09:02 +11:00
Andrew Tridgell
e7dea077b4 AP_Motors: fixed example sketch 2013-01-02 22:02:46 +11:00
Andrew Tridgell
5053fb8acc HAL_PX4: implement atomic operations 2013-01-02 21:45:17 +11:00
Andrew Tridgell
5a70f3becf HAL_PX4: added a scheduler implementation 2013-01-02 21:39:26 +11:00
Andrew Tridgell
e25e500516 AP_HAL: fixed SPI3 Semaphores.h 2013-01-02 21:07:25 +11:00
rmackay9
45b6dbf580 AP_Limit: small fixes to make parameter descriptions appear in mission planner 2013-01-02 18:50:03 +09:00
rmackay9
cf409abc63 AP_Mount: add parameter descriptions 2013-01-02 16:47:39 +09:00
rmackay9
e594f18b75 AP_InertialSensor: added parameter descriptions 2013-01-02 16:32:43 +09:00
Andrew Tridgell
a3c26d44e4 AP_HAL: rename Sempahore.h to Semaphores.h
this is needed to allow build on MacOS, as its case-insensitive
filesystem picks up the NuttX semaphore.h
2013-01-02 18:22:13 +11:00
rmackay9
55e6544e64 AP_InertialNav: added parameter descriptions 2013-01-02 16:17:00 +09:00
rmackay9
bf77a0f2e4 AP_Compass: added parameter descriptions 2013-01-02 16:08:44 +09:00
rmackay9
9e5861ccaf AP_AHRS: small fix to parameter comments 2013-01-02 16:08:38 +09:00
rmackay9
77331f6538 AP_AHRS: another attempt at updating the TRIM parameter descriptions 2013-01-02 15:47:59 +09:00
rmackay9
e6c10f4f0b AP_ARHS: add description to AHRS_TRIM parameters 2013-01-02 15:44:42 +09:00
Andrew Tridgell
374af1cd14 build: change from Arduino.mk to apm.mk 2013-01-02 17:29:37 +11:00
Andrew Tridgell
2ba2e1c279 Derivative: removed reference to DESKTOP_BUILD 2013-01-02 15:40:01 +11:00
Andrew Tridgell
3f6f0b6d79 Oilpan: removed reference to DESKTOP_BUILD 2013-01-02 15:39:41 +11:00
Andrew Tridgell
f91ddf5df9 AP_Motors: removed board type define 2013-01-02 15:27:58 +11:00
Andrew Tridgell
ba1a6eb073 AP_HAL: fixed SITL build 2013-01-02 14:48:15 +11:00
Andrew Tridgell
d0ae51e92a memcheck: fixed for PX4 build 2013-01-02 14:45:09 +11:00
Andrew Tridgell
f9ab781d57 APM_Control: include AP_Common.h 2013-01-02 14:45:09 +11:00
Andrew Tridgell
456e8bfb6e AP_Common: include stdlib.h for abs() 2013-01-02 14:45:09 +11:00
Andrew Tridgell
609ef220a6 AP_GPS: more state machine fixes for MTK19 GPS 2013-01-02 14:45:09 +11:00
Andrew Tridgell
ac8fcd5b23 AP_Common: include stdbool.h for ARM 2013-01-02 14:45:09 +11:00
Andrew Tridgell
d6b00bd848 AP_ADC: fixed bool problem on ARM 2013-01-02 14:45:09 +11:00
Andrew Tridgell
d3f154bbae AP_HAL: include stdbool.h for ARM build 2013-01-02 14:45:09 +11:00
Andrew Tridgell
4764a03aaa AP_Param: fixed ARM PX4 build 2013-01-02 14:45:09 +11:00
Andrew Tridgell
3ac3aeb1b1 AHRS: fixed build on ARM 2013-01-02 14:45:09 +11:00
Andrew Tridgell
5277dd4b0f APM_Control: fixed build on ARM 2013-01-02 14:45:09 +11:00
Andrew Tridgell
eb74fddd9f AP_Math: added global GRAVITY_MSS define 2013-01-02 14:45:08 +11:00
Andrew Tridgell
6901c56a2e yaw fixup 2013-01-02 14:45:08 +11:00
Andrew Tridgell
583845cc17 ahrs fixup 2013-01-02 14:45:08 +11:00
Andrew Tridgell
5923808526 AP_Relay: allow for no relay pin 2013-01-02 14:45:08 +11:00
Andrew Tridgell
3a762f891e AP_Param: fixup for ARM compiler 2013-01-02 14:45:08 +11:00
Andrew Tridgell
1b0670e67c AHRS: fixup for ARM compiler 2013-01-02 14:45:08 +11:00
Andrew Tridgell
d55acbc00a AP_YawController: fixup for ARM compiler 2013-01-02 14:45:08 +11:00
Andrew Tridgell
f7939ad179 AP_Relay: allow relay object in SITL 2013-01-02 10:19:43 +11:00
Andrew Tridgell
8d901b3f5a HAL_AVR: fixed a warning 2013-01-02 10:19:28 +11:00
Andrew Tridgell
c980b32319 GPS: fixed state machine logic errors in MTK19 driver 2013-01-02 10:12:55 +11:00
Andrew Tridgell
8c0d1d7084 GPS: fixed MTK19 driver for AP_HAL merge 2013-01-02 09:55:37 +11:00
rmackay9
92e271e517 AP_InertialNav: increase baro delay to 0.5 sec (was 0.2sec) to allow slower baro updates on APM1 2013-01-02 09:55:37 +11:00
rmackay9
af4d998697 AP_InertialNav: correct lat/lon to cm 2013-01-02 09:55:37 +11:00
Sandro Benigno
6abe1fe94f AP Camera changes required to work with modified AP_Relay lib. 2013-01-02 09:55:37 +11:00
Andrew Tridgell
0b2960e504 fixup relay merge 2013-01-02 09:55:37 +11:00
Sandro Benigno
cc7f26a99b New Relay class and the subclasses for APM1 and APM2.
Updated AP_Camera class.
2013-01-02 09:31:32 +11:00
Craig@3DR
2de676306e Improved parsing in auto detect 2013-01-02 09:24:31 +11:00
Craig@3DR
8cfefbc275 Updated rev number in driver 2013-01-02 09:22:21 +11:00
rmackay9
b8b17a4a70 ArduCopter: added AP_PerfMon library 2013-01-02 09:20:08 +11:00
rmackay9
bd0e018ca0 ArduCopter: restore auto-trim method but now use AHRS.add_trim 2013-01-02 09:20:08 +11:00
rmackay9
37b56662bd AP_InertialNav: Jason's bug fix to inertial nav velocity and position calculations 2013-01-02 09:19:39 +11:00
rmackay9
120b494d83 Filter: #include AP_Buffer.h no longer needed now that completementary filter has been moved to InertialNav library 2013-01-02 09:19:39 +11:00
rmackay9
3aca61cefb AP_Motors: remove unnecessary opposite_motor array (no longer needed with new stability patch) 2013-01-02 09:19:17 +11:00
rmackay9
41cc1c74d8 AP_InertialNav: increase time constant for Z axis to 7 seconds 2013-01-02 09:19:17 +11:00
rmackay9
a76aec675a AP_InertialSensor: resolved compile warning re uninitialised variable 2013-01-02 09:18:03 +11:00
rmackay9
90d7f00965 AP_GPS_MTK16: saved 22 bytes of ram by moving error message into program space.
Perhaps there's no point in writing an error message to a console that likely nobody will be viewing anyway.
2013-01-02 09:18:03 +11:00
rmackay9
811550cca6 AP_GPS_MTK19: small bug fix re "==" vs "="
Also saved 22 bytes of RAM by moving error message into program space.
2013-01-02 09:16:48 +11:00
Craig@3DR
f778961acf Added support for Mediatek firmware Rev 1.9 2013-01-02 09:16:47 +11:00
rmackay9
557f4e65de AP_InertialNav: small performance improvement by replacing mul_transpose with direct multiplication of Z axis accel correction to specific elements of dcm 2013-01-02 09:12:40 +11:00
rmackay9
1f7614929f AP_AHRS: save trim to eeprom when set_trim is called 2013-01-02 09:12:17 +11:00
rmackay9
e9fa5dec0f AP_InertialNav: make use of ahrs library's get_accel_ef method to save some cpu cycles 2013-01-02 09:11:25 +11:00
rmackay9
1c08f176ea AP_AHRS: add get_accel_ef method to return earth frame accelerometer values for use in ArduCopter's inertial nav and accel based throttle 2013-01-02 09:11:25 +11:00
Andrew Tridgell
18581d0220 HAL_AVR: change order of CS pin init - fixes APM2 boot problem
We now init the MPU6k CS pin before the MS5611 CS pin. This should not
matter at all, but it turns out that it solves the APM2 boot
problem. We should investigate why, as this may indicate an electrical
problem.

Pair-Programmed-With: Pat Hickey
2013-01-02 08:55:47 +11:00
Andrew Tridgell
57bf6531b4 Progmem: use right CONFIG_HAL_BOARD #ifdefs 2013-01-01 18:26:12 +11:00
Andrew Tridgell
da10e68e87 HAL_PX4: added basic console driver (output only) 2013-01-01 18:19:18 +11:00
Andrew Tridgell
0ef003a45f AP_HAL: added PX4 board support 2012-12-30 20:02:45 +11:00
Andrew Tridgell
24a291cf66 HAL_AVR: only build on APM boards 2012-12-30 20:02:45 +11:00
Andrew Tridgell
b41440175f HAL_PX4: started on new PX4 HAL structures 2012-12-30 20:02:45 +11:00
Andrew Tridgell
0adc4afcb5 InertialSensor: add reboot option in MPU6000 test 2012-12-27 21:29:00 +11:00
Andrew Tridgell
212728be34 InertialSensor: ensure MPU6000 is out of sleep mode before configuring
the MPU6000 starts in sleep mode, and can take a while to wakeup
2012-12-27 21:28:41 +11:00
Andrew Tridgell
091c14a33e SITL: disabled buffering on stdout
this fixes the ArduPlane log dump
2012-12-24 08:00:57 +11:00
Andrew Tridgell
0186fabb3b build: allow building with the "Empty" HAL
useful for porting
2012-12-24 07:30:50 +11:00
Andrew Tridgell
122b8716a7 InertialSensor: added auto reset of MPU6000 on startup failure
this works around the problem of the MPU6000 failing to come up on DTR
reset or warm reboot
2012-12-24 07:17:03 +11:00
Andrew Tridgell
44ad850542 InertialSensor: latch the data ready pin high on new data
this ensures we don't miss a sample due to another source of delay
2012-12-23 17:46:36 +11:00
Andrew Tridgell
fcb09c3993 InertialSensor: fixed example app for new syntax 2012-12-23 12:49:34 +11:00
Andrew Tridgell
e2edad8a3f InertialSensor: fixed last sample time in MPU6000
we lost this in the final work on the DTR bug
2012-12-23 08:59:35 +11:00
Andrew Tridgell
feb11f0bc9 PX4: mark example as nobuild for now 2012-12-22 14:40:10 +11:00
Andrew Tridgell
e7b915b0f4 AP_Math: fixed error comment 2012-12-22 12:52:42 +11:00
Andrew Tridgell
463a089e5c InertialNav: fixed example build 2012-12-22 12:50:31 +11:00
Andrew Tridgell
c3dc23d295 AP_HAL: fixed warning in progmem 2012-12-22 09:49:19 +11:00
Andrew Tridgell
1a53bc783c InertialSensor: poll data ready pin instead of an interrupt for MPU6k 2012-12-22 09:16:31 +11:00
Pat Hickey
563ca3f79b AP_HAL_AVR: expose gpio pin 70 for mpu6000 interrupt input 2012-12-22 09:11:14 +11:00
Pat Hickey
1678dcc6f0 AP_HAL: GPIO INTERRUPT defines 2012-12-22 09:11:11 +11:00
Andrew Tridgell
93040e5725 AP_HAL: removed the defer_timer_process() function
this is now unused
2012-12-21 20:01:42 +11:00
Andrew Tridgell
9548e7e79e InertialSensor: simplify the data_ready interrupt handling
this avoids using the defer process code, and fixes a nasty bug that
caused the APM to lockup on reset
2012-12-21 20:01:19 +11:00
Andrew Tridgell
c5ba33d39a AP_Baro: fixed MS5611 semaphore handling 2012-12-21 19:33:57 +11:00
Andrew Tridgell
47358929e2 HAL_AVR: fixed attach_interrupt race condition 2012-12-21 19:33:57 +11:00
Andrew Tridgell
8d47a739a1 SITL: fixed a return value in snprintf functions 2012-12-20 22:46:22 +11:00
Andrew Tridgell
cd430cb6a8 RC_Channel: added no_deadzone version of set_pwm() 2012-12-20 22:41:58 +11:00