Skip to content

Commit

Permalink
qmk doctor: add sonixflasher checks
Browse files Browse the repository at this point in the history
  • Loading branch information
dexter93 committed Sep 19, 2024
1 parent f45495b commit b2a1f2d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/python/qmk/cli/doctor/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ class CheckStatus(Enum):
'dfu-programmer': {},
'avrdude': {},
'dfu-util': {},
'sonixflasher': {
'version_arg': '--version'
},
'avr-gcc': {
'version_arg': '-dumpversion'
},
Expand Down Expand Up @@ -85,6 +88,14 @@ def _check_dfu_programmer_version():
return CheckStatus.OK


def _check_sonixflasher_version():
first_line = ESSENTIAL_BINARIES['sonixflasher']['output'].split('\n')[0]
version_number = first_line.split()[1]
cli.log.info('Found sonixflasher version %s', version_number)

return CheckStatus.OK


def check_binaries():
"""Iterates through ESSENTIAL_BINARIES and tests them.
"""
Expand All @@ -111,6 +122,7 @@ def check_binary_versions():
'avrdude': _check_avrdude_version,
'dfu-util': _check_dfu_util_version,
'dfu-programmer': _check_dfu_programmer_version,
'sonixflasher': _check_sonixflasher_version,
}

versions = []
Expand Down

0 comments on commit b2a1f2d

Please sign in to comment.