Implemented HOVERCAR variant

Major:
- created HOVERCAR variant (selectable via platformio.ini) for driving via 2 pedals: Brake (on cmd1) and Throttle (on cmd2)
- implemented "Double tapping" on Brake pedal to engage Reverse driving
- implemented that Brake pedal stops the vehicle but does not go to Reverse, to prevend unintended Reverse driving
- implemented ADC Protection when GND and Vcc wire are disconnected. The functionality can be enabled/disabled via #define ADC_PROTECT_ENA
- updated error handling: in case of major error the motors will be disabled for improved safety

Minor:
- fixed bug on low-pass filter for not reaching exact "0" value
- calibrated the ADC Battery voltage reading
- other minor visual updates
This commit is contained in:
EmanuelFeru
2019-12-31 13:35:01 +01:00
parent 183776ceb2
commit b4b23bbe9b
22 changed files with 389 additions and 193 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 KiB

View File

@@ -89,9 +89,9 @@ cf_currFilt = 0.12; % [%] Current filter coefficient [0, 1]. Lower v
%% F02_Diagnostics
b_diagEna = 1; % [-] Diagnostics enable flag: 0 = Disabled, 1 = Enabled (default)
t_errQual = 0.6 * f_ctrl/3; % [s] Error qualification time
t_errDequal = 2.0 * f_ctrl/3; % [s] Error dequalification time
r_errInpTgtThres = 400; % [-] Error input target threshold (for "Blocked motor" detection)
t_errQual = 0.24 * f_ctrl/3; % [s] Error qualification time
t_errDequal = 1.80 * f_ctrl/3; % [s] Error dequalification time
r_errInpTgtThres = 600; % [-] Error input target threshold (for "Blocked motor" detection)
%% F03_Control_Mode_Manager
dV_openRate = 1000 / (f_ctrl/3);% [V/s] Rate for voltage cut-off in Open Mode (Sample Time included in the rate)