mirror of
https://github.com/QIDITECH/QIDI_Q1_Pro.git
synced 2026-01-31 16:08:43 +03:00
Initial commit
This commit is contained in:
9
src/MakerbaseNetwork.cpp
Normal file
9
src/MakerbaseNetwork.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "../include/MakerbaseNetwork.h"
|
||||
|
||||
std::string get_wlan0_ip() {
|
||||
char result[MAX_FILE_LEN] = {0};
|
||||
std::string cmd = "ifconfig wlan0 | awk 'NR==2{print $2}' | tr -d '\n\r'";
|
||||
execute_cmd(cmd.data(), result);
|
||||
printf("%s", result);
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user