mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 17:35:22 +08:00
std::underlying_type is not supported by the g++ 4.6 used by CI server
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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])
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user