You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case the source has multiple .h file and the first one found isn't the right one., the script fails
myHeader_extension.h
myHeader.h (containing the class
extendoing the search for .h files will solve the issue:
# This function retrieves the directory path to the header file.
def get_path_to_header(sPath):
foundHeader = False
pathToHeader = ''
for file in os.listdir(sPath):
if file.endswith(".h"):
if(confirm_header_file(sPath + os.sep + file)):
pathToHeader = sPath + os.sep + file
foundHeader = True
if foundHeader:
return pathToHeader
else:
error_out(3, libData)
# This function confirms that there is a header file in teh Arduino Library
# folder.
def confirm_header_file(fPath):
print(fPath)
with open(fPath, 'r') as h:
for line in h:
if "class" in line:
return True
return False
The text was updated successfully, but these errors were encountered:
In case the source has multiple
.h
file and the first one found isn't the right one., the script failsextendoing the search for
.h
files will solve the issue:The text was updated successfully, but these errors were encountered: