Remove SPI_COM_FAIL error, add spi_error_rate_ to protocol

This commit is contained in:
Paul Guenette
2019-05-25 21:22:07 +02:00
parent 73fbd0d54d
commit 0c270eaa61
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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),