Ardupilot2/libraries
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
..
AC_AttitudeControl AC_AttControl: use ahrs get_rotation_body_to_ned 2015-12-23 11:38:21 +09:00
AC_Fence Global: rename min and max macros to uppercase 2015-12-01 16:28:09 -02:00
AC_InputManager AC_InputManager: Initial class creation 2015-11-12 19:37:21 +09:00
AC_PID Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AC_PrecLand Global: rename min and max macros to uppercase 2015-12-01 16:28:09 -02:00
AC_Sprayer Global: rename min and max macros to uppercase 2015-12-01 16:28:09 -02:00
AC_WPNav AC_WPNav: call renamed functions in AC_AttitudeControl 2015-12-09 19:58:50 +09:00
AP_ADC Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_ADSB AP_ADSB: fix unit conversion 2015-12-18 13:49:47 +09:00
AP_AHRS AP_AHRS_NavEKF: add setTakeoffExpected, setTouchdownExpected 2015-12-28 13:51:24 +09:00
AP_Airspeed Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_Arming AP_Arming: Allow arming without the hardware safety switch having been pressed 2015-12-21 17:48:29 +11:00
AP_Baro Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_BattMonitor Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_BoardConfig AP_BoardConfig: fix invalid Range meta data 2015-12-27 16:10:44 +11:00
AP_Buffer
AP_Camera AP_Camera: Camera options for better camera control 2015-12-18 18:16:11 +11:00
AP_Common Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_Compass Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_Declination Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_EPM AP_EPM: use millis/micros/panic functions 2015-11-20 12:30:34 +09:00
AP_Frsky_Telem AP_FrSkyTelem: use millis/micros/panic functions 2015-11-20 12:30:41 +09:00
AP_GPS Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_HAL AP_HAL: RingBuffer: fix macro expansion 2015-12-28 21:50:27 -02:00
AP_HAL_AVR HAL_AVR: fixed branch URL for AVR 2015-12-03 13:28:51 +11:00
AP_HAL_Empty HAL_Empty: use 5V voltage for HAL_EMPTY 2015-12-20 17:55:40 +11:00
AP_HAL_FLYMAPLE Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_HAL_Linux RCOutput_Bebop: Increase max_rpm on Bebop 2 2015-12-27 16:11:36 -02:00
AP_HAL_PX4 Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_HAL_QURT HAL_QURT: small cleanups 2015-12-28 06:42:11 +11:00
AP_HAL_SITL HAL_SITL: added semaphore support 2015-12-21 07:38:30 +11:00
AP_HAL_VRBRAIN AP_HAL_VRBRAIN: add empty optical flow 2015-12-18 17:56:04 +11:00
AP_InertialNav AP_InertialNav: Typo correction in comment 2015-12-19 10:11:35 +09:00
AP_InertialSensor Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_IRLock AP_IRLock: use millis/micros/panic functions 2015-11-20 12:31:35 +09:00
AP_L1_Control AP_L1_Control: fix invalid Range meta data 2015-12-27 16:10:44 +11:00
AP_LandingGear
AP_Limits
AP_Math Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_Menu AP_Menu: stop using Progmem.h 2015-12-27 15:58:12 -02:00
AP_Mission AP_Mission: don't link unused AP_Curve library 2015-12-28 10:23:23 -02:00
AP_Motors AP_Motors: don't link unused AP_Curve library 2015-12-28 10:23:23 -02:00
AP_Mount Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_NavEKF AP_NavEKF: use get_loop_delta_t() from INS 2015-12-27 14:57:14 +09:00
AP_NavEKF2 AP_NavEKF2: use get_loop_delta_t() from INS 2015-12-27 14:57:17 +09:00
AP_Navigation
AP_Notify Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_OpticalFlow Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_Parachute Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_Param AP_Param: stop using Progmem.h 2015-12-27 15:58:12 -02:00
AP_Rally AP_Rally: use millis/micros/panic functions 2015-11-20 12:34:04 +09:00
AP_RangeFinder Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_RCMapper
AP_Relay AP_Relay: don't default to using two PWMs as relays on FMUv4 2015-11-27 18:54:31 +11:00
AP_RPM AP_RPM: Move timeout check into synthetic quality check. 2015-12-08 08:25:19 +11:00
AP_RSSI
AP_Scheduler Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
AP_SerialManager
AP_ServoRelayEvents AP_ServoRelayEvents: use millis/micros/panic functions 2015-11-20 12:34:39 +09:00
AP_SpdHgtControl
AP_TECS AP_TECS: fix invalid Range meta data 2015-12-27 16:10:44 +11:00
AP_Terrain AP_Terrain: libraries_Text_revision 2015-11-26 08:10:15 +11:00
AP_Vehicle
APM_Control APM_Control: stop using Progmem.h 2015-12-27 15:58:12 -02:00
APM_OBC APM_OBC: use millis/micros/panic functions 2015-11-20 12:28:28 +09:00
DataFlash DataFlash: move lock to protect just buffer IO 2015-12-29 09:10:28 +11:00
doc
Filter Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
GCS_Console Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
GCS_MAVLink Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
PID Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
RC_Channel Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00
SITL SITL: update units for new adsb mavlink msg 2015-12-09 14:36:30 +11:00
StorageManager Global: don't link with AP_Progmem 2015-12-27 15:58:12 -02:00