added OUt combi with all 3 Phases active
This commit is contained in:
@@ -18,6 +18,7 @@ typedef enum {
|
||||
OUT_U,
|
||||
OUT_V,
|
||||
OUT_W,
|
||||
OUT_UVW,
|
||||
COMBI_COUNT
|
||||
}OutCombis;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
21
main/menu.c
21
main/menu.c
@@ -112,16 +112,17 @@ const char *mode_names[] = {
|
||||
};
|
||||
|
||||
const char *OutCombi_names[]= {
|
||||
"+U -V",
|
||||
"+U -W",
|
||||
"+V -W",
|
||||
"+V -U",
|
||||
"+W -U",
|
||||
"+W -V",
|
||||
"+U -V ",
|
||||
"+U -W ",
|
||||
"+V -W ",
|
||||
"+V -U ",
|
||||
"+W -U ",
|
||||
"+W -V ",
|
||||
" +U ",
|
||||
" +V ",
|
||||
" +W ",
|
||||
"ERROR"
|
||||
"+U+V+W",
|
||||
"ERROR "
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user