mirror of
https://github.com/QIDITECH/QIDI_Q1_Pro.git
synced 2026-01-31 07:58:42 +03:00
10 lines
271 B
C++
10 lines
271 B
C++
|
|
#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;
|
||
|
|
}
|