forked from lucysrausch/hoverboard-firmware-hack
► Added speed threshold to enable Phase Advance
- Phase Advance is enabled only when Motor Speed > n_motPhaAdvEna (400 rpm). This prevents that during a kick-down (100% duty cycle) the Phase advance kicks in even though we are running at low speed. - This update improves the acceleration response - no impact on code execution time
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
*
|
||||
* Code generated for Simulink model 'BLDC_controller'.
|
||||
*
|
||||
* Model version : 1.879
|
||||
* Model version : 1.883
|
||||
* Simulink Coder version : 8.13 (R2017b) 24-Jul-2017
|
||||
* C/C++ source code generated on : Thu Jun 6 17:49:29 2019
|
||||
* C/C++ source code generated on : Tue Jun 11 21:14:57 2019
|
||||
*
|
||||
* Target selection: ert.tlc
|
||||
* Embedded hardware selection: ARM Compatible->ARM Cortex
|
||||
@@ -146,6 +146,9 @@ struct P_ {
|
||||
int32_T n_commDeacvHi; /* Variable: n_commDeacvHi
|
||||
* Referenced by: '<S14>/n_commDeacv'
|
||||
*/
|
||||
int32_T n_motPhaAdvEna; /* Variable: n_motPhaAdvEna
|
||||
* Referenced by: '<S8>/n_motPhaAdvEna'
|
||||
*/
|
||||
int32_T r_commDCDeacv; /* Variable: r_commDCDeacv
|
||||
* Referenced by: '<S14>/r_commDCDeacv'
|
||||
*/
|
||||
@@ -161,6 +164,14 @@ struct P_ {
|
||||
int16_T dz_counterLo; /* Variable: dz_counterLo
|
||||
* Referenced by: '<S14>/dz_counter'
|
||||
*/
|
||||
int16_T z_maxCntRst; /* Variable: z_maxCntRst
|
||||
* Referenced by:
|
||||
* '<S15>/z_counter'
|
||||
* '<S15>/z_counter2'
|
||||
* '<S16>/z_maxCntRst'
|
||||
* '<S17>/Constant1'
|
||||
* '<S17>/UnitDelay1'
|
||||
*/
|
||||
uint8_T z_ctrlTypSel; /* Variable: z_ctrlTypSel
|
||||
* Referenced by: '<S7>/z_ctrlTypSel1'
|
||||
*/
|
||||
|
Reference in New Issue
Block a user