Andrew Tridgell
f3005c4267
DataFlash: use bulk SPI transfer() method
...
this reduces the per-byte overhead of flash logging to about 3.9 usec
2013-01-13 17:31:42 +11:00
Andrew Tridgell
a06202e750
HAL_SMACCM: added bulk SPI transfer() method
2013-01-13 17:31:42 +11:00
Andrew Tridgell
3dc0a990a1
HAL_Empty: added bulk SPI transfer() method
2013-01-13 17:31:42 +11:00
Andrew Tridgell
b5b7fd2f9a
HAL_AVR: added bulk transfer() method
...
this is quite a lot faster than the byte at a time method
2013-01-13 17:31:42 +11:00
Andrew Tridgell
6415f00ce3
AP_HAL: added a bulk transfer() method
...
very useful for dataflash
2013-01-13 17:31:42 +11:00
Pat Hickey
af8f576c67
AP_HAL_SMACCM: add LICENSE file
2013-01-12 11:54:19 -08:00
Pat Hickey
3d0a4394b6
DataFlash Empty: conform to blockread/write virtual if
2013-01-12 10:44:05 -08:00
Andrew Tridgell
7274d847f8
DataFlash: update for new block API
2013-01-12 17:21:21 +11:00
Andrew Tridgell
28a0ba6c4a
DataFlash: added block based dataflash writes
...
these are about 10x faster than the old writes
2013-01-12 17:21:04 +11:00
Andrew Tridgell
252d11ccfa
AP_GPS: initialise _step to zero in all drivers
...
new() does not zero-fill memory
2013-01-12 16:04:23 +11:00
Andrew Tridgell
64734dc51c
AP_Scheduler: show scheduler task slips
...
this is when a task doesn't run at the desired rate
2013-01-12 13:04:52 +11:00
Andrew Tridgell
1cb64dacf9
AP_Scheduler: expose debug variable
2013-01-12 12:06:55 +11:00
Andrew Tridgell
7ddadcf34e
AP_Scheduler: added new scheduler library
...
this will be used for main loop control
2013-01-12 12:02:57 +11:00
Andrew Tridgell
30b50a858d
Filter: fixed a warning on PX4
2013-01-11 21:17:34 +11:00
Andrew Tridgell
6142eac4b4
AP_InertialSensor: simplify get_delta_time() API
...
use a single float return rather than two APIs.
This also changes the MPU6k driver to match the new 2.9 behaviour of
using the MPU6k sample timing instead of micros()
2013-01-11 21:17:21 +11:00
Andrew Tridgell
7c7a215934
HAL_PX4: fixes for new Scheduler API
2013-01-11 12:25:26 +11:00
Andrew Tridgell
2fe4656a50
Merge pull request #4 from GaloisInc/master
...
Thanks Pat!
2013-01-10 17:24:59 -08:00
Andrew Tridgell
6aecdb3d7d
HAL_AVR: tweak the default serial buffer sizes
...
this reduces memory fragmentation a lot, saving memory
2013-01-11 11:16:09 +11:00
Andrew Tridgell
0cb8192861
HAL_AVR: ensure we can handle a 256 size buffer
2013-01-11 10:32:52 +11:00
Andrew Tridgell
cf04935438
HAL_AVR: make Console a direct wrapper of uartA
...
this saves a bunch of memory, and we don't really need separate
console support on AVR
2013-01-11 10:23:51 +11:00
Pat Hickey
7b5153c79b
AP_HAL_AVR_SITL: main calls system_initialized
2013-01-10 14:37:22 -08:00
Pat Hickey
4d5d08ad10
AP_HAL_Empty: main calls system_initialized
2013-01-10 14:37:07 -08:00
Pat Hickey
2b621dc579
AP_HAL_AVR: main calls system_initialized
2013-01-10 14:36:53 -08:00
James Bielman
25d078e2bd
AP_Baro_MS5611: Don't panic if taking semaphore fails during init.
...
- The MPU6000 holds on to the I2C semaphore for quite some time during
init, which caused a panic when the MS5611 is also on I2C.
2013-01-10 14:22:41 -08:00
James Bielman
edfddbab57
AP_HAL_SMACCM: Implement new scheduler methods.
...
- Set the system initialized after call to "setup" in main.
2013-01-10 14:22:15 -08:00
Pat Hickey
910e09fc96
AP_InertialSensor_MPU6000: fix sync/async semaphore usage with new scheduler
2013-01-10 14:12:19 -08:00
Pat Hickey
83adb72f16
AP_HAL_Empty: Stub out new Scheduler methods
2013-01-10 14:07:44 -08:00
Pat Hickey
a228519b18
AP_HAL_AVR_SITL: Implement new Scheduler methods
2013-01-10 14:07:43 -08:00
Pat Hickey
930a789b25
AP_HAL_AVR: Implement new scheduler methods
2013-01-10 14:07:43 -08:00
Pat Hickey
7a0f95c11c
AP_HAL: add Scheduler methods in_timerprocess, system_initialize
2013-01-10 14:07:43 -08:00
Pat Hickey
6d64bf2921
AP_HAL_SMACCM: Semaphores fixup
2013-01-10 13:52:30 -08:00
James Bielman
9abf3d2c0f
AP_HAL_SMACCM: Panic if taking a semaphore held by current thread.
...
- Catches bugs with attempted recursive semaphore taking.
2013-01-10 13:16:43 -08:00
Andrew Tridgell
ea3b405959
MAVLink: moved CRC table into program
...
this saves 256 bytes of memory
2013-01-10 21:28:07 +11:00
Andrew Tridgell
f3783b0306
AP_GPS: put SIRF init_messages in progmem
...
this saves 32 bytes of memory
2013-01-10 21:27:41 +11:00
Andrew Tridgell
dbad61816b
AP_InertialSensor: only build Oilpan driver on APM1
2013-01-10 21:01:55 +11:00
Andrew Tridgell
2c603a0960
AP_Baro: only build BMP085 driver on APM1
2013-01-10 21:01:07 +11:00
Andrew Tridgell
63634c4e8a
HAL_SMACCM: fixed build warning
2013-01-10 16:29:46 +11:00
Andrew Tridgell
130aaae168
HAL_AVR: switched to 8 bit mask
...
max buffer size is now 256. This makes serial faster
2013-01-10 16:29:34 +11:00
Andrew Tridgell
03b26c7d6d
AP_Motors: fixed setup of ESC update speeds
2013-01-10 15:52:46 +11:00
Pat Hickey
ea6147162a
AP_HAL_SMACCM: fix to goofed PPM_MAX_CHANNELS macro
2013-01-09 17:24:23 -08:00
Pat Hickey
8f5da03f93
AP_HAL_SMACCM: guard compilation on CONFIG_HAL_BOARD
2013-01-09 13:32:34 -08:00
Pat Hickey
59365f1b90
AP_HAL_AVR: UARTDriver guard needs AP_HAL_Boards.h
2013-01-09 13:32:13 -08:00
Pat Hickey
ab5522a20a
AP_HAL_SMACCM: remove meaningless example dir
2013-01-09 13:15:10 -08:00
James Bielman
0160a10ba7
AP_HAL_SMACCM: Increase scheduler stack sizes.
2013-01-09 11:19:51 -08:00
James Bielman
46b0742710
AP_HAL_SMACCM: Fix pin conflict between uartC and I2C.
...
- uartC is currently disconnected.
- Set uartB to USART6 for GPS communication.
2013-01-09 11:19:51 -08:00
James Bielman
7827a4a54a
ArduCopter: Add AP_HAL_SMACCM support.
...
- Added default configuration to "config.h".
- Added main function to run under FreeRTOS with HWF4.
2013-01-09 11:19:51 -08:00
James Bielman
4e0806186f
AP_HAL_SMACCM: Implement RCInput driver.
2013-01-09 11:19:51 -08:00
James Bielman
8e38ef6567
MPU6000: Flip Y and Z axes for SMACCM_HAL.
...
- The accelerometer is upside-down on the PX4FMU vs the APM2.
2013-01-09 11:19:51 -08:00
James Bielman
1309b7332a
MPU6000: Use signed addition when accumulating readings.
...
- Fixes very erratic accel readings on the PX4 board.
2013-01-09 11:19:51 -08:00
Andrew Tridgell
8cb0ed364a
AP_Baro: read 4 pressure values for every temperature value on BMP085
2013-01-09 23:44:26 +11:00
Andrew Tridgell
1ce1fa3864
AP_Baro: update example to use accumulate()
2013-01-09 23:06:24 +11:00
Andrew Tridgell
8ceabc97f1
AP_Baro: added accumulate() function
...
this allows us to read the BMP085 much faster
2013-01-09 23:05:17 +11:00
Andrew Tridgell
8f424cdf21
AP_Compass: ensure we check we got the semaphore
2013-01-09 20:42:20 +11:00
Andrew Tridgell
e76c77e86a
AP_HAL: mark semaphore take operations as WARN_IF_UNUSED
...
this prevents common bugs
2013-01-09 20:42:02 +11:00
Andrew Tridgell
90523ae975
AP_HAL: added WARN_IF_UNUSED macro
...
useful for key functions
2013-01-09 20:41:37 +11:00
Andrew Tridgell
8e1bee3a5e
HAL_AVR: make _taken volatile
2013-01-09 20:33:37 +11:00
Andrew Tridgell
f48790a56e
AP_InertialSensor: poll for new data in num_samples_available()
...
this lowers the latency for new data
2013-01-09 20:31:09 +11:00
Andrew Tridgell
4ab1cddd15
AP_InertialSensor: ensure we always have the SPI semaphore for MPU6k
2013-01-09 20:30:20 +11:00
Andrew Tridgell
9b972af307
AP_Baro: skip timer if we don't get the SPI semaphore
2013-01-09 20:27:48 +11:00
Andrew Tridgell
dc66708856
MAVLink: cope with available() returning -1
2013-01-09 13:31:00 +11:00
Andrew Tridgell
7be1335b3a
AP_Param: removed copy_name() and add token to find_by_index()
...
this allows callers to avoid another var_info traverse
2013-01-09 13:30:51 +11:00
Andrew Tridgell
c9fe7fe932
MAVLink: use buffer send and fast CRC if possible
2013-01-08 14:37:40 -08:00
Andrew Tridgell
df91734883
MAVLink: import latest upstream messages and headers
2013-01-08 14:37:40 -08:00
Andrew Tridgell
feeebae03f
GCS_MAVLink: added comm_send_buffer()
...
this reduces the overhead of sending messages
2013-01-08 14:37:39 -08:00
Andrew Tridgell
7f20f720e8
HAL_AVR: started I2C in high speed mode
...
this speeds up the compass a lot
2013-01-08 14:37:39 -08:00
Andrew Tridgell
c8ae665ac3
AP_Param: added copy_name_token()
...
this avoids an expensive var_info traversal on every copy_name call
2013-01-08 14:37:39 -08:00
Andrew Tridgell
44285cfbad
DataFlash: fixed a semaphore bug in APM1 dataflash code
2013-01-08 14:37:39 -08:00
Andrew Tridgell
b39166b71a
MPU6000: fixed minor timing bug
...
if we miss a sample due to SPI contention we shouldn't update last
sample time
2013-01-07 11:07:29 +11:00
Andrew Tridgell
f93a7d50eb
AP_GPS: fixed debug code
2013-01-07 11:06:53 +11:00
Andrew Tridgell
5ac23d358f
HAL_PX4: update for new i2cdriver interface
2013-01-07 11:05:30 +11:00
Andrew Tridgell
319e1a4e84
HAL_PX4: support setting servo rate
2013-01-07 11:05:30 +11:00
Pat Hickey
0660873fa7
AP_HAL_AVR: pull-up UART RX lines to fix GPS spoofing (Tridge)
...
Tridge discovered this bugfix:
https://groups.google.com/d/topic/drones-discuss/aek6LJeYQo8/discussion
2013-01-05 21:03:02 -08:00
Pat Hickey
1b7b096b05
AP_Relay: fix pin used on APM2/SITL per Sando on drones-discuss
...
* My bad, thanks for the fix Sandro
2013-01-05 13:51:59 -08:00
Andrew Tridgell
f7e5f88199
AP_GPS: make UBLOX driver a bit more robust
2013-01-05 20:39:31 +11:00
Andrew Tridgell
3b0398dc14
AP_GPS: fixed UBLOX example for PX4
2013-01-05 20:39:30 +11:00
Pat Hickey
dd27984eac
SITL: instansiate EmptyI2CDriver with EmptySemaphore
2013-01-04 16:20:22 -08:00
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