added OUt combi with all 3 Phases active

This commit is contained in:
2025-02-11 22:31:10 +01:00
parent d08903bcbe
commit d2f38fa7d7
3 changed files with 25 additions and 15 deletions

View File

@@ -18,6 +18,7 @@ typedef enum {
OUT_U,
OUT_V,
OUT_W,
OUT_UVW,
COMBI_COUNT
}OutCombis;

View File

@@ -363,6 +363,10 @@ void configure_mcpwm_output(OutCombis out_combi) {
phase_configurations[1].state = OFF;
phase_configurations[2].state = Highside;
break;
case OUT_UVW:
phase_configurations[0].state = Highside;
phase_configurations[1].state = Highside;
phase_configurations[2].state = Highside;
default:
break;
}

View File

@@ -121,6 +121,7 @@ const char *mode_names[] = {
" +U ",
" +V ",
" +W ",
"+U+V+W",
"ERROR "
};
@@ -135,7 +136,7 @@ const char *state_names[] = {
"Active ",
"Deaktive ",
"UV ",
"RFE set(OC)"
"RFE (OC) "
};
@@ -180,7 +181,11 @@ static void check_button_pressed(){
enc_in_counter=0;
break;
case 4:
if (current_mode==DC_BRUSHED_MODE){
current_out_combi =(current_out_combi+1)%10;
}else{
current_out_combi =(current_out_combi+1)%6;
}
stop_mcpwm_output();
configure_mcpwm_output(current_out_combi);
ShouldState = false;