I am using platformio on eclipse, i am geting bug WiFi.mode method could not be resolved, how to resolve it?, and where is mode method declared on ESP8266WiFiClass?
I am testing with the newest platformio
version of 3.5.2b2
and have no problems whatsoever. Test project with pio init -b nodemcuv2 --ide=eclipse
, test sketch:
Resolves fine within eclipse and compiles as expected. Following the definition of the mode
function (by highlighting the function name and pressing F3) leads to the ESP8266WiFiGeneric.h
header which declares the function inside the ESP8266WiFiGenericClass
class as
bool mode(WiFiMode_t);
The WiFi
class inherits from the ESP8266WiFiGenericClass
class ESP8266WiFiClass : public ESP8266WiFiGenericClass, public ESP8266WiFiSTAClass, public ESP8266WiFiScanClass, public ESP8266WiFiAPClass {
..
}
If your Eclipse IDE cannot resolve it, I would suggest executing the build target PlatformIO: Rebuild C/C++ Project Index
and then going Project -> C/C++ Index -> Rebuild
while having your main CPP file open. If that doesn’t help, we need more info on your pio
version, Eclipse version and what sketch you’re trying to compile.
Thanks, already i resolved it by myself by making and initializing new project as you said on your first statement, anyway thanks for your reply.