Commit Graph

19907 Commits

Author SHA1 Message Date
Lucas De Marchi 97022a4161 AP_HAL: RingBuffer: fix macro expansion
Fix warning that reveals a real bug:

In file included from libraries/AP_HAL_Linux/UARTDriver.cpp:25:0:
libraries/AP_HAL_Linux/UARTDriver.cpp: In member function 'virtual bool Linux::UARTDriver::tx_pending()':
libraries/AP_HAL/utility/RingBuffer.h:21:35: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
 #define BUF_EMPTY(buf) buf##_head == buf##_tail
                                   ^
libraries/AP_HAL_Linux/UARTDriver.cpp:355:13: note: in expansion of macro 'BUF_EMPTY'
     return !BUF_EMPTY(_writebuf);

The problem is when there's a ! operator: without the parenthesis we would actually be doing

    return !_write_buf_head == _write_buf_tail

which is not what we want.
2015-12-28 21:50:27 -02:00
Andrew Tridgell fe8070bd51 DataFlash: move lock to protect just buffer IO 2015-12-29 09:10:28 +11:00
Lucas De Marchi 1a0f613a0f AP_Curve: remove unused library 2015-12-28 10:23:23 -02:00
Lucas De Marchi e5e8bf3203 ArduCopter: don't link unused AP_Curve library 2015-12-28 10:23:23 -02:00
Lucas De Marchi 8d252955f5 AP_Motors: don't link unused AP_Curve library 2015-12-28 10:23:23 -02:00
Lucas De Marchi 326e74f64f AP_Mission: don't link unused AP_Curve library 2015-12-28 10:23:23 -02:00
Lucas De Marchi 5d3a519277 APM_PI: remove unused library 2015-12-28 10:23:23 -02:00
Lucas De Marchi 8cee02cde7 AP_PerfMon: remove unused library 2015-12-28 10:23:23 -02:00
Randy Mackay 6ac48b4dac Copter: minor formatting fix 2015-12-28 14:01:12 +09:00
Jonathan Challinger 750cacc875 Copter: barometer ground effect compensation 2015-12-28 13:51:27 +09:00
Jonathan Challinger a2999ece54 AP_AHRS_NavEKF: add setTakeoffExpected, setTouchdownExpected 2015-12-28 13:51:24 +09:00
Andrew Tridgell c90d7dd86e AP_HAL: fixed vprintf segfault 2015-12-28 08:44:40 +11:00
Andrew Tridgell fa2a39f6c6 HAL_QURT: small cleanups
thanks to Lucas for finding these
2015-12-28 06:42:11 +11:00
Julien BERAUD e46f23f538 RCOutput_Bebop: Increase max_rpm on Bebop 2
Bebop 2 can go as high as 12200 rpm. Use get_hw_arm32 method to see
if we are on a bebop or bebop 2
2015-12-27 16:11:36 -02:00
Julien BERAUD b6f51233db AP_HAL_Linux: Make RPI get_hw method public
Valid also on Bebop
2015-12-27 16:11:36 -02:00
Julien BERAUD cadef09542 AP_HAL_Linux: Fix comment and panic on Bebop 2015-12-27 16:11:36 -02:00
Lucas De Marchi 3a8bd7b829 AP_Progmem: remove unused library 2015-12-27 15:58:12 -02:00
Lucas De Marchi a096703b06 Global: don't link with AP_Progmem
AP_Progmem is not used anymore.
2015-12-27 15:58:12 -02:00
Lucas De Marchi 52ef8c10a5 AP_Param: stop using Progmem.h 2015-12-27 15:58:12 -02:00
Lucas De Marchi 360855f109 StorageManager: stop using Progmem.h 2015-12-27 15:58:12 -02:00
Lucas De Marchi 5f26c951d8 GCS_MAVLink: stop using Progmem.h 2015-12-27 15:58:12 -02:00
Lucas De Marchi 5d07e5bdbf DataFlash: stop using Progmem.h 2015-12-27 15:58:12 -02:00
Lucas De Marchi eb9fd96d5c AP_Scheduler: remove trailing whitespace 2015-12-27 15:58:12 -02:00
Lucas De Marchi 3375b6b01c AP_Scheduler: stop using Progmem.h 2015-12-27 15:58:12 -02:00
Lucas De Marchi 25c289b74c AP_Menu: stop using Progmem.h 2015-12-27 15:58:12 -02:00
Lucas De Marchi 502077d763 AP_Math: stop using Progmem.h 2015-12-27 15:58:12 -02:00
Lucas De Marchi 520b0384fd AP_HAL: remove unused in_progmem flag to print_vprintf 2015-12-27 15:58:12 -02:00
Lucas De Marchi 8e0c125f56 AP_HAL: print_vprintf: follow coding style
- Use 4 spaces to indent
 - Add braces to control statements
 - Don't use tabs
