Skip to content

Commit

Permalink
Use old send_cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-EEE committed Dec 10, 2023
1 parent cf1a447 commit 1b93263
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libraries/RPLidar/src/RPLidar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,12 @@ namespace rplidar {
*/
void RPLidar::_send_cmd(uint8_t cmd)
{
uint8_t msg[] = {SYNC_BYTE, cmd};
this->_serial->write(msg, sizeof(msg));
std::string req;
req += static_cast<uint8_t>(SYNC_BYTE);
req += static_cast<uint8_t>(cmd);

this->_serial->write(req);
spdlog::debug("Command sent: {}", spdlog::to_hex(req));
}

/**
Expand Down

0 comments on commit 1b93263

Please sign in to comment.