Commit 65d0e23c authored by Dimitris Lampridis's avatar Dimitris Lampridis

cli: rename serial command to eeprom_progam

Also ask separately for serial number to facilitate the use of barcode scanners
parent 19c4df41
......@@ -188,12 +188,12 @@ class OattnUsbTest(cmd.Cmd):
print('error resetting attenuation in channel {}'.format(ch))
return
def do_serial(self, args):
"""EXPERT: change serial number of board."""
def do_eeprom_program(self, args):
"""EXPERT: program the EEPROM (you will be asked to provide a serial number)."""
try:
bus, dev, serial = [int(arg) for arg in args.split()]
bus, dev = [int(arg) for arg in args.split()]
except ValueError as e:
print('usage: serial bus dev serialno')
print('usage: eeprom_program bus dev')
return
except Exception as e:
raise
......@@ -210,6 +210,7 @@ class OattnUsbTest(cmd.Cmd):
else:
print('device bus:{} dev:{} not found'.format(bus, dev))
return
serial = input('Please provide the serial number to program: ')
print('WARNING: about to erase and program the EEPROM with new serial number [{}]'
' into dev with old serial: [{}] at busdev: {}/{}, busport: {}'.format(
serial, device['serial'],
......
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