Commit Graph

4467 Commits

Author SHA1 Message Date
Randy Mackay
bb1664185f Copter: correct @Range of MOT_TCRV_MAXPCT parameter 2013-10-30 20:53:21 +09:00
Andrew Tridgell
c64aa0e4de AP_Airspeed: fixed I2C semaphore handling for I2C airspeed
this affects MS4525DO on APM2
2013-10-29 14:55:38 +11:00
Randy Mackay
d09fd0d035 BattMonitor: add @Increment to CAPACITY description 2013-10-29 11:23:27 +09:00
Randy Mackay
24147a370a BoardLEDs: all leds off during init 2013-10-29 10:54:08 +09:00
Andrew Tridgell
580e7b8a4a HAL_AVR: switch back to 500kHz SPI for MPU6k until we understand the issues
this is for new plane release. We need for analysis before we can
re-enable high speed SPI
2013-10-28 16:55:22 +11:00
Andrew Tridgell
5800c2a2c8 HAL_PX4: prevent excessive writes on startup from blocking
this could cause copter on PX4 to hang on startup
2013-10-28 16:12:44 +11:00
Randy Mackay
c602f7da0c AC_Fence: fix example sketch 2013-10-27 21:53:22 +09:00
Andrew Tridgell
c5b36ef3d2 AP_InertialNav: fixed example build 2013-10-27 22:11:59 +11:00
Randy Mackay
4348a272bf AP_InertialNav: remove unused velocity fns
remove get_longitude_velocity and get_latitude_velocity
2013-10-27 13:41:55 +09:00
Randy Mackay
8fc16d5cdf AP_InertialNav: add comments, make ahrs const from neurocopter
These fixes are provided by neurocopter but with my name because of
merge conflicts
_position and _velocity vectors added to save some floating point add
operations
unused reference to ins in constructor removed
2013-10-27 13:41:50 +09:00
Tobias
0b181dd995 AP_Buffer: remove header/source separation to allow arbitrary template
parameters without explicit instantiation in the cpp file.

