Commit Graph

3977 Commits

Author SHA1 Message Date
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
Randy Mackay
54cb815fec AP_Notify: add gps glitching and failsafe flags 2013-09-24 21:41:51 +09:00
Randy Mackay
a2c0415ba9 GPS_Glitch: make enable/disable a parameter 2013-09-24 21:41:42 +09:00
Randy Mackay
78124f2fca GPS_Glitch: remove unused recovered flag 2013-09-24 21:41:38 +09:00
Randy Mackay
90953a96e5 ToshibaLED: flash blue-yellow for gps failsafe and glitch 2013-09-24 21:41:25 +09:00
Randy Mackay
4bac26171b AP_Notify: add gps_glitch flag 2013-09-24 21:41:22 +09:00
Randy Mackay
262fcb301a InertialNav: rename set_current_position to set_home_position 2013-09-24 21:41:19 +09:00
Randy Mackay
81dd4f8b0c InertialNav: integrate GPS glitch detection 2013-09-24 21:41:13 +09:00
Randy Mackay
4dcfce7104 GPS_Glitch: glitch detection class 2013-09-24 21:41:10 +09:00
Randy Mackay
c6a99ac24a AutoTest: add support for GPS glitching 2013-09-24 21:41:04 +09:00
Andrew Tridgell
c1d56f74b5 AP_Common: change flymaple product ID to 0x100
keep it well away from the Invensense product IDs for the MPU6000
2013-09-24 13:51:28 +10:00
Mike McCauley
7850d1f2ce AP_Progmem: Add Flymaple support 2013-09-24 13:51:28 +10:00
Mike McCauley
b7e182e056 AP_Notify: Add flymaple LED definitions 2013-09-24 13:51:28 +10:00
Mike McCauley
4d10a96077 AP_InertialSensor: Add flymaple support 2013-09-24 13:51:27 +10:00
Mike McCauley
ec5425578e AP_HAL: Added Flymaple board 2013-09-24 13:33:25 +10:00
Mike McCauley
8f61a36e58 AP_Common: Flymaple compatibility 2013-09-24 13:33:25 +10:00
Mike McCauley
e3c20f06ac AP_Baro: Chnages to flymaple port.
Flymaple has no EOC pin
2013-09-24 13:33:25 +10:00
Mike McCauley
c1d3bedb60 AP_Airspeed: changes for Flymaple port pins and caibration constants 2013-09-24 13:33:25 +10:00
Mike McCauley
9bfc52d9af HAL_FLYMAPLE: initial port to flymaple board
See libraries/AP_HAL_FLYMAPLE/FlymaplePortingNotes.txt
2013-09-24 13:32:50 +10:00
Mike McCauley
2fa0c39f3a AP_Compass: added Flymaple orientation 2013-09-24 13:18:35 +10:00
Andrew Tridgell
37ad9e3f82 PID: fixed example build 2013-09-24 11:57:21 +10:00
Andrew Tridgell
d64660739e AP_OpticalFlow: fixed example build 2013-09-24 11:57:14 +10:00
Andrew Tridgell
448167e958 AP_GPS: fixed examples build 2013-09-24 11:57:03 +10:00
Andrew Tridgell
af2d7232c5 APM_Control: make the default time constant 0.75
thanks to Tom for the testing!
2013-09-24 07:37:12 +10:00
Andrew Tridgell
770b7b5901 AP_InertialSensor: prevent a lockup in MPU6000 driver
thanks to the VRBrain port for noticing this bug.

Failing to get the semaphore is an expected error with the MPU6000, as
we read data both from timer context and mainline code. That means
semaphore conflicts are inevitable. We shouldn't consider them an
error, and shouldn't panic when some arbitrary number of them have
happened since boot.

