mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-08-18 01:18:52 +08:00
add option to force precalib setting to bypass check
This commit is contained in:
@@ -127,6 +127,8 @@ void Encoder::update_pll_gains() {
|
||||
}
|
||||
|
||||
void Encoder::check_pre_calibrated() {
|
||||
if (config_.override_precal_check)
|
||||
return;
|
||||
// TODO: restoring config from python backup is fragile here (ACIM motor type must be set first)
|
||||
if (axis_->motor_.config_.motor_type != Motor::MOTOR_TYPE_ACIM) {
|
||||
if (!is_ready_)
|
||||
|
||||
@@ -27,6 +27,7 @@ public:
|
||||
int32_t cpr = (2048 * 4); // Default resolution of CUI-AMT102 encoder,
|
||||
float index_offset = 0.0f;
|
||||
bool use_index = false;
|
||||
bool override_precal_check = false; // If true, apply pre_calibrated unconditionally
|
||||
bool pre_calibrated = false; // If true, this means the offset stored in
|
||||
// configuration is valid and does not need
|
||||
// be determined by run_offset_calibration.
|
||||
|
||||
@@ -1088,6 +1088,7 @@ interfaces:
|
||||
phase_offset: int32
|
||||
phase_offset_float: float32
|
||||
direction: int32
|
||||
override_precal_check: bool
|
||||
pre_calibrated: {type: bool, c_setter: set_pre_calibrated}
|
||||
enable_phase_interpolation: bool
|
||||
bandwidth: {type: float32, c_setter: set_bandwidth}
|
||||
|
||||
Reference in New Issue
Block a user