mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
Tools: correct board_list.py for being copied into root dir in autotest
This commit is contained in:
parent
7bb36a5630
commit
b737d113c9
@ -18,13 +18,27 @@ class Board(object):
|
||||
|
||||
class BoardList(object):
|
||||
|
||||
def __init__(self):
|
||||
def set_hwdef_dir(self):
|
||||
self.hwdef_dir = os.path.join(
|
||||
os.path.dirname(os.path.realpath(__file__)),
|
||||
"..", "..", "libraries", "AP_HAL_ChibiOS", "hwdef")
|
||||
|
||||
if not os.path.exists(self.hwdef_dir):
|
||||
raise ValueError("%s does not exist" % self.hwdef_dir)
|
||||
if os.path.exists(self.hwdef_dir):
|
||||
return
|
||||
|
||||
self.hwdef_dir = os.path.join(
|
||||
os.path.dirname(os.path.realpath(__file__)),
|
||||
"libraries", "AP_HAL_ChibiOS", "hwdef")
|
||||
|
||||
if os.path.exists(self.hwdef_dir):
|
||||
# we're on the autotest server and have been copied in
|
||||
# to the APM root directory
|
||||
return
|
||||
|
||||
raise ValueError("Did not find hwdef_dir")
|
||||
|
||||
def __init__(self):
|
||||
self.set_hwdef_dir()
|
||||
|
||||
# no hwdefs for Linux boards - yet?
|
||||
self.boards = [
|
||||
|
Loading…
Reference in New Issue
Block a user