This commit is contained in:
Alvin-lyq 2026-04-29 16:09:28 +08:00
parent bd147b7b58
commit 9a3cbcb963
2 changed files with 3 additions and 2 deletions

View File

@ -84,8 +84,8 @@ void AGPbox::init_pbox_node()
bindUdp();
}
// 创建定时器(在串口/UDP打开之后
timer_ = this->create_wall_timer(1ms, std::bind(&AGPbox::timer_callback, this));
// 创建定时器(在串口/UDP打开之后使用10ms周期避免过快读取
timer_ = this->create_wall_timer(10ms, std::bind(&AGPbox::timer_callback, this));
}
void AGPbox::timer_callback()

View File

@ -158,6 +158,7 @@ bool ProtocolAsensing::registProtocol(const std::string &protocolFlag , int leng
protocolLengthMap.insert(std::pair<std::string, int>(protocolFlag, length));
protocolMap.insert(std::pair<std::string, ProtocolAsensing*>(protocolFlag, sub));
//TinyLog::info("regist protocol:%s length: %d\n" , protocolFlag.c_str() , length);
return true;
}
void ProtocolAsensing::toQuaternion(double* rpy , double* quaterArray)
{