selfcheck.py: bring back info about non-Clover firmware

This commit is contained in:
Oleg Kalachev
2022-02-01 07:56:47 +03:00
parent d0a0e5d50d
commit 75209ea2f9

View File

@@ -195,6 +195,9 @@ def check_fcu():
failure('no connection to the FCU (check wiring)') failure('no connection to the FCU (check wiring)')
return return
clover_tag = re.compile(r'-cl[oe]ver\.\d+$')
clover_fw = False
# Make sure the console is available to us # Make sure the console is available to us
mavlink_exec('\n') mavlink_exec('\n')
version_str = mavlink_exec('ver all') version_str = mavlink_exec('ver all')
@@ -204,11 +207,16 @@ def check_fcu():
for line in version_str.split('\n'): for line in version_str.split('\n'):
if line.startswith('FW version: '): if line.startswith('FW version: '):
info(line[len('FW version: '):]) info(line[len('FW version: '):])
elif line.startswith('FW git tag: '): elif line.startswith('FW git tag: '): # only Clover's firmware
info(line[len('FW git tag: '):]) tag = line[len('FW git tag: '):]
clover_fw = clover_tag.search(tag)
info(tag)
elif line.startswith('HW arch: '): elif line.startswith('HW arch: '):
info(line[len('HW arch: '):]) info(line[len('HW arch: '):])
if not clover_fw:
info('not Clover PX4 firmware, check https://clover.coex.tech/firmware')
est = get_param('SYS_MC_EST_GROUP') est = get_param('SYS_MC_EST_GROUP')
if est == 1: if est == 1:
info('selected estimator: LPE') info('selected estimator: LPE')