fix inconsistent indentation and tabbing

parent 54a5d97d
......@@ -76,8 +76,7 @@ int oau_att_open(char *serial)
uint8_t pins;
if( (ret = ftdi_read_pins(ctx->ftdi, &pins) ) < 0 )
{
if( (ret = ftdi_read_pins(ctx->ftdi, &pins) ) < 0 ) {
ftdi_usb_close( ctx->ftdi );
ftdi_free(ctx->ftdi);
return ret;
......
......@@ -46,7 +46,8 @@ class OauTest(cmd.Cmd):
self.fd = fd
self.nchannels = self.read_nchannels()
print('current device: serial {}, fd {}, {} channels'.format(
serial, fd, self.nchannels))
str(serial, 'utf8') if serial else '??',
fd, self.nchannels))
def do_close(self, arg):
"""close connection to current device."""
......@@ -112,7 +113,7 @@ class OauTest(cmd.Cmd):
print('no active connection')
return
for ch in range(1, self.nchannels+1):
err = self.api.oau_att_set_relay(self.fd, ch, attn_values['-40dB'])
err = self.api.oau_att_set_relay(self.fd, ch, self.attn_values['-40dB'])
if err < 0:
print('error resetting attenuation in channel {}'.format(ch))
return
......
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