Instead the wait_for_sample() code checks that we receive new data at
least every 50ms. That is a much safer test.
2013-09-23 22:48:36 +10:00
Andrew Tridgell
36ea705956 AP_OpticalFlow: fixed build with print() API change 2013-09-23 18:10:22 +10:00
Andrew Tridgell
0e9aef7e52 AP_HAL: changed base defines for print()
this avoids a conflict with wirish from libmaple
2013-09-23 18:10:21 +10:00
Mike McCauley
2e061fc507 AP_Param: Fix compiler warning on Flymaple 2013-09-23 18:10:21 +10:00
Mike McCauley
4c65c42411 AP_Compass: fixed ARM 32 bit compatibility 2013-09-23 18:10:21 +10:00
Andrew Tridgell
87bb3bc5dc AP_HAL: added AP_HAL_PX4 define 2013-09-22 16:02:42 +10:00
Andrew Tridgell
21010104e6 AP_HAL_Empty: added register_io_process() 2013-09-22 16:02:05 +10:00
Andrew Tridgell
928e06f52c AP_HAL: use fabs() in print
fixes build on Arduino
2013-09-22 13:18:40 +10:00
Andrew Tridgell
45d9140946 AP_HAL_SMACCM: updates for new API 2013-09-22 12:22:15 +10:00
Andrew Tridgell
40af9ab674 AP_HAL_PX4: updates for new API 2013-09-22 12:22:05 +10:00
Andrew Tridgell
d0bb998352 AP_HAL_Empty: updates for new API 2013-09-22 12:21:54 +10:00
Andrew Tridgell
dbb70fc57c AP_HAL_AVR_SITL: implement betterstream functions in AP_HAL
this gives more consistancy between ports
2013-09-22 12:21:22 +10:00
Andrew Tridgell
33fe27a104 AP_HAL_AVR: implement betterstream functions in AP_HAL
this gives more consistancy between ports
2013-09-22 12:21:11 +10:00
Andrew Tridgell
d46f5f6943 AP_HAL: implement betterstream functions in AP_HAL
this gives more consistancy between ports
2013-09-22 12:20:59 +10:00
Michael Oborne
54fc004956 SITL: fix sitl timer issues under cygwin 2013-09-21 22:06:38 +10:00
Andrew Tridgell
fc119d9b80 AP_Baro: cleaned up temperature and pressure units
thanks to Mike McCauley for pointing this out
2013-09-21 21:30:41 +10:00
Andrew Tridgell
7de47931a8 DataFlash: use %f not %.6f 2013-09-21 15:48:39 +10:00
Andrew Tridgell
16a7faa223 AP_Param: use %f not %.6f for param show 2013-09-21 15:45:19 +10:00
Andrew Tridgell
0d662c52b3 AP_HAL: fixed length return from snprintf 2013-09-21 15:45:05 +10:00
Andrew Tridgell
0063f1fad8 AP_HAL: added Util.cpp
common printf functions
2013-09-21 14:25:42 +10:00
Andrew Tridgell
05b426c1fc HAL_PX4: use common printf implementation on UARTs 2013-09-21 14:23:52 +10:00
Andrew Tridgell
f5c0f765fc AP_HAL_SMACCM: use common printf implementation 2013-09-21 14:23:13 +10:00
Andrew Tridgell
b9d6f8e8b1 AP_HAL_AVR: removed unused script 2013-09-21 13:30:02 +10:00
Andrew Tridgell
85b3f0d18d AP_HAL: expanded printf test suite 2013-09-21 13:29:52 +10:00
Andrew Tridgell
e12a4178f3 AP_HAL_SMACCM: convert to new AP_HAL printf 2013-09-21 13:29:40 +10:00
Andrew Tridgell
80e2a5cc32 AP_HAL_PX4: convert to new AP_HAL printf 2013-09-21 13:29:32 +10:00
Andrew Tridgell
4c1925b578 AP_HAL_Empty: convert to new AP_HAL printf 2013-09-21 13:29:22 +10:00
Andrew Tridgell
bb44fa4385 AP_HAL_AVR_SITL: convert to new AP_HAL printf 2013-09-21 13:29:12 +10:00
Andrew Tridgell
60122f9877 AP_HAL: moved printf implementation from AP_HAL_AVR to AP_HAL
this gives a common printf implementation on all boards, which
simplifies testing, and also simplifies porting to new boards
2013-09-21 13:28:46 +10:00
Andrew Tridgell
4ad4b60fbc HAL: added Printf test sketch
for testing new non-asm printf code
2013-09-21 11:16:08 +10:00
Andrew Tridgell
16a0dfc38c HAL_AVR: changed to C implementation of float formatting
Many thanks to Soren Kuula for this work!
2013-09-21 11:16:08 +10:00
Randy Mackay
4b18c670e3 DataFlash: explicitly print floats to 6 dec places
C++ default is to print 6 decimal places but nuttx displays none by
default
2013-09-20 22:13:02 +09:00
Randy Mackay
3f84e0adf6 AP_Param: explicitly print floats to 6 dec places
C++ default is to print 6 decimal places but nuttx displays none by
default
2013-09-20 22:12:33 +09:00
Andrew Tridgell
4d2bfe1078 AP_InertialSensor: fixed another example build 2013-09-19 21:09:34 +10:00
Andrew Tridgell
e1aa6e3ff1 libraries: fixed examples for no flash_leds() callback 2013-09-19 18:38:28 +10:00
Andrew Tridgell
f8e9d48a76 AP_InertialSensor: removed the flash_leds() callback
AP_Notify now handles this
2013-09-19 18:32:19 +10:00
Andrew Tridgell
66ee484b3c AP_Notify: convert to unix style file 2013-09-19 16:27:31 +10:00