Ver1.4 && variable size output && function modify
This commit is contained in:
parent
8f9dc89b9a
commit
8abd1f3cff
@ -16,10 +16,10 @@ void solve_types(void);
|
||||
// 记录布局解析(标定量使用)
|
||||
void solve_record_layout(void);
|
||||
|
||||
// 处理中间件
|
||||
void solve_middleware(void);
|
||||
// 处理标定量和观测量
|
||||
void solve_calibrations_and_measurements(void);
|
||||
|
||||
// 处理最终A2L输出
|
||||
void solve_A2L_output(void);
|
||||
// 处理最终A2L合并输出
|
||||
void solve_A2L_merge(void);
|
||||
|
||||
#endif
|
@ -930,8 +930,8 @@ void solve_record_layout(void)
|
||||
}
|
||||
}
|
||||
|
||||
// 处理中间件
|
||||
void solve_middleware(void)
|
||||
// 处理标定量和观测量
|
||||
void solve_calibrations_and_measurements(void)
|
||||
{
|
||||
// 抬头输出
|
||||
bool head_output = false;
|
||||
@ -1010,8 +1010,8 @@ void solve_middleware(void)
|
||||
fprintf(output_middleware_file, "\r\n\r\n%s\r\n\r\n", END_OF_GENERATED_CALIBRATION_AND_MEASURMENT_STR);
|
||||
}
|
||||
|
||||
// 处理最终A2L输出
|
||||
void solve_A2L_output(void)
|
||||
// 处理最终A2L合并输出
|
||||
void solve_A2L_merge(void)
|
||||
{
|
||||
// 回到文件起始
|
||||
fseek(input_reference_A2L_file, 0, SEEK_SET);
|
||||
|
23
Src/Main.cpp
23
Src/Main.cpp
@ -14,7 +14,7 @@ extern "C"
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
printf("\n\n");
|
||||
log_printf(LOG_SYS_INFO, "SrcToA2L Ver1.3");
|
||||
log_printf(LOG_SYS_INFO, "SrcToA2L Ver1.4");
|
||||
log_printf(LOG_SYS_INFO, "Auther: LuChiChick");
|
||||
log_printf(LOG_SYS_INFO, "%s\n%s\n%s\n\n", "Open source links:",
|
||||
" ├─Github: https://git.luchichick.cn/LuChiChick/SrcToA2L",
|
||||
@ -35,22 +35,25 @@ int main(int argc, char *argv[])
|
||||
log_printf(LOG_SYS_INFO, "Start compound type definition solve.\n\n");
|
||||
solve_types();
|
||||
|
||||
// 处理记录布局
|
||||
printf("\n\n");
|
||||
log_printf(LOG_SYS_INFO, "Start record layout solve.\n\n");
|
||||
solve_record_layout();
|
||||
// 中间件处理
|
||||
{
|
||||
// 处理记录布局
|
||||
printf("\n\n");
|
||||
log_printf(LOG_SYS_INFO, "Start record layout solve.\n\n");
|
||||
solve_record_layout();
|
||||
|
||||
// 处理中间件
|
||||
printf("\n\n");
|
||||
log_printf(LOG_SYS_INFO, "Start calibration and measurement solve.\n\n");
|
||||
solve_middleware();
|
||||
// 处理标定量和观测量
|
||||
printf("\n\n");
|
||||
log_printf(LOG_SYS_INFO, "Start calibrations and measurements solve.\n\n");
|
||||
solve_calibrations_and_measurements();
|
||||
}
|
||||
|
||||
// 处理最终输出
|
||||
if (input_reference_A2L_file != nullptr)
|
||||
{
|
||||
printf("\n\n");
|
||||
log_printf(LOG_SYS_INFO, "Start merging middleware into reference A2L file.\n\n");
|
||||
solve_A2L_output();
|
||||
solve_A2L_merge();
|
||||
}
|
||||
|
||||
log_printf(LOG_SYS_INFO, "Done.");
|
||||
|
@ -729,9 +729,9 @@ void f_print_calibration(FILE *file, variable_info v_info)
|
||||
if (start_addr_32 != 0 || input_map_file == nullptr)
|
||||
{
|
||||
if (v_info.element_count > 1)
|
||||
log_printf(v_info.type == TYPE_UNKNOWN ? LOG_FAILURE : LOG_SUCCESS, "%-15s %-15s 0x%08X %s[%d]", "Calibration", type_str[v_info.type], start_addr_32, v_info.name_str, v_info.element_count);
|
||||
log_printf(v_info.type == TYPE_UNKNOWN ? LOG_FAILURE : LOG_SUCCESS, "%-15s %-15s 0x%08X+%08X %s[%d]", "Calibration", type_str[v_info.type], start_addr_32, addr_offset, v_info.name_str, v_info.element_count);
|
||||
else
|
||||
log_printf(v_info.type == TYPE_UNKNOWN ? LOG_FAILURE : LOG_SUCCESS, "%-15s %-15s 0x%08X %s", "Calibration", type_str[v_info.type], start_addr_32, v_info.name_str);
|
||||
log_printf(v_info.type == TYPE_UNKNOWN ? LOG_FAILURE : LOG_SUCCESS, "%-15s %-15s 0x%08X+%08X %s", "Calibration", type_str[v_info.type], start_addr_32, addr_offset, v_info.name_str);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -914,16 +914,16 @@ void f_print_measurement(FILE *file, variable_info v_info)
|
||||
if (start_addr_32 != 0 || input_map_file == nullptr)
|
||||
{
|
||||
if (v_info.element_count > 1)
|
||||
log_printf(v_info.type == TYPE_UNKNOWN ? LOG_FAILURE : LOG_SUCCESS, "%-15s %-15s 0x%08X %s[%d]", "Measurement", type_str[v_info.type], start_addr_32, v_info.name_str, v_info.element_count);
|
||||
log_printf(v_info.type == TYPE_UNKNOWN ? LOG_FAILURE : LOG_SUCCESS, "%-15s %-15s 0x%08X+%08X %s[%d]", "Measurement", type_str[v_info.type], start_addr_32, addr_offset, v_info.name_str, v_info.element_count);
|
||||
else
|
||||
log_printf(v_info.type == TYPE_UNKNOWN ? LOG_FAILURE : LOG_SUCCESS, "%-15s %-15s 0x%08X %s", "Measurement", type_str[v_info.type], start_addr_32, v_info.name_str);
|
||||
log_printf(v_info.type == TYPE_UNKNOWN ? LOG_FAILURE : LOG_SUCCESS, "%-15s %-15s 0x%08X+%08X %s", "Measurement", type_str[v_info.type], start_addr_32, addr_offset, v_info.name_str);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (v_info.element_count > 1)
|
||||
log_printf(v_info.type == TYPE_UNKNOWN ? LOG_FAILURE : LOG_WARN, "%-15s %-15s 0x%08X %s[%d]", "Measurement", type_str[v_info.type], start_addr_32, v_info.name_str, v_info.element_count);
|
||||
log_printf(v_info.type == TYPE_UNKNOWN ? LOG_FAILURE : LOG_WARN, "%-15s %-15s 0x%08X+%08X %s[%d]", "Measurement", type_str[v_info.type], start_addr_32, addr_offset, v_info.name_str, v_info.element_count);
|
||||
else
|
||||
log_printf(v_info.type == TYPE_UNKNOWN ? LOG_FAILURE : LOG_WARN, "%-15s %-15s 0x%08X %s", "Measurement", type_str[v_info.type], start_addr_32, v_info.name_str);
|
||||
log_printf(v_info.type == TYPE_UNKNOWN ? LOG_FAILURE : LOG_WARN, "%-15s %-15s 0x%08X+%08X %s", "Measurement", type_str[v_info.type], start_addr_32, addr_offset, v_info.name_str);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user