Andrew Tridgell
7ecf8981b9
SITL: added dummy SPI and make RCInput 50Hz
2012-12-20 14:52:34 +11:00
Andrew Tridgell
e020694c03
SITL: fixed build of apm1/apm2 target
2012-12-20 14:52:34 +11:00
Andrew Tridgell
4cff98dcae
AP_HAL: added AP_HAL_BOARD_DRIVER define
...
this makes example sketches easier to read
2012-12-20 14:52:33 +11:00
Andrew Tridgell
abbe37be37
SITL: added emulated airspeed sensor on a pin
2012-12-20 14:52:33 +11:00
Andrew Tridgell
46f7c9e92b
SITL: added basic analogin implementation
2012-12-20 14:52:33 +11:00
Andrew Tridgell
472b45bc2a
SITL: fixed use of local printf() method in UART driver
2012-12-20 14:52:33 +11:00
Andrew Tridgell
7be507948f
SITL: added SITL_State::loop_hook()
...
this prevents us using so much CPU time, and ensures stdout is flushed
2012-12-20 14:52:33 +11:00
Andrew Tridgell
69bebbcaf8
SITL: removed old SITL code
2012-12-20 14:52:33 +11:00
Andrew Tridgell
0c9d37e2ee
SITL: added RCInput and RCOutput
2012-12-20 14:52:33 +11:00
Andrew Tridgell
28f0ce6185
Build: use -O0 for SITL
2012-12-20 14:52:33 +11:00
Andrew Tridgell
dcc17dad94
SITL: added panic() method in scheduler
2012-12-20 14:52:33 +11:00
Andrew Tridgell
475496cee2
Revert "Arduino.mk: use target variables rather than recursive make for apm1, apm2.."
...
This reverts commit fcd58cc1d7892bb8b45db75c35e1bdccaa2d47bb.
still doesn't work ...
2012-12-20 14:52:33 +11:00
Andrew Tridgell
975506c840
Build: add debugging in SITL build
2012-12-20 14:52:33 +11:00
Andrew Tridgell
448fc6719f
HAL_Empty: fixed return in dataflash
2012-12-20 14:52:33 +11:00
Andrew Tridgell
6627e7ea0e
HAL_Empty: fixed I2CDriver declaration
2012-12-20 14:52:33 +11:00
Andrew Tridgell
5f7f6966af
SITL: fixed GPS and UART startup
2012-12-20 14:52:32 +11:00
Andrew Tridgell
334b96b375
SITL: switched to empty driver for unimplemented backends
2012-12-20 14:52:32 +11:00
Andrew Tridgell
18db7b2efd
GPS: move _port setting to init()
...
this is needed to avoid constructor ordering dependencies
2012-12-20 14:52:32 +11:00
Pat Hickey
107ab1a694
AP_Baro: translated to SPI transactions
2012-12-20 14:52:32 +11:00
Pat Hickey
b502732249
AP_InertialSensor: rewrite basic code for spi device transactions
...
* I'm not touching that DMP stuff because I'm pretty convinced it should
instead be deprecated
2012-12-20 14:52:32 +11:00
Pat Hickey
3153105682
AP_HAL_AVR: spi transaction handle null RX properly
2012-12-20 14:52:32 +11:00
Pat Hickey
992de8c2b9
AP_ADC_ADS7844: changed to use spidevicedriver transaction
2012-12-20 14:52:32 +11:00
Pat Hickey
b43b003777
AP_ADC: fix typo in test
2012-12-20 14:52:32 +11:00
Pat Hickey
5c1e7abf0e
AP_HAL_Empty: add spi driver transaction
2012-12-20 14:52:32 +11:00
Pat Hickey
4fe889c9c5
AP_HAL_AVR: Implement bulk SPI transaction
2012-12-20 14:52:32 +11:00
Pat Hickey
d2f7402243
AP_HAL: add bulk transaction to SPIDeviceDriver
2012-12-20 14:52:32 +11:00
Pat Hickey
087b1fa196
AP_HAL_AVR: AnalogIn returns new ADCSource each time a channel is requested
...
* fixes a bug where multiple sources created as pin -1, then change to
appropriate pin on mavlink messages. Make treat each creation as distinct
object.
2012-12-20 14:52:32 +11:00
Pat Hickey
d5a46ca1e3
AP_ADC: uses scheduler panic
2012-12-20 14:52:32 +11:00
Pat Hickey
d92e8045c1
AP_Baro: uses scheduler panic
2012-12-20 14:52:31 +11:00
Pat Hickey
2c2279722b
AP_Baro_MS5611: use scheduler panic
2012-12-20 14:52:31 +11:00
Pat Hickey
a4f41c1d29
AP_InertialSensor: MPU6000 uses scheduler panic
2012-12-20 14:52:31 +11:00
Pat Hickey
90670cb499
AP_HAL_AVR: panic in spidevice0
2012-12-20 14:52:31 +11:00
Pat Hickey
885fc79af5
AP_HAL_Empty: add panic method to scheduler
2012-12-20 14:52:31 +11:00
Pat Hickey
9656b0ad0e
AP_HAL_AVR: add panic method to scheduler
2012-12-20 14:52:31 +11:00
Pat Hickey
c86004d676
AP_HAL: Add panic method to scheduler
2012-12-20 14:52:31 +11:00
Pat Hickey
8fe3c5e5d6
Arduino.mk: use target variables rather than recursive make for apm1, apm2..
2012-12-20 14:52:31 +11:00
Pat Hickey
76dabef7d6
AP_HAL_Empty: fix public declaration for i2cdriver
2012-12-20 14:52:31 +11:00
Pat Hickey
eda450a166
AP_HAL: I2CDriver bug fixed for pure virtual base class
2012-12-20 14:52:31 +11:00
Pat Hickey
de6f9e52b2
AP_HAL_Empty: finished up scaffolding
2012-12-20 14:52:31 +11:00
Pat Hickey
4c930b77a4
DataFlash_Empty defined
2012-12-20 14:52:31 +11:00
Pat Hickey
b7cd4312f3
AP_HAL_Empty: more scaffolding complete
2012-12-20 14:52:31 +11:00
Andrew Tridgell
7d27e420ae
AP_HAL: remove unnecessary Arduino.h includes
2012-12-20 14:52:30 +11:00
Andrew Tridgell
6a56f72918
Build: added empty Arduino.h
2012-12-20 14:52:30 +11:00
Andrew Tridgell
98ead51801
SITL: fill in a lot more of the AP_HAL SITL backend
2012-12-20 14:52:30 +11:00
Andrew Tridgell
4a54ffb523
Baro: use local include to reduce boilerplate
2012-12-20 14:52:30 +11:00
Andrew Tridgell
d473203737
Build: added global board targets
2012-12-20 14:52:30 +11:00
Pat Hickey
3cc204321c
AP_Motors_Class: add Progmem typedef
2012-12-20 14:52:30 +11:00
Pat Hickey
8d0c56a19a
AP_Curve: put template in cpp file
...
* required for the new funny way avr-gcc 4.7 does PSTR.
2012-12-20 14:52:30 +11:00
Pat Hickey
6ea38432b9
AP_Progmem_AVR: prog_char typedef was deprecated in avr-gcc 4.7, add compat def
2012-12-20 14:52:30 +11:00
Pat Hickey
3e3c0f57ae
AP_HAL_Empty: started building out the scaffolding
2012-12-20 14:52:30 +11:00
Pat Hickey
b79bd01761
SPIDriver: namespace explicit to better permit copypasta
2012-12-20 14:52:30 +11:00
Pat Hickey
527dfb5af4
AP_HAL: remove EmptyUARTDriver
2012-12-20 14:52:30 +11:00
Pat Hickey
63eb1dc85d
AP_HAL_AVR_SITL: separate header for AP_HAL_MAIN and Private
2012-12-20 14:52:30 +11:00
Pat Hickey
07be511f5e
AP_HAL_AVR: move AP_HAL_MAIN into separate header
2012-12-20 14:52:30 +11:00
Pat Hickey
d18b9feaa1
AP_HAL: add HAL_BOARD_EMPTY to AP_HAL_BOARDS
2012-12-20 14:52:30 +11:00
Pat Hickey
104ad8f6c8
AP_Menu: save a little ram by reducing MENU_ARGS_MAX to 3
...
* we only ever use 3 in arducopter's gyro gain setup
2012-12-20 14:52:29 +11:00
Andrew Tridgell
af12c18dea
AP_Param: setup var_info and num_vars earlier
...
needed for AP_HAL startup
2012-12-20 14:52:29 +11:00
Andrew Tridgell
8916b280fd
SITL: filled in more of the HAL SITL backend
2012-12-20 14:52:29 +11:00
Andrew Tridgell
e10e3ee3be
AP_HAL: fixed argv declaration to match getopt()
2012-12-20 14:52:29 +11:00
Andrew Tridgell
964bc56aa2
DataFlash: reinstate SITL dataflash code
2012-12-20 14:52:29 +11:00
Andrew Tridgell
18824c7ef5
AP_HAL: expose argc/argv in hal.init()
...
used for SITL port
2012-12-20 14:52:29 +11:00
Pat Hickey
ddafd4ffbb
memcheck: need AP_HAL_Boards import for CONFIG_HAL_BOARD configs to make sense
...
* with great programming in c preprocessor comes great responsibility
2012-12-20 14:52:29 +11:00
Pat Hickey
d93d932831
ArduCopter: defines fixes
...
Conflicts:
libraries/AP_Common/Arduino.mk
2012-12-20 14:52:28 +11:00
Pat Hickey
f060df9747
AP_HAL_AVR: now that we can detect the APM revision, use wdt reboot on apm2
2012-12-20 14:52:28 +11:00
Pat Hickey
7622b725c9
AP_Limits: fixes to use hal.storage for eeprom access
2012-12-20 14:52:28 +11:00
Pat Hickey
b0b3fa33b4
AP_Limits: fix for AP_Param var_info registration in AP_Limit_Module
...
* AP_Limit_Module class does not have its own var_info table.
2012-12-20 14:52:28 +11:00
Pat Hickey
304afd45e1
AP_Limits: export all internal headers from AP_Limits.h
2012-12-20 14:51:40 +11:00
Pat Hickey
f1869d1aa6
AP_GPS: GPS_406_test ported to AP_HAL
2012-12-20 14:51:40 +11:00
Pat Hickey
4c5aaef245
removed AP_PID test, deprecated and forgotten
2012-12-20 14:51:40 +11:00
Pat Hickey
308281f252
DataFlash_test ported to AP_HAL
2012-12-20 14:51:40 +11:00
Pat Hickey
a28c614fbe
remove RC_Channel2 test sketch: deprecated by AP_HAL
2012-12-20 14:51:40 +11:00
Andrew Tridgell
c4b8959202
DataFlash: added SITL headers
2012-12-20 14:51:40 +11:00
Pat Hickey
a4fdfd999c
remove AP_RangeFinder_test: deprecated by AP_HAL
2012-12-20 14:51:40 +11:00
Pat Hickey
d6cb240468
AP_GPS: GPS_NMEA_test ported to AP_HAL
...
* I wasn't able to demonstrate the library/test sketch working with my
ublox gps.
2012-12-20 14:51:40 +11:00
Andrew Tridgell
d42cbb791f
HAL_SITL: start filling in more of SITL framework
2012-12-20 14:51:40 +11:00
Andrew Tridgell
1342a82ba7
HAL_AVR: catch atomic nesting errors
2012-12-20 14:51:40 +11:00
Andrew Tridgell
e57834d763
DataFlash: added SITL header
2012-12-20 14:51:40 +11:00
Andrew Tridgell
551ff0c8b8
AP_HAL_AVR: prevent build of AVR code on non-AVR platforms
2012-12-20 14:51:40 +11:00
Andrew Tridgell
9b15d0e714
Build: update makefile for SITL build
2012-12-20 14:51:40 +11:00
Andrew Tridgell
2c1682f310
InertialSensor: use AP_HAL progmem
2012-12-20 14:51:39 +11:00
Andrew Tridgell
7582c882e6
Motors: updates for new AP_Param API
2012-12-20 14:51:39 +11:00
Andrew Tridgell
9d1f43928c
Mount: updates for new AP_Param API
2012-12-20 14:51:39 +11:00
Andrew Tridgell
f393389db2
Progmem: removed desktop specific progmem handling
2012-12-20 14:51:39 +11:00
Andrew Tridgell
9b3ed0b683
AP_Limits: updates for new AP_Param API
2012-12-20 14:51:39 +11:00
Andrew Tridgell
265707401f
memcheck: fix for new HAL_SITL
2012-12-20 14:51:39 +11:00
Andrew Tridgell
fc8bd8cf95
SITL: updates for new AP_Param API
2012-12-20 14:51:39 +11:00
Andrew Tridgell
306d53b4ae
PID: updates for new AP_Param API
2012-12-20 14:51:39 +11:00
Andrew Tridgell
cead629fc4
Filter: fixed merge error
2012-12-20 14:51:39 +11:00
Andrew Tridgell
4aa16303ed
RC_Channel: updates for new AP_Param API
2012-12-20 14:51:39 +11:00
Andrew Tridgell
c064becf28
AP_InertialSensor: updates for new AP_Param API
2012-12-20 14:51:39 +11:00
Andrew Tridgell
62e396167a
AP_InertialNav: updates for new AP_Param API
2012-12-20 14:51:39 +11:00
Andrew Tridgell
18fb9c67f6
AP_GPS: use AP_Progmem
2012-12-20 14:51:39 +11:00
Andrew Tridgell
69af1add15
Declination: fixes for AP_HAL progmem interface
2012-12-20 14:51:38 +11:00
Andrew Tridgell
c181498e36
Compass: updates for new AP_Param API
2012-12-20 14:51:38 +11:00
Andrew Tridgell
53470aff09
AP_Camera: updates for new AP_Param API
2012-12-20 14:51:38 +11:00
Andrew Tridgell
dbd9814327
AP_Baro: get rid of apm2_hardware parameter in init
2012-12-20 14:51:38 +11:00
Andrew Tridgell
cafeaf91d6
AP_Baro: updates for new AP_Param API
2012-12-20 14:51:38 +11:00
Andrew Tridgell
b5a23d934b
Airspeed: updates for new AP_Param API
2012-12-20 14:51:38 +11:00
Andrew Tridgell
5c148153ac
AP_AHRS: updates for new AP_Param API
2012-12-20 14:51:38 +11:00
Andrew Tridgell
a18298ed76
APM_PI: updates for new AP_Param API
2012-12-20 14:51:38 +11:00
Andrew Tridgell
e45f32a4b6
APM_OBC: updates for new AP_Param API
2012-12-20 14:51:38 +11:00
Andrew Tridgell
9349259487
AC_PID: updates for new AP_Param API
2012-12-20 14:51:38 +11:00
Andrew Tridgell
5a9ba4aeb4
APM_Control: updates for new AP_Param API
2012-12-20 14:51:38 +11:00
Andrew Tridgell
95d4cc2ce9
AP_Param: change method of loading defaults
...
this avoids a dependency on the constructor ordering by loading
defaults for each object separately
2012-12-20 14:51:38 +11:00
Andrew Tridgell
562b6a20c9
AP_HAL_AVR: conditionally build AVR specific helper code
2012-12-20 14:51:38 +11:00
Pat Hickey
54bab59066
AP_HAL_AVR_SITL: add initial scaffolding
2012-12-20 14:51:38 +11:00
Pat Hickey
475da4eca4
CONFIG_HAL_BOARD - test sketches fixed up, build all passes
2012-12-20 14:51:37 +11:00
Pat Hickey
25e597d3b3
AP_HAL_AVR: Refactor APM1 and APM2 instances to use CONFIG_HAL_BOARD
2012-12-20 14:51:37 +11:00
Pat Hickey
fa02ad7d4c
AP_HAL: preprocessor enum of HAL_BOARD
2012-12-20 14:51:37 +11:00
Pat Hickey
da99f5f283
Arduino.mk: compile with CONFIG_HAL_BOARD define from the user's config.mk
2012-12-20 14:51:37 +11:00
Andrew Tridgell
2ea243e45b
AP_Baro: removed unused code
2012-12-20 14:51:37 +11:00
Andrew Tridgell
13309cceb3
AP_GPS: reverted formatting of GPS messages
2012-12-20 14:51:37 +11:00
Pat Hickey
cb70590227
AP_HAL_AVR: remove Dataflash driver
2012-12-20 14:51:37 +11:00
Pat Hickey
9cee6cc941
AP_HAL: remove Dataflash driver
2012-12-20 14:51:37 +11:00
Pat Hickey
00cd4b1857
AP_HAL_AVR: Do not init HAL's dataflash
2012-12-20 14:51:37 +11:00
Andrew Tridgell
7d70ff409d
AP_OpticalFlow: use max() macro
2012-12-20 14:51:37 +11:00
Andrew Tridgell
6ee32ea872
AP_Limits: reverted parameter doc changes
2012-12-20 14:51:37 +11:00
Andrew Tridgell
b70f7f57ba
AP_Compass: restore low speed change on register read failure
2012-12-20 14:51:37 +11:00
Pat Hickey
7b9b088261
DataFlash: AP_HAL port fixups
2012-12-20 14:51:37 +11:00
Pat Hickey
aaffd9d96e
DataFlash: APM2 ported to AP_HAL SPIDeviceDriver
2012-12-20 14:51:36 +11:00
Pat Hickey
4f07a90b2e
DataFlash: apm1 fixups
2012-12-20 14:51:36 +11:00
Pat Hickey
ef1db1a3fc
DataFlash: don't take a delay_cb
2012-12-20 14:51:36 +11:00
Pat Hickey
0e5ff36c6c
DataFlash: DataFlash_APM1 rewritten in terms of AP_HAL spi primitives
2012-12-20 14:51:36 +11:00
Pat Hickey
a81de007d8
DataFlash: headers switch to use AP_HAL SPI device driver types
2012-12-20 14:51:36 +11:00
Pat Hickey
cc699a2a4e
DataFlash: conform to ordinary stdint types
...
* s/unsigned char/uint8_t/g
* changed all type 'byte' to uint8_t
2012-12-20 14:51:36 +11:00
Pat Hickey
fff4e87619
Arduino.mk: allow user avrdude flags
2012-12-20 14:51:36 +11:00
Andrew Tridgell
8b6ad6d559
SITL: removed SITL_debug()
...
not needed any more
2012-12-20 14:51:36 +11:00
Andrew Tridgell
38031edc9d
AP_InertialSensor: removed spurious init() method
2012-12-20 14:51:36 +11:00
Andrew Tridgell
c9a81d7de6
AP_InertialSensor: fixed sign of 16 bit SPI transfer
...
this gets accels and gyros working again
2012-12-20 14:51:36 +11:00
Pat Hickey
dbcc4fc6a5
AP_InertialSensor: variable wibble
2012-12-20 14:51:36 +11:00
Pat Hickey
9aca19415a
AP_InertialSensor: robust semaphores
2012-12-20 14:51:36 +11:00
Pat Hickey
1019fb45e7
AP_InertialSensor: remove sei in data interrupt handler
2012-12-20 14:51:36 +11:00
Pat Hickey
af852aa6a9
AP_HAL_AVR: init dataflash from HAL init
2012-12-20 14:51:35 +11:00
Pat Hickey
7f02993994
AP_HAL_AVR: less chatty Dataflash
2012-12-20 14:51:35 +11:00
Pat Hickey
09c14f3807
AP_ADC: more robust semaphores
2012-12-20 14:51:35 +11:00
Pat Hickey
bfd03ab40c
AP_Baro: robust spi device
2012-12-20 14:51:35 +11:00
Pat Hickey
60f7788be4
AP_Baro: robust calibration
2012-12-20 14:51:35 +11:00
Pat Hickey
eaa0a990a4
AP_Baro: MS5611 robust semaphores
2012-12-20 14:51:35 +11:00
Pat Hickey
52925b655f
AP_Baro: MS5611 uses delay in busy wait
2012-12-20 14:51:35 +11:00
Pat Hickey
6943d32d76
SITL: fixed to build under AP_HAL
...
* won't work or naything like that
2012-12-20 14:51:35 +11:00
Pat Hickey
4d0b1e6571
AP_Relay: add init method
2012-12-20 14:51:35 +11:00
Pat Hickey
70a3ee738a
gcs console: uartb fixup
2012-12-20 14:51:35 +11:00
Pat Hickey
7017a35fc3
AP_Airspeed: fix for AnalogIn read_average
2012-12-20 14:51:35 +11:00
Pat Hickey
8f99a12374
AP_ADC_AnalogSource: fix for new AnalogIn interface
2012-12-20 14:51:35 +11:00
Pat Hickey
a6d80af9ed
AP_ADC_AnalogSource: obey changes to AnalogSource interface
2012-12-20 14:51:35 +11:00
Pat Hickey
2be552ea22
AP_GPS: less chatty autodetect
2012-12-20 14:51:35 +11:00
Pat Hickey
d72c5cf828
AP_GPS: uartB fixup
2012-12-20 14:51:35 +11:00
Andrew Tridgell
5840ded767
AHRS: removed constrain() defines
2012-12-20 14:51:34 +11:00
Andrew Tridgell
09e7b0b592
AHRS: removed unused variable
2012-12-20 14:51:34 +11:00
Pat Hickey
70f34656bc
AP_AHRS: uart1 -> uartB fixup
2012-12-20 14:51:34 +11:00