diff options
author | Anton Matosov <anton.matosov@gmail.com> | 2015-01-05 23:22:43 +0200 |
---|---|---|
committer | Anton Matosov <anton.matosov@gmail.com> | 2015-01-05 23:22:43 +0200 |
commit | 29d0754df633b50bc456922ff68d3e6c020f1d81 (patch) | |
tree | a64927b05a0fa5c07eace5b582226f81764c513d /src/modules/systemlib | |
parent | 117d43067f3c16c596a41cf0af5feaee1b11716b (diff) | |
download | px4-firmware-29d0754df633b50bc456922ff68d3e6c020f1d81.tar.gz px4-firmware-29d0754df633b50bc456922ff68d3e6c020f1d81.tar.bz2 px4-firmware-29d0754df633b50bc456922ff68d3e6c020f1d81.zip |
std::underlying_type is not supported by the g++ 4.6 used by CI server
Diffstat (limited to 'src/modules/systemlib')
-rw-r--r-- | src/modules/systemlib/mixer/mixer.h | 3 | ||||
-rw-r--r-- | src/modules/systemlib/mixer/mixer_multirotor.cpp | 6 | ||||
-rwxr-xr-x | src/modules/systemlib/mixer/multi_tables | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/systemlib/mixer/mixer.h b/src/modules/systemlib/mixer/mixer.h index 55c4ce6af..6494a314e 100644 --- a/src/modules/systemlib/mixer/mixer.h +++ b/src/modules/systemlib/mixer/mixer.h @@ -447,7 +447,8 @@ private: * * Values are generated by the multi_tables script and placed to mixer_multirotor.generated.h */ -enum class MultirotorGeometry : unsigned int; +using MultirotorGeometryUnderlyingType = unsigned int; +enum class MultirotorGeometry : MultirotorGeometryUnderlyingType; /** * Multi-rotor mixer for pre-defined vehicle geometries. diff --git a/src/modules/systemlib/mixer/mixer_multirotor.cpp b/src/modules/systemlib/mixer/mixer_multirotor.cpp index d4bceaa27..bee9d0edc 100644 --- a/src/modules/systemlib/mixer/mixer_multirotor.cpp +++ b/src/modules/systemlib/mixer/mixer_multirotor.cpp @@ -78,8 +78,6 @@ float constrain(float val, float min, float max) } } -using GeometryType = typename std::underlying_type<MultirotorGeometry>::type; - MultirotorMixer::MultirotorMixer(ControlCallback control_cb, uintptr_t cb_handle, MultirotorGeometry geometry, @@ -92,8 +90,8 @@ MultirotorMixer::MultirotorMixer(ControlCallback control_cb, _pitch_scale(pitch_scale), _yaw_scale(yaw_scale), _idle_speed(-1.0f + idle_speed * 2.0f), /* shift to output range here to avoid runtime calculation */ - _rotor_count(_config_rotor_count[(GeometryType)geometry]), - _rotors(_config_index[(GeometryType)geometry]) + _rotor_count(_config_rotor_count[(MultirotorGeometryUnderlyingType)geometry]), + _rotors(_config_index[(MultirotorGeometryUnderlyingType)geometry]) { } diff --git a/src/modules/systemlib/mixer/multi_tables b/src/modules/systemlib/mixer/multi_tables index 5d746fcfa..01ff1b719 100755 --- a/src/modules/systemlib/mixer/multi_tables +++ b/src/modules/systemlib/mixer/multi_tables @@ -151,7 +151,7 @@ tables = [quad_x, quad_plus, quad_v, quad_wide, hex_x, hex_plus, hex_cox, octa_x def printEnum(): - print "enum class MultirotorGeometry : unsigned int {" + print "enum class MultirotorGeometry : MultirotorGeometryUnderlyingType {" for table in tables: print "\t{},".format(variableName(table).upper()) |