mirror of
https://github.com/scottbez1/smartknob.git
synced 2025-09-26 23:09:27 +08:00
fix compile errors for SimpleFOC 2.3.1
This commit is contained in:
parent
dafc5ca1e2
commit
239cd71dcb
@ -79,7 +79,9 @@ void MotorTask::run() {
|
||||
|
||||
PB_PersistentConfiguration c = configuration_.get();
|
||||
motor.pole_pairs = c.motor.calibrated ? c.motor.pole_pairs : 7;
|
||||
motor.initFOC(c.motor.zero_electrical_offset, c.motor.direction_cw ? Direction::CW : Direction::CCW);
|
||||
motor.zero_electric_angle = c.motor.zero_electrical_offset;
|
||||
motor.sensor_direction = c.motor.direction_cw ? Direction::CW : Direction::CCW;
|
||||
motor.initFOC();
|
||||
|
||||
motor.monitor_downsample = 0; // disable monitor at first - optional
|
||||
|
||||
@ -354,7 +356,9 @@ void MotorTask::calibrate() {
|
||||
|
||||
motor.controller = MotionControlType::angle_openloop;
|
||||
motor.pole_pairs = 1;
|
||||
motor.initFOC(0, Direction::CW);
|
||||
motor.zero_electric_angle = 0;
|
||||
motor.sensor_direction = Direction::CW;
|
||||
motor.initFOC();
|
||||
|
||||
float a = 0;
|
||||
|
||||
@ -397,10 +401,14 @@ void MotorTask::calibrate() {
|
||||
log("Sensor measures positive for positive motor rotation:");
|
||||
if (end_sensor > start_sensor) {
|
||||
log("YES, Direction=CW");
|
||||
motor.initFOC(0, Direction::CW);
|
||||
motor.zero_electric_angle = 0;
|
||||
motor.sensor_direction = Direction::CW;
|
||||
motor.initFOC();
|
||||
} else {
|
||||
log("NO, Direction=CCW");
|
||||
motor.initFOC(0, Direction::CCW);
|
||||
motor.zero_electric_angle = 0;
|
||||
motor.sensor_direction = Direction::CCW;
|
||||
motor.initFOC();
|
||||
}
|
||||
snprintf(buf_, sizeof(buf_), " (start was %.1f, end was %.1f)", start_sensor, end_sensor);
|
||||
log(buf_);
|
||||
|
@ -17,7 +17,7 @@ test_dir = firmware/test
|
||||
data_dir = firmware/data
|
||||
|
||||
[base_config]
|
||||
platform = espressif32@3.4
|
||||
platform = espressif32@6.4.0
|
||||
framework = arduino
|
||||
monitor_speed = 921600
|
||||
monitor_flags =
|
||||
@ -43,7 +43,7 @@ board = esp32doit-devkit-v1
|
||||
board_build.partitions = default_ffat.csv
|
||||
lib_deps =
|
||||
${base_config.lib_deps}
|
||||
askuric/Simple FOC @ 2.2.0
|
||||
askuric/Simple FOC @ 2.3.1
|
||||
bodmer/TFT_eSPI@2.4.25
|
||||
fastled/FastLED @ 3.5.0
|
||||
bogde/HX711 @ 0.7.5
|
||||
@ -134,7 +134,7 @@ board = adafruit_feather_esp32s3
|
||||
board_build.partitions = firmware/partitions-4MB-fat.csv
|
||||
lib_deps =
|
||||
${base_config.lib_deps}
|
||||
askuric/Simple FOC@2.3.0
|
||||
askuric/Simple FOC@2.3.1
|
||||
bodmer/TFT_eSPI@2.5.0
|
||||
|
||||
build_flags =
|
||||
|
Loading…
Reference in New Issue
Block a user