mirror of https://github.com/rusefi/bldc.git
Added hall sensor interpolation ERPM config option
This commit is contained in:
parent
1989a27994
commit
af7cd36cb8
|
@ -19,6 +19,7 @@
|
|||
* Added locking time and ramp up time parameters to sensorless startup.
|
||||
* Removed D axis current injection.
|
||||
* Initial VESC IO-board support
|
||||
* Added hall sensor interpolation ERPM config option.
|
||||
|
||||
=== FW 5.01 ===
|
||||
* Fixed PPM bug in previous release.
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#define FW_VERSION_MAJOR 5
|
||||
#define FW_VERSION_MINOR 02
|
||||
// Set to 0 for building a release and iterate during beta test builds
|
||||
#define FW_TEST_VERSION_NUMBER 10
|
||||
#define FW_TEST_VERSION_NUMBER 12
|
||||
|
||||
#include "datatypes.h"
|
||||
|
||||
|
|
|
@ -3991,7 +3991,8 @@ static float correct_hall(float angle, float dt, volatile motor_all_state_t *mot
|
|||
motor->m_ang_hall_int_prev = ang_hall_int;
|
||||
|
||||
if (((60.0 / (2.0 * M_PI)) * ((M_PI / 3.0) /
|
||||
fmaxf(fabsf(motor->m_hall_dt_diff_now), fabsf(motor->m_hall_dt_diff_last)))) < 100) {
|
||||
fmaxf(fabsf(motor->m_hall_dt_diff_now),
|
||||
fabsf(motor->m_hall_dt_diff_last)))) < conf_now->foc_hall_interp_erpm) {
|
||||
// Don't interpolate on very low speed, just use the closest hall sensor. The reason is that we might
|
||||
// get stuck at 60 degrees off if a direction change happens between two steps.
|
||||
motor->m_ang_hall = ang_hall_now;
|
||||
|
|
3
utils.c
3
utils.c
|
@ -767,7 +767,8 @@ uint8_t utils_second_motor_id(void) {
|
|||
* Use hall sensor port for second motor on dual motor hardware.
|
||||
*
|
||||
* @param samples
|
||||
* The number of samples to read and filter over.
|
||||
* The number of extra samples to read and filter over. If this
|
||||
* is 0, only one sample will be used.
|
||||
*
|
||||
* @return
|
||||
* The state of the three hall sensors.
|
||||
|
|
Loading…
Reference in New Issue