timvideos / HDMI2USB-mode-switch

Tool for switching boards supported by HDMI2USB firmware between multiple different modes (programming, webcam, etc).
Apache License 2.0
10 stars 13 forks source link

Make the find-board `--by-xxxx` arguments work #15

Open mithro opened 8 years ago

mithro commented 8 years ago

Currently the following arguments don't actually do anything...

    parser.add_argument(
        '--by-type',
        choices=boards.BOARD_TYPES,
        help='Find board with a given type.')

    parser.add_argument(
        '--by-mac',
        help='Find board with the given MAC address.')
    parser.add_argument(
        '--by-dna',
        help='Find board with the given Device DNA.')
    parser.add_argument(
        '--by-position',
        help="""\
Find board using a given position in the USB structure.

Example:
 1-2.3 - Bus 1, Port 2 (which is a hub), Port 3
 5-6.7.8 - Bus 5, Port 2 (which is a hub), Port 7 (which is a hub), Port 8 (which is a hub)

While this *should* be static across reboots, but sadly on some machines it isn't :(
""")  # noqa