Run yapf on all python files in the repo
Signed-off-by: Ravago Jones <ravagojones@gmail.com>
Change-Id: I221e04c3f517fab8535b22551553799e0fee7a80
diff --git a/motors/fet12/current_equalize.py b/motors/fet12/current_equalize.py
index ea44916..114d53f 100755
--- a/motors/fet12/current_equalize.py
+++ b/motors/fet12/current_equalize.py
@@ -4,6 +4,7 @@
import sys
import calib_sensors
+
def manual_calibrate():
# 38 27 -84
# 36 -64 39
@@ -20,11 +21,12 @@
transform = I * numpy.linalg.inv(Is)
return transform
+
def main():
transform = manual_calibrate()
if len(sys.argv) > 1:
- transform = calib_sensors.calibrate(sys.argv[1:])
+ transform = calib_sensors.calibrate(sys.argv[1:])
print("#ifndef MOTORS_FET12_CURRENT_MATRIX_")
print("#define MOTORS_FET12_CURRENT_MATRIX_")
@@ -35,7 +37,8 @@
print("namespace motors {")
print("")
print(
- "inline ::std::array<float, 3> DecoupleCurrents(int16_t currents[3]) {")
+ "inline ::std::array<float, 3> DecoupleCurrents(int16_t currents[3]) {"
+ )
print(" ::std::array<float, 3> ans;")
for i in range(3):
@@ -54,5 +57,6 @@
return 0
+
if __name__ == '__main__':
sys.exit(main())