Skip to content

Commit 11dcf72

Browse files
authored
Merge pull request #5 from esp-cpp/feature/bldc-driver-update
Feature/bldc driver update
2 parents 08aa581 + 8ffb38f commit 11dcf72

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

components/espp

Submodule espp updated 130 files

main/main.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,11 @@ extern "C" void app_main(void) {
108108
5.0f, // tested by running velocity_openloop and seeing if the veloicty is ~correct
109109
.kv_rating =
110110
320, // tested by running velocity_openloop and seeing if the velocity is ~correct
111-
.current_limit = 1.0f, // Amps
112-
.zero_electric_offset = 2.3914752, // gotten from previously running without providing this
111+
.current_limit = 1.0f, // Amps
112+
.zero_electric_offset = 0.0f, // set to zero to always calibrate
113113
// and it will be logged.
114-
.sensor_direction = espp::detail::SensorDirection::COUNTER_CLOCKWISE,
114+
.sensor_direction =
115+
espp::detail::SensorDirection::UNKNOWN, // set to unknown to always calibrate
115116
.foc_type = espp::detail::FocType::SPACE_VECTOR_PWM,
116117
.driver = driver,
117118
.sensor = mt6701,
@@ -135,7 +136,7 @@ extern "C" void app_main(void) {
135136
.output_min = -20.0, // angle pid works on velocity (rad/s)
136137
.output_max = 20.0, // angle pid works on velocity (rad/s)
137138
},
138-
.log_level = espp::Logger::Verbosity::WARN});
139+
.log_level = espp::Logger::Verbosity::INFO});
139140

140141
using BldcHaptics = espp::BldcHaptics<BldcMotor>;
141142

0 commit comments

Comments
 (0)