Skip to content

Commit

Permalink
Add some more lifecycle information to the listing
Browse files Browse the repository at this point in the history
  • Loading branch information
kk7ds committed Nov 20, 2015
1 parent 21c8022 commit 9e3764f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion uvcclient/uvcclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def index(self):
return [{'name': x['name'],
'uuid': x['uuid'],
'state': x['state'],
'managed': x['managed'],
} for x in cams]

def name_to_uuid(self, name):
Expand Down Expand Up @@ -247,7 +248,13 @@ def main():
client.dump(opts.uuid)
elif opts.list:
for cam in client.index():
if cam['state'] == 'DISCONNECTED':
if not cam['managed']:
status = 'new'
elif cam['state'] == 'FIRMWARE_OUTDATED':
status = 'outdated'
elif cam['state'] == 'UPGRADING':
status = 'upgrading'
elif cam['state'] == 'DISCONNECTED':
status = 'offline'
elif cam['state'] == 'CONNECTED':
status = 'online'
Expand Down

0 comments on commit 9e3764f

Please sign in to comment.