Commit 3c8c2d6d authored by Felix Kettner's avatar Felix Kettner

more pep8

parent d5e64915
Pipeline #34323 passed with stage
in 25 seconds
......@@ -89,7 +89,6 @@ class Nano:
def reset_encoders(self):
write_order(self.serial_file, order=Order.RESET_ENCODERS)
def get_battery_voltage(self):
write_order(self.serial_file, order=Order.VOLTAGE)
return read_i16(self.serial_file)
......@@ -112,20 +111,20 @@ class Nano:
def get_color_rgb(self):
# red
GPIO.output(c.COLOR_SENSOR_S2,GPIO.LOW)
GPIO.output(c.COLOR_SENSOR_S3,GPIO.LOW)
GPIO.output(c.COLOR_SENSOR_S2, GPIO.LOW)
GPIO.output(c.COLOR_SENSOR_S3, GPIO.LOW)
write_order(self.serial_file, order=Order.COLOR)
red = read_i16(self.serial_file)
# blue
GPIO.output(c.COLOR_SENSOR_S2,GPIO.LOW)
GPIO.output(c.COLOR_SENSOR_S3,GPIO.HIGH)
GPIO.output(c.COLOR_SENSOR_S2, GPIO.LOW)
GPIO.output(c.COLOR_SENSOR_S3, GPIO.HIGH)
write_order(self.serial_file, order=Order.COLOR)
blue = read_i16(self.serial_file)
# green
GPIO.output(c.COLOR_SENSOR_S2,GPIO.HIGH)
GPIO.output(c.COLOR_SENSOR_S3,GPIO.HIGH)
GPIO.output(c.COLOR_SENSOR_S2, GPIO.HIGH)
GPIO.output(c.COLOR_SENSOR_S3, GPIO.HIGH)
write_order(self.serial_file, order=Order.COLOR)
green = read_i16(self.serial_file)
......@@ -133,20 +132,20 @@ class Nano:
def get_color(self):
# red
GPIO.output(c.COLOR_SENSOR_S2,GPIO.LOW)
GPIO.output(c.COLOR_SENSOR_S3,GPIO.LOW)
GPIO.output(c.COLOR_SENSOR_S2, GPIO.LOW)
GPIO.output(c.COLOR_SENSOR_S3, GPIO.LOW)
write_order(self.serial_file, order=Order.COLOR)
red = read_i16(self.serial_file)
# blue
GPIO.output(c.COLOR_SENSOR_S2,GPIO.LOW)
GPIO.output(c.COLOR_SENSOR_S3,GPIO.HIGH)
GPIO.output(c.COLOR_SENSOR_S2, GPIO.LOW)
GPIO.output(c.COLOR_SENSOR_S3, GPIO.HIGH)
write_order(self.serial_file, order=Order.COLOR)
blue = read_i16(self.serial_file)
# green
GPIO.output(c.COLOR_SENSOR_S2,GPIO.HIGH)
GPIO.output(c.COLOR_SENSOR_S3,GPIO.HIGH)
GPIO.output(c.COLOR_SENSOR_S2, GPIO.HIGH)
GPIO.output(c.COLOR_SENSOR_S3, GPIO.HIGH)
write_order(self.serial_file, order=Order.COLOR)
green = read_i16(self.serial_file)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment