btstack_parser detects btstack_root based on script location

This commit is contained in:
Matthias Ringwald 2016-03-04 17:28:21 +01:00
parent f25d0f872d
commit 5df8813f82

View File

@ -1,9 +1,9 @@
#!/usr/bin/env python
# BlueKitchen GmbH (c) 2014
import re
import os
import sys
# paths
bluetooth_h_path = 'src/bluetooth.h'
@ -13,7 +13,8 @@ hci_cmds_c_path = 'src/hci_cmd.c'
hci_cmds_h_path = 'src/hci_cmd.h'
hci_h_path = 'src/hci.h'
btstack_root = '../..'
btstack_root = os.path.abspath(os.path.dirname(sys.argv[0]) + '/..')
print ("BTstack root %s" % btstack_root)
def set_btstack_root(path):
global btstack_root