http://stackoverflow.com/questions/495021/why-can-templates-only-be-implemented-in-the-header-file
2013-10-27 13:41:43 +09:00
Randy Mackay
e23135faa1 AP_InertialNav: bug fix for gps delay handling 2013-10-27 13:41:40 +09:00
Tobias
cfaaf4b1e7 AP_InertialNav: rename AP_Buffer functions, fix delay handling bug
The most recent value was used instead of the intended historical value
as indicated by the comment.
2013-10-27 13:41:38 +09:00
Tobias
dc62398821 AP_Buffer: add comments and rename functions to conform with the
STL-container naming conventions
Comment format changes by Randy
2013-10-27 13:41:36 +09:00
Tobias
6c825eace2 AP_InertialNav: move variable definitions to elide unused default
construction of objects (saves 106 bytes)
2013-10-27 13:41:32 +09:00
Tobias
c3309d909c AC_WPNav: make more member pointers const 2013-10-27 13:41:29 +09:00
Tobias
bb5cf4a311 AC_WPNav: make member pointer to AP_InertialNav object const since it's
never modified
2013-10-27 13:41:23 +09:00
Tobias
b94d6848de AC_Fence: replace "_ina->geT_position().z" with more efficent
"_inav->get_altitude()"
2013-10-27 13:41:19 +09:00
Tobias
596c7a25b7 AC_Fence: make member pointer to AP_InertialNav const, remove unused
gps-pointer member
2013-10-27 13:41:09 +09:00
Randy Mackay
f56d00ebb6 AC_Sprayer: add doxygen info 2013-10-27 13:40:57 +09:00
Tobias
1ecb583dd9 AC_WPNav: replace unnecessary objects with const refs 2013-10-27 13:40:53 +09:00
Tobias
c62f2e3d0c AC_Sprayer: replace unnecessary object with const ref 2013-10-27 13:40:44 +09:00
Tobias
e2c3ea0f56 AC_Sprayer: add consts, update comments
* removed some comments that were left over from the classes this class
was copypasta'ed from
2013-10-27 13:39:32 +09:00
Tobias
f4000e66e6 Filter: add consts 2013-10-27 13:39:28 +09:00
Tobias
7855d242c7 AP_Baro: add time-unit comment 2013-10-27 13:39:23 +09:00
Tobias
c9f68fcd1b AP_InertialNav: remove unused AP_InertialSensor pointer 2013-10-27 13:39:10 +09:00
Tobias
cbff58e2ed AP_InertialNav: add comments, rename incorrectly named member,
initialize member, remove redundant assignment
adjustments to original commit by randy
2013-10-27 13:39:08 +09:00
Andrew Tridgell
5af51140a9 HAL_Linux: fixed scheduler initialisation bug in Linux HAL as well 2013-10-26 18:25:27 +11:00
Andrew Tridgell
622f0dcc1d HAL_PX4: prevent threads running before subsystems are initialised
this fixes a bug where the timer thread would hang waiting for the
console on startup. This caused the "hit enter" behaviour with recent
PX4 bugs, as AnalogIn tried to read from fd==0, which was a console
read
2013-10-26 18:12:35 +11:00
Paul Riseborough
97cdd36dd8 APM_Control : Moved scaler on roll and pitch integrator to be before integrator
This means that the value of aileron and elevator trim offset won't change with airspeed
2013-10-25 22:37:49 +11:00
Randy Mackay
0049351f2f GCS_MAVLink: generate after adding RC reciever to SYS_STATUS enum 2013-10-24 16:32:49 +09:00
Randy Mackay
d1906abb5c GCS_MAVLink: add RC receiver to SYS_STATUS enum 2013-10-24 16:32:09 +09:00
Andrew Tridgell
de96ad9445 AP_GPS: fixed date handling in NMEA driver 2013-10-24 14:22:48 +11:00
Andrew Tridgell
65ebdfa786 HAL_SITL: fixed time strings in simulated NMEA GPS 2013-10-24 14:22:48 +11:00
Andrew Tridgell
6b2222c32e DataFlash: show timestamps on flash logs 2013-10-24 14:22:48 +11:00
Andrew Tridgell
34cde1a640 HAL_PX4: implement set_system_clock() 2013-10-24 14:22:48 +11:00
Andrew Tridgell
0ca82d5e3c AP_HAL: added set_system_clock() API 2013-10-24 14:22:48 +11:00
Andrew Tridgell
744819cec8 AP_GPS: added fake time to fake GPS lock 2013-10-24 14:22:48 +11:00
Andrew Tridgell
d7a9888e26 DataFlash: updates for new GPS API 2013-10-24 14:22:47 +11:00
Andrew Tridgell
19ba07a3f9 AP_InertialNav: updates for new GPS API 2013-10-24 14:22:47 +11:00
Andrew Tridgell
b7b9efd120 HAL_SITL: properly emulate timestamps on ublox and MTK 2013-10-24 14:22:47 +11:00
Andrew Tridgell
6f5ac1d553 AP_GPS: added support for GPS time in week/millisec
also adds time_epoch_usec() for MAVLink SYSTEM_TIME
2013-10-24 14:22:47 +11:00
Andrew Tridgell
6438be74e0 HAL_SITL: get the ublox GPS timestamps right in SITL 2013-10-24 14:22:47 +11:00
Andrew Tridgell
f34b1c280d AP_BattMonitor: added set_monitoring() API
needed for test sketch
2013-10-23 09:40:42 +11:00
Andrew Tridgell
d305dd5946 AP_AHRS: debounce the GPS/compass consistency test
we will only consider the compass inconsistent with GPS if it is off
for more than 2 seconds
2013-10-23 09:40:42 +11:00
texlan
78acea820f Copter: fix symmetry in stability patch for Tricopters
Removes the "Increase opposing motors by 1/2 the overage of the high
motor" logic and merely moves all 3 motors down by the same amount if
one is over out_max. This eliminates the asymmetric scaling of
the previous logic when more than one motor is over out_max. This
resolves #537
2013-10-21 20:12:53 +09:00
Randy Mackay
8f4665c4c7 ToshibaLED: ignore I2C errors during init 2013-10-21 20:01:34 +09:00
Randy Mackay
443023bbbf AP_HAL: add ignore_errors to I2C driver 2013-10-21 20:01:32 +09:00
Randy Mackay
943d7374f6 Copter: slow start motors from 0 to min throttle 2013-10-20 14:51:35 +09:00
texlan
53553751d1 Copter: Correctly set limit.lower flags for Tricopters
Resolves #536
2013-10-19 23:08:25 +09:00
Andrew Tridgell
1c091cbca5 HAL_PX4: fixed a scheduler bug that affects UART IO
we need to detect if we are in a timer task using a PID, not a
flag. This is the same type of bug I fixed last week, but now fixed
properly.

The bug could well be the "USB bug" that Craig has been chasing
2013-10-19 16:50:38 +11:00
Randy Mackay
e0c4785b2a Copter: OctaQuad H-frame support 2013-10-18 10:41:07 +09:00
Andrew Tridgell
3393a5c99e AP_Baro: prevent a race condition in the SITL baro driver 2013-10-17 17:22:19 +11:00
Andrew Tridgell
86afc26609 HAL_SITL: decrease wind with altitude
this prevents JSBSim crash on the runway
2013-10-17 17:22:19 +11:00
Andrew Tridgell
98d391efa0 AP_Camera: added note on DO_SET_CAM_TRIGG_DIST in docs 2013-10-15 10:09:39 +11:00
Andrew Tridgell
ede927f68a HAL_SITL: added airspeed noise control 2013-10-14 15:40:45 +11:00
Mike McCauley
c524a7c717 AP_HAL_FLYMAPLE: remove obsolete debugging code from RCInput 2013-10-14 11:34:47 +10:00
Mike McCauley
6f04e5f2e7 AP_HAL_FLYMAPLE: RCInput now more robust in the face of connect/disconnect of
a PPM-SUM source

