mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-20 22:55:00 +08:00
Remove SPI_COM_FAIL error, add spi_error_rate_ to protocol
This commit is contained in:
@@ -445,8 +445,8 @@ bool Encoder::update() {
|
||||
if(abs_spi_pos_updated_ == false && abs_spi_pos_init_once_){
|
||||
// Low pass filter the error
|
||||
spi_error_rate_ += current_meas_period * (1.0f - spi_error_rate_);
|
||||
if (spi_error_rate_ > 0.005f)
|
||||
set_error(ERROR_ABS_SPI_COM_FAIL);
|
||||
// if (spi_error_rate_ > 0.005f)
|
||||
// set_error(ERROR_ABS_SPI_COM_FAIL);
|
||||
}
|
||||
else
|
||||
// Low pass filter the error
|
||||
|
||||
@@ -133,8 +133,8 @@ public:
|
||||
make_protocol_ro_property("vel_estimate", &vel_estimate_),
|
||||
make_protocol_ro_property("calib_scan_response", &calib_scan_response_),
|
||||
make_protocol_property("pos_abs", &pos_abs_),
|
||||
// make_protocol_property("pll_kp", &pll_kp_),
|
||||
// make_protocol_property("pll_ki", &pll_ki_),
|
||||
make_protocol_ro_property("spi_error_rate", &spi_error_rate_),
|
||||
|
||||
make_protocol_object("config",
|
||||
make_protocol_property("mode", &config_.mode,
|
||||
[](void* ctx) { static_cast<Encoder*>(ctx)->abs_spi_init(); }, this),
|
||||
|
||||
Reference in New Issue
Block a user