► Improved controller: faster and better overall

- the controller is faster and more light in memory footprint
- motor control is now done intependenly using Reusable code generation setting in Simulink
- fixed bug when chaging direction fast
This commit is contained in:
EmanuelFeru
2019-06-05 22:39:30 +02:00
parent 19e4115d06
commit fe4bd76d7e
339 changed files with 30978 additions and 148177 deletions

View File

@@ -2,73 +2,21 @@ function CodeMetrics() {
this.metricsArray = {};
this.metricsArray.var = new Array();
this.metricsArray.fcn = new Array();
this.metricsArray.var["rtDW"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
size: 87};
this.metricsArray.var["rtP"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller_data.c",
size: 87};
this.metricsArray.var["rtPrevZCX"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
size: 2};
this.metricsArray.var["rtU"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
size: 14};
this.metricsArray.var["rtY"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
size: 40};
this.metricsArray.fcn["BLDC_controller.c:Edge_counter"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 2,
stackTotal: 2};
this.metricsArray.fcn["BLDC_controller.c:Edge_counter_Disable"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
this.metricsArray.fcn["BLDC_controller_initialize"] = {file: "D:\\git\\hoverboard-firmware-hack\\01_Matlab\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 8,
stackTotal: 8};
this.metricsArray.fcn["BLDC_controller_step"] = {file: "D:\\git\\hoverboard-firmware-hack\\01_Matlab\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 60,
stackTotal: 69};
this.metricsArray.fcn["div_nde_s32_floor"] = {file: "D:\\git\\hoverboard-firmware-hack\\01_Matlab\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 0,
stackTotal: 0};
this.metricsArray.fcn["BLDC_controller.c:Edge_counter_Reset"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 0,
stackTotal: 0};
this.metricsArray.fcn["BLDC_controller.c:F01_03_Direction_Detection"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 1,
stackTotal: 1};
this.metricsArray.fcn["BLDC_controller.c:F02_Electrical_Angle_Ca_Disable"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 0,
stackTotal: 0};
this.metricsArray.fcn["BLDC_controller.c:F02_Electrical_Angle_Calculatio"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 11,
stackTotal: 20};
this.metricsArray.fcn["BLDC_controller.c:F03_01_Pure_Trapezoidal_Method"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 5,
stackTotal: 14};
this.metricsArray.fcn["BLDC_controller.c:F03_02_Sinusoidal3rd_Method"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 5,
stackTotal: 14};
this.metricsArray.fcn["BLDC_controller.c:F03_02_Sinusoidal_Method"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 5,
stackTotal: 14};
this.metricsArray.fcn["BLDC_controller.c:Motor_Speed_Calculation"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
this.metricsArray.fcn["intrp1d_s16s32s32u8u32n31l_s"] = {file: "D:\\git\\hoverboard-firmware-hack\\01_Matlab\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 4,
stackTotal: 4};
this.metricsArray.fcn["BLDC_controller.c:div_nde_s32_floor"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 0,
stackTotal: 0};
this.metricsArray.fcn["BLDC_controller.c:falling_edge2"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 0,
stackTotal: 0};
this.metricsArray.fcn["BLDC_controller.c:falling_edge2_b"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 0,
stackTotal: 0};
this.metricsArray.fcn["BLDC_controller.c:intrp1d_s16s32s32u8u32n31l_s"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 4,
stackTotal: 4};
this.metricsArray.fcn["BLDC_controller.c:plook_u8s32u32n31_evenc_s"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
this.metricsArray.fcn["plook_u8s32u32n31_evenc_s"] = {file: "D:\\git\\hoverboard-firmware-hack\\01_Matlab\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 9,
stackTotal: 9};
this.metricsArray.fcn["BLDC_controller.c:rising_edge"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 0,
stackTotal: 0};
this.metricsArray.fcn["BLDC_controller.c:rising_edge_f"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 0,
stackTotal: 0};
this.metricsArray.fcn["BLDC_controller_initialize"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 0,
stackTotal: 0};
this.metricsArray.fcn["BLDC_controller_step"] = {file: "D:\\Work_home\\01_Motor_control\\BLDC_controller_ert_rtw\\BLDC_controller.c",
stack: 27,
stackTotal: 47};
this.getMetrics = function(token) {
var data;
data = this.metricsArray.var[token];
@@ -79,6 +27,6 @@ function CodeMetrics() {
data.type = "var";
}
return data; };
this.codeMetricsSummary = '<a href="BLDC_controller_metrics.html">Global Memory: 230(bytes) Maximum Stack: 27(bytes)</a>';
this.codeMetricsSummary = '<a href="BLDC_controller_metrics.html">Global Memory: 0(bytes) Maximum Stack: 60(bytes)</a>';
}
CodeMetrics.instance = new CodeMetrics();