Also remove some left over debug code.
2013-10-14 11:34:47 +10:00
Mike McCauley
ce1a8fb831 AP_HAL_FLYMAPLE: Added new example test sketch RCInput.pde 2013-10-14 11:34:47 +10:00
Mike McCauley
3226a81611 AP_HAL_FLYMAPLE: Improvements to RCInput
More reasonable sync pulse times, add input filter to prevent false triggering
2013-10-14 11:34:47 +10:00
Mike McCauley
fe6cacf081 AP_InertialSensor: Minor correction to comments in AP_InertialSensor_Flymaple.cpp 2013-10-14 11:34:47 +10:00
Mike McCauley
0920d9ac49 AP_HAL_FLYMAPLE: UARTDriver Use new libmaple TX buffers.
Caution: requires latest libmaple from
git@github.com:mikemccauley/libmaple.git
2013-10-14 11:34:47 +10:00
Mike McCauley
38512e3756 AP_HAL_FLYMAPLE: I2CDriver improvements to interrupt hygiene 2013-10-14 11:34:47 +10:00
Mike McCauley
8e5a9b06fb AP_HAL_FLYMAPLE: Fix example Scheduler.pde fo recent changes to API 2013-10-14 11:34:47 +10:00
Mike McCauley
bc55a2844c AP_HAL_FLYMAPLE: Fix example Scheduler.pde to compile with recent changes to
scheduler API
2013-10-14 11:34:47 +10:00
Andrew Tridgell
72b97168c9 AP_RangeFinder: improved SONAR_PIN docs 2013-10-14 10:03:52 +11:00
Andrew Tridgell
7831113f84 AP_InertialSensor: yield the CPU for the right time in wait_for_sample()
this improves timing performance
2013-10-14 08:45:58 +11:00
Andrew Tridgell
d973730b88 HAL_PX4: use hrt timer and semaphores to improve timing
this gives much more accurate microsecond delays, while also ensuring
we yield the CPU when possible
2013-10-14 08:29:30 +11:00
Andrew Tridgell
8532e2bff8 AP_InertialSensor: fixed timing of PX4 sensor samples 2013-10-13 22:15:50 +11:00
Andrew Tridgell
c4d62f6b92 AP_Scheduler: fixed SCHED_DEBUG docs 2013-10-13 21:41:01 +11:00
Andrew Tridgell
0f4da25e68 AP_Scheduler: make sure we run remaining tasks on overrun
when a task overruns its time, we can still run the rest of the tasks
in the task list
2013-10-13 21:41:01 +11:00
Andrew Tridgell
a5788dde8f HAL_AVR: added Scheduler.set_timer_speed() support 2013-10-13 11:03:37 +09:00
Andrew Tridgell
7ef187fcfd AP_HAL: added optional set_timer_speed() scheduler API
will be used by copter to reduce interrupt load on APM2
2013-10-13 11:03:35 +09:00
Andrew Tridgell
4de2a654ab AP_Mount: changed ahrs to be a const reference
saves a bit of code
2013-10-13 11:03:24 +09:00
Andrew Tridgell
34770fe6bf HAL_AVR: fixed SPI bus speed switching
this fixes a bug in changing the bus speed between devices
2013-10-13 11:03:17 +09:00
Randy Mackay
f2f61af125 HAL_AVR: scheduler interrupt 500hz for APM2 2013-10-13 11:03:13 +09:00
Andrew Tridgell
9833900f91 AP_InertialSensor: run MPU6000 sensor register reads at 8MHz
run other register IO at 500kHz
2013-10-13 11:03:08 +09:00
Andrew Tridgell
04836ea763 HAL_AVR: set initial bus speed on MPU6k to 500kHz, then change to 8MHz
this should allow us to work even with older chips. See the MPU6000
product specification, which says max 20MHz for sensor and interrupt
regs, and max 1MHz for all other regs
2013-10-13 11:03:06 +09:00
Andrew Tridgell
5ccf8409b4 AP_HAL: added an optional spi.set_bus_speed() API
this will be used by MPU6000 on APM2 to change speed after init
2013-10-13 11:03:04 +09:00
Andrew Tridgell
4dc2f4bd58 HAL_AVR: spi3 at 8mhz for mpu6k and ms5611 2013-10-13 11:03:02 +09:00
John Arne Birkeland
f6038f36bf HAL_AVR: Improved AVRTimer micros() and millis()
- More efficient code by using 16-bit timer
- micros() now has proper 1 us resolution and less overhead
- millis() has less overhead
- removed unneeded/unwanted initializatin of timers in AVRTimer::init()
2013-10-13 11:03:00 +09:00
Andrew Tridgell
5ba34b38c1 HAL_AVR: added specialised transfer functions for MPU6k and APM1 ADC
this saves quite a lot of time in interrupts
2013-10-13 11:02:57 +09:00
Andrew Tridgell
d60a68fd9c AP_Baro: check baro at exactly 100Hz
prevent waits for samples
2013-10-13 11:02:53 +09:00
Randy Mackay
499bc52c5b Perfmon: fixes to work with HAL 2013-10-13 11:02:49 +09:00
Andrew Tridgell
e34cc6dd9a HAL_PX4: added some UART debugging
this may help to track down USB issues
2013-10-13 12:43:25 +11:00
Andrew Tridgell
55ba536331 HAL_SITL: fixed a warning 2013-10-12 13:13:00 +11:00
Andrew Tridgell
84336bc74e AP_TECS: added initial flight_stage handling 2013-10-12 13:12:43 +11:00
Andrew Tridgell
2b80df6319 AP_SpdHgtControl: added FightStage parameter to update_pitch_throttle()
will be used for special landing handling
2013-10-12 13:12:16 +11:00
Andrew Tridgell
0f0b040891 AP_Camera: added set_trigger_distance() call 2013-10-11 21:37:27 +11:00
Andrew Tridgell
1c7a44a595 GCS_MAVLink: regenerate mavlink headers 2013-10-11 21:37:27 +11:00
Andrew Tridgell
8198bfe756 MAVLink: added MAV_CMD_DO_SET_CAM_TRIGG_DIST 2013-10-11 21:36:50 +11:00
Andrew Tridgell
63bee0b2d8 HAL_PX4: disable checks for in_timerprocess
these are not valid in this form for the way the timer thread works on
PX4.
2013-10-11 16:06:35 +11:00
Andrew Tridgell
25d3e5b7e9 AP_GPS: changed fake GPS fix to have a latitude/longitude
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-10-11 16:06:35 +11:00
Andrew Tridgell
ae1fd4baa4 HAL_AVR: reduce the latency of semaphore waits
this reduces the average cost of waiting for the MPU6000 semaphore
from the main loop
2013-10-10 15:41:51 +11:00
Andrew Tridgell
cfa1b5353f AP_Scheduler: show slips only for SCHED_DEBUG>1
this allows us to see PERF reports in copter without console writes
slowing things down
2013-10-10 15:41:34 +11:00
Andrew Tridgell
dd4b9275fd AP_Scheduler: improved the accuracy of the scheduling code
prevent accumulated micros() errors in run()
2013-10-10 14:14:39 +11:00
Randy Mackay
1a070e61f0 BattMon: amp-per-volt reduced to 17 (was 18.002) 2013-10-10 11:14:01 +09:00
Andrew Tridgell
eb0176d509 GCS_Console: don't build this example
it doesn't build any more
2013-10-10 09:54:20 +11:00
Andrew Tridgell
b3af59cc0c AP_InertialSensor: don't build L3G4200D example 2013-10-10 09:54:20 +11:00
Andrew Tridgell
fc7f3c8aa6 AP_HAL: fixed example build 2013-10-10 09:54:20 +11:00
Andrew Tridgell
a04c056598 AP_InertialSensor: remove unused get_last_sample_time_micros() 2013-10-10 09:54:19 +11:00
Craig3DRobotics
e5501bf911 AP_BattMonitor: Updated parameter descriptions 2013-10-09 15:33:03 -07:00
Andrew Tridgell
cd65e2109d AP_BattMonitor: fixed type in docs 2013-10-10 07:22:05 +11:00
Andrew Tridgell
0d682e74c1 HAL_Linux: run threads a bit more slowly
this was just wasting cycles
2013-10-10 07:21:38 +11:00
Andrew Tridgell
8f79a03c25 HAL_Linux: use larger UART buffers
might as well use the memory
2013-10-10 07:21:38 +11:00
Randy Mackay
13cf7c96cd GPSGlitch: parameters for accel and always-ok-radius 2013-10-09 13:02:14 +09:00
Andrew Tridgell
5d685385eb AP_InertialSensor: use gyro sample count on L3G4200D
this gives more even timing in ArduCopter
2013-10-08 19:20:34 +11:00
Andrew Tridgell
6444b0bddd AP_InertialSensor_L3G4200D: a sample is only available if gyro had a sample 2013-10-08 19:20:34 +11:00
Andrew Tridgell
e5e4cdee18 AP_InertialSensor: added wait_for_sample() API call
this waits for a new INS sample to arrive, using whatever method is
most efficient on each INS type
2013-10-08 17:31:15 +11:00
Andrew Tridgell
67db1cedaa HAL_PX4: fixed delay_microseconds() on PX4
we could underflow and delay a very long time!
2013-10-08 17:31:15 +11:00
Andrew Tridgell
f59d0099a4 AP_Notify: fixed RGBLED on PX4 with latest PX4Firmware
now needs a RGBLED_MODE_ON
2013-10-08 14:55:10 +11:00
Randy Mackay
9aea577eb1 BattMonitor: correct default pins for PX4 2013-10-08 10:28:48 +09:00
Andrew Tridgell
c17a5e5ed1 AP_InertialSensor: added a small delay in accel calibration
allows threads to run on Linux
2013-10-08 11:50:54 +11:00
Andrew Tridgell
1ccd6bb7ef AP_Compass: don't wait more than 1ms for compass sample
this prevents 5ms delays in compass accumulate
2013-10-08 11:50:54 +11:00
Andrew Tridgell
28b4ae1c3a HAL_Linux: improved latency of timed semaphores 2013-10-08 11:50:54 +11:00
Andrew Tridgell
6fa55d101f AP_Baro: fixed I2C semaphore handling for BMP085 driver 2013-10-08 11:50:54 +11:00
Andrew Tridgell
f286369990 AP_Compass: fixed orientation on Linux 2013-10-08 11:50:54 +11:00
Andrew Tridgell
83c942a512 AP_Compass: prevent NULL deref on enable mag while running 2013-10-08 11:50:53 +11:00
Andrew Tridgell
77e8061170 AP_Common: added product ID for L3G4200D 2013-10-08 11:50:53 +11:00
Andrew Tridgell
a216e1d239 HAL_Linux: don't prevent write while timer is busy
the timer can block on I2C writes, which causes the main loop to run
2013-10-08 11:50:53 +11:00
Andrew Tridgell
91511e6503 HAL_Linux: better realtime setup
lock all memory and pre-fault the stack in all threads
2013-10-08 11:50:53 +11:00
Andrew Tridgell
2422b94292 DataFlash: prevent valgrind errors from Empty driver 2013-10-08 11:50:53 +11:00
Andrew Tridgell
12af23bb7c AP_InertialSensor: added L3G4200D example 2013-10-08 11:50:53 +11:00
Andrew Tridgell
1aabd7155e AP_InertialSensor: added L3G4200D driver
this is for a cheap ebay 10DOF sensor
2013-10-08 11:50:53 +11:00
Andrew Tridgell
64c8cb4739 APM_Control: improved auto docs for AP_SteerController 2013-10-07 09:31:02 +11:00
Mike McCauley
84edbb335a AP_HAL_FLYMAPLE: UARTDriver now uses the new libmaple tx ring buffers
This requires the libmaple fork at
https://github.com/mikemccauley/libmaple.git
which includes low level support for buffered usart transmits
2013-10-07 08:41:53 +11:00
Mike McCauley
11317dcec4 AP_HAL_FLYMAPLE: FlymaplePortingNotes.txt improvements to install/build
documentation.
2013-10-07 08:41:53 +11:00
Mike McCauley
7f9d4a155f AP_HAL_FLYMAPLE: UARTDriver begin now honours txS == 0 which means no change 2013-10-07 08:41:52 +11:00
Mike McCauley
60921f7dfa AP_HAL_FLYMAPLE: Improved libmaple version detection 2013-10-07 08:41:52 +11:00
Andrew Tridgell
07b8f45770 HAL_Linux: use CLOCK_MONOTONIC_RAW to ensure clock never goes backwards
this avoids ntp mucking with APM timing
2013-10-07 08:41:52 +11:00
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
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
Andrew Tridgell
445edb8793 GCS_MAVLink: remove CR/LF 2013-09-19 16:27:14 +10:00
Andrew Tridgell
18896d9c9b AP_Math: fixed DOS CR/LF errors 2013-09-19 16:26:32 +10:00
Andrew Tridgell
cf633e4d79 AP_HAL: convert to unix file format 2013-09-19 16:26:14 +10:00
Andrew Tridgell
a5b29f44d5 AP_HAL: added hal.gpio->usb_connected() function
this replaces the USB_MUX_PIN on APM2, and works on PX4 and FMUv2
2013-09-19 16:23:40 +10:00
Randy Mackay
d3fcfe669d Copter Motors: increase MOT_SPIN_ARMED to int16 2013-09-18 13:28:01 +09:00
Andrew Tridgell
0d6b847966 AP_Notify: grab initial flags state in init()
this prevents annoying tones on startup of APM:Plane
2013-09-18 10:55:42 +10:00
Andrew Tridgell
284492cfec AP_GPS: fixed an initialisation problem with GPS drivers
before the first full packet arrives we could report uninitialised
values for groundspeed and heading
2013-09-16 21:20:36 +10:00
Andrew Tridgell
4864496ae6 SITL: reduce default GPS delay to 0.4
closer to real uBlox delay
2013-09-16 11:41:51 +10:00
Andrew Tridgell
84ed2141a0 AP_Math: fixed float rounding in location_offset()
this prevents rounding of positions in the rover code
2013-09-16 11:38:55 +10:00
Andrew Tridgell
3e24ff1b07 AP_SteerController: change the scaling of the D term
this should cope better with low speed
2013-09-16 09:42:45 +10:00
Andrew Tridgell
e85d275fe5 SITL: added SIM_SERVO_RATE parameter
this allows a slew rate for servos to be specified in degrees/second
2013-09-16 09:16:52 +10:00
Andrew Tridgell
98b4ed1522 AP_SteerController: lower the default STEER2SRV_D 2013-09-16 08:26:29 +10:00
Randy Mackay
d16587340d AP_Notify: add PX4's tone_alarm
Sounds added for arming, disarming and low battery events
2013-09-15 17:24:00 +09:00
Andrew Tridgell
9be02fb493 AC_Fence: changed to AP_Vehicle.h 2013-09-13 11:46:32 +10:00
Andrew Tridgell
fbe4be94cf APM_Control: changed to AP_Vehicle.h 2013-09-13 11:46:22 +10:00
Andrew Tridgell
15a4582ed7 AP_AHRS: changed to AP_Vehicle.h 2013-09-13 11:46:10 +10:00
Andrew Tridgell
2e742582e4 AP_Airspeed: changed to AP_Vehicle.h
also allow updates to ARSPD_RATIO from user while autocal is running
2013-09-13 11:45:57 +10:00
Andrew Tridgell
23fc6f8aed AP_HAL_AVR: changed to AP_Vehicle.h 2013-09-13 11:45:24 +10:00
Andrew Tridgell
c64950e4f5 AP_InertialNav: changed to AP_Vehicle.h 2013-09-13 11:45:10 +10:00
Andrew Tridgell
a67413d495 AP_Mount: changed to AP_Vehicle.h 2013-09-13 11:44:54 +10:00
Andrew Tridgell
645eb711cb DataFlash: changed to AP_Vehicle.h 2013-09-13 11:44:42 +10:00
Andrew Tridgell
16d2ad9796 AP_TECS: changed to AP_Vehicle.h 2013-09-13 11:44:31 +10:00
Andrew Tridgell
30ebcd36ac AP_SpdHgtControl: removed AircraftParameters 2013-09-13 11:44:19 +10:00
Andrew Tridgell
79a4bc6ea4 AP_Vehicle: added new header for parameters in multiple libraries
this adds a header where we can put vehicle specific parameters that
will be used in multiple libraries
2013-09-13 11:43:59 +10:00
Andrew Tridgell
5bef6dd539 AP_Motors: fixed example build 2013-09-13 10:53:53 +10:00
Andrew Tridgell
cc4fad23d9 AP_Airspeed: updates for Pixhawk 2013-09-13 10:48:57 +10:00
Andrew Tridgell
2990359043 PX4: Implement accurate ratiometric voltage reading on Pixhawk
this uses the monitoring of the 5V rail to compensate for changes in
the 5V reference versus the 3.3V ADC reference. It reduces the noise
on ratiometric sensors by a factor of about 6x.
2013-09-13 10:48:57 +10:00
Randy Mackay
0a047ae1c1 Copter Motors: increased spin-when-armed to 70
Changed choices to be displayed in ground stations
2013-09-12 22:36:04 +09:00
Randy Mackay
62cb5c172b Copter Motors: add slow start feature
Combined armed, frame orientation and slow_start into flags bitmask
Removed ability to set max throttle because it was never used
Re-ordered class variables
2013-09-12 22:27:44 +09:00
Randy Mackay
ac98644405 Sprayer: minor change to flags type 2013-09-12 22:24:14 +09:00
Andrew Tridgell
bc3249fada SITL: fixed Vcc voltage 2013-09-12 16:34:38 +10:00
Andrew Tridgell
3a3cecf5ff PX4: support getting servorail voltage from ORB 2013-09-12 16:28:06 +10:00
Andrew Tridgell
457ca0b57d AP_ADC_AnalogSource: fixed APM1 build 2013-09-12 13:28:11 +10:00
Andrew Tridgell
fb56feb6b2 HAL_PX4: support all analog input pins, with scaling
this allows voltage/current/Vcc sensing on FMUv2
2013-09-12 13:26:00 +10:00
Andrew Tridgell
a80d3344f5 AP_HAL_AVR: support voltage_latest() 2013-09-12 13:25:17 +10:00
Andrew Tridgell
a587b1140a AP_HAL: added voltage_latest() interface
this will be used for reading the 5V rail
2013-09-12 13:23:04 +10:00
Andrew Tridgell
b7e54bd463 AP_Airspeed: reduce speed of autocal
it was responding to noise too rapidly

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-09-12 07:48:57 +10:00
Andrew Tridgell
2171f2a80b AP_SteerController: move scaler onto integrator input
this should make integrator scale with speed

Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-09-12 07:48:57 +10:00
Randy Mackay
5e7a6b3b98 Sprayer: add pump min rate and test
If pump is enabled while copter is disarmed it will spray as if
travelling at 1m/s
2013-09-11 17:04:58 +09:00
Randy Mackay
b3c636dfa3 AP_Notify: add radio and battery failsafe
radio and battery failsafe are slow flashing yellow
pre-arm check failure changed to double flashing yellow
2013-09-11 14:36:05 +09:00
Andrew Tridgell
341dca4dfe AP_L1_Control: added set_default_period()
used by the rover code
2013-09-09 19:55:53 +10:00
Andrew Tridgell
7b3a674d66 AP_InertialSensor: added set_default_filter() method 2013-09-09 19:18:52 +10:00
Andrew Tridgell
229841052a AP_Compass_PX4: removed MAGIOCSSAMPLERATE call 2013-09-09 18:04:41 +10:00
Andrew Tridgell
c044385fff AP_AHRS: added groundspeed() method
this gives ground speed in m/s from GPS
2013-09-09 18:04:41 +10:00
Andrew Tridgell
0918393fed APM_Control: fixed some documentation typos 2013-09-09 18:04:40 +10:00
Andrew Tridgell
7413c15959 APM_Control: added a ground vehicle steering controller
this will be used both for the rover code, and for ground steering of
a plane on takeoff
2013-09-09 18:04:40 +10:00
Andrew Tridgell
f5d20b4085 SITL: reduce the minimum accel and gyro noise
on APM2 and PX4 we do a lot of smoothing of accels and gyros, so a 2
bit error isn't a good representation of the min noise
2013-09-09 18:04:40 +10:00
Andrew Tridgell
396c4f30d2 AP_InertialSensor_PX4: don't set QUEUEDEPTH
the default of 2 samples is fine
2013-09-09 18:04:40 +10:00
Andrew Tridgell
db14a85fc5 AP_Compass: added more debugging to AP_Compass_PX4 driver
this helps debug compass initialisation issues
2013-09-09 18:04:40 +10:00
Andrew Tridgell
8b80beadc4 PX4: make FMUv2 identify itself differently
so we can tell which is which in logs
2013-09-09 18:04:40 +10:00
Andrew Tridgell
7328369b91 GCS_MAVLink: added FENCE_ACTION_GUIDED_THR_PASS 2013-09-08 07:29:30 +10:00
Andrew Tridgell
ff0f6bcd42 AP_InertialSensor: fixed example build 2013-09-07 21:03:59 +10:00
Andrew Tridgell
b8b72819c1 AP_Compass: ignore COMPASS_ORIENT for internal compass
this means if COMPASS_ORIENT is not 0 and the external compass fails
to start on boot we don't end up with a bad compass orientation
2013-09-07 16:49:51 +10:00
Andrew Tridgell
5484b97419 AP_GPS: reset _fix_count to 0 on nav settings update
this makes it run every 20s exactly
2013-09-04 13:18:00 +10:00
Andrew Tridgell
879d44f930 AP_GPS: use the mask bits to only set dynamic model
this ensures we don't try to change any other CFG_NAV5 settings
2013-09-04 13:17:20 +10:00
Andrew Tridgell
fa107bdb58 PX4: moved UART handling to its own thread
this prevents slow writes to the SD card from interfering with MAVLink
or GPS serial communication
2013-09-04 13:15:27 +10:00
Andrew Tridgell
7082e0f8aa AP_HAL: added hold_in_bootloader parameter to scheduler->reboot() 2013-09-04 11:58:13 +10:00
Andrew Tridgell
1328316bfc AP_Airspeed: fixed saving of airspeed ratios 2013-08-31 10:26:27 +10:00
Paul Riseborough
1c7bdc40ec AP_Airspeed : Expanded range of ARSPD_RATIO adjustment 2013-08-31 08:03:11 +10:00
Andrew Tridgell
e8fc8cea01 AP_Scheduler: updated docs 2013-08-30 15:33:30 +10:00
Andrew Tridgell
8d08f6d669 AP_Relay: document new relay pin numbers 2013-08-30 15:21:23 +10:00
Andrew Tridgell
5e33bbd197 PX4: fixed sense of relay pins 2013-08-30 15:05:29 +10:00
Andrew Tridgell
c56017d8f1 AP_AHRS: added in new orientations 2013-08-30 14:19:17 +10:00
Andrew Tridgell
9320e82ac2 AP_Compass: added in new orientations 2013-08-30 14:19:03 +10:00
Andrew Tridgell
fbf79c07f0 AP_Compass: added COMPASS_EXTERNAL option
this allows configuring of a compass as being externally attached
2013-08-30 14:02:09 +10:00
Andrew Tridgell
97b7130bb9 libraries: update license header to GPLv3
we switched to GPLv3 a long time ago, but neglected to update the
per-file license headers
2013-08-30 13:01:39 +10:00
Andrew Tridgell
b29369bc03 AP_Notify: fixed examples build 2013-08-30 13:01:39 +10:00
Andrew Tridgell
905e07edf9 AP_Mount: fixed examples build 2013-08-30 13:01:39 +10:00
Andrew Tridgell
01387a1553 AP_Motors: fixed examples build 2013-08-30 13:01:39 +10:00
Andrew Tridgell
873e54deb1 AP_Math: fixed example build 2013-08-30 13:01:39 +10:00
Andrew Tridgell
5caf2e0ea4 AP_InertialSensor: fixed example build 2013-08-30 13:01:39 +10:00
Andrew Tridgell
a2902d4a0f AP_InertialNav: fixed example build 2013-08-30 13:01:38 +10:00
Andrew Tridgell
83fbb29db1 HAL_PX4: fixed example build 2013-08-30 13:01:36 +10:00
Andrew Tridgell
0bfc18b72d HAL_AVR: fixed examples build 2013-08-30 13:01:36 +10:00
Andrew Tridgell
e6bd3b65b9 AP_GPS: fixed examples build 2013-08-30 13:01:36 +10:00
Andrew Tridgell
517c44bbaa AP_Baro: fixed example build 2013-08-30 13:01:36 +10:00
Andrew Tridgell
e6794239ca AC_Fence: fixed example build 2013-08-30 13:01:36 +10:00
Andrew Tridgell
6182571c21 AP_AHRS: fixed example build 2013-08-30 13:01:36 +10:00
Andrew Tridgell
69c8df3326 AP_Airspeed: fixed example build
removed Airspeed_Calibration test, as it is not useful
2013-08-30 13:01:36 +10:00
Andrew Tridgell
b57af23933 DataFlash: fixed example build 2013-08-30 13:01:36 +10:00
Andrew Tridgell
7535ecb282 AP_Notify: enable board LEDs for ESC calibration
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-08-30 13:01:36 +10:00
Andrew Tridgell
d67ad2c7ee AP_Notify: added missing files 2013-08-30 13:01:35 +10:00
Andrew Tridgell
67401294f4 GCS_MAVLink: added missing header 2013-08-30 13:01:35 +10:00
Andrew Tridgell
7b1e2b0e78 AP_GPS: don't need notify.h here 2013-08-30 13:01:35 +10:00
Andrew Tridgell
65a490c209 AP_InertialSensor: update for new notify API 2013-08-30 13:01:35 +10:00
Andrew Tridgell
495c4bbbbe AP_Notify: simplify interface to avoid timers and external calls
this changes AP_Notify to use updates via notify.update() at 50Hz,
avoiding the need for the 1kHz timer. It also creates a parent class
for ToshibaLED so that the I2C and PX4 ToshibaLED drivers can be
abstracted out.

Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-08-30 13:01:35 +10:00
Randy Mackay
2658cda4bc Toshiba_LED_PX4: local #defines for led brightness 2013-08-30 13:01:35 +10:00
Randy Mackay
07abfc59ac AP_HAL_PX4: compile error fix 2013-08-30 13:01:35 +10:00
Randy Mackay
82b7b2cb3e GPS: integrate AP_Notify 2013-08-30 13:01:35 +10:00
Randy Mackay
5651bdbe3a INS: integrate AP_Notify 2013-08-30 13:01:35 +10:00
Randy Mackay
0797489ad8 Motors: use AP_Notify static flags variable 2013-08-30 13:01:35 +10:00
Randy Mackay
0c1db12538 AP_Notify: add ToshibaLED_PX4 2013-08-30 13:01:35 +10:00
Randy Mackay
a52b1831ca AP_Notify: make flags static variable 2013-08-30 13:01:35 +10:00
Randy Mackay
496962f037 GPS: update notify 2013-08-30 13:01:35 +10:00
Randy Mackay
54007854a9 Notify: add ToshibaLED 2013-08-30 13:01:35 +10:00
Randy Mackay
f8a872f01e AP_Motors: update notify 2013-08-30 13:01:34 +10:00
Randy Mackay
ac36a09747 AP_HAL: add toggle to GPIO 2013-08-30 13:01:34 +10:00
Randy Mackay
b1278fa006 AP_Notify: early draft of library 2013-08-30 13:01:34 +10:00
Andrew Tridgell
0527bae8cb PX4: support PX4IO relay pins
this allows the pins to be used in the relay code
2013-08-30 13:01:34 +10:00
Andrew Tridgell
0c06dff2db AP_Airspeed: constrain internal state of calibration code 2013-08-30 13:01:34 +10:00
Andrew Tridgell
3916a07dcf AP_Airspeed: added logging of airspeed calibration internals 2013-08-30 13:01:34 +10:00
Andrew Tridgell
ce3fb290f1 AP_Airspeed: fixed initialisation of auto-calibration 2013-08-30 13:01:34 +10:00
Andrew Tridgell
dd747505c5 DataFlash: report when DataFlash write fails 2013-08-30 13:01:34 +10:00
Andrew Tridgell
395739dded AP_Baro: simplify PX4 driver
we can now rely on queueing in NuttX driver
2013-08-30 13:01:34 +10:00
Andrew Tridgell
1ff669eb97 AP_Compass: simplify PX4 compass driver
we can now rely on queueing in the NuttX driver
2013-08-30 13:01:34 +10:00
Andrew Tridgell
4c752e4a94 AP_Math: simplify rotations test code 2013-08-30 13:01:34 +10:00
Andrew Tridgell
4662858077 DataFlash: we don't need AP_AHRS.h 2013-08-30 13:01:34 +10:00
Andrew Tridgell
e2b0e07973 AP_Math: removed unused matrix rotation code
we only need to rotate vectors
2013-08-30 13:01:34 +10:00
Andrew Tridgell
c6e29c9519 GCS_MAVLink: update to latest upstream mavlink headers 2013-08-30 13:01:34 +10:00
Andrew Tridgell
a295a01bbc AP_Math: added missing 90 degree rotations
this ensures we can handle all 90 degree rotations of the compass and
main board. A test in examples/rotations shows that we have them all.
2013-08-30 13:01:33 +10:00