diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e323536 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +/.out +/Src/__pycache__ +/build/__pycache__ +/build_temp +/DebugVarEdit_GUI.build +/DebugVarEdit_GUI.dist +/DebugVarEdit_GUI.onefile-build \ No newline at end of file diff --git a/.out/generateVars.exe b/.out/generateVars.exe deleted file mode 100644 index 70873be..0000000 Binary files a/.out/generateVars.exe and /dev/null differ diff --git a/.out/scanVars.exe b/.out/scanVars.exe deleted file mode 100644 index 8b7e057..0000000 Binary files a/.out/scanVars.exe and /dev/null differ diff --git a/.out/scanVars0.py b/.out/scanVars0.py deleted file mode 100644 index b5e8657..0000000 --- a/.out/scanVars0.py +++ /dev/null @@ -1,732 +0,0 @@ -# pyinstaller --onefile --distpath . --workpath ./build --specpath ./build scanVars.py -import sys -import os -import re -import argparse -from pathlib import Path - - -# === Словарь соответствия типов XML → DebugVarType_t === -type_map = dict([ - *[(k, 'pt_int8') for k in ('signed char', 'char')], - *[(k, 'pt_int16') for k in ('int', 'int16', 'short')], - *[(k, 'pt_int32') for k in ('long', 'int32', '_iqx')], - *[(k, 'pt_int64') for k in ('long long', 'int64')], - - *[(k, 'pt_uint8') for k in ('unsigned char',)], - *[(k, 'pt_uint16') for k in ('unsigned int', 'unsigned short', 'Uint16')], - *[(k, 'pt_uint32') for k in ('unsigned long', 'Uint32')], - *[(k, 'pt_uint64') for k in ('unsigned long long', 'Uint64')], - - *[(k, 'pt_ptr_int8') for k in ('signed char*',)], - *[(k, 'pt_ptr_int16') for k in ('int*', 'short*')], - *[(k, 'pt_ptr_int32') for k in ('long*',)], - *[(k, 'pt_ptr_uint8') for k in ('unsigned char*',)], - *[(k, 'pt_ptr_uint16') for k in ('unsigned int*', 'unsigned short*')], - *[(k, 'pt_ptr_uint32') for k in ('unsigned long*',)], - ('unsigned long long*', 'pt_int64'), - - *[(k, 'pt_arr_int8') for k in ('signed char[]',)], - *[(k, 'pt_arr_int16') for k in ('int[]', 'short[]')], - *[(k, 'pt_arr_int32') for k in ('long[]',)], - *[(k, 'pt_arr_uint8') for k in ('unsigned char[]',)], - *[(k, 'pt_arr_uint16') for k in ('unsigned int[]', 'unsigned short[]')], - *[(k, 'pt_arr_uint32') for k in ('unsigned long[]',)], - - *[(k, 'pt_float') for k in ('float', 'float32')], - - ('struct', 'pt_struct'), - ('union', 'pt_union'), -]) - -def parse_makefile(makefile_path): - makefile_dir = os.path.dirname(makefile_path) - project_root = os.path.dirname(makefile_dir) # поднялись из Debug - - with open(makefile_path, 'r', encoding='utf-8') as f: - lines = f.readlines() - - objs_lines = [] - collecting = False - - for line in lines: - stripped = line.strip() - if stripped.startswith("ORDERED_OBJS") and "+=" in stripped: - parts = stripped.split("\\") - first_part = parts[0] - idx = first_part.find("+=") - tail = first_part[idx+2:].strip() - if tail: - objs_lines.append(tail) - collecting = True - if len(parts) > 1: - for p in parts[1:]: - p = p.strip() - if p: - objs_lines.append(p) - continue - - if collecting: - if stripped.endswith("\\"): - objs_lines.append(stripped[:-1].strip()) - else: - objs_lines.append(stripped) - collecting = False - - objs_str = ' '.join(objs_lines) - - objs_str = re.sub(r"\$\([^)]+\)", "", objs_str) - - objs = [] - for part in objs_str.split(): - part = part.strip() - if part.startswith('"') and part.endswith('"'): - part = part[1:-1] - if part: - objs.append(part) - - c_files = [] - include_dirs = set() - - for obj_path in objs: - if "DebugTools" in obj_path: - continue - if "v120" in obj_path: - continue - - if obj_path.startswith("Debug\\") or obj_path.startswith("Debug/"): - rel_path = obj_path.replace("Debug\\", "Src\\").replace("Debug/", "Src/") - else: - rel_path = obj_path - - abs_path = os.path.normpath(os.path.join(project_root, rel_path)) - - root, ext = os.path.splitext(abs_path) - if ext.lower() == ".obj": - c_path = root + ".c" - else: - c_path = abs_path - - # Сохраняем только .c файлы - if c_path.lower().endswith(".c"): - c_files.append(c_path) - dir_path = os.path.dirname(c_path) - if dir_path and "DebugTools" not in dir_path: - include_dirs.add(dir_path) - - return c_files, sorted(include_dirs) - -# Шаблон для поиска глобальных переменных -# Пример: int varname; -# Пропускаем строки с static и функции -VAR_PATTERN = re.compile( - r'^\s*(?!static)(\w[\w\s\*]+)\s+(\w+)\s*(=\s*[^;]+)?\s*;', - re.MULTILINE) -EXTERN_PATTERN = re.compile( - r'^\s*extern\s+[\w\s\*]+\s+(\w+)\s*;', - re.MULTILINE) - - -TYPEDEF_PATTERN = re.compile( - r'typedef\s+(struct|union)?\s*(\w+)?\s*{[^}]*}\s*(\w+)\s*;', re.DOTALL) - -TYPEDEF_SIMPLE_PATTERN = re.compile( - r'typedef\s+(.+?)\s+(\w+)\s*;', re.DOTALL) - -def map_type_to_pt(typename, varname): - typename = typename.strip() - - # Убираем const и volatile, где бы они ни были (например, "const volatile int") - for qualifier in ('const', 'volatile'): - typename = typename.replace(qualifier, '') - - typename = typename.strip() # снова убрать лишние пробелы после удаления - - # Раскрутка через typedef - resolved_type = typedef_aliases.get(typename, typename) - - # Прямая проверка - if resolved_type in type_map: - return type_map[resolved_type] - - if resolved_type.startswith('struct'): - return type_map['struct'] - if resolved_type.startswith('union'): - return type_map['union'] - - if '_iq' in resolved_type and '_iqx' in type_map: - return type_map['_iqx'] - - return 'pt_unknown' - -def get_iq_define(vtype): - if '_iq' in vtype: - # Преобразуем _iqXX в t_iqXX - return 't' + vtype[vtype.index('_iq'):] - else: - return 't_iq_none' - -def get_files_by_ext(roots, exts): - files = [] - for root in roots: - for dirpath, _, filenames in os.walk(root): - for f in filenames: - if any(f.endswith(e) for e in exts): - files.append(os.path.join(dirpath, f)) - return files - -def read_file_try_encodings(filepath): - for enc in ['utf-8', 'cp1251']: - try: - with open(filepath, 'r', encoding=enc) as f: - content = f.read() - content = strip_single_line_comments(content) # <=== ВАЖНО - return content, enc - except UnicodeDecodeError: - continue - raise UnicodeDecodeError(f"Не удалось прочитать файл {filepath} с кодировками utf-8 и cp1251") - -FUNC_PATTERN = re.compile( - r'\w[\w\s\*\(\),]*\([^;{)]*\)\s*\{(?:[^{}]*|\{[^}]*\})*?\}', re.DOTALL) - -def strip_single_line_comments(code): - # Удалим // ... до конца строки - return re.sub(r'//.*?$', '', code, flags=re.MULTILINE) - -def remove_function_bodies(code): - - result = [] - i = 0 - length = len(code) - while i < length: - match = re.search(r'\b[\w\s\*\(\),]*\([^;{}]*\)\s*\{', code[i:]) - if not match: - result.append(code[i:]) - break - - start = i + match.start() - brace_start = i + match.end() - 1 - result.append(code[i:start]) # Добавляем всё до функции - - # Ищем конец функции по уровню вложенности скобок - brace_level = 1 - j = brace_start + 1 - in_string = False - while j < length and brace_level > 0: - char = code[j] - - if char == '"' or char == "'": - quote = char - j += 1 - while j < length and code[j] != quote: - if code[j] == '\\': - j += 2 - else: - j += 1 - elif code[j] == '{': - brace_level += 1 - elif code[j] == '}': - brace_level -= 1 - j += 1 - - # Заменяем тело функции пробелами той же длины - result.append(' ' * (j - start)) - i = j - - return ''.join(result) - -def extract_struct_definitions_from_file(filepath): - with open(filepath, 'r', encoding='utf-8', errors='ignore') as f: - content = f.read() - - # Удаляем комментарии - content = re.sub(r'//.*', '', content) - content = re.sub(r'/\*.*?\*/', '', content, flags=re.DOTALL) - - type_definitions = {} - anonymous_counter = [0] - - def split_fields(body): - """ - Разбивает тело struct/union на поля с учётом вложенных { }. - Возвращает список строк - полей (без ;). - """ - fields = [] - start = 0 - brace_level = 0 - for i, ch in enumerate(body): - if ch == '{': - brace_level += 1 - elif ch == '}': - brace_level -= 1 - elif ch == ';' and brace_level == 0: - fields.append(body[start:i].strip()) - start = i + 1 - # если что-то осталось после последнего ; - tail = body[start:].strip() - if tail: - fields.append(tail) - return fields - - def parse_fields(body): - fields = {} - body = body.strip('{} \n\t') - field_strings = split_fields(body) - for field_str in field_strings: - if field_str.startswith(('struct ', 'union ')): - # Вложенный struct/union - # Пытаемся найти имя и тело - m = re.match(r'(struct|union)\s*(\w*)\s*({.*})\s*(\w+)?', field_str, re.DOTALL) - if m: - kind, tag, inner_body, varname = m.groups() - if not varname: - # Анонимная вложенная структура/объединение - varname = f"__anon_{anonymous_counter[0]}" - anonymous_counter[0] += 1 - type_definitions[varname] = parse_fields(inner_body) - fields[varname] = varname - else: - # Если есть имя переменной - anon_type_name = f"__anon_{anonymous_counter[0]}" - anonymous_counter[0] += 1 - type_definitions[anon_type_name] = parse_fields(inner_body) - fields[varname] = anon_type_name if tag == '' else f"{kind} {tag}" - else: - # Не смогли распарсить вложенную структуру - кладём как есть - fields[field_str] = None - else: - # Обычное поле - # Нужно выделить тип и имя поля с учётом указателей и массивов - m = re.match(r'(.+?)\s+([\w\*\[\]]+)$', field_str) - if m: - typename, varname = m.groups() - fields[varname.strip()] = typename.strip() - else: - # не распарсили поле — кладём "как есть" - fields[field_str] = None - return fields - - # Парсим typedef struct/union {...} Alias; - typedef_struct_pattern = re.compile( - r'\btypedef\s+(struct|union)\s*({.*?})\s*(\w+)\s*;', re.DOTALL) - for match in typedef_struct_pattern.finditer(content): - alias = match.group(3) - body = match.group(2) - type_definitions[alias] = parse_fields(body) - - # Парсим struct/union Name {...}; - named_struct_pattern = re.compile( - r'\b(struct|union)\s+(\w+)\s*({.*?})\s*;', re.DOTALL) - for match in named_struct_pattern.finditer(content): - name = match.group(2) - body = match.group(3) - if name not in type_definitions: - type_definitions[name] = parse_fields(body) - - return type_definitions - -def parse_vars_from_file(filepath): - content, encoding = read_file_try_encodings(filepath) - content_clean = remove_function_bodies(content) - - vars_found = [] - for m in VAR_PATTERN.finditer(content_clean): - typename = m.group(1).strip() - varlist = m.group(2) - for var in varlist.split(','): - varname = var.strip() - # Убираем указатели и массивы - varname = varname.strip('*').split('[')[0] - # Фильтрация мусора - if not re.match(r'^[_a-zA-Z][_a-zA-Z0-9]*$', varname): - continue - vars_found.append((varname, typename)) - return vars_found, encoding - -def parse_typedefs_from_file(filepath): - """ - Парсит typedef из файла C: - - typedef struct/union { ... } Alias; - - typedef simple_type Alias; - - Возвращает словарь alias -> базовый тип (например, 'MyType' -> 'struct' или 'unsigned int'). - """ - with open(filepath, 'r', encoding='utf-8', errors='ignore') as f: - content = f.read() - - # Убираем однострочные комментарии - content = re.sub(r'//.*?$', '', content, flags=re.MULTILINE) - # Убираем многострочные комментарии - content = re.sub(r'/\*.*?\*/', '', content, flags=re.DOTALL) - - aliases = {} - - # --- Парсим typedef struct/union {...} Alias; - # Используем стек для вложенных фигурных скобок - typedef_struct_union_pattern = re.compile(r'\btypedef\s+(struct|union)\b', re.IGNORECASE) - pos = 0 - while True: - m = typedef_struct_union_pattern.search(content, pos) - if not m: - break - kind = m.group(1) - brace_open_pos = content.find('{', m.end()) - if brace_open_pos == -1: - # Нет тела структуры, пропускаем - pos = m.end() - continue - - # Ищем позицию закрывающей скобки с учётом вложенности - brace_level = 1 - i = brace_open_pos + 1 - while i < len(content) and brace_level > 0: - if content[i] == '{': - brace_level += 1 - elif content[i] == '}': - brace_level -= 1 - i += 1 - if brace_level != 0: - # Некорректный синтаксис - pos = m.end() - continue - - # Отрезок typedef структуры/объединения - typedef_block = content[m.start():i] - - # После закрывающей скобки ожидаем имя алиаса и точку с запятой - rest = content[i:].lstrip() - alias_match = re.match(r'(\w+)\s*;', rest) - if alias_match: - alias_name = alias_match.group(1) - aliases[alias_name] = kind # например, "struct" или "union" - pos = i + alias_match.end() - else: - # Анонимный typedef? Просто пропускаем - pos = i - - # --- Удаляем typedef struct/union {...} Alias; чтобы не мешали простым typedef - # Для этого удалим весь блок typedef struct/union {...} Alias; - def remove_typedef_struct_union_blocks(text): - result = [] - last_pos = 0 - for m in typedef_struct_union_pattern.finditer(text): - brace_open_pos = text.find('{', m.end()) - if brace_open_pos == -1: - continue - brace_level = 1 - i = brace_open_pos + 1 - while i < len(text) and brace_level > 0: - if text[i] == '{': - brace_level += 1 - elif text[i] == '}': - brace_level -= 1 - i += 1 - if brace_level != 0: - continue - # Ищем имя алиаса и точку с запятой после i - rest = text[i:].lstrip() - alias_match = re.match(r'\w+\s*;', rest) - if alias_match: - end_pos = i + alias_match.end() - result.append(text[last_pos:m.start()]) - last_pos = end_pos - result.append(text[last_pos:]) - return ''.join(result) - - content_simple = remove_typedef_struct_union_blocks(content) - - # --- Парсим простые typedef: typedef base_type alias; - simple_typedef_pattern = re.compile( - r'\btypedef\s+([^{};]+?)\s+(\w+)\s*;', re.MULTILINE) - for m in simple_typedef_pattern.finditer(content_simple): - base_type = m.group(1).strip() - alias = m.group(2).strip() - if alias not in aliases: - aliases[alias] = base_type - - return aliases - -def parse_externs_from_file(filepath): - content, encoding = read_file_try_encodings(filepath) - extern_vars = set(EXTERN_PATTERN.findall(content)) - return extern_vars, encoding - -def get_relpath_to_srcdirs(filepath, src_dirs): - # Ищем первый SRC_DIR, в котором лежит filepath, и возвращаем относительный путь - for d in src_dirs: - try: - rel = os.path.relpath(filepath, d) - # Проверим, что rel не уходит выше корня (например, не начинается с '..') - if not rel.startswith('..'): - return rel.replace('\\', '/') # Для единообразия в путях - except ValueError: - continue - # Если ни один SRC_DIR не подходит, вернуть basename - return os.path.basename(filepath) - -def find_all_includes_recursive(c_files, include_dirs, processed_files=None): - """ - Рекурсивно ищет все include-файлы начиная с заданных c_files. - include_dirs — список директорий, в которых ищем include-файлы. - processed_files — множество уже обработанных файлов (для избежания циклов). - """ - if processed_files is None: - processed_files = set() - - include_files = set() - include_pattern = re.compile(r'#include\s+"([^"]+)"') - - for cfile in c_files: - norm_path = os.path.normpath(cfile) - if norm_path in processed_files: - continue - processed_files.add(norm_path) - - content, _ = read_file_try_encodings(cfile) - includes = include_pattern.findall(content) - for inc in includes: - include_files.add(inc) - - # Ищем полный путь к include-файлу в include_dirs - inc_full_path = None - for dir_ in include_dirs: - candidate = os.path.normpath(os.path.join(dir_, inc)) - if os.path.isfile(candidate): - inc_full_path = candidate - break - - # Если нашли include-файл и ещё не обработали — рекурсивно ищем include внутри него - if inc_full_path and inc_full_path not in processed_files: - nested_includes = find_all_includes_recursive( - [inc_full_path], include_dirs, processed_files - ) - include_files.update(nested_includes) - - return include_files - -def file_uses_typedef_vars(filepath, missing_vars, typedefs): - """ - Проверяем, содержит ли файл typedef с одним из missing_vars. - typedefs — словарь alias->базовый тип, полученный parse_typedefs_from_file. - """ - # Здесь проще проверить, есть ли в typedefs ключи из missing_vars, - # но в условии — typedef переменных из missing_in_h, - # значит, нужно проверить typedef переменных с этими именами - - # Для упрощения — прочитаем содержимое и проверим наличие typedef с именами из missing_vars - - content, _ = read_file_try_encodings(filepath) - - for var in missing_vars: - # Ищем в content что-то типа typedef ... var ...; - # Для простоты регулярка: typedef ... var; - pattern = re.compile(r'\btypedef\b[^;]*\b' + re.escape(var) + r'\b[^;]*;', re.DOTALL) - if pattern.search(content): - return True - return False - -def file_contains_extern_vars(filepath, extern_vars): - content, _ = read_file_try_encodings(filepath) - for var in extern_vars: - pattern = re.compile(r'\bextern\b[^;]*\b' + re.escape(var) + r'\b\s*;') - if pattern.search(content): - return True - return False - -def add_struct_fields(new_debug_vars, var_prefix, struct_type, all_structs, existing_debug_vars): - """ - Рекурсивно добавляет поля структуры в new_debug_vars. - - var_prefix: имя переменной или путь к полю (например "myVar" или "myVar.subfield") - struct_type: имя типа структуры (например "MyStruct") - all_structs: словарь всех структур - existing_debug_vars: множество уже существующих имен переменных - """ - if struct_type not in all_structs: - # Типа нет в структуре, значит не структура или неизвестный тип — выходим - return - - fields = all_structs[struct_type] - for field_name, field_type in fields.items(): - full_var_name = f"{var_prefix}.{field_name}" - - if full_var_name in existing_debug_vars or full_var_name in new_debug_vars: - continue - - if field_type is None: - continue - - iq_type = get_iq_define(field_type) - pt_type = map_type_to_pt(field_type, full_var_name) - formated_name = f'"{full_var_name}"' - line = f'\t{{(char *)&{full_var_name:<40} , {pt_type:<20} , {iq_type:<20} , {formated_name:<40}}}, \\' - new_debug_vars[full_var_name] = line - - # Если поле — тоже структура, рекурсивно раскрываем - # При этом убираем указатели и массивы из типа, если они есть - base_field_type = field_type.split()[0] # например "struct" или "MyStruct*" - # Удаляем указатели и массивы из имени типа для поиска в all_structs - base_field_type = re.sub(r'[\*\[\]0-9]+', '', base_field_type) - base_field_type = base_field_type.strip() - - if base_field_type in all_structs: - add_struct_fields(new_debug_vars, full_var_name, base_field_type, all_structs, existing_debug_vars) - else: - a=1 - - - -def main(make_path): - - c_files, include_dirs = parse_makefile(make_path) - all_dirs = c_files + include_dirs - - h_files = get_files_by_ext(include_dirs, ['.h']) - - vars_in_c = {} - encodings_c = set() - for cf in c_files: - vars_found, enc = parse_vars_from_file(cf) - encodings_c.add(enc) - for vname, vtype in vars_found: - vars_in_c[vname] = (vtype, cf) - - externs_in_h = set() - for hf in h_files: - externs, _ = parse_externs_from_file(hf) - externs_in_h |= externs - - missing_in_h = {v: vars_in_c[v] for v in vars_in_c if v not in externs_in_h} - - all_structs = {} - for fl in c_files + h_files: - structs = extract_struct_definitions_from_file(fl) - all_structs.update(structs) - - # Подготовка typedef-ов - global typedef_aliases - typedef_aliases = {} - for f in h_files + c_files: - aliases = parse_typedefs_from_file(f) - typedef_aliases.update(aliases) - - - included_headers = find_all_includes_recursive(c_files, include_dirs) # все подключенные .h - include_files = [] - - for header in included_headers: - # Полный путь к файлу нужно получить - full_path = None - for d in all_dirs: - candidate = os.path.join(d, header) - if os.path.isfile(candidate): - full_path = candidate - break - if not full_path: - continue # файл не найден в SRC_DIRS — игнорируем - - # Проверяем, что это строго .h - if not full_path.endswith('.h'): - continue - - # Парсим typedef из файла - typedefs = parse_typedefs_from_file(full_path) - - # Проверяем, использует ли typedef переменные из missing_in_h по их vtype - uses_typedef = any(vtype in typedefs for (vtype, path) in missing_in_h.values()) - - # Проверяем наличие extern переменных - has_extern = file_contains_extern_vars(full_path, externs_in_h) - - if not has_extern and not uses_typedef: - continue - - # Если прошло оба условия — добавляем - include_files.append(full_path) - - # Путь к debug_vars.h - common_prefix = os.path.commonpath(include_dirs) - output_dir = os.path.join(common_prefix, 'DebugTools') - os.makedirs(output_dir, exist_ok=True) - output_path = os.path.join(output_dir, 'debug_vars.c') - - # Считываем существующие переменные - existing_debug_vars = {} - if os.path.isfile(output_path): - with open(output_path, 'r', encoding='utf-8', errors='ignore') as f: - old_lines = f.readlines() - for line in old_lines: - m = re.match(r'\s*{.*?,\s+.*?,\s+.*?,\s+"([_a-zA-Z][_a-zA-Z0-9]*)"\s*},', line) - if m: - varname = m.group(1) - existing_debug_vars[varname] = line.strip() - - # Генерируем новые переменные - new_debug_vars = {} - for vname, (vtype, path) in vars_in_c.items(): - if vname in existing_debug_vars: - continue - iq_type = get_iq_define(vtype) - pt_type = map_type_to_pt(vtype, vname) - - if pt_type not in ('pt_struct', 'pt_union'): - formated_name = f'"{vname}"' - line = f'{{(char *)&{vname:<41} , {pt_type:<21} , {iq_type:<21} , {formated_name:<42}}}, \\' - new_debug_vars[vname] = line - else: - continue - # Если тип переменной — структура, добавляем поля - base_type = vtype.split()[0] - # Удаляем символы указателей '*' и всю квадратную скобку с содержимым (например [10]) - base_type = re.sub(r'\*|\[[^\]]*\]', '', base_type).strip() - if base_type in all_structs: - add_struct_fields(new_debug_vars, vname, base_type, all_structs, existing_debug_vars) - - # Сортируем новые переменные по алфавиту по имени - sorted_new_debug_vars = dict(sorted(new_debug_vars.items())) - # Объединяем все переменные - all_debug_lines = list(existing_debug_vars.values()) + list(sorted_new_debug_vars.values()) - - # DebugVar_Numb теперь по всем переменным - out_lines = [] - out_lines.append("// Этот файл сгенерирован автоматически") - out_lines.append(f'#include "debug_tools.h"') - - out_lines.append('\n\n// Инклюды для доступа к переменным') - out_lines.append(f'#include "IQmathLib.h"') - for incf in include_files: - out_lines.append(f'#include "{incf}"') - - - out_lines.append('\n\n// Экстерны для доступа к переменным') - for vname, (vtype, path) in missing_in_h.items(): - out_lines.append(f'extern {vtype} {vname};') - - out_lines.append(f'\n\n// Определение массива с указателями на переменные для отладки') - out_lines.append(f'int DebugVar_Numb = {len(all_debug_lines)};') - out_lines.append('#pragma DATA_SECTION(dbg_vars,".dbgvar_info")') - out_lines.append('DebugVar_t dbg_vars[] = {\\') - out_lines.extend(all_debug_lines) - out_lines.append('};') - out_lines.append('') - # Выберем кодировку для записи файла - # Если встречается несколько, возьмем первую из set - enc_to_write = 'cp1251' - - #print("== GLOBAL VARS FOUND ==") - #for vname, (vtype, path) in vars_in_c.items(): - #print(f"{vtype:<20} {vname:<40} // {path}") - - - with open(output_path, 'w', encoding=enc_to_write) as f: - f.write('\n'.join(out_lines)) - - print(f'Файл debug_vars.c сгенерирован в кодировке, переменных: {len(all_debug_lines)}') - -if __name__ == '__main__': - if len(sys.argv) < 2: - main('F:/Work/Projects/TMS/TMS_new_bus/Debug/makefile') - print("Usage: parse_makefile.py path/to/Makefile") - sys.exit(1) - else: - main(sys.argv[1]) diff --git a/.out/setupAllVars.py b/.out/setupAllVars.py deleted file mode 100644 index d371ea4..0000000 --- a/.out/setupAllVars.py +++ /dev/null @@ -1,143 +0,0 @@ -import xml.etree.ElementTree as ET - - -# === Словарь соответствия типов XML → DebugVarType_t === -type_map = dict([ - *[(k, 'pt_int8') for k in ('signed char', 'char')], - *[(k, 'pt_int16') for k in ('int', 'int16', 'short')], - *[(k, 'pt_int32') for k in ('long', 'int32', '_iqx')], - *[(k, 'pt_int64') for k in ('long long', 'int64')], - - *[(k, 'pt_uint8') for k in ('unsigned char',)], - *[(k, 'pt_uint16') for k in ('unsigned int', 'unsigned short', 'Uint16')], - *[(k, 'pt_uint32') for k in ('unsigned long', 'Uint32')], - *[(k, 'pt_uint64') for k in ('unsigned long long', 'Uint64')], - - *[(k, 'pt_ptr_int8') for k in ('signed char*',)], - *[(k, 'pt_ptr_int16') for k in ('int*', 'short*')], - *[(k, 'pt_ptr_int32') for k in ('long*',)], - *[(k, 'pt_ptr_uint8') for k in ('unsigned char*',)], - *[(k, 'pt_ptr_uint16') for k in ('unsigned int*', 'unsigned short*')], - *[(k, 'pt_ptr_uint32') for k in ('unsigned long*',)], - ('unsigned long long*', 'pt_int64'), - - *[(k, 'pt_arr_int8') for k in ('signed char[]',)], - *[(k, 'pt_arr_int16') for k in ('int[]', 'short[]')], - *[(k, 'pt_arr_int32') for k in ('long[]',)], - *[(k, 'pt_arr_uint8') for k in ('unsigned char[]',)], - *[(k, 'pt_arr_uint16') for k in ('unsigned int[]', 'unsigned short[]')], - *[(k, 'pt_arr_uint32') for k in ('unsigned long[]',)], - - *[(k, 'pt_float') for k in ('float', 'float32')], - - ('struct', 'pt_struct'), - ('union', 'pt_union'), -]) - - - -def is_anonymous(elem): - typ = elem.attrib.get('type', '') - return 'anonymous' in typ - - -def get_array_sizes(elem): - sizes = [] - i = 0 - while True: - attr = 'size' if i == 0 else f'size{i}' - if attr in elem.attrib: - sizes.append(elem.attrib[attr]) - i += 1 - else: - break - return ''.join(f'[{size}]' for size in sizes) - - -def collect_externs_and_vars(element, prefix, extern_vars, variables): - kind = element.attrib.get('kind', '') - name = element.attrib.get('name', prefix) - vtype = element.attrib.get('type', 'unknown') - - # Пропускаем анонимные типы полностью - if is_anonymous(element): - return - - # Для массивов учитываем все размеры size, size1, size2... - if kind == 'array': - array_dims = get_array_sizes(element) - extern_type = vtype # тип без размеров - extern_vars[name] = (extern_type, array_dims) - variables.append((name, vtype)) # В массив макросов кладём сам массив (без элементов) - return - - # Для обычных структур (не анонимных) и переменных - if kind in ('struct', 'union'): - extern_vars[name] = (vtype, '') - variables.append((name, vtype)) - return - - # Простые переменные - extern_vars[name] = (vtype, '') - variables.append((name, vtype)) - - -def parse_variables(xml_path): - tree = ET.parse(xml_path) - root = tree.getroot() - - extern_vars = dict() - variables = [] - - for var in root.findall('variable'): - collect_externs_and_vars(var, var.attrib['name'], extern_vars, variables) - - return variables, extern_vars - -def format_extern_declaration(varname, vartype, dims): - base_type = vartype.replace('[]', '') # убираем [] из типа - return f"extern {base_type} {varname}{dims};" - - -def to_macro_entry(varname, vartype): - # pt_ и t_iq_none — пример, замените на вашу логику или словарь - ptr_type = type_map.get(vartype) - if ptr_type is None: - ptr_type = 'char *' - iq_type = "t_iq_none" - return f"\t{{(char *)&{varname:<40}, {ptr_type:<20}, {iq_type:<20}, \"{varname}\"}}," - - -def generate_code(variables, extern_vars): - # extern-блок - extern_lines = [] - for var, (vtype, dims) in sorted(extern_vars.items()): - # фильтр анонимных структур по имени (пример) - if "anonymous" in var: - continue - extern_lines.append(format_extern_declaration(var, vtype, dims)) - - # define DebugVar_Numb - debugvar_numb = len(variables) - defines = [f"#define DebugVar_Numb\t{debugvar_numb}"] - - # define DebugVar_Init - defines.append("#define DebugVar_Init\t\\") - defines.append("{\\") - for varname, vartype in variables: - defines.append(to_macro_entry(varname, vartype)) - defines.append("}") - - return "\n".join(extern_lines) + "\n\n" + "\n".join(defines) - - -if __name__ == "__main__": - xml_file = "F:/Work/Projects/TMS/TMS_new_bus/bin/New_bus_allVars.xml" - variables, extern_vars = parse_variables(xml_file) - - code = generate_code(variables, extern_vars) - - with open("debug_vars.h", "w") as f: - f.write(code) - - print("Сгенерировано в debug_vars.h") \ No newline at end of file diff --git a/.out/setupVars_out.py b/.out/setupVars_out.py deleted file mode 100644 index 538de02..0000000 --- a/.out/setupVars_out.py +++ /dev/null @@ -1,581 +0,0 @@ -import sys -import os -import subprocess -import xml.etree.ElementTree as ET -from generateVars import map_type_to_pt, get_iq_define, type_map -from enum import IntEnum -from scanVars import run_scan -from generateVars import run_generate - -from PySide2.QtWidgets import ( - QApplication, QWidget, QTableWidget, QTableWidgetItem, - QCheckBox, QComboBox, QLineEdit, QVBoxLayout, QHBoxLayout, QPushButton, - QCompleter, QAbstractItemView, QLabel, QMessageBox, QFileDialog, QTextEdit -) -from PySide2.QtGui import QTextCursor -from PySide2.QtCore import Qt, QProcess - -class rows(IntEnum): - include = 0 - name = 1 - type = 2 - pt_type = 3 - iq_type = 4 - ret_type = 5 - short_name = 6 - -# 1. Парсим vars.xml -def make_absolute_path(path, base_path): - if not os.path.isabs(path): - return os.path.abspath(os.path.join(base_path, path)) - return os.path.abspath(path) - -def parse_vars(filename): - tree = ET.parse(filename) - root = tree.getroot() - - vars_list = [] - variables_elem = root.find('variables') - if variables_elem is not None: - for var in variables_elem.findall('var'): - name = var.attrib.get('name', '') - vars_list.append({ - 'name': name, - 'enable': var.findtext('enable', 'false'), - 'shortname': var.findtext('shortname', name), - 'pt_type': var.findtext('pt_type', 'pt_unknown'), - 'iq_type': var.findtext('iq_type', 'iq_none'), - 'return_type': var.findtext('return_type', 'int'), - 'type': var.findtext('type', 'unknown'), - 'file': var.findtext('file', ''), - 'extern': var.findtext('extern', 'false') == 'true', - 'static': var.findtext('static', 'false') == 'true', - }) - - return vars_list - -# 2. Парсим structSup.xml -def parse_structs(filename): - tree = ET.parse(filename) - root = tree.getroot() - - structs = {} - typedef_map = {} - - # --- Считываем структуры --- - structs_elem = root.find('structs') - if structs_elem is not None: - for struct in structs_elem.findall('struct'): - name = struct.attrib['name'] - fields = {} - for field in struct.findall('field'): - fname = field.attrib.get('name') - ftype = field.attrib.get('type') - if fname and ftype: - fields[fname] = ftype - structs[name] = fields - - # --- Считываем typedef-ы --- - typedefs_elem = root.find('typedefs') - if typedefs_elem is not None: - for typedef in typedefs_elem.findall('typedef'): - name = typedef.attrib.get('name') - target_type = typedef.attrib.get('type') - if name and target_type: - typedef_map[name.strip()] = target_type.strip() - - return structs, typedef_map - - - -class ProcessOutputWindow(QWidget): - def __init__(self, command, args): - super().__init__() - self.setWindowTitle("Поиск переменных...") - self.resize(600, 400) - - self.layout = QVBoxLayout(self) - self.output_edit = QTextEdit() - self.output_edit.setReadOnly(True) - self.layout.addWidget(self.output_edit) - - self.btn_close = QPushButton("Закрыть") - self.btn_close.setEnabled(False) - self.btn_close.clicked.connect(self.close) - self.layout.addWidget(self.btn_close) - - self.process = QProcess(self) - self.process.setProcessChannelMode(QProcess.MergedChannels) - self.process.readyReadStandardOutput.connect(self.handle_stdout) - self.process.finished.connect(self.process_finished) - - self.process.start(command, args) - - def handle_stdout(self): - data = self.process.readAllStandardOutput() - text = data.data().decode('utf-8') - self.output_edit.append(text) - - def process_finished(self): - self.output_edit.append("\n--- Процесс завершён ---") - self.btn_close.setEnabled(True) - -# 3. UI: таблица с переменными -class VarEditor(QWidget): - def __init__(self): - super().__init__() - self.vars_list = [] - self.structs = {} - self.typedef_map = {} - self.structs_xml_path = None # сюда запишем путь из - self.initUI() - - def initUI(self): - self.setWindowTitle("Variable Editor") - - # --- Поля ввода пути проекта и XML --- - - # XML Output - xml_layout = QHBoxLayout() - xml_layout.addWidget(QLabel("XML Output:")) - self.xml_output_edit = QLineEdit() - xml_layout.addWidget(self.xml_output_edit) - self.xml_output_edit.returnPressed.connect(self.read_xml_file) - btn_xml_browse = QPushButton("...") - btn_xml_browse.setFixedWidth(30) - xml_layout.addWidget(btn_xml_browse) - btn_xml_browse.clicked.connect(self.browse_xml_output) - - # Project Path - proj_layout = QHBoxLayout() - proj_layout.addWidget(QLabel("Project Path:")) - self.proj_path_edit = QLineEdit() - proj_layout.addWidget(self.proj_path_edit) - btn_proj_browse = QPushButton("...") - btn_proj_browse.setFixedWidth(30) - proj_layout.addWidget(btn_proj_browse) - btn_proj_browse.clicked.connect(self.browse_proj_path) - - # Makefile Path - makefile_layout = QHBoxLayout() - makefile_layout.addWidget(QLabel("Makefile Path (relative path):")) - self.makefile_edit = QLineEdit() - makefile_layout.addWidget(self.makefile_edit) - btn_makefile_browse = QPushButton("...") - btn_makefile_browse.setFixedWidth(30) - makefile_layout.addWidget(btn_makefile_browse) - btn_makefile_browse.clicked.connect(self.browse_makefile) - - - - # Source Output File/Directory - source_output_layout = QHBoxLayout() - source_output_layout.addWidget(QLabel("Source Output File:")) - self.source_output_edit = QLineEdit() - source_output_layout.addWidget(self.source_output_edit) - btn_source_output_browse = QPushButton("...") - btn_source_output_browse.setFixedWidth(30) - source_output_layout.addWidget(btn_source_output_browse) - btn_source_output_browse.clicked.connect(self.browse_source_output) - - - self.btn_update_vars = QPushButton("Обновить данные о переменных") - self.btn_update_vars.clicked.connect(self.update_vars_data) - - # Таблица переменных - self.table = QTableWidget(len(self.vars_list), 7) - self.table.setHorizontalHeaderLabels([ - 'Include', - 'Name', - 'Origin Type', - 'Pointer Type', - 'IQ Type', - 'Return Type', - 'Short Name' - ]) - self.table.setEditTriggers(QAbstractItemView.AllEditTriggers) - - # Кнопка сохранения - btn_save = QPushButton("Build") - btn_save.clicked.connect(self.save_build) - - # Основной layout - layout = QVBoxLayout() - layout.addLayout(xml_layout) - layout.addLayout(proj_layout) - layout.addLayout(makefile_layout) - layout.addWidget(self.btn_update_vars) - layout.addWidget(self.table) - layout.addWidget(btn_save) - layout.addLayout(source_output_layout) - - self.setLayout(layout) - - def update_vars_data(self): - proj_path = os.path.abspath(self.proj_path_edit.text().strip()) - xml_path = os.path.abspath(self.xml_output_edit.text().strip()) - makefile_path = make_absolute_path(self.makefile_edit.text().strip(), proj_path) - - if not proj_path or not xml_path: - QMessageBox.warning(self, "Ошибка", "Пожалуйста, укажите пути проекта и XML.") - return - - if not os.path.isfile(makefile_path): - QMessageBox.warning(self, "Ошибка", f"Makefile не найден по пути:\n{makefile_path}") - return - - scanvars_exe = "scanVars.exe" - args = [proj_path, makefile_path, xml_path] - - # Создаем и показываем окно с выводом процесса - self.proc_win = ProcessOutputWindow("python", []) - self.proc_win.show() - self.proc_win.output_edit.append("Запуск анализа переменных...") - - # Запускаем в отдельном процессе через QProcess, если нужен live-вывод: - from threading import Thread - - def run_scan_wrapper(): - try: - run_scan(proj_path, makefile_path, xml_path) - self.proc_win.output_edit.append("\n--- Анализ завершён ---") - except Exception as e: - self.proc_win.output_edit.append(f"\n[ОШИБКА] {e}") - self.proc_win.btn_close.setEnabled(True) - self.after_scanvars_finished(0, 0) - - Thread(target=run_scan_wrapper).start() - # Можно подписаться на сигнал завершения процесса, если хочешь обновить UI после - #self.proc_win.process.finished.connect(lambda exitCode, exitStatus: self.after_scanvars_finished(exitCode, exitStatus)) - - - def save_build(self): - vars_out = [] - for row in range(self.table.rowCount()): - include_cb = self.table.cellWidget(row, rows.include) - if not include_cb.isChecked(): - continue - name_edit = self.table.cellWidget(row, rows.name) - pt_type_combo = self.table.cellWidget(row, rows.pt_type) - iq_combo = self.table.cellWidget(row, rows.iq_type) - ret_combo = self.table.cellWidget(row, rows.ret_type) - short_name_edit = self.table.cellWidget(row, rows.short_name) - - var_data = { - 'name': name_edit.text(), - 'type': 'pt_' + pt_type_combo.currentText(), - 'iq_type': iq_combo.currentText(), - 'return_type': ret_combo.currentText() if ret_combo.currentText() else 'int', - 'short_name': short_name_edit.text(), - } - vars_out.append(var_data) - - # Здесь нужно указать абсолютные пути к проекту, xml и output (замени на свои) - proj_path = os.path.abspath(self.proj_path_edit.text().strip()) - xml_path = os.path.abspath(self.xml_output_edit.text().strip()) - output_dir_c_file = os.path.abspath(self.source_output_edit.text().strip()) - - if not proj_path or not xml_path or not output_dir_c_file: - QMessageBox.warning(self, "Ошибка", "Заполните все пути: проект, XML и output.") - return - - try: - run_generate(proj_path, xml_path, output_dir_c_file) - QMessageBox.information(self, "Готово", "Файл debug_vars.c успешно сгенерирован.") - except Exception as e: - QMessageBox.critical(self, "Ошибка при генерации", str(e)) - - def browse_proj_path(self): - dir_path = QFileDialog.getExistingDirectory(self, "Выберите папку проекта") - if dir_path: - self.proj_path_edit.setText(dir_path) - - def read_xml_file(self): - file_path = self.xml_output_edit.text().strip() - if file_path and not os.path.isfile(file_path): - return - - self.vars_list = parse_vars(file_path) - try: - tree = ET.parse(file_path) - root = tree.getroot() - - proj_path = self.proj_path_edit.text().strip() - - if not proj_path: - # Если в поле ничего нет, пробуем взять из XML - proj_path_from_xml = root.attrib.get('proj_path', '').strip() - if proj_path_from_xml and os.path.isdir(proj_path_from_xml): - proj_path = proj_path_from_xml - self.proj_path_edit.setText(proj_path_from_xml) - else: - QMessageBox.warning( - self, - "Внимание", - "Путь к проекту (proj_path) не найден или не существует.\n" - "Пожалуйста, укажите его вручную в поле 'Project Path'." - ) - else: - if not os.path.isdir(proj_path): - QMessageBox.warning( - self, - "Внимание", - f"Указанный путь к проекту не существует:\n{proj_path}\n" - "Пожалуйста, исправьте путь в поле 'Project Path'." - ) - - - # --- makefile_path из атрибута --- - makefile_path = root.attrib.get('makefile_path', '').strip() - makefile_path_full = make_absolute_path(makefile_path, proj_path) - if makefile_path_full and os.path.isfile(makefile_path_full): - self.makefile_edit.setText(makefile_path) - - # --- structs_path из атрибута --- - structs_path = root.attrib.get('structs_path', '').strip() - structs_path_full = make_absolute_path(structs_path, proj_path) - if structs_path_full and os.path.isfile(structs_path_full): - self.structs_xml_path = structs_path_full - self.structs, self.typedef_map = parse_structs(structs_path_full) - else: - self.structs_xml_path = None - - self.update_table() - except Exception as e: - QMessageBox.warning(self, "Ошибка", f"Ошибка при чтении XML:\n{e}") - - def browse_xml_output(self): - file_path, _ = QFileDialog.getSaveFileName( - self, - "Выберите XML файл", - filter="XML files (*.xml);;All Files (*)" - ) - self.xml_output_edit.setText(file_path) - self.read_xml_file() - - - def browse_xml_struct(self): - file_path, _ = QFileDialog.getSaveFileName(self, "Выберите XML файл", filter="XML files (*.xml);;All Files (*)") - if file_path: - self.xml_output_edit.setText(file_path) - if os.path.isfile(file_path): - self.structs, self.typedef_map = parse_structs(file_path) - - def browse_makefile(self): - file_path, _ = QFileDialog.getOpenFileName( - self, "Выберите Makefile", filter="Makefile (makefile);;All Files (*)" - ) - if file_path: - self.makefile_edit.setText(file_path) - - def browse_source_output(self): - dir_path = QFileDialog.getExistingDirectory(self, "Выберите папку для debug_vars.c") - if dir_path: - self.source_output_edit.setText(dir_path) - - def after_scanvars_finished(self, exitCode, exitStatus): - xml_path = self.xml_output_edit.text().strip() - if not os.path.isfile(xml_path): - QMessageBox.critical(self, "Ошибка", f"Файл не найден: {xml_path}") - return - - try: - # Читаем структуры, если задан путь - if self.structs_xml_path and os.path.isfile(self.structs_xml_path): - try: - self.structs, self.typedef_map = parse_structs(self.structs_xml_path) - # При необходимости обновите UI или сделайте что-то с self.structs - except Exception as e: - QMessageBox.warning(self, "Внимание", f"Не удалось загрузить структуры из {self.structs_xml_path}:\n{e}") - - self.vars_list = parse_vars(xml_path) - self.update_table() - - - except Exception as e: - QMessageBox.critical(self, "Ошибка", f"Не удалось загрузить переменные:\n{e}") - - def update_table(self): - self.type_options = list(dict.fromkeys(type_map.values())) - self.display_type_options = [t.replace('pt_', '') for t in self.type_options] - iq_types = ['iq_none', 'iq'] + [f'iq{i}' for i in range(1, 31)] - self.table.setRowCount(len(self.vars_list)) - - for row, var in enumerate(self.vars_list): - cb = QCheckBox() - enable_str = var.get('enable', 'false') - cb.setChecked(enable_str.lower() == 'true') - self.table.setCellWidget(row, rows.include, cb) - - name_edit = QLineEdit(var['name']) - if var['type'] in self.structs: - completer = QCompleter(self.structs[var['type']].keys()) - completer.setCaseSensitivity(Qt.CaseInsensitive) - name_edit.setCompleter(completer) - self.table.setCellWidget(row, rows.name, name_edit) - - # Type (origin) - origin_type = var.get('type', '').strip() - origin_item = QTableWidgetItem(origin_type) - origin_item.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled) # read-only - self.table.setItem(row, rows.type, origin_item) - - pt_type_combo = QComboBox() - pt_type_combo.addItems(self.display_type_options) - internal_type = map_type_to_pt(var['type'], var['name'], self.typedef_map) - display_type = internal_type.replace('pt_', '') - if display_type in self.display_type_options: - pt_type_combo.setCurrentText(display_type) - else: - pt_type_combo.addItem(display_type) - pt_type_combo.setCurrentText(display_type) - self.table.setCellWidget(row, rows.pt_type, pt_type_combo) - - iq_combo = QComboBox() - iq_combo.addItems(iq_types) - iq_type = get_iq_define(var['type']) # Получаем IQ-тип, например 'iq24' - display_type = iq_type.replace('t_', '') - if iq_type in iq_types: - iq_combo.setCurrentText(display_type) - else: - iq_combo.addItem(display_type) - iq_combo.setCurrentText(display_type) - self.table.setCellWidget(row, rows.iq_type, iq_combo) - - ret_combo = QComboBox() - ret_combo.addItems(iq_types) - self.table.setCellWidget(row, rows.ret_type, ret_combo) - - short_name_edit = QLineEdit(var['name']) - self.table.setCellWidget(row, rows.short_name, short_name_edit) - - cb.stateChanged.connect(self.save_table_to_xml) - name_edit.textChanged.connect(self.save_table_to_xml) - pt_type_combo.currentTextChanged.connect(self.save_table_to_xml) - iq_combo.currentTextChanged.connect(self.save_table_to_xml) - ret_combo.currentTextChanged.connect(self.save_table_to_xml) - short_name_edit.textChanged.connect(self.save_table_to_xml) - - - def save_table_to_xml(self): - def make_relative_path(abs_path, base_path): - try: - return os.path.relpath(abs_path, base_path).replace("\\", "/") - except ValueError: - return abs_path.replace("\\", "/") - - xml_path = self.xml_output_edit.text().strip() - proj_path = self.proj_path_edit.text().strip() - makefile_path = self.makefile_edit.text().strip() - - if not xml_path or not os.path.isfile(xml_path): - print("XML файл не найден или путь пустой") - return - - try: - tree = ET.parse(xml_path) - root = tree.getroot() - - # Обновим атрибуты с относительными путями - if os.path.isdir(proj_path): - root.set("proj_path", proj_path.replace("\\", "/")) - - if os.path.isfile(makefile_path): - rel_makefile = make_relative_path(makefile_path, proj_path) - root.set("makefile_path", rel_makefile) - - if self.structs_xml_path and os.path.isfile(self.structs_xml_path): - rel_struct_path = make_relative_path(self.structs_xml_path, proj_path) - root.set("structs_path", rel_struct_path) - - - vars_elem = root.find('variables') - if vars_elem is None: - # Если блока нет, создаём - vars_elem = ET.SubElement(root, 'variables') - - original_info = {} - for var_elem in vars_elem.findall('var'): - name = var_elem.attrib.get('name') - if name: - original_info[name] = { - 'type': var_elem.findtext('type', ''), - 'file': var_elem.findtext('file', ''), - 'extern': var_elem.findtext('extern', ''), - 'static': var_elem.findtext('static', '') - } - # Собираем данные из таблицы - updated_vars = [] - for row in range(self.table.rowCount()): - cb = self.table.cellWidget(row, 0) - name_edit = self.table.cellWidget(row, 1) - pt_type_combo = self.table.cellWidget(row, 3) - iq_combo = self.table.cellWidget(row, 4) - ret_combo = self.table.cellWidget(row, 5) - short_name_edit = self.table.cellWidget(row, 6) - - var_name = name_edit.text() - - # Берём оригинальные type и file из словаря, если есть - orig_type = original_info.get(var_name, {}).get('type', '') - orig_file = original_info.get(var_name, {}).get('file', '') - orig_extern = original_info.get(var_name, {}).get('extern', '') - orig_static = original_info.get(var_name, {}).get('static', '') - - updated_vars.append({ - 'name': var_name, - 'enable': cb.isChecked(), - 'shortname': short_name_edit.text(), - 'pt_type': 'pt_' + pt_type_combo.currentText(), - 'iq_type': iq_combo.currentText(), - 'return_type': ret_combo.currentText() or 'int', - 'type': orig_type, - 'file': orig_file, - 'extern': orig_extern, - 'static': orig_static, - }) - - # Обновляем или добавляем по одному var в XML - for v in updated_vars: - var_elem = None - for ve in vars_elem.findall('var'): - if ve.attrib.get('name') == v['name']: - var_elem = ve - break - if var_elem is None: - var_elem = ET.SubElement(vars_elem, 'var', {'name': v['name']}) - - def set_sub_elem_text(parent, tag, text): - el = parent.find(tag) - if el is None: - el = ET.SubElement(parent, tag) - el.text = str(text) - - set_sub_elem_text(var_elem, 'enable', 'true' if v['enable'] else 'false') - set_sub_elem_text(var_elem, 'shortname', v['shortname']) - set_sub_elem_text(var_elem, 'pt_type', v['pt_type']) - set_sub_elem_text(var_elem, 'iq_type', v['iq_type']) - set_sub_elem_text(var_elem, 'return_type', v['return_type']) - set_sub_elem_text(var_elem, 'type', v['type']) - set_sub_elem_text(var_elem, 'file', v['file']) - set_sub_elem_text(var_elem, 'extern', v['extern']) - set_sub_elem_text(var_elem, 'static', v['static']) - - # Сохраняем изменения - tree.write(xml_path, encoding='utf-8', xml_declaration=True) - - except Exception as e: - print(f"Ошибка при сохранении XML: {e}") - - - -if __name__ == "__main__": - app = QApplication(sys.argv) - - editor = VarEditor() - editor.resize(900, 600) - editor.show() - - sys.exit(app.exec_()) - - \ No newline at end of file diff --git a/DebugVarEdit.exe b/DebugVarEdit.exe deleted file mode 100644 index 5558808..0000000 Binary files a/DebugVarEdit.exe and /dev/null differ diff --git a/DebugVarEdit/DebugVarEdit.exe b/DebugVarEdit/DebugVarEdit.exe deleted file mode 100644 index 4ab8d7f..0000000 Binary files a/DebugVarEdit/DebugVarEdit.exe and /dev/null differ diff --git a/DebugVarEdit/MSVCP140.dll b/DebugVarEdit/MSVCP140.dll deleted file mode 100644 index 2fb94f7..0000000 Binary files a/DebugVarEdit/MSVCP140.dll and /dev/null differ diff --git a/DebugVarEdit/MSVCP140_1.dll b/DebugVarEdit/MSVCP140_1.dll deleted file mode 100644 index ae442dc..0000000 Binary files a/DebugVarEdit/MSVCP140_1.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/QtCore.pyd b/DebugVarEdit/PySide2/QtCore.pyd deleted file mode 100644 index c38c1aa..0000000 Binary files a/DebugVarEdit/PySide2/QtCore.pyd and /dev/null differ diff --git a/DebugVarEdit/PySide2/QtGui.pyd b/DebugVarEdit/PySide2/QtGui.pyd deleted file mode 100644 index 2f8cda4..0000000 Binary files a/DebugVarEdit/PySide2/QtGui.pyd and /dev/null differ diff --git a/DebugVarEdit/PySide2/QtNetwork.pyd b/DebugVarEdit/PySide2/QtNetwork.pyd deleted file mode 100644 index ce187eb..0000000 Binary files a/DebugVarEdit/PySide2/QtNetwork.pyd and /dev/null differ diff --git a/DebugVarEdit/PySide2/QtWidgets.pyd b/DebugVarEdit/PySide2/QtWidgets.pyd deleted file mode 100644 index 642a3e7..0000000 Binary files a/DebugVarEdit/PySide2/QtWidgets.pyd and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/bearer/qgenericbearer.dll b/DebugVarEdit/PySide2/plugins/bearer/qgenericbearer.dll deleted file mode 100644 index 16fdcde..0000000 Binary files a/DebugVarEdit/PySide2/plugins/bearer/qgenericbearer.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/iconengines/qsvgicon.dll b/DebugVarEdit/PySide2/plugins/iconengines/qsvgicon.dll deleted file mode 100644 index 3e94d97..0000000 Binary files a/DebugVarEdit/PySide2/plugins/iconengines/qsvgicon.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/imageformats/qgif.dll b/DebugVarEdit/PySide2/plugins/imageformats/qgif.dll deleted file mode 100644 index 0e5f316..0000000 Binary files a/DebugVarEdit/PySide2/plugins/imageformats/qgif.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/imageformats/qicns.dll b/DebugVarEdit/PySide2/plugins/imageformats/qicns.dll deleted file mode 100644 index d2ad344..0000000 Binary files a/DebugVarEdit/PySide2/plugins/imageformats/qicns.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/imageformats/qico.dll b/DebugVarEdit/PySide2/plugins/imageformats/qico.dll deleted file mode 100644 index 63d020b..0000000 Binary files a/DebugVarEdit/PySide2/plugins/imageformats/qico.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/imageformats/qjpeg.dll b/DebugVarEdit/PySide2/plugins/imageformats/qjpeg.dll deleted file mode 100644 index 5470328..0000000 Binary files a/DebugVarEdit/PySide2/plugins/imageformats/qjpeg.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/imageformats/qpdf.dll b/DebugVarEdit/PySide2/plugins/imageformats/qpdf.dll deleted file mode 100644 index 451b046..0000000 Binary files a/DebugVarEdit/PySide2/plugins/imageformats/qpdf.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/imageformats/qsvg.dll b/DebugVarEdit/PySide2/plugins/imageformats/qsvg.dll deleted file mode 100644 index f2ebdeb..0000000 Binary files a/DebugVarEdit/PySide2/plugins/imageformats/qsvg.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/imageformats/qtga.dll b/DebugVarEdit/PySide2/plugins/imageformats/qtga.dll deleted file mode 100644 index dfff137..0000000 Binary files a/DebugVarEdit/PySide2/plugins/imageformats/qtga.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/imageformats/qtiff.dll b/DebugVarEdit/PySide2/plugins/imageformats/qtiff.dll deleted file mode 100644 index fed5b78..0000000 Binary files a/DebugVarEdit/PySide2/plugins/imageformats/qtiff.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/imageformats/qwbmp.dll b/DebugVarEdit/PySide2/plugins/imageformats/qwbmp.dll deleted file mode 100644 index d788814..0000000 Binary files a/DebugVarEdit/PySide2/plugins/imageformats/qwbmp.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/imageformats/qwebp.dll b/DebugVarEdit/PySide2/plugins/imageformats/qwebp.dll deleted file mode 100644 index 092f4e0..0000000 Binary files a/DebugVarEdit/PySide2/plugins/imageformats/qwebp.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/platforminputcontexts/qtvirtualkeyboardplugin.dll b/DebugVarEdit/PySide2/plugins/platforminputcontexts/qtvirtualkeyboardplugin.dll deleted file mode 100644 index f7cf629..0000000 Binary files a/DebugVarEdit/PySide2/plugins/platforminputcontexts/qtvirtualkeyboardplugin.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/platforms/qdirect2d.dll b/DebugVarEdit/PySide2/plugins/platforms/qdirect2d.dll deleted file mode 100644 index ad1d459..0000000 Binary files a/DebugVarEdit/PySide2/plugins/platforms/qdirect2d.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/platforms/qminimal.dll b/DebugVarEdit/PySide2/plugins/platforms/qminimal.dll deleted file mode 100644 index f1ffb73..0000000 Binary files a/DebugVarEdit/PySide2/plugins/platforms/qminimal.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/platforms/qoffscreen.dll b/DebugVarEdit/PySide2/plugins/platforms/qoffscreen.dll deleted file mode 100644 index 71ec591..0000000 Binary files a/DebugVarEdit/PySide2/plugins/platforms/qoffscreen.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/platforms/qwebgl.dll b/DebugVarEdit/PySide2/plugins/platforms/qwebgl.dll deleted file mode 100644 index 6a749fb..0000000 Binary files a/DebugVarEdit/PySide2/plugins/platforms/qwebgl.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/platforms/qwindows.dll b/DebugVarEdit/PySide2/plugins/platforms/qwindows.dll deleted file mode 100644 index 0d08fdd..0000000 Binary files a/DebugVarEdit/PySide2/plugins/platforms/qwindows.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/platformthemes/qxdgdesktopportal.dll b/DebugVarEdit/PySide2/plugins/platformthemes/qxdgdesktopportal.dll deleted file mode 100644 index 3987616..0000000 Binary files a/DebugVarEdit/PySide2/plugins/platformthemes/qxdgdesktopportal.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/plugins/styles/qwindowsvistastyle.dll b/DebugVarEdit/PySide2/plugins/styles/qwindowsvistastyle.dll deleted file mode 100644 index 9d5512d..0000000 Binary files a/DebugVarEdit/PySide2/plugins/styles/qwindowsvistastyle.dll and /dev/null differ diff --git a/DebugVarEdit/PySide2/qt.conf b/DebugVarEdit/PySide2/qt.conf deleted file mode 100644 index 4196808..0000000 --- a/DebugVarEdit/PySide2/qt.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Paths] -Prefix = . diff --git a/DebugVarEdit/PySide2/translations/qtbase_ar.qm b/DebugVarEdit/PySide2/translations/qtbase_ar.qm deleted file mode 100644 index 32861b8..0000000 Binary files a/DebugVarEdit/PySide2/translations/qtbase_ar.qm and /dev/null differ diff --git a/DebugVarEdit/PySide2/translations/qtbase_bg.qm b/DebugVarEdit/PySide2/translations/qtbase_bg.qm deleted file mode 100644 index faeb167..0000000 Binary files a/DebugVarEdit/PySide2/translations/qtbase_bg.qm and /dev/null differ diff --git a/DebugVarEdit/PySide2/translations/qtbase_ca.qm b/DebugVarEdit/PySide2/translations/qtbase_ca.qm deleted file mode 100644 index 20b751d..0000000 Binary files a/DebugVarEdit/PySide2/translations/qtbase_ca.qm and /dev/null differ diff --git a/DebugVarEdit/PySide2/translations/qtbase_cs.qm b/DebugVarEdit/PySide2/translations/qtbase_cs.qm deleted file mode 100644 index 459ef26..0000000 Binary files a/DebugVarEdit/PySide2/translations/qtbase_cs.qm and /dev/null differ diff --git a/DebugVarEdit/PySide2/translations/qtbase_da.qm b/DebugVarEdit/PySide2/translations/qtbase_da.qm deleted file mode 100644 index 4ede24b..0000000 Binary files a/DebugVarEdit/PySide2/translations/qtbase_da.qm and /dev/null differ diff --git a/DebugVarEdit/PySide2/translations/qtbase_de.qm b/DebugVarEdit/PySide2/translations/qtbase_de.qm deleted file mode 100644 index 4a4c988..0000000 Binary files a/DebugVarEdit/PySide2/translations/qtbase_de.qm and /dev/null differ diff --git a/DebugVarEdit/PySide2/translations/qtbase_en.qm b/DebugVarEdit/PySide2/translations/qtbase_en.qm deleted file mode 100644 index be651ee..0000000 --- a/DebugVarEdit/PySide2/translations/qtbase_en.qm +++ /dev/null @@ -1 +0,0 @@ - 1: matched = False - # Проверяем совпадение по пути - if path_matches_search(name, path_parts[:level+1]): - matched = True item.setHidden(not matched) - # Раскрываем, если это не последний уровень поиска + # Раскрываем узел, если он соответствует и ещё есть путь вниз if matched and level < len(path_parts) - 1: item.setExpanded(True) else: @@ -186,6 +191,7 @@ class VariableSelectorDialog(QDialog): return matched or matched_any_child + # Если в поиске нет точки — особая логика для первого уровня if '.' not in text and '->' not in text and text != '': for i in range(self.tree.topLevelItemCount()): @@ -462,8 +468,7 @@ class VariableSelectorDialog(QDialog): set_text('show_var', 'false') set_text('enable', 'false') - scanVars.indent_xml(root) - ET.ElementTree(root).write(self.xml_path, encoding="utf-8", xml_declaration=True) + myXML.fwrite(root, self.xml_path) self.populate_tree() self.done(QDialog.Accepted) @@ -513,8 +518,7 @@ class VariableSelectorDialog(QDialog): self.all_vars[:] = [v for v in self.all_vars if v['name'] not in selected_names] if removed_any: - scanVars.indent_xml(root) - ET.ElementTree(root).write(self.xml_path, encoding="utf-8", xml_declaration=True) + myXML.fwrite(root, self.xml_path) self.populate_tree() self.filter_tree() diff --git a/Src/__pycache__/VariableSelector.cpython-37.pyc b/Src/__pycache__/VariableSelector.cpython-37.pyc deleted file mode 100644 index 03b74be..0000000 Binary files a/Src/__pycache__/VariableSelector.cpython-37.pyc and /dev/null differ diff --git a/Src/__pycache__/VariableTable.cpython-37.pyc b/Src/__pycache__/VariableTable.cpython-37.pyc deleted file mode 100644 index f47fabd..0000000 Binary files a/Src/__pycache__/VariableTable.cpython-37.pyc and /dev/null differ diff --git a/Src/__pycache__/generateVars.cpython-37.pyc b/Src/__pycache__/generateVars.cpython-37.pyc deleted file mode 100644 index b1a215b..0000000 Binary files a/Src/__pycache__/generateVars.cpython-37.pyc and /dev/null differ diff --git a/Src/__pycache__/parseMakefile.cpython-37.pyc b/Src/__pycache__/parseMakefile.cpython-37.pyc deleted file mode 100644 index 70bb5a5..0000000 Binary files a/Src/__pycache__/parseMakefile.cpython-37.pyc and /dev/null differ diff --git a/Src/__pycache__/scanVarGUI.cpython-37.pyc b/Src/__pycache__/scanVarGUI.cpython-37.pyc deleted file mode 100644 index 28caa2a..0000000 Binary files a/Src/__pycache__/scanVarGUI.cpython-37.pyc and /dev/null differ diff --git a/Src/__pycache__/scanVars.cpython-37.pyc b/Src/__pycache__/scanVars.cpython-37.pyc deleted file mode 100644 index 708d8b5..0000000 Binary files a/Src/__pycache__/scanVars.cpython-37.pyc and /dev/null differ diff --git a/Src/__pycache__/setupVars.cpython-37.pyc b/Src/__pycache__/setupVars.cpython-37.pyc deleted file mode 100644 index 678e5c5..0000000 Binary files a/Src/__pycache__/setupVars.cpython-37.pyc and /dev/null differ diff --git a/Src/generateVars.py b/Src/generateVars.py index b1dccdc..01ef426 100644 --- a/Src/generateVars.py +++ b/Src/generateVars.py @@ -9,7 +9,7 @@ import re import xml.etree.ElementTree as ET from pathlib import Path from xml.dom import minidom -from scanVars import indent_xml +import myXML import argparse @@ -216,8 +216,7 @@ def add_new_vars_to_xml(proj_path, xml_rel_path, output_path): added_count += 1 if added_count > 0: - indent_xml(root) - ET.ElementTree(root).write(xml_full_path, encoding="utf-8", xml_declaration=True) + myXML.fwrite(root, xml_full_path) print(f"[INFO] В XML добавлено новых переменных: {added_count}") return True diff --git a/Src/myXML.py b/Src/myXML.py new file mode 100644 index 0000000..7ce0c85 --- /dev/null +++ b/Src/myXML.py @@ -0,0 +1,78 @@ +import os +import xml.etree.ElementTree as ET + +def make_absolute_path(path, base_path): + if not os.path.isabs(path) and os.path.isdir(base_path): + try: + return os.path.abspath(os.path.join(base_path, path)) + except Exception: + pass # На случай сбоя в os.path.join или abspath + elif os.path.isabs(path): + return os.path.abspath(path) + else: + return path + + +def make_relative_path(abs_path, base_path): + abs_path = os.path.abspath(abs_path) + base_path = os.path.abspath(base_path) + + # Разбиваем на списки директорий + abs_parts = abs_path.split(os.sep) + base_parts = base_path.split(os.sep) + + # Проверяем, является ли base_path настоящим префиксом пути (по папкам) + if abs_parts[:len(base_parts)] == base_parts: + rel_parts = abs_parts[len(base_parts):] + return "/".join(rel_parts) + + # Иначе пробуем relpath + try: + return os.path.relpath(abs_path, base_path).replace("\\", "/") + except Exception: + return abs_path.replace("\\", "/") + +def indent_xml(elem, level=0): + indent = " " + i = "\n" + level * indent + if len(elem): + if not elem.text or not elem.text.strip(): + elem.text = i + indent + for child in elem: + indent_xml(child, level + 1) + if not elem.tail or not elem.tail.strip(): + elem.tail = i + else: + if level and (not elem.tail or not elem.tail.strip()): + elem.tail = i + + +def fwrite(root, xml_full_path): + indent_xml(root) + ET.ElementTree(root).write(xml_full_path, encoding="utf-8", xml_declaration=True) + + +def safe_parse_xml(xml_path): + """ + Безопасно парсит XML-файл. + + Возвращает кортеж (root, tree) или (None, None) при ошибках. + """ + if not xml_path or not os.path.isfile(xml_path): + print(f"Файл '{xml_path}' не найден или путь пустой") + return None, None + + try: + if os.path.getsize(xml_path) == 0: + return None, None + + tree = ET.parse(xml_path) + root = tree.getroot() + return root, tree + + except ET.ParseError as e: + print(f"Ошибка парсинга XML файла '{xml_path}': {e}") + return None, None + except Exception as e: + print(f"Неожиданная ошибка при чтении XML файла '{xml_path}': {e}") + return None, None diff --git a/Src/scanVars.py b/Src/scanVars.py index b190e7e..e9716a6 100644 --- a/Src/scanVars.py +++ b/Src/scanVars.py @@ -14,22 +14,10 @@ from xml.dom import minidom from parseMakefile import parse_makefile from collections import deque import argparse +from setupVars import make_relative_path +import myXML BITFIELD_WIDTHS = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32} -def indent_xml(elem, level=0): - indent = " " - i = "\n" + level * indent - if len(elem): - if not elem.text or not elem.text.strip(): - elem.text = i + indent - for child in elem: - indent_xml(child, level + 1) - if not elem.tail or not elem.tail.strip(): - elem.tail = i - else: - if level and (not elem.tail or not elem.tail.strip()): - elem.tail = i - def is_frozen(): # Для Nuitka --onefile return getattr(sys, 'frozen', False) @@ -529,31 +517,6 @@ def analyze_typedefs_and_structs_across_files(c_files, include_dirs): return resolved_typedefs, resolved_structs -def safe_parse_xml(xml_path): - """ - Безопасно парсит XML-файл. - - Возвращает кортеж (root, tree) или (None, None) при ошибках. - """ - if not xml_path or not os.path.isfile(xml_path): - print(f"Файл '{xml_path}' не найден или путь пустой") - return None, None - - try: - if os.path.getsize(xml_path) == 0: - return None, None - - tree = ET.parse(xml_path) - root = tree.getroot() - return root, tree - - except ET.ParseError as e: - print(f"Ошибка парсинга XML файла '{xml_path}': {e}") - return None, None - except Exception as e: - print(f"Неожиданная ошибка при чтении XML файла '{xml_path}': {e}") - return None, None - def read_vars_from_xml(xml_path): xml_full_path = os.path.normpath(xml_path) vars_data = {} @@ -561,7 +524,7 @@ def read_vars_from_xml(xml_path): if not os.path.exists(xml_full_path): return vars_data # пусто, если файла нет - root, tree = safe_parse_xml(xml_full_path) + root, tree = myXML.safe_parse_xml(xml_full_path) if root is None: return vars_data @@ -612,12 +575,22 @@ def generate_xml_output(proj_path, xml_path, unique_vars, h_files_needed, vars_n if os.path.isfile(xml_full_path): existing_vars_data = read_vars_from_xml(xml_full_path) - # --- Новый блок: формируем атрибуты корневого тега --- - analysis_attrs = {"proj_path": proj_path} + # --- Новый блок: формируем атрибуты корневого тега с относительными путями --- + proj_path = os.path.abspath(proj_path) + analysis_attrs = { + "proj_path": proj_path.replace("\\", "/") + } + if makefile_path: - analysis_attrs["makefile_path"] = makefile_path + rel_makefile = make_relative_path(makefile_path, proj_path) + if not os.path.isabs(rel_makefile): + analysis_attrs["makefile_path"] = rel_makefile.replace("\\", "/") + if structs_xml_path: - analysis_attrs["structs_path"] = structs_xml_path + rel_struct = make_relative_path(structs_xml_path, proj_path) + if not os.path.isabs(rel_struct): + analysis_attrs["structs_path"] = rel_struct.replace("\\", "/") + root = ET.Element("analysis", attrib=analysis_attrs) @@ -679,8 +652,7 @@ def generate_xml_output(proj_path, xml_path, unique_vars, h_files_needed, vars_n ET.SubElement(var_elem, "file").text = rel_file.replace("\\", "/") # Форматирование с отступами - indent_xml(root) - ET.ElementTree(root).write(xml_full_path, encoding="utf-8", xml_declaration=True) + myXML.fwrite(root, xml_full_path) optional_printf(PRINT_STATUS, f"[XML] Variables saved to {xml_full_path}") @@ -722,8 +694,7 @@ def write_typedefs_and_structs_to_xml(proj_path, xml_path, typedefs, structs): ET.SubElement(typedefs_elem, "typedef", name=name, type=underlying) # Преобразуем в красиво отформатированную XML-строку - indent_xml(root) - ET.ElementTree(root).write(xml_full_path, encoding="utf-8", xml_declaration=True) + myXML.fwrite(root, xml_full_path) print(f"[XML] Typedefs and structs saved to: {xml_full_path}") @@ -939,9 +910,15 @@ def run_scan(proj_path, makefile_path, output_xml, verbose=2): typedefs = dict(sorted(typedefs.items())) structs = dict(sorted(structs.items())) + print('Progress: "Writting XML..."') + print("Progress: 0/2") print("[XML] Creating structs.xml...") structs_xml = os.path.join(os.path.dirname(output_xml), "structs.xml") write_typedefs_and_structs_to_xml(proj_path, structs_xml, typedefs, structs) + print("Progress: 1/2") print("[XML] Creating vars.xml...") generate_xml_output(proj_path, output_xml, vars, includes, externs, structs_xml, makefile_path) + print("Progress: 2/2") + print('Progress: "Done"') + print('Progress: 1/1') diff --git a/Src/setupVars.py b/Src/setupVars.py index 2595b73..4de57a1 100644 --- a/Src/setupVars.py +++ b/Src/setupVars.py @@ -5,7 +5,7 @@ import xml.etree.ElementTree as ET from generateVars import map_type_to_pt, get_iq_define, type_map from enum import IntEnum import scanVars -import setupVars +import myXML def make_absolute_path(path, base_path): @@ -41,7 +41,7 @@ def make_relative_path(abs_path, base_path): def parse_vars(filename, typedef_map=None): - root, tree = safe_parse_xml(filename) + root, tree = myXML.safe_parse_xml(filename) if root is None: return [] @@ -93,15 +93,14 @@ def parse_vars(filename, typedef_map=None): 'static': var.findtext('static', 'false') == 'true', }) - scanVars.indent_xml(root) - ET.ElementTree(root).write(filename, encoding="utf-8", xml_declaration=True) + myXML.fwrite(root, filename) return vars_list # 2. Парсим structSup.xml def parse_structs(filename): - root, tree = safe_parse_xml(filename) + root, tree = myXML.safe_parse_xml(filename) if root is None: return {}, {} @@ -153,32 +152,6 @@ def parse_structs(filename): return structs, typedef_map -def safe_parse_xml(xml_path): - """ - Безопасно парсит XML-файл. - - Возвращает кортеж (root, tree) или (None, None) при ошибках. - """ - if not xml_path or not os.path.isfile(xml_path): - #print(f"Файл '{xml_path}' не найден или путь пустой") - return None, None - - try: - if os.path.getsize(xml_path) == 0: - return None, None - - tree = ET.parse(xml_path) - root = tree.getroot() - return root, tree - - except ET.ParseError as e: - print(f"Ошибка парсинга XML файла '{xml_path}': {e}") - return None, None - except Exception as e: - print(f"Неожиданная ошибка при чтении XML файла '{xml_path}': {e}") - return None, None - - def expand_struct_recursively(prefix, type_str, structs, typedefs, var_attrs, depth=0): if depth > 10: diff --git a/Src/setupVars_GUI.py b/Src/setupVars_GUI.py new file mode 100644 index 0000000..e69de29 diff --git a/build/build_and_clean.py b/build/build_and_clean.py index d79c99e..406e644 100644 --- a/build/build_and_clean.py +++ b/build/build_and_clean.py @@ -5,9 +5,16 @@ from pathlib import Path from PIL import Image # нужна библиотека Pillow для конвертации PNG в ICO import PySide2 from PyInstaller.utils.hooks import collect_data_files +# install: +# - PyInstaller +# - nuitka +# - Pillow +# - PySide2 +# - clang # === Конфигурация === USE_NUITKA = True # True — сборка через Nuitka, False — через PyInstaller + SRC_PATH = Path("./Src/") SCRIPT_PATH = SRC_PATH / "DebugVarEdit_GUI.py" OUTPUT_NAME = "DebugVarEdit" @@ -15,13 +22,12 @@ OUTPUT_NAME = "DebugVarEdit" DIST_PATH = Path("./").resolve() WORK_PATH = Path("./build_temp").resolve() SPEC_PATH = WORK_PATH -SCRIPT_DIR = SRC_PATH ICON_PATH = SRC_PATH / "icon.png" ICON_ICO_PATH = SRC_PATH / "icon.ico" # === Пути к DLL и прочим зависимостям === LIBS = { - "libclang.dll": SCRIPT_DIR / "libclang.dll" + "libclang.dll": SRC_PATH / "libclang.dll" } # === PySide2 плагины === diff --git a/debug_vars.c b/debug_vars.c index b0b7e08..2c2560f 100644 --- a/debug_vars.c +++ b/debug_vars.c @@ -4,32 +4,32 @@ // #include "RS_Functions_modbus.h" -#include "dq_to_alphabeta_cos.h" -#include "errors.h" -#include "v_pwm24.h" -#include "vector.h" #include "xp_project.h" #include "xp_write_xpwm_time.h" -#include "pwm_vector_regul.h" +#include "teta_calc.h" +#include "vector.h" +#include "v_pwm24.h" +#include "errors.h" +#include "dq_to_alphabeta_cos.h" #include "log_can.h" #include "f281xpwm.h" +#include "pwm_vector_regul.h" #include "adc_tools.h" #include "rotation_speed.h" -#include "teta_calc.h" #include "RS_Functions.h" -#include "detect_phase_break2.h" -#include "svgen_dq.h" -#include "xp_rotation_sensor.h" -#include "Spartan2E_Functions.h" -#include "xPeriphSP6_loader.h" #include "xp_controller.h" +#include "xPeriphSP6_loader.h" +#include "xp_rotation_sensor.h" #include "x_serial_bus.h" +#include "Spartan2E_Functions.h" #include "x_parallel_bus.h" -#include "log_params.h" +#include "svgen_dq.h" +#include "detect_phase_break2.h" #include "log_to_memory.h" -#include "global_time.h" #include "CRC_Functions.h" +#include "global_time.h" #include "CAN_Setup.h" +#include "log_params.h" #include "pid_reg3.h" #include "IQmathLib.h" #include "doors_control.h" @@ -314,9 +314,8 @@ extern int zero_ADC[20]; // -int DebugVar_Qnt = 2; +int DebugVar_Qnt = 1; #pragma DATA_SECTION(dbg_vars,".dbgvar_info") DebugVar_t dbg_vars[] = {\ -{(char *)&ADC0finishAddr, pt_uint8, iq7, pt_uint8, "asdasjjjjj" }, \ -{(char *)&ADC1finishAddr, pt_int16, iq_none, pt_int16, "ADC1finish" }, \ +{(char *)&ADC0finishAddr, pt_uint8, t_iq7, pt_uint8, "asdasjjjjj" }, \ }; diff --git a/structs.xml b/structs.xml index bb15e3c..896041a 100644 --- a/structs.xml +++ b/structs.xml @@ -54,7 +54,7 @@ - + @@ -142,7 +142,7 @@ - + @@ -165,7 +165,7 @@ - + @@ -189,7 +189,7 @@ - + @@ -206,7 +206,7 @@ - + @@ -223,7 +223,7 @@ - + @@ -240,7 +240,7 @@ - + @@ -257,7 +257,7 @@ - + @@ -274,7 +274,7 @@ - + @@ -291,7 +291,7 @@ - + @@ -308,7 +308,7 @@ - + @@ -325,7 +325,7 @@ - + @@ -342,7 +342,7 @@ - + @@ -359,7 +359,7 @@ - + @@ -376,7 +376,7 @@ - + @@ -393,7 +393,7 @@ - + @@ -410,7 +410,7 @@ - + @@ -427,7 +427,7 @@ - + @@ -444,7 +444,7 @@ - + @@ -461,7 +461,7 @@ - + @@ -478,7 +478,7 @@ - + @@ -495,7 +495,7 @@ - + @@ -512,7 +512,7 @@ - + @@ -529,7 +529,7 @@ - + @@ -546,7 +546,7 @@ - + @@ -563,7 +563,7 @@ - + @@ -580,7 +580,7 @@ - + @@ -597,7 +597,7 @@ - + @@ -614,7 +614,7 @@ - + @@ -631,7 +631,7 @@ - + @@ -648,7 +648,7 @@ - + @@ -665,7 +665,7 @@ - + @@ -682,7 +682,7 @@ - + @@ -699,7 +699,7 @@ - + @@ -716,7 +716,7 @@ - + @@ -733,7 +733,7 @@ - + @@ -750,7 +750,7 @@ - + @@ -767,7 +767,7 @@ - + @@ -784,7 +784,7 @@ - + @@ -801,7 +801,7 @@ - + @@ -818,7 +818,7 @@ - + @@ -835,7 +835,7 @@ - + @@ -852,7 +852,7 @@ - + @@ -869,7 +869,7 @@ - + @@ -886,7 +886,7 @@ - + @@ -903,7 +903,7 @@ - + @@ -920,7 +920,7 @@ - + @@ -937,7 +937,7 @@ - + @@ -954,7 +954,7 @@ - + @@ -971,7 +971,7 @@ - + @@ -988,7 +988,7 @@ - + @@ -1005,7 +1005,7 @@ - + @@ -1022,7 +1022,7 @@ - + @@ -1039,7 +1039,7 @@ - + @@ -1056,7 +1056,7 @@ - + @@ -1073,7 +1073,7 @@ - + @@ -1090,7 +1090,7 @@ - + @@ -1107,7 +1107,7 @@ - + @@ -1124,7 +1124,7 @@ - + @@ -1141,7 +1141,7 @@ - + @@ -1158,7 +1158,7 @@ - + @@ -1175,7 +1175,7 @@ - + @@ -1192,7 +1192,7 @@ - + @@ -1211,7 +1211,7 @@ - + @@ -1228,7 +1228,7 @@ - + @@ -1245,7 +1245,7 @@ - + @@ -1262,7 +1262,7 @@ - + @@ -1279,7 +1279,7 @@ - + @@ -1296,7 +1296,7 @@ - + @@ -1313,7 +1313,7 @@ - + @@ -1330,7 +1330,7 @@ - + @@ -1347,7 +1347,7 @@ - + @@ -1364,7 +1364,7 @@ - + @@ -1381,7 +1381,7 @@ - + @@ -1398,7 +1398,7 @@ - + @@ -1415,7 +1415,7 @@ - + @@ -1432,7 +1432,7 @@ - + @@ -1449,7 +1449,7 @@ - + @@ -1466,7 +1466,7 @@ - + @@ -1483,7 +1483,7 @@ - + @@ -1500,7 +1500,7 @@ - + @@ -1517,7 +1517,7 @@ - + @@ -1534,7 +1534,7 @@ - + @@ -1551,7 +1551,7 @@ - + @@ -1568,7 +1568,7 @@ - + @@ -1585,7 +1585,7 @@ - + @@ -1602,7 +1602,7 @@ - + @@ -1620,7 +1620,7 @@ - + @@ -1630,7 +1630,7 @@ - + @@ -1642,7 +1642,7 @@ - + @@ -1655,7 +1655,7 @@ - + @@ -1672,7 +1672,7 @@ - + @@ -1695,7 +1695,7 @@ - + @@ -1704,7 +1704,7 @@ - + @@ -1722,7 +1722,7 @@ - + @@ -1761,7 +1761,7 @@ - + @@ -1778,7 +1778,7 @@ - + @@ -1795,7 +1795,7 @@ - + @@ -1812,7 +1812,7 @@ - + @@ -1829,7 +1829,7 @@ - + @@ -1846,7 +1846,7 @@ - + @@ -1863,7 +1863,7 @@ - + @@ -1882,7 +1882,7 @@ - + @@ -1899,7 +1899,7 @@ - + @@ -1916,7 +1916,7 @@ - + @@ -1933,7 +1933,7 @@ - + @@ -1950,7 +1950,7 @@ - + @@ -1967,7 +1967,7 @@ - + @@ -1984,7 +1984,7 @@ - + @@ -2001,7 +2001,7 @@ - + @@ -2018,7 +2018,7 @@ - + @@ -2035,7 +2035,7 @@ - + @@ -2052,7 +2052,7 @@ - + @@ -2069,7 +2069,7 @@ - + @@ -2124,7 +2124,7 @@ - + @@ -2141,7 +2141,7 @@ - + @@ -2158,7 +2158,7 @@ - + @@ -2175,7 +2175,7 @@ - + @@ -2192,7 +2192,7 @@ - + @@ -2209,7 +2209,7 @@ - + @@ -2249,7 +2249,7 @@ - + @@ -2266,7 +2266,7 @@ - + @@ -2283,7 +2283,7 @@ - + @@ -2300,7 +2300,7 @@ - + @@ -2317,7 +2317,7 @@ - + @@ -2334,7 +2334,7 @@ - + @@ -2351,7 +2351,7 @@ - + @@ -2368,7 +2368,7 @@ - + @@ -2385,7 +2385,7 @@ - + @@ -2402,7 +2402,7 @@ - + @@ -2419,7 +2419,7 @@ - + @@ -2436,7 +2436,7 @@ - + @@ -2472,7 +2472,7 @@ - + @@ -2491,7 +2491,7 @@ - + @@ -2506,7 +2506,7 @@ - + @@ -2536,7 +2536,7 @@ - + @@ -2561,7 +2561,7 @@ - + @@ -2586,7 +2586,7 @@ - + @@ -2604,7 +2604,7 @@ - + @@ -2629,7 +2629,7 @@ - + @@ -2654,7 +2654,7 @@ - + @@ -2679,7 +2679,7 @@ - + @@ -2697,7 +2697,7 @@ - + @@ -2722,7 +2722,7 @@ - + @@ -2747,7 +2747,7 @@ - + @@ -2772,7 +2772,7 @@ - + @@ -2797,7 +2797,7 @@ - + @@ -2820,7 +2820,7 @@ - + @@ -2845,7 +2845,7 @@ - + @@ -2866,7 +2866,7 @@ - + @@ -2887,7 +2887,7 @@ - + @@ -2909,7 +2909,7 @@ - + @@ -2931,7 +2931,7 @@ - + @@ -2956,7 +2956,7 @@ - + @@ -2977,7 +2977,7 @@ - + @@ -2995,7 +2995,7 @@ - + @@ -3020,7 +3020,7 @@ - + @@ -3045,7 +3045,7 @@ - + @@ -3070,7 +3070,7 @@ - + @@ -3095,7 +3095,7 @@ - + @@ -3120,7 +3120,7 @@ - + @@ -3145,7 +3145,7 @@ - + @@ -3170,7 +3170,7 @@ - + @@ -3188,7 +3188,7 @@ - + @@ -3210,7 +3210,7 @@ - + @@ -3232,7 +3232,7 @@ - + @@ -3255,7 +3255,7 @@ - + @@ -3278,7 +3278,7 @@ - + @@ -3301,7 +3301,7 @@ - + @@ -3324,7 +3324,7 @@ - + @@ -3470,10 +3470,10 @@ - + - + @@ -3527,7 +3527,7 @@ - + @@ -3545,7 +3545,7 @@ - + @@ -3568,7 +3568,7 @@ - + @@ -3584,7 +3584,7 @@ - + @@ -3600,7 +3600,7 @@ - + @@ -3625,7 +3625,7 @@ - + @@ -3636,7 +3636,7 @@ - + @@ -3654,7 +3654,7 @@ - + @@ -3679,7 +3679,7 @@ - + @@ -3703,7 +3703,7 @@ - + @@ -3728,7 +3728,7 @@ - + @@ -3751,10 +3751,10 @@ - + - + @@ -3762,10 +3762,10 @@ - + - + @@ -3787,10 +3787,10 @@ - + - + @@ -3815,7 +3815,7 @@ - + @@ -3835,7 +3835,7 @@ - + @@ -3871,7 +3871,7 @@ - + @@ -4021,7 +4021,7 @@ - + @@ -4043,7 +4043,7 @@ - + @@ -4104,9 +4104,9 @@ - + - + @@ -4153,7 +4153,7 @@ - + @@ -4176,7 +4176,7 @@ - + @@ -4199,7 +4199,7 @@ - + @@ -4260,7 +4260,7 @@ - + @@ -4271,7 +4271,7 @@ - + @@ -4302,7 +4302,7 @@ - + @@ -4348,7 +4348,7 @@ - + @@ -4361,7 +4361,7 @@ - + @@ -4377,7 +4377,7 @@ - + @@ -4397,7 +4397,7 @@ - + @@ -4418,7 +4418,7 @@ - + @@ -4459,7 +4459,7 @@ - + @@ -4673,7 +4673,7 @@ - + @@ -4704,7 +4704,7 @@ - + @@ -4940,7 +4940,7 @@ - + @@ -4957,7 +4957,7 @@ - + @@ -4974,7 +4974,7 @@ - + @@ -4991,7 +4991,7 @@ - + @@ -5008,7 +5008,7 @@ - + @@ -5025,7 +5025,7 @@ - + @@ -5042,7 +5042,7 @@ - + @@ -5059,7 +5059,7 @@ - + @@ -5076,7 +5076,7 @@ - + @@ -5093,7 +5093,7 @@ - + @@ -5110,7 +5110,7 @@ - + @@ -5127,7 +5127,7 @@ - + @@ -5144,7 +5144,7 @@ - + @@ -5161,7 +5161,7 @@ - + @@ -5178,7 +5178,7 @@ - + @@ -5195,7 +5195,7 @@ - + @@ -5212,7 +5212,7 @@ - + @@ -5229,7 +5229,7 @@ - + @@ -5246,7 +5246,7 @@ - + @@ -5263,7 +5263,7 @@ - + @@ -5280,7 +5280,7 @@ - + @@ -5297,7 +5297,7 @@ - + @@ -5314,7 +5314,7 @@ - + @@ -5331,7 +5331,7 @@ - + @@ -5348,7 +5348,7 @@ - + @@ -5365,7 +5365,7 @@ - + @@ -5382,7 +5382,7 @@ - + @@ -5399,7 +5399,7 @@ - + @@ -5416,7 +5416,7 @@ - + @@ -5433,7 +5433,7 @@ - + @@ -5450,7 +5450,7 @@ - + @@ -5467,7 +5467,7 @@ - + @@ -5484,7 +5484,7 @@ - + @@ -5501,7 +5501,7 @@ - + @@ -5518,7 +5518,7 @@ - + @@ -5535,7 +5535,7 @@ - + @@ -5552,7 +5552,7 @@ - + @@ -5569,7 +5569,7 @@ - + @@ -5586,7 +5586,7 @@ - + @@ -5603,7 +5603,7 @@ - + @@ -5620,7 +5620,7 @@ - + @@ -5637,7 +5637,7 @@ - + @@ -5654,7 +5654,7 @@ - + @@ -5671,7 +5671,7 @@ - + @@ -5688,7 +5688,7 @@ - + @@ -5705,7 +5705,7 @@ - + @@ -5722,7 +5722,7 @@ - + @@ -5739,7 +5739,7 @@ - + @@ -5756,7 +5756,7 @@ - + @@ -5773,7 +5773,7 @@ - + @@ -5790,7 +5790,7 @@ - + @@ -5807,7 +5807,7 @@ - + @@ -5824,7 +5824,7 @@ - + @@ -5841,7 +5841,7 @@ - + @@ -5858,7 +5858,7 @@ - + @@ -5875,7 +5875,7 @@ - + @@ -5892,7 +5892,7 @@ - + @@ -5909,7 +5909,7 @@ - + @@ -5926,7 +5926,7 @@ - + @@ -5943,7 +5943,7 @@ - + @@ -6121,7 +6121,7 @@ - + @@ -6138,7 +6138,7 @@ - + @@ -6155,7 +6155,7 @@ - + @@ -6172,7 +6172,7 @@ - + @@ -6189,7 +6189,7 @@ - + @@ -6206,7 +6206,7 @@ - + @@ -6223,7 +6223,7 @@ - + @@ -6240,7 +6240,7 @@ - + @@ -6257,7 +6257,7 @@ - + @@ -6274,7 +6274,7 @@ - + @@ -6291,7 +6291,7 @@ - + @@ -6308,7 +6308,7 @@ - + @@ -6325,7 +6325,7 @@ - + @@ -6342,7 +6342,7 @@ - + @@ -6359,7 +6359,7 @@ - + @@ -6376,7 +6376,7 @@ - + @@ -6393,7 +6393,7 @@ - + @@ -6410,7 +6410,7 @@ - + @@ -6427,7 +6427,7 @@ - + @@ -6444,7 +6444,7 @@ - + @@ -6461,7 +6461,7 @@ - + @@ -6478,7 +6478,7 @@ - + @@ -6495,7 +6495,7 @@ - + @@ -6512,7 +6512,7 @@ - + @@ -6703,7 +6703,7 @@ - + @@ -6757,7 +6757,7 @@ - + @@ -6799,7 +6799,7 @@ - + @@ -6848,7 +6848,7 @@ - + @@ -6872,7 +6872,7 @@ - + @@ -6927,10 +6927,10 @@ - + - + @@ -6938,10 +6938,10 @@ - + - + @@ -6951,10 +6951,10 @@ - + - + @@ -6964,10 +6964,10 @@ - + - + @@ -6987,10 +6987,10 @@ - + - + @@ -7002,10 +7002,10 @@ - + - + @@ -7016,10 +7016,10 @@ - + - + @@ -7031,10 +7031,10 @@ - + - + @@ -7050,10 +7050,10 @@ - + - + @@ -7075,10 +7075,10 @@ - + - + @@ -7100,10 +7100,10 @@ - + - + @@ -7138,7 +7138,7 @@ - + @@ -7151,10 +7151,10 @@ - + - + @@ -7166,10 +7166,10 @@ - + - + @@ -7180,10 +7180,10 @@ - + - + @@ -7195,10 +7195,10 @@ - + - + @@ -7214,10 +7214,10 @@ - + - + @@ -7239,10 +7239,10 @@ - + - + @@ -7264,10 +7264,10 @@ - + - + @@ -7280,10 +7280,10 @@ - + - + @@ -7305,10 +7305,10 @@ - + - + @@ -7330,10 +7330,10 @@ - + - + @@ -7344,10 +7344,10 @@ - + - + @@ -7359,10 +7359,10 @@ - + - + @@ -7373,10 +7373,10 @@ - + - + @@ -7388,10 +7388,10 @@ - + - + @@ -7407,7 +7407,7 @@ - + @@ -7459,10 +7459,10 @@ - + - + @@ -7470,10 +7470,10 @@ - + - + @@ -7483,10 +7483,10 @@ - + - + @@ -7496,10 +7496,10 @@ - + - + @@ -7519,10 +7519,10 @@ - + - + @@ -7534,10 +7534,10 @@ - + - + @@ -7548,10 +7548,10 @@ - + - + @@ -7563,10 +7563,10 @@ - + - + @@ -7582,10 +7582,10 @@ - + - + @@ -7607,10 +7607,10 @@ - + - + @@ -7632,10 +7632,10 @@ - + - + @@ -7670,10 +7670,10 @@ - + - + @@ -7688,10 +7688,10 @@ - + - + @@ -7701,10 +7701,10 @@ - + - + @@ -7729,7 +7729,7 @@ - + @@ -7748,10 +7748,10 @@ - + - + @@ -7779,7 +7779,7 @@ - + @@ -7801,10 +7801,10 @@ - + - + @@ -7832,7 +7832,7 @@ - + @@ -7847,10 +7847,10 @@ - + - + @@ -7876,7 +7876,7 @@ - + @@ -7891,10 +7891,10 @@ - + - + @@ -7909,10 +7909,10 @@ - + - + @@ -7922,10 +7922,10 @@ - + - + @@ -7950,7 +7950,7 @@ - + @@ -7968,7 +7968,7 @@ - + @@ -7981,10 +7981,10 @@ - + - + @@ -7999,10 +7999,10 @@ - + - + @@ -8012,10 +8012,10 @@ - + - + @@ -8029,10 +8029,10 @@ - + - + @@ -8040,10 +8040,10 @@ - + - + @@ -8053,10 +8053,10 @@ - + - + @@ -8066,10 +8066,10 @@ - + - + @@ -8085,10 +8085,10 @@ - + - + @@ -8096,10 +8096,10 @@ - + - + @@ -8109,10 +8109,10 @@ - + - + @@ -8122,10 +8122,10 @@ - + - + @@ -8145,10 +8145,10 @@ - + - + @@ -8194,10 +8194,10 @@ - + - + @@ -8212,10 +8212,10 @@ - + - + @@ -8223,10 +8223,10 @@ - + - + @@ -8234,10 +8234,10 @@ - + - + @@ -8259,10 +8259,10 @@ - + - + @@ -8284,10 +8284,10 @@ - + - + @@ -8302,10 +8302,10 @@ - + - + @@ -8313,10 +8313,10 @@ - + - + @@ -8324,10 +8324,10 @@ - + - + @@ -8349,10 +8349,10 @@ - + - + @@ -8365,10 +8365,10 @@ - + - + @@ -8390,10 +8390,10 @@ - + - + @@ -8415,10 +8415,10 @@ - + - + @@ -8434,10 +8434,10 @@ - + - + @@ -8459,10 +8459,10 @@ - + - + @@ -8470,10 +8470,10 @@ - + - + @@ -8489,10 +8489,10 @@ - + - + @@ -8505,30 +8505,30 @@ - + - + - + - + - + - + @@ -8616,10 +8616,10 @@ - + - + @@ -8634,10 +8634,10 @@ - + - + @@ -8645,10 +8645,10 @@ - + - + @@ -8656,10 +8656,10 @@ - + - + @@ -8681,10 +8681,10 @@ - + - + @@ -8697,10 +8697,10 @@ - + - + @@ -8722,10 +8722,10 @@ - + - + @@ -8747,10 +8747,10 @@ - + - + @@ -8766,10 +8766,10 @@ - + - + @@ -8791,10 +8791,10 @@ - + - + @@ -8802,10 +8802,10 @@ - + - + @@ -8821,10 +8821,10 @@ - + - + @@ -8837,30 +8837,30 @@ - + - + - + - + - + - + @@ -8878,10 +8878,10 @@ - + - + @@ -8894,30 +8894,30 @@ - + - + - + - + - + - + @@ -8932,10 +8932,10 @@ - + - + @@ -8950,10 +8950,10 @@ - + - + @@ -8961,10 +8961,10 @@ - + - + @@ -8972,10 +8972,10 @@ - + - + @@ -8997,10 +8997,10 @@ - + - + @@ -9013,10 +9013,10 @@ - + - + @@ -9038,10 +9038,10 @@ - + - + @@ -9063,10 +9063,10 @@ - + - + @@ -9082,10 +9082,10 @@ - + - + @@ -9107,10 +9107,10 @@ - + - + @@ -9118,10 +9118,10 @@ - + - + @@ -9136,10 +9136,10 @@ - + - + @@ -9156,10 +9156,10 @@ - + - + @@ -9174,10 +9174,10 @@ - + - + @@ -9185,10 +9185,10 @@ - + - + @@ -9196,10 +9196,10 @@ - + - + @@ -9221,10 +9221,10 @@ - + - + @@ -9242,10 +9242,10 @@ - + - + @@ -9260,10 +9260,10 @@ - + - + @@ -9271,10 +9271,10 @@ - + - + @@ -9282,10 +9282,10 @@ - + - + @@ -9307,10 +9307,10 @@ - + - + @@ -9359,10 +9359,10 @@ - + - + @@ -9384,10 +9384,10 @@ - + - + @@ -9409,10 +9409,10 @@ - + - + @@ -9426,10 +9426,10 @@ - + - + @@ -9442,10 +9442,10 @@ - + - + @@ -9466,10 +9466,10 @@ - + - + @@ -9491,10 +9491,10 @@ - + - + @@ -9516,10 +9516,10 @@ - + - + @@ -9541,10 +9541,10 @@ - + - + @@ -9555,10 +9555,10 @@ - + - + @@ -9570,10 +9570,10 @@ - + - + @@ -9604,10 +9604,10 @@ - + - + @@ -9629,10 +9629,10 @@ - + - + @@ -9654,10 +9654,10 @@ - + - + @@ -9679,10 +9679,10 @@ - + - + @@ -9693,10 +9693,10 @@ - + - + @@ -9708,10 +9708,10 @@ - + - + @@ -9727,10 +9727,10 @@ - + - + @@ -9752,10 +9752,10 @@ - + - + @@ -9777,10 +9777,10 @@ - + - + @@ -9802,10 +9802,10 @@ - + - + @@ -9816,10 +9816,10 @@ - + - + @@ -9831,10 +9831,10 @@ - + - + @@ -9850,10 +9850,10 @@ - + - + @@ -9875,10 +9875,10 @@ - + - + @@ -9900,10 +9900,10 @@ - + - + @@ -9917,10 +9917,10 @@ - + - + @@ -9933,10 +9933,10 @@ - + - + @@ -9953,10 +9953,10 @@ - + - + @@ -9978,10 +9978,10 @@ - + - + @@ -10003,10 +10003,10 @@ - + - + @@ -10020,10 +10020,10 @@ - + - + @@ -10036,10 +10036,10 @@ - + - + @@ -10055,7 +10055,7 @@ - + @@ -10084,7 +10084,7 @@ - + @@ -10113,7 +10113,7 @@ - + @@ -10133,7 +10133,7 @@ - + @@ -10153,7 +10153,7 @@ - + @@ -10205,7 +10205,7 @@ - + @@ -10247,7 +10247,7 @@ - + @@ -10282,7 +10282,7 @@ - + @@ -10318,7 +10318,7 @@ - + @@ -10354,7 +10354,7 @@ - + @@ -10374,7 +10374,7 @@ - + @@ -10394,7 +10394,7 @@ - + @@ -10476,10 +10476,10 @@ - + - + @@ -10494,10 +10494,10 @@ - + - + @@ -10505,10 +10505,10 @@ - + - + @@ -10516,10 +10516,10 @@ - + - + @@ -10541,10 +10541,10 @@ - + - + @@ -10556,10 +10556,10 @@ - + - + @@ -10575,10 +10575,10 @@ - + - + @@ -10593,10 +10593,10 @@ - + - + @@ -10604,10 +10604,10 @@ - + - + @@ -10615,10 +10615,10 @@ - + - + @@ -10640,10 +10640,10 @@ - + - + @@ -10654,10 +10654,10 @@ - + - + @@ -10679,10 +10679,10 @@ - + - + @@ -10704,10 +10704,10 @@ - + - + @@ -10719,10 +10719,10 @@ - + - + @@ -10744,10 +10744,10 @@ - + - + @@ -10755,10 +10755,10 @@ - + - + @@ -10784,10 +10784,10 @@ - + - + @@ -10850,10 +10850,10 @@ - + - + @@ -10868,10 +10868,10 @@ - + - + @@ -10879,10 +10879,10 @@ - + - + @@ -10890,10 +10890,10 @@ - + - + @@ -10915,10 +10915,10 @@ - + - + @@ -10930,10 +10930,10 @@ - + - + @@ -10949,10 +10949,10 @@ - + - + @@ -10967,10 +10967,10 @@ - + - + @@ -10978,10 +10978,10 @@ - + - + @@ -10989,10 +10989,10 @@ - + - + @@ -11014,10 +11014,10 @@ - + - + @@ -11028,10 +11028,10 @@ - + - + @@ -11053,10 +11053,10 @@ - + - + @@ -11078,10 +11078,10 @@ - + - + @@ -11093,10 +11093,10 @@ - + - + @@ -11118,10 +11118,10 @@ - + - + @@ -11129,10 +11129,10 @@ - + - + @@ -11158,10 +11158,10 @@ - + - + @@ -11224,10 +11224,10 @@ - + - + @@ -11242,10 +11242,10 @@ - + - + @@ -11253,10 +11253,10 @@ - + - + @@ -11264,10 +11264,10 @@ - + - + @@ -11289,10 +11289,10 @@ - + - + @@ -11311,10 +11311,10 @@ - + - + @@ -11330,10 +11330,10 @@ - + - + @@ -11348,10 +11348,10 @@ - + - + @@ -11359,10 +11359,10 @@ - + - + @@ -11370,10 +11370,10 @@ - + - + @@ -11395,10 +11395,10 @@ - + - + @@ -11416,10 +11416,10 @@ - + - + @@ -11441,10 +11441,10 @@ - + - + @@ -11466,10 +11466,10 @@ - + - + @@ -11487,10 +11487,10 @@ - + - + @@ -11512,10 +11512,10 @@ - + - + @@ -11523,10 +11523,10 @@ - + - + @@ -11534,10 +11534,10 @@ - + - + @@ -11602,10 +11602,10 @@ - + - + @@ -11620,10 +11620,10 @@ - + - + @@ -11631,10 +11631,10 @@ - + - + @@ -11642,10 +11642,10 @@ - + - + @@ -11667,10 +11667,10 @@ - + - + @@ -11682,10 +11682,10 @@ - + - + @@ -11701,10 +11701,10 @@ - + - + @@ -11719,10 +11719,10 @@ - + - + @@ -11730,10 +11730,10 @@ - + - + @@ -11741,10 +11741,10 @@ - + - + @@ -11766,10 +11766,10 @@ - + - + @@ -11780,10 +11780,10 @@ - + - + @@ -11805,10 +11805,10 @@ - + - + @@ -11830,10 +11830,10 @@ - + - + @@ -11845,10 +11845,10 @@ - + - + @@ -11870,10 +11870,10 @@ - + - + @@ -11881,10 +11881,10 @@ - + - + @@ -11910,10 +11910,10 @@ - + - + @@ -11976,10 +11976,10 @@ - + - + @@ -11994,10 +11994,10 @@ - + - + @@ -12005,10 +12005,10 @@ - + - + @@ -12016,10 +12016,10 @@ - + - + @@ -12041,10 +12041,10 @@ - + - + @@ -12066,10 +12066,10 @@ - + - + @@ -12084,10 +12084,10 @@ - + - + @@ -12095,10 +12095,10 @@ - + - + @@ -12106,10 +12106,10 @@ - + - + @@ -12131,10 +12131,10 @@ - + - + @@ -12147,10 +12147,10 @@ - + - + @@ -12172,10 +12172,10 @@ - + - + @@ -12197,10 +12197,10 @@ - + - + @@ -12216,10 +12216,10 @@ - + - + @@ -12241,10 +12241,10 @@ - + - + @@ -12252,10 +12252,10 @@ - + - + @@ -12286,10 +12286,10 @@ - + - + @@ -12304,10 +12304,10 @@ - + - + @@ -12315,10 +12315,10 @@ - + - + @@ -12326,10 +12326,10 @@ - + - + @@ -12351,10 +12351,10 @@ - + - + @@ -12365,10 +12365,10 @@ - + - + @@ -12390,10 +12390,10 @@ - + - + @@ -12415,10 +12415,10 @@ - + - + @@ -12430,10 +12430,10 @@ - + - + @@ -12455,10 +12455,10 @@ - + - + @@ -12466,10 +12466,10 @@ - + - + @@ -12495,10 +12495,10 @@ - + - + @@ -12516,10 +12516,10 @@ - + - + @@ -12534,10 +12534,10 @@ - + - + @@ -12545,10 +12545,10 @@ - + - + @@ -12556,10 +12556,10 @@ - + - + @@ -12581,10 +12581,10 @@ - + - + @@ -12595,10 +12595,10 @@ - + - + @@ -12620,10 +12620,10 @@ - + - + @@ -12645,10 +12645,10 @@ - + - + @@ -12660,10 +12660,10 @@ - + - + @@ -12685,10 +12685,10 @@ - + - + @@ -12696,10 +12696,10 @@ - + - + @@ -12725,10 +12725,10 @@ - + - + @@ -12746,10 +12746,10 @@ - + - + @@ -12764,10 +12764,10 @@ - + - + @@ -12775,10 +12775,10 @@ - + - + @@ -12786,10 +12786,10 @@ - + - + @@ -12811,10 +12811,10 @@ - + - + @@ -12832,10 +12832,10 @@ - + - + @@ -12857,10 +12857,10 @@ - + - + @@ -12882,10 +12882,10 @@ - + - + @@ -12903,10 +12903,10 @@ - + - + @@ -12928,10 +12928,10 @@ - + - + @@ -12939,10 +12939,10 @@ - + - + @@ -12950,10 +12950,10 @@ - + - + @@ -12973,10 +12973,10 @@ - + - + @@ -12991,10 +12991,10 @@ - + - + @@ -13002,10 +13002,10 @@ - + - + @@ -13013,10 +13013,10 @@ - + - + @@ -13038,10 +13038,10 @@ - + - + @@ -13052,10 +13052,10 @@ - + - + @@ -13077,10 +13077,10 @@ - + - + @@ -13102,10 +13102,10 @@ - + - + @@ -13117,10 +13117,10 @@ - + - + @@ -13142,10 +13142,10 @@ - + - + @@ -13153,10 +13153,10 @@ - + - + @@ -13182,10 +13182,10 @@ - + - + @@ -13203,10 +13203,10 @@ - + - + @@ -13221,10 +13221,10 @@ - + - + @@ -13232,10 +13232,10 @@ - + - + @@ -13243,10 +13243,10 @@ - + - + @@ -13268,10 +13268,10 @@ - + - + @@ -13284,10 +13284,10 @@ - + - + @@ -13309,10 +13309,10 @@ - + - + @@ -13334,10 +13334,10 @@ - + - + @@ -13353,10 +13353,10 @@ - + - + @@ -13378,10 +13378,10 @@ - + - + @@ -13389,10 +13389,10 @@ - + - + @@ -13408,10 +13408,10 @@ - + - + @@ -13419,10 +13419,10 @@ - + - + @@ -13431,10 +13431,10 @@ - + - + @@ -13442,10 +13442,10 @@ - + - + @@ -13456,10 +13456,10 @@ - + - + @@ -13474,10 +13474,10 @@ - + - + @@ -13485,10 +13485,10 @@ - + - + @@ -13496,10 +13496,10 @@ - + - + @@ -13521,10 +13521,10 @@ - + - + @@ -13535,10 +13535,10 @@ - + - + @@ -13560,10 +13560,10 @@ - + - + @@ -13585,10 +13585,10 @@ - + - + @@ -13600,10 +13600,10 @@ - + - + @@ -13625,10 +13625,10 @@ - + - + @@ -13636,10 +13636,10 @@ - + - + @@ -13665,10 +13665,10 @@ - + - + @@ -13682,10 +13682,10 @@ - + - + @@ -13700,10 +13700,10 @@ - + - + @@ -13711,10 +13711,10 @@ - + - + @@ -13722,10 +13722,10 @@ - + - + @@ -13747,10 +13747,10 @@ - + - + @@ -13761,10 +13761,10 @@ - + - + @@ -13786,10 +13786,10 @@ - + - + @@ -13811,10 +13811,10 @@ - + - + @@ -13826,10 +13826,10 @@ - + - + @@ -13851,10 +13851,10 @@ - + - + @@ -13862,10 +13862,10 @@ - + - + @@ -13891,10 +13891,10 @@ - + - + @@ -13908,10 +13908,10 @@ - + - + @@ -13926,10 +13926,10 @@ - + - + @@ -13937,10 +13937,10 @@ - + - + @@ -13948,10 +13948,10 @@ - + - + @@ -13973,10 +13973,10 @@ - + - + @@ -13994,10 +13994,10 @@ - + - + @@ -14019,10 +14019,10 @@ - + - + @@ -14044,10 +14044,10 @@ - + - + @@ -14065,10 +14065,10 @@ - + - + @@ -14090,10 +14090,10 @@ - + - + @@ -14101,10 +14101,10 @@ - + - + @@ -14112,10 +14112,10 @@ - + - + @@ -14131,10 +14131,10 @@ - + - + @@ -14149,10 +14149,10 @@ - + - + @@ -14160,10 +14160,10 @@ - + - + @@ -14171,10 +14171,10 @@ - + - + @@ -14196,10 +14196,10 @@ - + - + @@ -14210,10 +14210,10 @@ - + - + @@ -14235,10 +14235,10 @@ - + - + @@ -14260,10 +14260,10 @@ - + - + @@ -14275,10 +14275,10 @@ - + - + @@ -14300,10 +14300,10 @@ - + - + @@ -14311,10 +14311,10 @@ - + - + @@ -14340,10 +14340,10 @@ - + - + @@ -14357,10 +14357,10 @@ - + - + @@ -14375,10 +14375,10 @@ - + - + @@ -14386,10 +14386,10 @@ - + - + @@ -14397,10 +14397,10 @@ - + - + @@ -14422,10 +14422,10 @@ - + - + @@ -14438,10 +14438,10 @@ - + - + @@ -14463,10 +14463,10 @@ - + - + @@ -14488,10 +14488,10 @@ - + - + @@ -14507,10 +14507,10 @@ - + - + @@ -14532,10 +14532,10 @@ - + - + @@ -14543,10 +14543,10 @@ - + - + @@ -14562,10 +14562,10 @@ - + - + @@ -14580,10 +14580,10 @@ - + - + @@ -14591,10 +14591,10 @@ - + - + @@ -14602,10 +14602,10 @@ - + - + @@ -14627,10 +14627,10 @@ - + - + @@ -14642,10 +14642,10 @@ - + - + @@ -14659,10 +14659,10 @@ - + - + @@ -14677,10 +14677,10 @@ - + - + @@ -14688,10 +14688,10 @@ - + - + @@ -14699,10 +14699,10 @@ - + - + @@ -14724,10 +14724,10 @@ - + - + @@ -14739,10 +14739,10 @@ - + - + @@ -14756,10 +14756,10 @@ - + - + @@ -14774,10 +14774,10 @@ - + - + @@ -14785,10 +14785,10 @@ - + - + @@ -14796,10 +14796,10 @@ - + - + @@ -14821,10 +14821,10 @@ - + - + @@ -14843,10 +14843,10 @@ - + - + @@ -14860,10 +14860,10 @@ - + - + @@ -14878,10 +14878,10 @@ - + - + @@ -14889,10 +14889,10 @@ - + - + @@ -14900,10 +14900,10 @@ - + - + @@ -14925,10 +14925,10 @@ - + - + @@ -14940,10 +14940,10 @@ - + - + @@ -14957,10 +14957,10 @@ - + - + @@ -14975,10 +14975,10 @@ - + - + @@ -14986,10 +14986,10 @@ - + - + @@ -14997,10 +14997,10 @@ - + - + @@ -15022,10 +15022,10 @@ - + - + @@ -15043,10 +15043,10 @@ - + - + @@ -15061,10 +15061,10 @@ - + - + @@ -15072,10 +15072,10 @@ - + - + @@ -15083,10 +15083,10 @@ - + - + @@ -15108,10 +15108,10 @@ - + - + @@ -15123,10 +15123,10 @@ - + - + @@ -15136,10 +15136,10 @@ - + - + @@ -15154,10 +15154,10 @@ - + - + @@ -15165,10 +15165,10 @@ - + - + @@ -15176,10 +15176,10 @@ - + - + @@ -15201,10 +15201,10 @@ - + - + @@ -15216,10 +15216,10 @@ - + - + @@ -15229,10 +15229,10 @@ - + - + @@ -15247,10 +15247,10 @@ - + - + @@ -15258,10 +15258,10 @@ - + - + @@ -15269,10 +15269,10 @@ - + - + @@ -15294,10 +15294,10 @@ - + - + @@ -15316,10 +15316,10 @@ - + - + @@ -15329,10 +15329,10 @@ - + - + @@ -15347,10 +15347,10 @@ - + - + @@ -15358,10 +15358,10 @@ - + - + @@ -15369,10 +15369,10 @@ - + - + @@ -15394,10 +15394,10 @@ - + - + @@ -15409,10 +15409,10 @@ - + - + @@ -15422,10 +15422,10 @@ - + - + @@ -15440,10 +15440,10 @@ - + - + @@ -15451,10 +15451,10 @@ - + - + @@ -15462,10 +15462,10 @@ - + - + @@ -15487,10 +15487,10 @@ - + - + @@ -15510,10 +15510,10 @@ - + - + @@ -15527,10 +15527,10 @@ - + - + @@ -15549,10 +15549,10 @@ - + - + @@ -15566,10 +15566,10 @@ - + - + @@ -15616,10 +15616,10 @@ - + - + @@ -15641,10 +15641,10 @@ - + - + @@ -15670,10 +15670,10 @@ - + - + @@ -15695,10 +15695,10 @@ - + - + @@ -15728,10 +15728,10 @@ - + - + @@ -15753,10 +15753,10 @@ - + - + @@ -15782,10 +15782,10 @@ - + - + @@ -15807,10 +15807,10 @@ - + - + @@ -15850,7 +15850,7 @@ - + @@ -15861,7 +15861,7 @@ - + @@ -15879,7 +15879,7 @@ - + @@ -15904,7 +15904,7 @@ - + @@ -15928,7 +15928,7 @@ - + @@ -15953,7 +15953,7 @@ - + @@ -15976,10 +15976,10 @@ - + - + @@ -15987,10 +15987,10 @@ - + - + @@ -16012,10 +16012,10 @@ - + - + @@ -16053,10 +16053,10 @@ - + - + @@ -16078,10 +16078,10 @@ - + - + @@ -16105,10 +16105,10 @@ - + - + @@ -16134,10 +16134,10 @@ - + - + @@ -16159,10 +16159,10 @@ - + - + @@ -16188,10 +16188,10 @@ - + - + @@ -16213,10 +16213,10 @@ - + - + @@ -16244,10 +16244,10 @@ - + - + @@ -16269,10 +16269,10 @@ - + - + @@ -16298,10 +16298,10 @@ - + - + @@ -16323,10 +16323,10 @@ - + - + @@ -16367,10 +16367,10 @@ - + - + @@ -16384,10 +16384,10 @@ - + - + @@ -16442,10 +16442,10 @@ - + - + @@ -16460,10 +16460,10 @@ - + - + @@ -16471,10 +16471,10 @@ - + - + @@ -16482,10 +16482,10 @@ - + - + @@ -16507,10 +16507,10 @@ - + - + @@ -16529,10 +16529,10 @@ - + - + @@ -16548,10 +16548,10 @@ - + - + @@ -16566,10 +16566,10 @@ - + - + @@ -16577,10 +16577,10 @@ - + - + @@ -16588,10 +16588,10 @@ - + - + @@ -16613,10 +16613,10 @@ - + - + @@ -16634,10 +16634,10 @@ - + - + @@ -16659,10 +16659,10 @@ - + - + @@ -16684,10 +16684,10 @@ - + - + @@ -16705,10 +16705,10 @@ - + - + @@ -16730,10 +16730,10 @@ - + - + @@ -16741,10 +16741,10 @@ - + - + @@ -16752,10 +16752,10 @@ - + - + @@ -16895,10 +16895,10 @@ - + - + @@ -16906,10 +16906,10 @@ - + - + @@ -16919,10 +16919,10 @@ - + - + @@ -16932,10 +16932,10 @@ - + - + @@ -16955,10 +16955,10 @@ - + - + @@ -16970,10 +16970,10 @@ - + - + @@ -16984,10 +16984,10 @@ - + - + @@ -16999,10 +16999,10 @@ - + - + @@ -17018,10 +17018,10 @@ - + - + @@ -17043,10 +17043,10 @@ - + - + @@ -17068,10 +17068,10 @@ - + - + @@ -17137,10 +17137,10 @@ - + - + @@ -17162,10 +17162,10 @@ - + - + @@ -17187,10 +17187,10 @@ - + - + @@ -17204,10 +17204,10 @@ - + - + @@ -17220,10 +17220,10 @@ - + - + @@ -17244,10 +17244,10 @@ - + - + @@ -17269,10 +17269,10 @@ - + - + @@ -17294,10 +17294,10 @@ - + - + @@ -17319,10 +17319,10 @@ - + - + @@ -17333,10 +17333,10 @@ - + - + @@ -17348,10 +17348,10 @@ - + - + @@ -17419,7 +17419,7 @@ - + @@ -17461,7 +17461,7 @@ - + @@ -17526,10 +17526,10 @@ - + - + @@ -17551,10 +17551,10 @@ - + - + @@ -17580,10 +17580,10 @@ - + - + @@ -17605,10 +17605,10 @@ - + - + @@ -17638,10 +17638,10 @@ - + - + @@ -17663,10 +17663,10 @@ - + - + @@ -17692,10 +17692,10 @@ - + - + @@ -17717,10 +17717,10 @@ - + - + @@ -17760,7 +17760,7 @@ - + @@ -17771,7 +17771,7 @@ - + @@ -17789,7 +17789,7 @@ - + @@ -17814,7 +17814,7 @@ - + @@ -17838,7 +17838,7 @@ - + @@ -17863,7 +17863,7 @@ - + @@ -17886,10 +17886,10 @@ - + - + @@ -17897,10 +17897,10 @@ - + - + @@ -17922,10 +17922,10 @@ - + - + @@ -17967,10 +17967,10 @@ - + - + @@ -18016,10 +18016,10 @@ - + - + @@ -18034,10 +18034,10 @@ - + - + @@ -18045,10 +18045,10 @@ - + - + @@ -18056,10 +18056,10 @@ - + - + @@ -18081,10 +18081,10 @@ - + - + @@ -18106,10 +18106,10 @@ - + - + @@ -18124,10 +18124,10 @@ - + - + @@ -18135,10 +18135,10 @@ - + - + @@ -18146,10 +18146,10 @@ - + - + @@ -18171,10 +18171,10 @@ - + - + @@ -18187,10 +18187,10 @@ - + - + @@ -18212,10 +18212,10 @@ - + - + @@ -18237,10 +18237,10 @@ - + - + @@ -18256,10 +18256,10 @@ - + - + @@ -18281,10 +18281,10 @@ - + - + @@ -18292,10 +18292,10 @@ - + - + @@ -18311,10 +18311,10 @@ - + - + @@ -18327,30 +18327,30 @@ - + - + - + - + - + - + @@ -18418,7 +18418,7 @@ - + @@ -18454,7 +18454,7 @@ - + @@ -18520,7 +18520,7 @@ - + @@ -18572,10 +18572,10 @@ - + - + @@ -18583,10 +18583,10 @@ - + - + @@ -18596,10 +18596,10 @@ - + - + @@ -18609,10 +18609,10 @@ - + - + @@ -18632,10 +18632,10 @@ - + - + @@ -18647,10 +18647,10 @@ - + - + @@ -18661,10 +18661,10 @@ - + - + @@ -18676,10 +18676,10 @@ - + - + @@ -18695,10 +18695,10 @@ - + - + @@ -18720,10 +18720,10 @@ - + - + @@ -18745,10 +18745,10 @@ - + - + @@ -18783,10 +18783,10 @@ - + - + @@ -18801,10 +18801,10 @@ - + - + @@ -18814,10 +18814,10 @@ - + - + @@ -18842,7 +18842,7 @@ - + @@ -18861,10 +18861,10 @@ - + - + @@ -18892,7 +18892,7 @@ - + @@ -18914,7 +18914,7 @@ - + @@ -18968,7 +18968,7 @@ - + @@ -19010,7 +19010,7 @@ - + @@ -19059,7 +19059,7 @@ - + @@ -19083,7 +19083,7 @@ - + @@ -19110,7 +19110,7 @@ - + @@ -19122,7 +19122,7 @@ - + @@ -19157,7 +19157,7 @@ - + @@ -19218,7 +19218,7 @@ - + @@ -19253,7 +19253,7 @@ - + @@ -19276,7 +19276,7 @@ - + @@ -19333,7 +19333,7 @@ - + @@ -19343,7 +19343,7 @@ - + @@ -19366,7 +19366,7 @@ - + @@ -19438,7 +19438,7 @@ - + @@ -19468,7 +19468,7 @@ - + @@ -19513,7 +19513,7 @@ - + @@ -19530,7 +19530,7 @@ - + @@ -19562,7 +19562,7 @@ - + @@ -19786,7 +19786,7 @@ - + @@ -19920,8 +19920,8 @@ - - + + @@ -20087,8 +20087,8 @@ - - + + diff --git a/vars.xml b/vars.xml index 7b41385..5b29518 100644 --- a/vars.xml +++ b/vars.xml @@ -1,8 +1,8 @@ - + - false + true true asdasjjjjj pt_uint8 @@ -3589,35 +3589,47 @@ false false + + true + true + project.cds_tk.count_elements_pbus + pt_uint16 + t_iq_none + t_iq_none + UInt16 + Src/myXilinx/xp_project.c + false + false + Src/myXilinx/RS_Functions_modbus.h - Src/VectorControl/dq_to_alphabeta_cos.h - Src/main/errors.h - Src/main/v_pwm24.h - Src/main/vector.h Src/myXilinx/xp_project.h Src/myXilinx/xp_write_xpwm_time.h - Src/VectorControl/pwm_vector_regul.h + Src/VectorControl/teta_calc.h + Src/main/vector.h + Src/main/v_pwm24.h + Src/main/errors.h + Src/VectorControl/dq_to_alphabeta_cos.h Src/myLibs/log_can.h Src/main/f281xpwm.h + Src/VectorControl/pwm_vector_regul.h Src/main/adc_tools.h Src/main/rotation_speed.h - Src/VectorControl/teta_calc.h Src/myXilinx/RS_Functions.h - Src/myLibs/detect_phase_break2.h - Src/myLibs/svgen_dq.h - Src/myXilinx/xp_rotation_sensor.h - Src/myXilinx/Spartan2E_Functions.h - Src/myXilinx/xPeriphSP6_loader.h Src/myXilinx/xp_controller.h + Src/myXilinx/xPeriphSP6_loader.h + Src/myXilinx/xp_rotation_sensor.h Src/myXilinx/x_serial_bus.h + Src/myXilinx/Spartan2E_Functions.h Src/myXilinx/x_parallel_bus.h - Src/myLibs/log_params.h + Src/myLibs/svgen_dq.h + Src/myLibs/detect_phase_break2.h Src/myLibs/log_to_memory.h - Src/main/global_time.h Src/myXilinx/CRC_Functions.h + Src/main/global_time.h Src/myLibs/CAN_Setup.h + Src/myLibs/log_params.h Src/myLibs/pid_reg3.h Src/myLibs/IQmathLib.h Src/main/doors_control.h