diff options
author | Anton Matosov <anton.matosov@gmail.com> | 2015-01-05 12:41:25 +0200 |
---|---|---|
committer | Anton Matosov <anton.matosov@gmail.com> | 2015-01-05 12:41:25 +0200 |
commit | 6ba0b758045261906d60d772ac001d8b46d0b4c7 (patch) | |
tree | b8a783007a7c37806e423d789547e269c6aa5e6d /src/modules | |
parent | 1bc6c44a0e30059620bc5fec85c5d096cd911df0 (diff) | |
download | px4-firmware-6ba0b758045261906d60d772ac001d8b46d0b4c7.tar.gz px4-firmware-6ba0b758045261906d60d772ac001d8b46d0b4c7.tar.bz2 px4-firmware-6ba0b758045261906d60d772ac001d8b46d0b4c7.zip |
Replaced tabs with spaces as it is critical for some python builds
Diffstat (limited to 'src/modules')
-rwxr-xr-x | src/modules/systemlib/mixer/multi_tables | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/src/modules/systemlib/mixer/multi_tables b/src/modules/systemlib/mixer/multi_tables index 07594ee72..786b63b02 100755 --- a/src/modules/systemlib/mixer/multi_tables +++ b/src/modules/systemlib/mixer/multi_tables @@ -17,14 +17,14 @@ CCW = 1.0 CW = -CCW quad_x = [ - [ 45, CCW], - [-135, CCW], - [-45, CW], + [ 45, CCW], + [-135, CCW], + [-45, CW], [135, CW], ] quad_plus = [ - [ 90, CCW], + [ 90, CCW], [ -90, CCW], [ 0, CW], [ 180, CW], @@ -38,14 +38,14 @@ quad_v = [ ] quad_wide = [ - [ 68, CCW], + [ 68, CCW], [ -129, CCW], [ -68, CW], [ 129, CW], ] hex_x = [ - [ 90, CW], + [ 90, CW], [ -90, CCW], [ -30, CW], [ 150, CCW], @@ -110,44 +110,44 @@ twin_engine = [ ] def variableName(variable): - for variableName, value in list(globals().iteritems()): - if value is variable: - return variableName + for variableName, value in list(globals().iteritems()): + if value is variable: + return variableName tables = [quad_x, quad_plus, quad_v, quad_wide, hex_x, hex_plus, hex_cox, octa_x, octa_plus, octa_cox, twin_engine] def printEnum(): - print "enum MultirotorMixer::Geometry : unsigned int {" - for table in tables: - print "\t{},".format(variableName(table).upper()) + print "enum MultirotorMixer::Geometry : unsigned int {" + for table in tables: + print "\t{},".format(variableName(table).upper()) - print "\n\tMAX_GEOMETRY" - print "}; // enum MultirotorMixer::Geometry\n" + print "\n\tMAX_GEOMETRY" + print "}; // enum MultirotorMixer::Geometry\n" def printScaleTables(): - for table in tables: - print "const MultirotorMixer::Rotor _config_{}[] = {{".format(variableName(table)) - for (angle, yawScale) in table: - rollScale = rcos(angle + 90) - pitchScale = rcos(angle) - print "\t{{ {:9f}, {:9f}, {:9f} }},".format(rollScale, pitchScale, yawScale) - print "};\n" - + for table in tables: + print "const MultirotorMixer::Rotor _config_{}[] = {{".format(variableName(table)) + for (angle, yawScale) in table: + rollScale = rcos(angle + 90) + pitchScale = rcos(angle) + print "\t{{ {:9f}, {:9f}, {:9f} }},".format(rollScale, pitchScale, yawScale) + print "};\n" + def printScaleTablesIndex(): - print "const MultirotorMixer::Rotor *_config_index[] = {" - for table in tables: - print "\t&_config_{}[0],".format(variableName(table)) - print "};\n" + print "const MultirotorMixer::Rotor *_config_index[] = {" + for table in tables: + print "\t&_config_{}[0],".format(variableName(table)) + print "};\n" def printScaleTablesCounts(): - print "const unsigned _config_rotor_count[] = {" - for table in tables: - print "\t{}, /* {} */".format(len(table), variableName(table)) - print "};\n" - - + print "const unsigned _config_rotor_count[] = {" + for table in tables: + print "\t{}, /* {} */".format(len(table), variableName(table)) + print "};\n" + + printEnum() |