refactor: use dynamic port detection for Kobuki communication setup

This commit is contained in:
ishak jmilou.ishak
2025-01-21 12:26:41 +01:00
parent b20b9b693a
commit c74b9a8758

View File

@@ -37,8 +37,9 @@ std::string findKobukiPort()
void setup()
{
std::string port = findKobukiPort();
unsigned char *null_ptr(0);
robot.startCommunication("/dev/ttyUSB0", true, null_ptr);
robot.startCommunication((port.c_str()), true, null_ptr);
// connect mqtt server and sub to commands
client.connect();
client.subscribe("home/commands");