Tools/px4airframes: refactor & remove some unneeded code

This commit is contained in:
Beat Küng
2017-04-18 11:58:18 +02:00
parent 59ea964ea2
commit 62c1a23ea3
3 changed files with 61 additions and 61 deletions
+58
View File
@@ -22,6 +22,64 @@ class ParameterGroup(object):
"""
return self.name
def GetImageName(self):
"""
Get parameter group image base name (w/o extension)
"""
if (self.name == "Standard Plane"):
return "Plane"
elif (self.name == "Flying Wing"):
return "FlyingWing"
elif (self.name == "Quadrotor x"):
return "QuadRotorX"
elif (self.name == "Quadrotor +"):
return "QuadRotorPlus"
elif (self.name == "Hexarotor x"):
return "HexaRotorX"
elif (self.name == "Hexarotor +"):
return "HexaRotorPlus"
elif (self.name == "Octorotor +"):
return "OctoRotorPlus"
elif (self.name == "Octorotor x"):
return "OctoRotorX"
elif (self.name == "Octorotor Coaxial"):
return "OctoRotorXCoaxial"
elif (self.name == "Octo Coax Wide"):
return "OctoRotorXCoaxial"
elif (self.name == "Quadrotor Wide"):
return "QuadRotorWide"
elif (self.name == "Quadrotor H"):
return "QuadRotorH"
elif (self.name == "Simulation"):
return "AirframeSimulation"
elif (self.name == "Plane A-Tail"):
return "PlaneATail"
elif (self.name == "VTOL Duo Tailsitter"):
return "VTOLDuoRotorTailSitter"
elif (self.name == "Standard VTOL"):
return "VTOLPlane"
elif (self.name == "VTOL Quad Tailsitter"):
return "VTOLQuadRotorTailSitter"
elif (self.name == "VTOL Tiltrotor"):
return "VTOLTiltRotor"
elif (self.name == "Coaxial Helicopter"):
return "HelicopterCoaxial"
elif (self.name == "Helicopter"):
return "Helicopter"
elif (self.name == "Hexarotor Coaxial"):
return "Y6A"
elif (self.name == "Y6B"):
return "Y6B"
elif (self.name == "Tricopter Y-"):
return "YMinus"
elif (self.name == "Tricopter Y+"):
return "YPlus"
elif (self.name == "Rover"):
return "Rover"
elif (self.name == "Boat"):
return "Boat"
return "AirframeUnknown"
def GetParams(self):
"""
Returns the parsed list of parameters. Every parameter is a Parameter