2015-12-27 15:58:12 -02:00
Lucas De Marchi c35730058a AP_HAL: print_vprintf: stop using Progmem.h
Remove the unused support to data from progmem, including the unused %S
format specifier.
2015-12-27 15:58:12 -02:00
Lucas De Marchi 5bb4e3eda9 AP_GPS: stop using Progmem.h
Besides the trivial convertions, while reading
initblob_state[instance].blob we need to be sure to read only one byte
like we were before.
2015-12-27 15:58:12 -02:00
Lucas De Marchi 88319f52f7 AP_Declination: remove line continuation slashes
These are not necessary and only clutter the code.
2015-12-27 15:58:12 -02:00
Lucas De Marchi 3ae0082f52 AP_Declination: stop using Progmem.h
Since the headers were re-ordered we also had to add inttypes.h to
AP_Declination.h following a include-what-you-use approach.
2015-12-27 15:58:12 -02:00
Lucas De Marchi cfb5bbeb9f APM_Control: stop using Progmem.h 2015-12-27 15:58:12 -02:00
Lucas De Marchi 29ed01189d AP_HAL: ftoa_engine: replace tabs with spaces 2015-12-27 15:58:12 -02:00
Lucas De Marchi e751d632e6 AP_HAL: ftoa_engine: stop using Progmem.h 2015-12-27 15:58:12 -02:00
Randy Mackay f19e1e6c70 Tracker: update ver to 0.7.5 including ReleaseNotes 2015-12-27 16:14:29 +09:00
Randy Mackay ecf01732d9 Tracker: add dataflash logging 2015-12-27 16:14:20 +09:00
Randy Mackay 2829dc67ac Tracker: remove unused CLI_ENABLED definition 2015-12-27 16:02:43 +09:00
Randy Mackay 8aa286eaaa Tracker: update time last heartbeat packet sent
This is required to support dataflash messages
2015-12-27 16:02:42 +09:00
Andrew Tridgell 6a5c5969fa AP_AHRS: fixed example build 2015-12-27 14:57:32 +09:00
Andrew Tridgell 3fb0b8f69d AP_InertialSensor: fixed example build 2015-12-27 14:57:30 +09:00
Andrew Tridgell 26ced77ebc Replay: fixes for AP_Scheduler change 2015-12-27 14:57:28 +09:00
Andrew Tridgell 782ba00d4b Tracker: convert to Hz based task table 2015-12-27 14:57:26 +09:00
Andrew Tridgell 7daab1ee62 Rover: convert to Hz based task table 2015-12-27 14:57:24 +09:00
Andrew Tridgell 4dd8714880 Copter: changed to Hz based task table 2015-12-27 14:57:21 +09:00
Andrew Tridgell 513d5c17b9 Plane: allow for settable main loop rate 2015-12-27 14:57:19 +09:00
Andrew Tridgell 23cef70846 AP_NavEKF2: use get_loop_delta_t() from INS 2015-12-27 14:57:17 +09:00
Andrew Tridgell 28a684ea03 AP_NavEKF: use get_loop_delta_t() from INS 2015-12-27 14:57:14 +09:00
Andrew Tridgell 17fc58f3cd AP_InertialSensor: re-work for more flexible main loop rates 2015-12-27 14:57:12 +09:00
Andrew Tridgell 93ef881109 AP_InertialSensor: added get_loop_delta_t() API 2015-12-27 14:57:10 +09:00