diff --git a/read_values.py b/read_values.py index 364d7bf..bff42f4 100644 --- a/read_values.py +++ b/read_values.py @@ -43,7 +43,11 @@ if __name__ == '__main__': previous_module = "" for module in modules: #for each module inside the list of modules + if module[0] not in module_index: #this if break is added to avoid the script from breaking at the start (which happens when serial is not yet receiving all values, but only fragments) + # print("break") + break # break and start the for loop again function_index[module[0]](previous_module, module) #use function_index to run functions for each module + previous_module = module_index[module[0]] #use module_index to replace abbr. with full name if module == modules[-1]: #if module is the last module in list of modules final_module = module_index[module[0]] #use name of the last module to define final_module