Skip to content

Commit fe7ff53

Browse files
committed
fixed some modbus bugs
1 parent b9d4fca commit fe7ff53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/comm/src/maix_modbus.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ Slave::~Slave()
293293
::maix::err::Err Slave::__receive__()
294294
{
295295
this->rc_ = ::modbus_receive(this->ctx_.get(), this->query_);
296-
if (this->rc_ >= 0) {
296+
if (this->rc_ > 0) {
297297
if (this->debug_) {
298298
log::info("%s receive, len: %d", this->TAG().c_str(), this->rc_);
299299
}

0 commit comments

Comments
 (0)