diff --git a/Makefile b/Makefile index b896e51391..c0413ea7ef 100644 --- a/Makefile +++ b/Makefile @@ -125,6 +125,9 @@ ros_sitl_simple: qurt_eagle_travis: $(call cmake-build,$@) +posix_eagle_release: + $(call cmake-build,$@) + posix: posix_sitl_simple posix_sitl_default: posix_sitl_simple @@ -135,7 +138,7 @@ run_sitl_quad: posix Tools/sitl_run.sh posix-configs/SITL/init/rcS none jmavsim run_sitl_iris: posix - Tools/sitl_run.sh posix-configs/SITL/init/rcS_iris_gazebo + Tools/sitl_run.sh posix-configs/SITL/init/rcS_iris_gazebo none gazebo run_sitl_plane: posix Tools/sitl_run.sh posix-configs/SITL/init/rc.fixed_wing diff --git a/ROMFS/px4fmu_common/init.d/10015_tbs_discovery b/ROMFS/px4fmu_common/init.d/10015_tbs_discovery index 0acb4088f4..97beb6831a 100644 --- a/ROMFS/px4fmu_common/init.d/10015_tbs_discovery +++ b/ROMFS/px4fmu_common/init.d/10015_tbs_discovery @@ -28,11 +28,3 @@ fi set MIXER quad_w set PWM_OUT 1234 -set PWM_MIN 1200 - -set MIXER_AUX pass -set PWM_AUX_RATE 50 -set PWM_AUX_OUT 1234 -set PWM_AUX_DISARMED 1000 -set PWM_AUX_MIN 1000 -set PWM_AUX_MAX 2000 diff --git a/ROMFS/px4fmu_common/init.d/10016_3dr_iris b/ROMFS/px4fmu_common/init.d/10016_3dr_iris index ffaa935055..30af86730e 100644 --- a/ROMFS/px4fmu_common/init.d/10016_3dr_iris +++ b/ROMFS/px4fmu_common/init.d/10016_3dr_iris @@ -32,6 +32,3 @@ fi set MIXER quad_w set PWM_OUT 1234 - -set PWM_MIN 1200 -set PWM_MAX 1950 diff --git a/ROMFS/px4fmu_common/init.d/10017_steadidrone_qu4d b/ROMFS/px4fmu_common/init.d/10017_steadidrone_qu4d index 7e27043156..7accc4f6e9 100644 --- a/ROMFS/px4fmu_common/init.d/10017_steadidrone_qu4d +++ b/ROMFS/px4fmu_common/init.d/10017_steadidrone_qu4d @@ -30,7 +30,4 @@ fi set MIXER quad_w -set PWM_MIN 1210 -set PWM_MAX 2100 - set PWM_OUT 1234 diff --git a/ROMFS/px4fmu_common/init.d/10019_sk450_deadcat b/ROMFS/px4fmu_common/init.d/10019_sk450_deadcat index 4f22ddc436..0b1e3b2dfa 100644 --- a/ROMFS/px4fmu_common/init.d/10019_sk450_deadcat +++ b/ROMFS/px4fmu_common/init.d/10019_sk450_deadcat @@ -30,7 +30,6 @@ fi set MIXER sk450_deadcat set PWM_OUT 1234 -set PWM_MIN 1050 set PWM_AUX_OUT 1234 # set PWM_AUX_MIN 900 diff --git a/Tools/px4params/srcparser.py b/Tools/px4params/srcparser.py index 2201fac6dd..b67ad890a9 100644 --- a/Tools/px4params/srcparser.py +++ b/Tools/px4params/srcparser.py @@ -45,6 +45,7 @@ class Parameter(object): "min": 5, "max": 4, "unit": 3, + "decimal": 2, # all others == 0 (sorted alphabetically) } @@ -106,7 +107,7 @@ class SourceParser(object): re_remove_dots = re.compile(r'\.+$') re_remove_carriage_return = re.compile('\n+') - valid_tags = set(["group", "board", "min", "max", "unit"]) + valid_tags = set(["group", "board", "min", "max", "unit", "decimal"]) # Order of parameter groups priority = { diff --git a/Tools/sitl_run.sh b/Tools/sitl_run.sh index 1d80464fad..d80fcc2c70 100755 --- a/Tools/sitl_run.sh +++ b/Tools/sitl_run.sh @@ -1,12 +1,26 @@ #!/bin/bash cp Tools/posix_lldbinit build_posix_sitl_simple/src/firmware/posix/.lldbinit cp Tools/posix.gdbinit build_posix_sitl_simple/src/firmware/posix/.gdbinit + +SIM_PID=0 + if [ "$3" == "jmavsim" ] then cd Tools/jMAVSim ant java -Djava.ext.dirs= -cp lib/*:out/production/jmavsim.jar me.drton.jmavsim.Simulator -udp 127.0.0.1:14560 & + SIM_PID=echo $! cd ../.. +elif [ "$3" == "gazebo" ] +then + if [ -x "$(command -v gazebo)" ] + then + gazebo ${SITL_GAZEBO_PATH}/worlds/iris.world & + SIM_PID=echo $! + else + echo "You need to have gazebo simulator installed!" + exit 1 + fi fi cd build_posix_sitl_simple/src/firmware/posix mkdir -p rootfs/fs/microsd @@ -22,3 +36,11 @@ then else ./mainapp ../../../../$1 fi + +if [ "$3" == "jmavsim" ] +then + kill -9 $SIM_PID +elif [ "$3" == "gazebo" ] +then + kill -9 $SIM_PID +fi diff --git a/Vagrantfile b/Vagrantfile index 775abd461f..c24bfe6859 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -78,7 +78,7 @@ Vagrant.configure(2) do |config| echo "cd /Firmware" >> ~/.bashrc # Install software sudo apt-get update - sudo apt-get install -y build-essential ccache cmake clang-3.5 lldb-3.5 g++-4.8 gcc-4.8 genromfs libc6-i386 libncurses5-dev python-argparse python-empy python-serial s3cmd texinfo zlib1g-dev git-core zip gdb + sudo apt-get install -y build-essential ccache cmake clang-3.5 lldb-3.5 g++-4.8 gcc-4.8 genromfs libc6-i386 libncurses5-dev python-argparse python-empy python-serial s3cmd texinfo zlib1g-dev git-core zip gdb gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf pushd . cd ~ wget -q https://launchpadlibrarian.net/186124160/gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2 diff --git a/cmake/common/px4_base.cmake b/cmake/common/px4_base.cmake index 5c9b8aefdf..5c8ea5787a 100644 --- a/cmake/common/px4_base.cmake +++ b/cmake/common/px4_base.cmake @@ -492,7 +492,6 @@ function(px4_add_common_flags) -Wpointer-arith -Wmissing-declarations -Wno-unused-parameter - -Wno-varargs -Werror=format-security -Werror=array-bounds -Wfatal-errors @@ -517,6 +516,7 @@ function(px4_add_common_flags) if (NOT ${OS} STREQUAL "qurt") list(APPEND warnings -Wno-unused-const-variable + -Wno-varargs ) endif() else() diff --git a/cmake/configs/posix_eagle_release.cmake b/cmake/configs/posix_eagle_release.cmake index 8e3bb26078..b0b2a9171d 100644 --- a/cmake/configs/posix_eagle_release.cmake +++ b/cmake/configs/posix_eagle_release.cmake @@ -5,6 +5,15 @@ if("${DSPAL_STUBS_ENABLE}" STREQUAL "") set(DSPAL_STUBS_ENABLE "1") endif() +if ("${QRL_SDK_DIR}" STREQUAL "") + set(QRL_SDK_DIR /opt/qrlsdk) +endif() + +set(CMAKE_PROGRAM_PATH + "${QRL_SDK_DIR}/gcc-linaro-4.8-2015.06-x86_64_arm-linux-gnueabihf/bin" + ${CMAKE_PROGRAM_PATH} + ) + set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake) set(config_module_list diff --git a/cmake/configs/qurt_eagle_hello.cmake b/cmake/configs/qurt_eagle_hello.cmake index c127216681..4328a3d4aa 100644 --- a/cmake/configs/qurt_eagle_hello.cmake +++ b/cmake/configs/qurt_eagle_hello.cmake @@ -1,6 +1,6 @@ include(qurt/px4_impl_qurt) -set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.4.cmake) +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake) set(config_module_list drivers/device diff --git a/cmake/configs/qurt_eagle_hil.cmake b/cmake/configs/qurt_eagle_hil.cmake index 0b48820254..4222fff249 100644 --- a/cmake/configs/qurt_eagle_hil.cmake +++ b/cmake/configs/qurt_eagle_hil.cmake @@ -1,6 +1,6 @@ include(qurt/px4_impl_qurt) -set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.4.cmake) +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake) set(config_module_list drivers/device diff --git a/cmake/configs/qurt_eagle_muorb.cmake b/cmake/configs/qurt_eagle_muorb.cmake index 492225aa40..d73d7becff 100644 --- a/cmake/configs/qurt_eagle_muorb.cmake +++ b/cmake/configs/qurt_eagle_muorb.cmake @@ -1,6 +1,6 @@ include(qurt/px4_impl_qurt) -set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.4.cmake) +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake) set(config_module_list drivers/device diff --git a/cmake/configs/qurt_eagle_release.cmake b/cmake/configs/qurt_eagle_release.cmake index 494416ed4f..945e9da199 100644 --- a/cmake/configs/qurt_eagle_release.cmake +++ b/cmake/configs/qurt_eagle_release.cmake @@ -20,7 +20,7 @@ set(target_libraries ) -set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.4.cmake) +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake) set(config_module_list # diff --git a/cmake/configs/qurt_eagle_test.cmake b/cmake/configs/qurt_eagle_test.cmake index b2935f1fda..2e6a370950 100644 --- a/cmake/configs/qurt_eagle_test.cmake +++ b/cmake/configs/qurt_eagle_test.cmake @@ -1,6 +1,6 @@ include(qurt/px4_impl_qurt) -set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.4.cmake) +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake) set(config_module_list drivers/device diff --git a/cmake/configs/qurt_eagle_travis.cmake b/cmake/configs/qurt_eagle_travis.cmake index 3b4672a115..b9fda6ec48 100644 --- a/cmake/configs/qurt_eagle_travis.cmake +++ b/cmake/configs/qurt_eagle_travis.cmake @@ -3,7 +3,7 @@ include(qurt/px4_impl_qurt) # Run a full link with build stubs to make sure qurt target isn't broken set(QURT_ENABLE_STUBS "1") -set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.4.cmake) +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake) set(config_module_list drivers/device diff --git a/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake b/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake index 61d63f8677..eb48554b16 100644 --- a/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake +++ b/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake @@ -26,13 +26,13 @@ set(CMAKE_SYSTEM_VERSION 1) # specify the cross compiler find_program(C_COMPILER arm-linux-gnueabihf-gcc) if(NOT C_COMPILER) - message(FATAL_ERROR "could not find arm-none-eabi-gcc compiler") + message(FATAL_ERROR "could not find arm-linux-gnueabihf-gcc compiler") endif() cmake_force_c_compiler(${C_COMPILER} GNU) find_program(CXX_COMPILER arm-linux-gnueabihf-g++) if(NOT CXX_COMPILER) - message(FATAL_ERROR "could not find arm-none-eabi-g++ compiler") + message(FATAL_ERROR "could not find arm-linux-gnueabihf-g++ compiler") endif() cmake_force_cxx_compiler(${CXX_COMPILER} GNU) @@ -41,7 +41,7 @@ foreach(tool objcopy nm ld) string(TOUPPER ${tool} TOOL) find_program(${TOOL} arm-linux-gnueabihf-${tool}) if(NOT ${TOOL}) - message(FATAL_ERROR "could not find ${tool}") + message(FATAL_ERROR "could not find arm-linux-gnueabihf-${tool}") endif() endforeach() diff --git a/cmake/toolchains/Toolchain-hexagon-7.4.cmake b/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake similarity index 97% rename from cmake/toolchains/Toolchain-hexagon-7.4.cmake rename to cmake/toolchains/Toolchain-hexagon-7.2.10.cmake index 9c4286044d..4e27436ec7 100644 --- a/cmake/toolchains/Toolchain-hexagon-7.4.cmake +++ b/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake @@ -35,7 +35,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) include(common/px4_base) if(NOT HEXAGON_TOOLS_ROOT) - set(HEXAGON_TOOLS_ROOT /opt/7.4/Tools) + set(HEXAGON_TOOLS_ROOT $ENV{HOME}/Qualcomm/HEXAGON_Tools/7.2.10/Tools) endif() macro (list2string out in) @@ -53,7 +53,7 @@ set(HEXAGON_LIB_DIR ${HEXAGON_TOOLS_ROOT}/gnu/hexagon/lib) set(HEXAGON_ISS_DIR ${HEXAGON_TOOLS_ROOT}/lib/iss) set(TOOLSLIB ${HEXAGON_TOOLS_ROOT}/target/hexagon/lib/${V_ARCH}/G0) -# Use the HexagonTools compiler (6.4.05) +# Use the HexagonTools compiler (7.2.10) set(CMAKE_C_COMPILER ${HEXAGON_BIN}/${CROSSDEV}clang) set(CMAKE_CXX_COMPILER ${HEXAGON_BIN}/${CROSSDEV}clang++) @@ -82,6 +82,7 @@ set(ARCHCPUFLAGS add_definitions( -D_PID_T -D_UID_T -D_TIMER_T -Dnoreturn_function= + -D_HAS_C9X -D__EXPORT= -Drestrict= -D_DEBUG diff --git a/src/modules/attitude_estimator_q/attitude_estimator_q_params.c b/src/modules/attitude_estimator_q/attitude_estimator_q_params.c index d72f62dc61..d3959db4cf 100644 --- a/src/modules/attitude_estimator_q/attitude_estimator_q_params.c +++ b/src/modules/attitude_estimator_q/attitude_estimator_q_params.c @@ -47,6 +47,7 @@ * @group Attitude Q estimator * @min 0 * @max 1 + * @decimal 2 */ PARAM_DEFINE_FLOAT(ATT_W_ACC, 0.2f); @@ -56,6 +57,7 @@ PARAM_DEFINE_FLOAT(ATT_W_ACC, 0.2f); * @group Attitude Q estimator * @min 0 * @max 1 + * @decimal 2 */ PARAM_DEFINE_FLOAT(ATT_W_MAG, 0.1f); @@ -65,6 +67,7 @@ PARAM_DEFINE_FLOAT(ATT_W_MAG, 0.1f); * @group Attitude Q estimator * @min 0 * @max 1 + * @decimal 2 */ PARAM_DEFINE_FLOAT(ATT_W_GYRO_BIAS, 0.1f); @@ -77,6 +80,7 @@ PARAM_DEFINE_FLOAT(ATT_W_GYRO_BIAS, 0.1f); * * @group Attitude Q estimator * @unit degrees + * @decimal 2 */ PARAM_DEFINE_FLOAT(ATT_MAG_DECL, 0.0f); @@ -106,6 +110,7 @@ PARAM_DEFINE_INT32(ATT_ACC_COMP, 2); * @min 0 * @max 2 * @unit rad/s + * @decimal 3 */ PARAM_DEFINE_FLOAT(ATT_BIAS_MAX, 0.05f); @@ -113,7 +118,8 @@ PARAM_DEFINE_FLOAT(ATT_BIAS_MAX, 0.05f); * Threshold (of RMS) to warn about high vibration levels * * @group Attitude Q estimator - * @min 0.001 - * @max 100 + * @min 0.01 + * @max 10 + * @decimal 2 */ PARAM_DEFINE_FLOAT(ATT_VIBE_THRESH, 0.2f); diff --git a/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp b/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp index 61bd32a1b3..04be54eb33 100644 --- a/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp +++ b/src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp @@ -1122,7 +1122,7 @@ int AttitudePositionEstimatorEKF::start() _estimator_task = px4_task_spawn_cmd("ekf_att_pos_estimator", SCHED_DEFAULT, SCHED_PRIORITY_MAX - 20, - 3900, + 4600, (px4_main_t)&AttitudePositionEstimatorEKF::task_main_trampoline, nullptr); @@ -1245,9 +1245,9 @@ void AttitudePositionEstimatorEKF::pollData() _ekf->dAngIMU.y = _sensor_combined.gyro_integral_rad[_gyro_main * 3 + 1]; _ekf->dAngIMU.z = _sensor_combined.gyro_integral_rad[_gyro_main * 3 + 2]; } else { - _ekf->dAngIMU.x = 0.5f * (_ekf->angRate.x + _sensor_combined.gyro_rad_s[_gyro_main * 3 + 0]); - _ekf->dAngIMU.y = 0.5f * (_ekf->angRate.y + _sensor_combined.gyro_rad_s[_gyro_main * 3 + 1]); - _ekf->dAngIMU.z = 0.5f * (_ekf->angRate.z + _sensor_combined.gyro_rad_s[_gyro_main * 3 + 2]); + _ekf->dAngIMU.x = 0.5f * (_ekf->angRate.x + _sensor_combined.gyro_rad_s[_gyro_main * 3 + 0]) * _ekf->dtIMU; + _ekf->dAngIMU.y = 0.5f * (_ekf->angRate.y + _sensor_combined.gyro_rad_s[_gyro_main * 3 + 1]) * _ekf->dtIMU; + _ekf->dAngIMU.z = 0.5f * (_ekf->angRate.z + _sensor_combined.gyro_rad_s[_gyro_main * 3 + 2]) * _ekf->dtIMU; } _ekf->angRate.x = _sensor_combined.gyro_rad_s[_gyro_main * 3 + 0]; @@ -1265,9 +1265,9 @@ void AttitudePositionEstimatorEKF::pollData() _ekf->dVelIMU.y = _sensor_combined.accelerometer_integral_m_s[_accel_main * 3 + 1]; _ekf->dVelIMU.z = _sensor_combined.accelerometer_integral_m_s[_accel_main * 3 + 2]; } else { - _ekf->dVelIMU.x = 0.5f * (_ekf->accel.x + _sensor_combined.accelerometer_m_s2[_accel_main * 3 + 0]); - _ekf->dVelIMU.y = 0.5f * (_ekf->accel.y + _sensor_combined.accelerometer_m_s2[_accel_main * 3 + 1]); - _ekf->dVelIMU.z = 0.5f * (_ekf->accel.z + _sensor_combined.accelerometer_m_s2[_accel_main * 3 + 2]); + _ekf->dVelIMU.x = 0.5f * (_ekf->accel.x + _sensor_combined.accelerometer_m_s2[_accel_main * 3 + 0]) * _ekf->dtIMU; + _ekf->dVelIMU.y = 0.5f * (_ekf->accel.y + _sensor_combined.accelerometer_m_s2[_accel_main * 3 + 1]) * _ekf->dtIMU; + _ekf->dVelIMU.z = 0.5f * (_ekf->accel.z + _sensor_combined.accelerometer_m_s2[_accel_main * 3 + 2]) * _ekf->dtIMU; } _ekf->accel.x = _sensor_combined.accelerometer_m_s2[_accel_main * 3 + 0]; diff --git a/src/modules/fw_pos_control_l1/fw_pos_control_l1_params.c b/src/modules/fw_pos_control_l1/fw_pos_control_l1_params.c index cfd1988f44..5870039c24 100644 --- a/src/modules/fw_pos_control_l1/fw_pos_control_l1_params.c +++ b/src/modules/fw_pos_control_l1/fw_pos_control_l1_params.c @@ -179,7 +179,7 @@ PARAM_DEFINE_FLOAT(FW_THR_LND_MAX, 1.0f); * @max 150.0 * @group L1 Control */ -PARAM_DEFINE_FLOAT(FW_CLMBOUT_DIFF, 25.0f); +PARAM_DEFINE_FLOAT(FW_CLMBOUT_DIFF, 10.0f); /** * Maximum climb rate diff --git a/src/modules/mavlink/mavlink_main.cpp b/src/modules/mavlink/mavlink_main.cpp index 297a76239b..a12133c021 100644 --- a/src/modules/mavlink/mavlink_main.cpp +++ b/src/modules/mavlink/mavlink_main.cpp @@ -1676,7 +1676,6 @@ Mavlink::task_main(int argc, char *argv[]) configure_stream("GPS_RAW_INT", 1.0f); configure_stream("GLOBAL_POSITION_INT", 3.0f); configure_stream("LOCAL_POSITION_NED", 3.0f); - configure_stream("NAMED_VALUE_FLOAT", 2.0f); configure_stream("RC_CHANNELS", 1.0f); configure_stream("SERVO_OUTPUT_RAW_0", 1.0f); configure_stream("POSITION_TARGET_GLOBAL_INT", 3.0f); diff --git a/src/platforms/posix/main.cpp b/src/platforms/posix/main.cpp index 26465c266e..1b22627721 100644 --- a/src/platforms/posix/main.cpp +++ b/src/platforms/posix/main.cpp @@ -66,6 +66,13 @@ extern "C" { cout.flush(); _exit(0); } + void _SigFpeHandler(int sig_num); + void _SigFpeHandler(int sig_num) + { + cout.flush(); + cout << endl << "floating point exception" << endl; + cout.flush(); + } } static void print_prompt() @@ -137,6 +144,7 @@ int main(int argc, char **argv) { bool daemon_mode = false; signal(SIGINT, _SigIntHandler); + signal(SIGFPE, _SigFpeHandler); int index = 1; bool error_detected = false; diff --git a/src/platforms/px4_defines.h b/src/platforms/px4_defines.h index b80532b099..06bddf2eb6 100644 --- a/src/platforms/px4_defines.h +++ b/src/platforms/px4_defines.h @@ -234,14 +234,6 @@ __END_DECLS // Missing math.h defines #define PX4_ISFINITE(x) __builtin_isfinite(x) -// FIXME - these are missing for clang++ but not for clang -#if defined(__cplusplus) -#define isfinite(x) true -#define isnan(x) false -#define isinf(x) false -#define fminf(x, y) ((x) > (y) ? y : x) -#endif - #endif /*