|
@@ -27,13 +27,13 @@ void show_direction() {
|
|
int main(int argc, char** argv)
|
|
int main(int argc, char** argv)
|
|
{
|
|
{
|
|
|
|
|
|
- string imu_dev = "com1";
|
|
|
|
|
|
+ string imu_dev = "/dev/mini_imu";
|
|
int order = 0;
|
|
int order = 0;
|
|
string input;
|
|
string input;
|
|
|
|
|
|
while (true)
|
|
while (true)
|
|
{
|
|
{
|
|
- cout << "输入串口号(例如:/dev/ttyUSB0):" << endl;
|
|
|
|
|
|
+ cout << "输入串口号(如果执行了initdev_mini_imu.sh则为:/dev/mini_imu,否则需要使用'ls /dev'查看串口号):" << endl;
|
|
cin >> imu_dev;
|
|
cin >> imu_dev;
|
|
|
|
|
|
int ret = initSerialPort(imu_dev.c_str());
|
|
int ret = initSerialPort(imu_dev.c_str());
|
|
@@ -82,4 +82,4 @@ int main(int argc, char** argv)
|
|
|
|
|
|
closeSerialPort(); //关闭与IMU模块的串口连接
|
|
closeSerialPort(); //关闭与IMU模块的串口连接
|
|
return 0;
|
|
return 0;
|
|
-}
|
|
|
|
|
|
+}
|