commit 9ba62457a900690a0fd9dd175ffef5a9bea74be9 Author: unknown Date: Mon Apr 1 10:31:33 2024 +0800 first commit diff --git a/extra_script.py b/extra_script.py new file mode 100644 index 0000000..1eafbb4 --- /dev/null +++ b/extra_script.py @@ -0,0 +1,3 @@ +Import("env") + +env.Replace(PROGNAME="firmware_%s" % env.GetProjectOption("custom_prog_version")) \ No newline at end of file diff --git a/include/README b/include/README new file mode 100644 index 0000000..194dcd4 --- /dev/null +++ b/include/README @@ -0,0 +1,39 @@ + +This directory is intended for project header files. + +A header file is a file containing C declarations and macro definitions +to be shared between several project source files. You request the use of a +header file in your project source file (C, C++, etc) located in `src` folder +by including it, with the C preprocessing directive `#include'. + +```src/main.c + +#include "header.h" + +int main (void) +{ + ... +} +``` + +Including a header file produces the same results as copying the header file +into each source file that needs it. Such copying would be time-consuming +and error-prone. With a header file, the related declarations appear +in only one place. If they need to be changed, they can be changed in one +place, and programs that include the header file will automatically use the +new version when next recompiled. The header file eliminates the labor of +finding and changing all the copies as well as the risk that a failure to +find one copy will result in inconsistencies within a program. + +In C, the usual convention is to give header files names that end with `.h'. +It is most portable to use only letters, digits, dashes, and underscores in +header file names, and at most one dot. + +Read more about using header files in official GCC documentation: + +* Include Syntax +* Include Operation +* Once-Only Headers +* Computed Includes + +https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html diff --git a/lib/README b/lib/README new file mode 100644 index 0000000..6debab1 --- /dev/null +++ b/lib/README @@ -0,0 +1,46 @@ + +This directory is intended for project specific (private) libraries. +PlatformIO will compile them to static libraries and link into executable file. + +The source code of each library should be placed in a an own separate directory +("lib/your_library_name/[here are source files]"). + +For example, see a structure of the following two libraries `Foo` and `Bar`: + +|--lib +| | +| |--Bar +| | |--docs +| | |--examples +| | |--src +| | |- Bar.c +| | |- Bar.h +| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html +| | +| |--Foo +| | |- Foo.c +| | |- Foo.h +| | +| |- README --> THIS FILE +| +|- platformio.ini +|--src + |- main.c + +and a contents of `src/main.c`: +``` +#include +#include + +int main (void) +{ + ... +} + +``` + +PlatformIO Library Dependency Finder will find automatically dependent +libraries scanning project source files. + +More information about PlatformIO Library Dependency Finder +- https://docs.platformio.org/page/librarymanager/ldf.html diff --git a/platformio.ini b/platformio.ini new file mode 100644 index 0000000..17deb42 --- /dev/null +++ b/platformio.ini @@ -0,0 +1,52 @@ +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; https://docs.platformio.org/page/projectconf.html + +; [env:esp32dev] +; platform = espressif32 +; board = esp32dev +; framework = arduino +; monitor_speed = 115200 +; ;upload_speed=115200 +; ; upload_port = COM31 +; ;monitor_port = com5 +; lib_deps = +; vshymanskyy/TinyGSM@^0.11.5 +; knolleary/PubSubClient@^2.8 +; plerup/EspSoftwareSerial@^6.15.2 +; arduino-libraries/ArduinoHttpClient@^0.4.0 +; janelia-arduino/Vector@^1.2.2 +; build_flags: +; -DVERSION=${this.custom_prog_version} +; extra_scripts = pre:extra_script.py +; custom_prog_version = V2.6 + + +[env:esp32-s3-devkitc-1] +; platformio/espressif32@^6.4.0 +platform = espressif32 @ ^4.4.0 +board = esp32-s3-devkitc-1 +framework = arduino +platform_packages = + toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 + ; framework-arduinoespressif32 @ 2.0.6+sha.099b432 +board_upload.flash_size=4MB +board_upload.psram_size =2MB +lib_deps = + vshymanskyy/TinyGSM@^0.11.5 + knolleary/PubSubClient@^2.8 + plerup/EspSoftwareSerial@^6.15.2 + arduino-libraries/ArduinoHttpClient@^0.4.0 + janelia-arduino/Vector@^1.2.2 + paulstoffregen/OneWire@^2.3.7 + milesburton/DallasTemperature@^3.11.0 + adafruit/Adafruit MLX90614 Library@^2.1.3 + sparkfun/SparkFun u-blox Arduino Library@^1.8.11 + + diff --git a/smartweatherstation.code-workspace b/smartweatherstation.code-workspace new file mode 100644 index 0000000..ef8574a --- /dev/null +++ b/smartweatherstation.code-workspace @@ -0,0 +1,13 @@ +{ + "folders": [ + { + "name": "smartweatherstation", + "path": "smartweatherstation" + } + ], + "settings": { + "files.associations": { + "*.tpp": "cpp" + } + } +} \ No newline at end of file diff --git a/src/Define.h b/src/Define.h new file mode 100644 index 0000000..3d8c5fa --- /dev/null +++ b/src/Define.h @@ -0,0 +1,10 @@ +#ifndef Define_h +#define Define_h +//#define DebugCalibration +//#define DINBIAO +//#define Curentvsion "V2.4b"\ +#define Curentvsion "V2.5b" +#define Curentvsion "V2.3" +#define TINY_GSM_DEBUG Serial + +#endif \ No newline at end of file diff --git a/src/GSMMannager.cpp b/src/GSMMannager.cpp new file mode 100644 index 0000000..cd3bd51 --- /dev/null +++ b/src/GSMMannager.cpp @@ -0,0 +1,136 @@ +#include "GSMMannager.h" +HardwareSerial *MySerial; +GSMMannger::GSMMannger(int serialnumber, int rx, int tx) +{ + MySerial=new HardwareSerial(serialnumber); + modem = new TinyGsm(*MySerial); + MySerial->begin(115200, SERIAL_8N1, rx, tx); + client = new TinyGsmClient(*modem); + // !!!!!!!!!!! �ϵ� + Serial.println("Wait..."); + pinMode(37, OUTPUT); //pin32控制sim800C电源 高电平上电 低电平断电 + digitalWrite(37, HIGH); + delay(100); + digitalWrite(37, LOW); + Serial.println("Wait...1"); + delay(1800); + // Set your reset, enable, power pins here + // !!!!!!!!!!! + + delay(5000); + // Set GSM module baud rate + // MySerial->readString(); + int banddd=TinyGsmAutoBaud(*MySerial, rx, tx, 9600,460800); + if (banddd==0) + { + Serial.println("fail to connect sim800 reboot"); + esp_restart(); + /* code */ + } + + Serial.println("band is" + String(banddd)); + delay(6000); + modem->init(); + + String modemInfo = modem->getModemInfo(); + if (modemInfo=="") + { + Serial.println("fail to getmode reboot"); + esp_restart(); + /* code */ + } + Serial.print("Modem Info: "); + + SerialMon.println(modemInfo); + if (GSM_PIN && modem->getSimStatus() != 3) + { + modem->simUnlock(GSM_PIN); + } + SerialMon.print("Waiting for network..."); + if (!modem->waitForNetwork()) + { + SerialMon.println(" fail"); + delay(10000); + return; + } + SerialMon.println(" success"); + + if (modem->isNetworkConnected()) + { + SerialMon.println("Network connected"); + } + SerialMon.print(F("Connecting to ")); + SerialMon.print(apn); + if (!modem->gprsConnect(apn, gprsUser, gprsPass)) + { + SerialMon.println(" fail"); + delay(10000); + return; + } + SerialMon.println(" success"); + + if (modem->isGprsConnected()) + { + SerialMon.println("GPRS connected"); + } + modem->NTPServerSync(); +} +String GSMMannger::I2toS(int n) +{ + if (n>=10) + { + return String(n); + } else{ + return "0"+ String(n); + } +} +String GSMMannger::GetDataAndTime() { + //String str=modem->getGSMDateTime(DATE_FULL); + if(modem->getNetworkTime(&year,&month,&day,&hour,&minute, &second,&timezone)) + { + String date=String(year)+"-"+I2toS(month)+"-"+I2toS(day)+" "+I2toS(hour)+":"+I2toS(minute)+":"+I2toS(second); + return date;} + return "2000-01-01 00:00:00"; +} + +void GSMMannger::loop() +{ + + if (!modem->isNetworkConnected()) + { + + SerialMon.println("Network disconnected"); + if (!modem->waitForNetwork(20000L, true)) + { + SerialMon.println(" re wait For Network fail"); + esp_restart(); + delay(10000); + return; + } + if (modem->isNetworkConnected()) + { + SerialMon.println("Network re-connected"); + } + + // and make sure GPRS/EPS is still connected + if (!modem->isGprsConnected()) + { + SerialMon.println("GPRS disconnected!"); + SerialMon.print(F("Connecting to ")); + SerialMon.print(apn); + if (!modem->gprsConnect(apn, gprsUser, gprsPass)) + { + SerialMon.println(" set apn gprsuser gprspass fail"); + esp_restart(); + delay(10000); + return; + } + if (modem->isGprsConnected()) + { + SerialMon.println("GPRS reconnected"); + } + } + } +} + + diff --git a/src/GSMMannager.h b/src/GSMMannager.h new file mode 100644 index 0000000..a36f98f --- /dev/null +++ b/src/GSMMannager.h @@ -0,0 +1,33 @@ +#define TINY_GSM_MODEM_SIM800 +#define SerialMon Serial +#include +#include + + +//#define TINY_GSM_DEBUG SerialMon +#define GSM_AUTOBAUD_MIN 9600 +#define GSM_AUTOBAUD_MAX 115200 +#define TINY_GSM_USE_GPRS true +#define TINY_GSM_USE_WIFI false + +#define GSM_PIN "" + +const char apn[] = "CMNET"; +const char gprsUser[] = ""; +const char gprsPass[] = ""; + +class GSMMannger +{ + public: + GSMMannger(int serialnumber,int rx,int tx); // ���ǹ��캯�� + TinyGsm *modem; + TinyGsmClient *client; + String GetDataAndTime(); + void loop(); + String I2toS(int n); + int year,month, day, hour,minute, second; + float timezone; + +}; + + \ No newline at end of file diff --git a/src/MyEsp8266.cpp b/src/MyEsp8266.cpp new file mode 100644 index 0000000..728b40f --- /dev/null +++ b/src/MyEsp8266.cpp @@ -0,0 +1,5 @@ +// +// Created by xin on 2022/4/28. +// + +#include "MyEsp8266.h" diff --git a/src/MyEsp8266.h b/src/MyEsp8266.h new file mode 100644 index 0000000..f735a1a --- /dev/null +++ b/src/MyEsp8266.h @@ -0,0 +1,14 @@ +// +// Created by xin on 2022/4/28. +// + +#ifndef ESP32MAINBOARD_MYESP8266_H +#define ESP32MAINBOARD_MYESP8266_H + + +class MyEsp8266 { + +}; + + +#endif //ESP32MAINBOARD_MYESP8266_H diff --git a/src/MyWebServer.cpp b/src/MyWebServer.cpp new file mode 100644 index 0000000..f0b1392 --- /dev/null +++ b/src/MyWebServer.cpp @@ -0,0 +1,138 @@ +#include "MyWebServer.h" + +ESPWebServer *ESPStaticServer; +void webserver::printn(String str) +{ + if (serialmy != nullptr) + { + serialmy->print(str); + } +} +void webserver::initme() +{ + + printn("webserver begain\n"); + + // wifiMulti.addAP("IRIS", "irishk*******"); // 将需要连接的一系列WiFi ID和密码输入这里 + // wifiMulti.addAP("ssid_from_AP_2", "your_password_for_AP_2"); // ESP8266-NodeMCU再启动后会扫描当前网络 + // wifiMulti.addAP("ssid_from_AP_3", "your_password_for_AP_3"); // 环境查找是否有这里列出的WiFi ID。如果有 + // printn("Connecting ..."); // 则尝试使用此处存储的密码进行连接。 + + // int i = 0; + // while (wifiMulti.run() != WL_CONNECTED) { // 尝试进行wifi连接。 + // delay(1000); + // printn("retry to connect wifi"); + // } + + // WiFi连接成功后将通过串口监视器输出连接成功信息 + + printn("Connected to \n"); + printn(WiFi.SSID()); // 通过串口监视器输出连接的WiFi名称 + printn("IP address:\t"); + printn(WiFi.localIP().toString()); // 通过串口监视器输出ESP8266-NodeMCU的IP + printn("\n"); + if (SPIFFS.begin()) + { // 启动闪存文件系统 + printn("SPIFFS Started.\n"); + } + else + { + printn("SPIFFS Failed to Start.\n"); + } + + server->onNotFound(handleUserRequet); // 告知系统如何处理用户请求 + + server->begin(); // 启动网站服务 + printn("HTTP server started\n"); +} +webserver::webserver(HardwareSerial *serial) +{ + serialmy = serial; + server=new ESPWebServer(80); + ESPStaticServer=server; + initme(); +} +webserver::webserver() +{ + serialmy = nullptr; + server=new ESPWebServer(80); + ESPStaticServer=server; + initme(); +} + +webserver::~webserver() +{ +} + +void webserver::handleUserRequet() +{ + Serial.println("some one come\n"); + + // 获取用户请求网址信息 + String webAddress = ESPStaticServer->uri(); + + // 通过handleFileRead函数处处理用户访问 + bool fileReadOK = handleFileRead(webAddress); + + // 如果在SPIFFS无法找到用户访问的资源,则回复404 (Not Found) + if (!fileReadOK) + { + ESPStaticServer->send(404, "text/plain", "404 Not Found"); + } +} + +bool webserver::handleFileRead(String path) +{ //处理浏览器HTTP访问 + + if (path.endsWith("/")) + { // 如果访问地址以"/"为结尾 + path = "/index.html"; // 则将访问地址修改为/index.html便于SPIFFS访问 + } + + String contentType = getContentType(path); // 获取文件类型 + + if (SPIFFS.exists(path)) + { // 如果访问的文件可以在SPIFFS中找到 + File file = SPIFFS.open(path, "r"); // 则尝试打开该文件 + ESPStaticServer->streamFile(file, contentType); // 并且将该文件返回给浏览器 + file.close(); // 并且关闭文件 + return true; // 返回true + } + return false; // 如果文件未找到,则返回false +} + +// 获取文件类型 +String webserver::getContentType(String filename) +{ + if (filename.endsWith(".htm")) + return "text/html"; + else if (filename.endsWith(".html")) + return "text/html"; + else if (filename.endsWith(".css")) + return "text/css"; + else if (filename.endsWith(".js")) + return "application/javascript"; + else if (filename.endsWith(".png")) + return "image/png"; + else if (filename.endsWith(".gif")) + return "image/gif"; + else if (filename.endsWith(".jpg")) + return "image/jpeg"; + else if (filename.endsWith(".ico")) + return "image/x-icon"; + else if (filename.endsWith(".xml")) + return "text/xml"; + else if (filename.endsWith(".pdf")) + return "application/x-pdf"; + else if (filename.endsWith(".zip")) + return "application/x-zip"; + else if (filename.endsWith(".gz")) + return "application/x-gzip"; + return "text/plain"; +} + +void webserver::loop() +{ + ESPStaticServer->handleClient(); + // printn("..."); +} diff --git a/src/MyWebServer.h b/src/MyWebServer.h new file mode 100644 index 0000000..ec1f8c1 --- /dev/null +++ b/src/MyWebServer.h @@ -0,0 +1,38 @@ +#ifndef wenserver_H +#define wenserver_H +#define ESP32 +#ifdef ESP32 + +#include "WebServer.h" +#include "WiFi.h" +#include "Arduino.h" +#include "SPIFFS.h" +#define ESPWebServer WebServer +#elif +#include +#include +#define ESPWebServer ESP8266WebServer +#endif +#include + +class webserver +{ +private: + +public: + webserver(HardwareSerial *serial); + webserver(); + void initme(); + HardwareSerial *serialmy; + ~webserver(); + static void handleUserRequet(); + static bool handleFileRead(String path); + static String getContentType(String filename); + void loop(); + void printn(String str); + ESPWebServer *server; +}; + +#endif + + diff --git a/src/SDmanger.cpp b/src/SDmanger.cpp new file mode 100644 index 0000000..745926b --- /dev/null +++ b/src/SDmanger.cpp @@ -0,0 +1,287 @@ +#include"SDmanger.h" +File Comenfile; + +int sdcard::init_sdcard() +{ + SD_MMC.setPins(9,10,11,12,13,14); + int succ = SD_MMC.begin("/sdcard", true,true,150); + if (succ) { + Serial.printf("SD_MMC Begin: %d\n", succ); + uint8_t cardType = SD_MMC.cardType(); + Serial.print("SD_MMC Card Type: "); + if (cardType == CARD_MMC) { + Serial.println("MMC"); + } else if (cardType == CARD_SD) { + Serial.println("SDSC"); + } else if (cardType == CARD_SDHC) { + Serial.println("SDHC"); + } else { + Serial.println("UNKNOWN"); + } + + uint64_t cardSize = SD_MMC.cardSize() / (1024 * 1024); + Serial.printf("SD_MMC Card Size: %lluMB\n", cardSize); + + } else { + Serial.printf("Failed to mount SD card VFAT filesystem. \n"); + Serial.println("Do you have an SD Card installed?"); + Serial.println("Check pin 12 and 13, not grounded, or grounded with 10k resistors!\n\n"); + // major_fail(); + } + + return ESP_OK; +} + + void sdcard::mylistDir( const char * dirname, uint8_t levels) { + + Serial.printf("Listing directory: %s\n", "/"); + String dir(dirname); + File root = SD_MMC.open(dirname); + if (!root) { + Serial.println("Failed to open directory"); + return; + } + if (!root.isDirectory()) { + Serial.println("Not a directory"); + return; + } + + File filex = root.openNextFile(); + while (filex) { + if (filex.isDirectory()) + { + Serial.print(" DIR : "); + Serial.println(filex.name()); + if (levels) { + String filename=dir+"/"+String(filex.name()); + mylistDir( filename.c_str(), levels - 1); + } + } + else + { + Serial.print(" FILE: "); + Serial.print(filex.name()); + Serial.print(" SIZE: "); + Serial.println(filex.size()); + } + filex = root.openNextFile(); + } +} +bool sdcard::ListDir(const char * dirname,Vector &stringlist) +{ + stringlist.clear(); + Serial.printf("Listing directory: %s\n", dirname); + String dir(dirname); + File root = SD_MMC.open(dirname); + if (!root) { + Serial.println("Failed to open directory"); + return true; + } + if (!root.isDirectory()) { + Serial.println("Not a directory"); + return true; + } + + File filex = root.openNextFile(); + while (filex) + { + if (filex.isDirectory()) { + + } else { + String filename=dir+"/"+String(filex.name()); + stringlist.push_back(filename); + + if (stringlist.size()==stringlist.max_size()) + { + return false; + /* code */ + } + + } + filex = root.openNextFile(); + } + + return true; + +} + + + void sdcard::delete_old_stuff() { + + Serial.printf("Total space: %lluMB\n", SD_MMC.totalBytes() / (1024 * 1024)); + Serial.printf("Used space: %lluMB\n", SD_MMC.usedBytes() / (1024 * 1024)); + + //listDir( "/", 0); + + float full = 1.0 * SD_MMC.usedBytes() / SD_MMC.totalBytes();; + if (full < 0.8) { + Serial.printf("Nothing deleted, %.1f%% disk full\n", 100.0 * full); + } else { + Serial.printf("Disk is %.1f%% full ... deleting oldest file\n", 100.0 * full); + while (full > 0.8) { + + double del_number = 999999999; + char del_numbername[50]; + + File f = SD_MMC.open("/"); + + File file = f.openNextFile(); + + while (file) { + //Serial.println(file.name()); + if (!file.isDirectory()) { + + char foldname[50]; + strcpy(foldname, file.name()); + for ( int x = 0; x < 50; x++) { + if ( (foldname[x] >= 0x30 && foldname[x] <= 0x39) || foldname[x] == 0x2E) { + } else { + if (foldname[x] != 0) foldname[x] = 0x20; + } + } + + double i = atof(foldname); + if ( i > 0 && i < del_number) { + strcpy (del_numbername, file.name()); + del_number = i; + } + //Serial.printf("Name is %s, number is %f\n", foldname, i); + } + file = f.openNextFile(); + + } + Serial.printf("lowest is Name is %s, number is %f\n", del_numbername, del_number); + if (del_number < 999999999) { + deleteFolderOrFile(del_numbername); + } + full = 1.0 * SD_MMC.usedBytes() / SD_MMC.totalBytes(); + Serial.printf("Disk is %.1f%% full ... \n", 100.0 * full); + f.close(); + } + } +} + + void sdcard::deleteFolderOrFile(const char * val) { + // Function provided by user @gemi254 + Serial.printf("Deleting : %s\n", val); + File f = SD_MMC.open(val); + if (!f) { + Serial.printf("Failed to open %s\n", val); + return; + } + + if (f.isDirectory()) { + File file = f.openNextFile(); + while (file) { + if (file.isDirectory()) { + Serial.print(" DIR : "); + Serial.println(file.name()); + } else { + Serial.print(" FILE: "); + Serial.print(file.name()); + Serial.print(" SIZE: "); + Serial.print(file.size()); + if (SD_MMC.remove(file.name())) { + Serial.println(" deleted."); + } else { + Serial.println(" FAILED."); + } + } + file = f.openNextFile(); + } + f.close(); + //Remove the dir + if (SD_MMC.rmdir(val)) { + Serial.printf("Dir %s removed\n", val); + } else { + Serial.println("Remove dir failed"); + } + + } else { + //Remove the file + if (SD_MMC.remove(val)) { + Serial.printf("File %s deleted\n", val); + } else { + Serial.println("Delete failed"); + } + } +} + + void sdcard:: testwriet() +{ + File file; + file = SD_MMC.open("/gps/try.txt", "wb"); + file.println("hello world"); + file.flush(); + file.close(); +} + + + + void sdcard::WriteStringToFile(String name,String Str) + { + File file; + + file = SD_MMC.open(name, "w+"); + file.println(Str); + file.flush(); + file.close(); + } + void sdcard::WriteStringToFile(String name,char *data,size_t lenth) + { + File file; + + file = SD_MMC.open(name, "wb"); + file.write((const byte *)data,lenth); + file.flush(); + file.close(); + } + bool sdcard::Mkdir(String path) + { + return SD_MMC.mkdir(path); + } + +namespace sdcard +{ + void openFileformWirte(String Path) + { + if (Comenfile.available()) + { + Comenfile.close(); + /* code */ + } + Comenfile = SD_MMC.open(Path, "w+"); + + } + + void WritetoFileCommen(String Str) + { + if (Comenfile.available()) + { + Comenfile.print(Str); + Comenfile.flush(); + /* code */ + } + } + + void WritetoFileCommen(char *data,size_t lenth) + { + if (Comenfile.available()) + { + Comenfile.write((const byte *)data,lenth); + Comenfile.flush(); + /* code */ + } + + } + + void closeCommenFile() + { + if (Comenfile.available()) + { + Comenfile.close(); + /* code */ + } + + } +} \ No newline at end of file diff --git a/src/SDmanger.h b/src/SDmanger.h new file mode 100644 index 0000000..f7279e0 --- /dev/null +++ b/src/SDmanger.h @@ -0,0 +1,28 @@ +#ifndef SDMANGER_H +#define SDMANGER_H +#include "driver/sdmmc_host.h" +#include "driver/sdmmc_defs.h" +#include "sdmmc_cmd.h" +#include "esp_vfs_fat.h" +#include "FS.h" +#include +#include "Vector.h" +namespace sdcard{ + int init_sdcard(); + + void mylistDir( const char * dirname, uint8_t levels); + bool ListDir(const char * dirname,Vector &stringlist); + void delete_old_stuff(); + void deleteFolderOrFile(const char * val) ; + void testwriet(); + void WriteStringToFile(String name,String Str); + void WriteStringToFile(String name,char *data,size_t lenth); + bool Mkdir(String path); + void openFileformWirte(String Path); + void WritetoFileCommen(String Str); + void WritetoFileCommen(char *data,size_t lenth); +void closeCommenFile(); + +} +#endif + diff --git a/src/SensorOptoSky.cpp b/src/SensorOptoSky.cpp new file mode 100644 index 0000000..dc283fe --- /dev/null +++ b/src/SensorOptoSky.cpp @@ -0,0 +1,281 @@ +// +// Created by xin on 2022/4/24. +// + +#include "wifidebug.h" + + +#include "SensorOptoSky.h" +bool SensorOptoSky::initSensor(int id ) +{ + IS1Sensor.SetPortName(id); + SensorInfo=GetSensorInfo(); + pinMode(5,OUTPUT); + pinMode(6,OUTPUT); + // Serial.println("i am here12312312312312312"); + return true; +} + +STRSensorInfo SensorOptoSky::GetSensorInfo() { + STRSensorInfo setem; + + if (!IS1Sensor.isSensorInit()) + { + Serial.println("sensor is 123123"); + return setem; + } + int lenthretrunl; + char *result; + + IS1Sensor.SendComment(GET_PN_NUMBER); + IS1Sensor.GetReturn(GET_PN_NUMBER, lenthretrunl,1000); + result=new char[lenthretrunl+1](); + memcpy(result,IS1Sensor.result,lenthretrunl); + result[lenthretrunl]='\0'; + + String str(result); + Serial.println(str); + delete[] result; + str.remove(str.indexOf("00")+1,str.length()-(str.indexOf("00")+1)); + setem.SensorName=str; + ///////////////////////////////////////////////////////// + + IS1Sensor.SendComment(GET_SN_NUMBER); + IS1Sensor.GetReturn(GET_SN_NUMBER, lenthretrunl,1000); + result=new char[lenthretrunl+1](); + memcpy(result,IS1Sensor.result,lenthretrunl); + result[lenthretrunl]='\0'; + String SNNUMBER(result); + Serial.println(SNNUMBER); + delete[] result;// + SNNUMBER.remove(SNNUMBER.indexOf('X'),SNNUMBER.length()-SNNUMBER.indexOf('X')); + setem.serialnumber=SNNUMBER; +/* + Serial.write("IS1Sensor.result+10,lenthretrunl"); + Serial.write(IS1Sensor.result+3,lenthretrunl-3); + Serial.println("SNNUMBER"); + Serial.println(SNNUMBER); + +*/ + //////////////////////// + + + u_char *shutter=new u_char[2](); + int msc=10; + shutter[0] = (int)msc / 256; + shutter[1] = (int)msc % 256; + IS1Sensor.SendComment(SYNCHRONIZATION_GET_DATA,shutter,2); + IS1Sensor.GetReturn(SYNCHRONIZATION_GET_DATA, lenthretrunl,10); + setem.BandNum = (lenthretrunl-1)/2; + Serial.println("band lenth:" ); + Serial.println( setem.BandNum ); + DATABUFF=new unsigned short[setem.BandNum] ; + DownData=new unsigned short[setem.BandNum] ; + UpData=new unsigned short[setem.BandNum] ; +//////////////////////////////////////////////////////// + shutter[0] = 0x00; + shutter[1] = 0x01; + IS1Sensor.SendComment(GET_WAVELENGTH_CALIBRATION_COFF,shutter,2); + IS1Sensor.GetReturn(GET_WAVELENGTH_CALIBRATION_COFF, lenthretrunl); + float a[4]; + memcpy(a, IS1Sensor.result + 16, 4 * 4); + + int bandsss= setem.BandNum; + setem.wavelenthlist=new float[setem.BandNum](); + Serial.print("a0:"); + Serial.print(a[0]); + Serial.print(" a1:"); + Serial.print(a[1]); + Serial.print(" a2:"); + Serial.print(a[2]); + Serial.print(" a3:"); + Serial.println(a[3]); + setem.a1=a[0]; + setem.a2=a[1]; + setem.a3=a[2]; + setem.a4=a[3]; + for ( int i = 1; i <=bandsss ; i++) + { + setem.wavelenthlist[i-1] = a[0] * i*i*i + a[1] * i*i + a[2] * i + a[3]; + + } + /////////////////////////////////////////////////// + shutter[0] = 0x00; + shutter[1] = 0x01; + + IS1Sensor.SendComment(SET_AVERAGE_NUMBER, shutter,2); + IS1Sensor.GetReturn(SET_AVERAGE_NUMBER, lenthretrunl); + setem.maxValue=65535; + delete[] shutter; + + return setem; + /* 非线性校正 + IS1Sensor.SendComment(0x53, shutter,2); + IS1Sensor. GetReturn(0x53, lenthretrunl); +*/ + +} + +void SensorOptoSky::SetShutter(int id) { + switch (id) { + case 0: + { + digitalWrite(5,LOW); + digitalWrite(6,LOW); + delay(200); + break; + } + case 1:{ + digitalWrite(6,HIGH); + digitalWrite(5,LOW); + delay(200); + break; + } + case 2:{ + digitalWrite(5,HIGH); + digitalWrite(6,LOW); + delay(200); + break; + } + } + +} + +void SensorOptoSky::GetOneDate(int msc) { + u_char *shutter=new u_char[2](); + shutter[0] = (int)msc / 256; + shutter[1] = (int)msc % 256; + int lenthretrunl; + IS1Sensor.SendComment(SYNCHRONIZATION_GET_DATA,shutter,2); + IS1Sensor.GetReturn(SYNCHRONIZATION_GET_DATA, lenthretrunl,msc); + memcpy(DATABUFF, IS1Sensor.result + 1, SensorInfo.BandNum * 2); + shortLittletoBiG(DATABUFF, SensorInfo.BandNum); +} + +void SensorOptoSky::shortLittletoBiG(unsigned short *data, int lenth) { + char *chardata=(char *)data; + char temp; + for (int i = 0; i maxvalue) { + if (maxvaluenow > maxvalue) + { + shutternow = shutternow *0.7; + } + else + { + shutternow = maxvalue * 0.98 / (maxvaluenow * 1.0)*shutternow + 1; + } + if (shutternow > maxtime) + { + shutternow = maxtime; + break; + } + GetOneDate(shutternow); + maxvaluenow= Getmaxvalue(DATABUFF, SensorInfo.BandNum); + Serial.print("now Shutter is :"); + Serial.print(shutternow); + Serial.print(" maxvalue is :"); + Serial.println(maxvaluenow); + numberoftry++; + if (numberoftry > 200) + { + + return maxtime; + + } + if (shutternow == maxtime) + { + + return maxtime; + } + } + Serial.print("zi dong value:"); + Serial.println(shutternow); + if (shutternow<0) + { + shutternow=maxtime; + /* code */ + } + + return shutternow; +} + +int SensorOptoSky::Getmaxvalue(unsigned short *data, int lenth) { + int ret=-1; + for (int i = 0; i < lenth; ++i) { + if (data[i]>ret){ + ret=data[i]; + } + } + return ret; +} + +void SensorOptoSky::TakeOneJob() { + SetShutter(1); + int shutter=OptSnenser(90); + shutterup=shutter; + GetOneDate(shutter); + memcpy(UpData,DATABUFF,SensorInfo.BandNum*2); + SetShutter(0); + GetOneDate(shutter); + for (int i = 0; i < SensorInfo.BandNum; ++i) { + UpData[i]=UpData[i]-DATABUFF[i]; + } + shutterup=shutter; + Serial.println("Finish Up ------Green"); + bool dingbing=false; +#ifdef DINBIAO + + String strout="1 shutteruo is "+String(shutterup)+" Finish Up ------Green "; + printbytcpserver(strout); + PrintFunc(strout ); + digitalWrite(21, LOW); + printbytcpserver("please change the fiber in 1 min"); + delay(90000); + SensorInfo.SensorName=SensorInfo.SensorName+"cali"; + Serial.println("begindown"); + digitalWrite(21, HIGH); +#endif + + + + SetShutter(2); + shutter=OptSnenser(90); + shutterdown=shutter; + GetOneDate(shutter); + memcpy(DownData,DATABUFF,SensorInfo.BandNum*2); + SetShutter(0); + GetOneDate(shutter); + for (int i = 0; i < SensorInfo.BandNum; ++i) { + DownData[i]=DownData[i]-DATABUFF[i]; + } + shutterdown=shutter; + Serial.println("Down Finish ------Blue"); +#ifdef DINBIAO + String strout1="2 shutterdown is "+String(shutterdown)+" Down Finish ------Blue"; + PrintFunc(strout1 ); + printbytcpserver(strout1); + +#endif +} + + + diff --git a/src/SensorOptoSky.h b/src/SensorOptoSky.h new file mode 100644 index 0000000..477a564 --- /dev/null +++ b/src/SensorOptoSky.h @@ -0,0 +1,32 @@ +// +// Created by xin on 2022/4/24. +// + +#ifndef ESP32MAINBOARD_SENSOROPTOSKY_H +#define ESP32MAINBOARD_SENSOROPTOSKY_H +; +#include "optoskybase.h" +typedef void (*PRINTFUNC)(String ); +class SensorOptoSky { +public: + STRSensorInfo SensorInfo; + OptoSky IS1Sensor; + bool initSensor(int id = 2); + STRSensorInfo GetSensorInfo(); + void SetShutter(int id);// 0 dark 1 green 2 blue + void GetOneDate(int msc); + unsigned short *DATABUFF; + int shutterup,shutterdown; + unsigned short *DownData; + unsigned short *UpData; + void shortLittletoBiG( unsigned short *data,int lenth); + int OptSnenser(int percent); + int Getmaxvalue(unsigned short *data,int lenth); + void TakeOneJob(); + PRINTFUNC PrintFunc; + //int shutterup,shutterdown; + +}; + + +#endif //ESP32MAINBOARD_SENSOROPTOSKY_H diff --git a/src/TCPserver.cpp b/src/TCPserver.cpp new file mode 100644 index 0000000..e268c47 --- /dev/null +++ b/src/TCPserver.cpp @@ -0,0 +1,206 @@ +#include "TCPserver.h" +bool fenge(String &zifuchuan, String &outstring, String fengefu) +{ + int weizhi = 0; //找查的位置 + + if (zifuchuan == "") + { + // Serial.print("commanesdafasdf"); + return false; + + /* code */ + } + + weizhi = zifuchuan.indexOf(fengefu); //找到位置 + if (weizhi != -1) //如果位置不为空 + { + // Serial.println(zifuchuan); + outstring = zifuchuan.substring(0, weizhi); //打印取第一个字符 + zifuchuan = zifuchuan.substring(weizhi + fengefu.length(), zifuchuan.length()); + return true; + //分隔后只取后面一段内容 以方便后面找查 + } + else + { + // Serial.print(zifuchuan); + outstring = zifuchuan; + zifuchuan = ""; + return true; + } +} +TCPserver::TCPserver(int port) +{ + server = new WiFiServer(port); + myserial = nullptr; + isPortOutInit = false; + +} +#if ARDUINO_USB_CDC_ON_BOOT && !ARDUINO_USB_MODE +TCPserver::TCPserver(USBCDC *serial,int port) +{ + server = new WiFiServer(port); + myserial = serial; + isPortOutInit = true; + +} +#elif ARDUINO_USB_CDC_ON_BOOT && ARDUINO_USB_MODE +TCPserver::TCPserver(HWCDC *serial,int port) +{ + server = new WiFiServer(port); + myserial = serial; + isPortOutInit = true; + +} +#else +TCPserver::TCPserver(HardwareSerial *serial, int port /* args */) +{ + server = new WiFiServer(port); + myserial = serial; + isPortOutInit = true; + +} +#endif +void TCPserver::initme() +{ + server->begin(); + //关闭小包合并包功能,不会延时发送数据 + server->setNoDelay(true); +} +void TCPserver::loop() +{ + uint8_t i; + //检测是否有新的client请求进来 + // myserial->print("asdffsd"); + if (server->hasClient()) + { + for (i = 0; i < MAX_SRV_CLIENTS; i++) + { + //释放旧无效或者断开的client + if (!serverClients[i] || !serverClients[i].connected()) + { + if (serverClients[i]) + { + serverClients[i].stop(); + } + //分配最新的client + serverClients[i] = server->available(); + if (isPortOutInit) + { + myserial->print("New client: "); + myserial->print(i); + /* code */ + } + break; + } + } + //当达到最大连接数 无法释放无效的client,需要拒绝连接 + if (i == MAX_SRV_CLIENTS) + { + WiFiClient serverClient = server->available(); + serverClient.stop(); + if (isPortOutInit) + { + myserial->print("Connection rejected "); + } + } + } + //检测client发过来的数据 + for (i = 0; i < MAX_SRV_CLIENTS; i++) + { + if (serverClients[i] && serverClients[i].connected()) + { + if (serverClients[i].available()) + { + // get data from the telnet client and push it to the UART + String str = ""; + while (serverClients[i].available()) + { + //发送到串口调试器 + if (isPortOutInit) + { + str = str + String((char)serverClients[i].read()); + // myserial->write(serverClients[i].read()); + /* code */ + } + } + + } + } + } + if (isPortOutInit) + { + + if (myserial->available()) + { + //把串口调试器发过来的数据 发送给client + size_t len = myserial->available(); + uint8_t sbuf[len]; + myserial->readBytes(sbuf, len); + // push UART data to all connected telnet clients + for (i = 0; i < MAX_SRV_CLIENTS; i++) + { + if (serverClients[i] && serverClients[i].connected()) + { + serverClients[i].write(sbuf, len); + delay(1); + } + } + } + } +} +void TCPserver::SendDataToClinet(String str, int clinetid) +{ + + // myserial->print("Connection rejected "); + if (clinetid == -1) + { + int i; + for (i = 0; i < MAX_SRV_CLIENTS; i++) + { + if (serverClients[i] && serverClients[i].connected()) + { + serverClients[i].println(str); + delay(1); + } + } + /* code */ + } + else + { + if (serverClients[clinetid] && serverClients[clinetid].connected()) + { + serverClients[clinetid].println(str); + delay(1); + } + } +} +void TCPserver::SendDataToClinet(char *str, int clinetid) +{ + // push UART data to all connected telnet clients + myserial->print("Connection rejected "); + if (clinetid == -1) + { + int i; + for (i = 0; i < MAX_SRV_CLIENTS; i++) + { + if (serverClients[i] && serverClients[i].connected()) + { + serverClients[i].write(str); + delay(1); + } + } + /* code */ + } + else + { + if (serverClients[clinetid] && serverClients[clinetid].connected()) + { + serverClients[clinetid].write(str); + delay(1); + } + } +} +TCPserver::~TCPserver() +{ + delete server; +} \ No newline at end of file diff --git a/src/TCPserver.h b/src/TCPserver.h new file mode 100644 index 0000000..73dbb19 --- /dev/null +++ b/src/TCPserver.h @@ -0,0 +1,54 @@ +#ifndef TCPSERVER_H +#define TCPSERVER_H + +#include +#ifdef ESP8266 +#include +#else +#include +#endif + +#define MAX_SRV_CLIENTS 2 +class TCPserver +{ +private: + /* data */ + //创建server 端口号是23 + WiFiServer *server; +//管理clients + WiFiClient serverClients[MAX_SRV_CLIENTS]; + + bool isPortOutInit; + +public: + + +#if ARDUINO_USB_CDC_ON_BOOT && !ARDUINO_USB_MODE //Serial used for USB CDC + USBCDC *myserial; + TCPserver(USBCDC *serial,int port); +#elif ARDUINO_USB_CDC_ON_BOOT && ARDUINO_USB_MODE + HWCDC *myserial; + TCPserver(HWCDC *serial,int port); +#else + HardwareSerial *myserial; + TCPserver(HardwareSerial *serial,int port); +#endif + + + + TCPserver(int port); + void initme(); + ~TCPserver(); + void SendDataToClinet(String str,int clinetid=-1); + void SendDataToClinet(char *str,int clinetid=-1); + void loop(); + +}; + + + + + + + +#endif \ No newline at end of file diff --git a/src/log.cpp b/src/log.cpp new file mode 100644 index 0000000..ee1c385 --- /dev/null +++ b/src/log.cpp @@ -0,0 +1,46 @@ +#include "log.h" +/* + +w+以纯文本方式读写,而wb+是以二进制方式进行读写。 + +mode说明: + +w 打开只写文件,若文件存在则文件长度清为0,即该文件内容会消失。若文件不存在则建立该文件。 + +w+ 打开可读写文件,若文件存在则文件长度清为零,即该文件内容会消失。若文件不存在则建立该文件。 + +wb 只写方式打开或新建一个二进制文件,只允许写数据。 + +wb+ 读写方式打开或建立一个二进制文件,允许读和写。 + +r 打开只读文件,该文件必须存在,否则报错。 + +r+ 打开可读写的文件,该文件必须存在,否则报错。 + +rb+ 读写方式打开一个二进制文件,只允许读写数据。 + +a 以附加的方式打开只写文件。若文件不存在,则会建立该文件,如果文件存在,写入的数据会被加到文件尾,即文件原先的内容会被保留。(EOF符保留) + +a+ 以附加方式打开可读写的文件。若文件不存在,则会建立该文件,如果文件存在,写入的数据会被加到文件尾后,即文件原先的内容会被保留。 (原来的EOF符不保留) + +ab+ 读写打开一个二进制文件,允许读或在文件末追加数据。 + +加入b 字符用来告诉函数库打开的文件为二进制文件,而非纯文字文件。 +*/ + +void write_log(String path,unsigned char level,String write_data) +{ +#ifdef ceshi + Serial.println(write_data); +#endif + + if(level > 10) { + //保存本地,和同时上传云端,小于10只保存本地 + } + + File file; + file = SD_MMC.open(path,"a+"); + file.println(write_data); + file.flush(); + file.close(); +} diff --git a/src/log.h b/src/log.h new file mode 100644 index 0000000..054b04f --- /dev/null +++ b/src/log.h @@ -0,0 +1,12 @@ +#ifndef _LOG_H_ +#define _LOG_H_ + + +#define ceshi 1 +#include "SDmanger.h" +void write_log(String path,unsigned char level,String write_data); + + + +#endif + diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..7cbd421 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,759 @@ +#include"Define.h" +#include +#include +#include +#include +#include "SensorOptoSky.h" +#include +#include +#include +//#include "MyWebServer.h" +#include "SDmanger.h" +//#include "HttpsOTAUpdate.h" +#include "slave.h" +#include "log.h" + +#include + +#define LOGGING +//myPort将原来ESP8266对内通讯改为,485对内的通讯 +// #define MYPORT_TX 45 +// #define MYPORT_RX 46 +int hassend = 0; +GSMMannger *gsmmanger; +UpDateClassByme *ProgrameUper; +HttpClient *http; +bool ishttpbusy = false; +SensorOptoSky IS1Sensor; +// SoftwareSerial myPort(MYPORT_RX, MYPORT_TX, false); +// HardwareSerial myPort(1); +// swSer(14, 12, false, 256); +// u_char a[]={0x01,0x04,0x00,0x00,0x00,0x06,0x70,0x08}; +u_char ret[17]; +u_char windret[17]; +Ticker ticker; +slave myslave; + +String getnetData() +{ + int err = http->get("/weather/php/Date.php"); + if (err != 0) + { + SerialMon.println(F("Date failed to connect")); + delay(10000); + return ""; + } + int status = http->responseStatusCode(); + if (!status) + { + delay(10000); + return ""; + } + + // SerialMon.println(F("Response Headers:")); + while (http->headerAvailable()) + { + String headerName = http->readHeaderName(); + String headerValue = http->readHeaderValue(); + // SerialMon.println("Date: " + headerName + " : " + headerValue); + } + if (http->isResponseChunked()) + { + // SerialMon.println(F("Date The response is chunked")); + } + + String body = http->responseBody(); + http->stop(); + return body; +} +bool UpdateData(String path, char *str, size_t lenth, String Contenttype = "") +{ + + http->beginRequest(); + http->post(path); + if (Contenttype != "") + { + http->sendHeader(HTTP_HEADER_CONTENT_TYPE, Contenttype); + + /* code */ + } + + http->sendHeader(HTTP_HEADER_CONTENT_LENGTH, lenth); + http->endRequest(); + int err = http->write((const byte *)str, lenth); + delay(1000); + Serial.print("send date size"); + Serial.println(err); + + /* + for (size_t i = 0; i < lenth; i++) + { + Serial.print("0x"); + Serial.print(str[i],HEX); + Serial.print(" "); + if (i%20==0) + { + Serial.println(" "); + + } + } + */ + // http->write((const byte*)IS1Sensor.UpData, IS1Sensor.SensorInfo.BandNum*2); + // http->stop(); + Serial.println("hear1"); + if (err == 0) + { + + http->stop(); + return false; + } + int status = http->responseStatusCode(); + Serial.println("hear3"); + if (!status) + { + http->stop(); + return false; + } + + int length = http->contentLength(); + Serial.println("hear4"); + if (length == 0) + { + http->stop(); + return false; + } + + String body = http->responseBody(); + Serial.println("body:"+body); + if (body != "ok") + { + http->stop(); + return false; + } + + http->stop(); + return true; +} +void ReuploadData(String path, String webpath, String content = "") +{ + vTaskDelay(1); + Vector files; + String vec[20]; //每次处理20个 + files.setStorage(vec); + while (!sdcard::ListDir(path.c_str(), files)) + { + if (files.size() != 0) + { + Serial.println("find " + String(files.size()) + "file"); + for (size_t i = 0; i < files.size(); i++) + { + File nowfile = SD_MMC.open(files.at(i).c_str(), "rb"); + size_t size = nowfile.size(); + char *arr = new char[size]; + nowfile.readBytes(arr, size); + bool flagsucc = UpdateData(webpath, arr, size, content); + if (!flagsucc) + { + return; + /* code */ + } + delete[] arr; + sdcard::deleteFolderOrFile(files.at(i).c_str()); + vTaskDelay(1); + /* code */ + } + } + vTaskDelay(1); + } + if (files.size() != 0) + { + Serial.println("find " + String(files.size()) + "file not enough 20"); + for (size_t i = 0; i < files.size(); i++) + { + vTaskDelay(1); + File nowfile = SD_MMC.open(files.at(i).c_str(), "rb"); + size_t size = nowfile.size(); + char *arr = new char[size]; + nowfile.readBytes(arr, size); + Serial.println("run here now"); + bool flagsucc = UpdateData(webpath, arr, size, content); + if (!flagsucc) + { + return; + /* code */ + } + + delete[] arr; + sdcard::deleteFolderOrFile(files.at(i).c_str()); + /* code */ + } + } + vTaskDelay(1); +} +String fenge(String str, String fen, int index) +{ + int weizhi; + String temps[str.length()]; + int i = 0; + do + { + weizhi = str.indexOf(fen); + if (weizhi != -1) + { + temps[i] = str.substring(0, weizhi); + str = str.substring(weizhi + fen.length(), str.length()); + i++; + } + else + { + if (str.length() > 0) + temps[i] = str; + } + } while (weizhi >= 0); + + if (index > i) + return "-1"; + return temps[index]; +} +void Reuploaddata(void *) //重新上传数据 +{ + ReuploadData("/down", "/weather/php/SpectralDataUp.php"); + ReuploadData("/up", "/weather/php/SpectralDataUp.php"); + ReuploadData("/other", "/weather/php/WindsensorUp.php", "application/json"); +} +void Reuploaddata() //重新上传数据 +{ + ReuploadData("/down", "/weather/php/SpectralDataUp.php"); + ReuploadData("/up", "/weather/php/SpectralDataUp.php"); + ReuploadData("/other", "/weather/php/WindsensorUp.php", "application/json"); + +} + +String Datenow=""; +void printbytcp(String str) +{ + //tcpserver.SendDataToClinet(str); + Serial.println(str); + str=Datenow+"#######"+str; + int lennn=str.length(); + char *temp = new char[lennn]; + memcpy(temp, str.c_str(), str.length()); + bool flagsucc = UpdateData("/weather/php/log.php", temp, lennn); + vTaskDelay(3000); + delete[] temp; + +} + + +void esp8266_readmeichaung() +{ + //读取美创模块 + // while (myPort.read() != -1) + // ; + // delay(1000); //等待1s 防止下位机反应不过来 + // myPort.println("MLX#"); + // delay(10); + // for (int j = 0; j < 8; ++j) + // { + // ret[j] = myPort.read(); + // } + // double temprature; + // memcpy(&temprature, ret, 8); + // Serial.println("wendu"); + // Serial.println(temprature); + // Serial.println("hello word"); + +///////////////now/////////////////////////// + double temprature = myslave.getMLX(); + Serial.println("wendu"); + Serial.println(temprature); + Serial.println("hello word"); + + + + /////////////////////////////初始化windsensor并测评1�71ᅣ1�77///////////////////////////////////////////////////////////// + // while (myPort.read() != -1) + // ; + // sleep(1); + // myPort.println("WindSensor#"); + // delay(210); + // for (int j = 0; j < 17; ++j) + // { + // windret[j] = myPort.read(); + // } + // float VV = (windret[3] * 256 + windret[4]) * 1.0 / 100; + // float DD = (windret[5] * 256 + windret[6]) * 1.0 / 10; + // float TT = (windret[7] * 256 + windret[8]) * 1.0 / 100; + // float HH = (windret[9] * 256 + windret[10]) * 1.0 / 100; + // long PP = (windret[13] * 256 + windret[14]) * 256 * 256 + (windret[11] * 256 + windret[12]); + // Serial.println("VV:" + String(VV) + "DD:" + String(DD) + "TT:" + String(TT) + "HH:" + String(HH) + "PP:" + String(PP)); + + +////////////////////////////////now//////////////////////////// + myslave.getWehter(); + memcpy(windret,myslave.ret,17); + float VV = (windret[3] * 256 + windret[4]) * 1.0 / 100; + float DD = (windret[5] * 256 + windret[6]) * 1.0 / 10; + float TT = (windret[7] * 256 + windret[8]) * 1.0 / 100; + float HH = (windret[9] * 256 + windret[10]) * 1.0 / 100; + long PP = (windret[13] * 256 + windret[14]) * 256 * 256 + (windret[11] * 256 + windret[12]); + Serial.println("VV:" + String(VV) + "DD:" + String(DD) + "TT:" + String(TT) + "HH:" + String(HH) + "PP:" + String(PP)); +} + + +String get_GPS(void) +{ + Serial.println("check GPS..."); + gsmmanger->modem->sendAT(GF("+CGNSPWR?")); + gsmmanger->modem->waitResponse("OK"); + + Serial.println("Open GPS..."); + gsmmanger->modem->sendAT(GF("+CGNSPWR=1")); + gsmmanger->modem->waitResponse("OK"); + + gsmmanger->modem->sendAT(GF("+CGNSAID=31,1,1,1")); + gsmmanger->modem->waitResponse("OK"); + + Serial.println("get GNSS..."); + gsmmanger->modem->sendAT(GF("+CGNSINF")); + + String gps; + gsmmanger->modem->waitResponse(5000,gps); + // Serial.println(gps); + + return gps; +} + + +String log_path; +String log_data; +void setup() +{ + Serial2.begin(115200); + + Serial.begin(115200); + sdcard::init_sdcard(); + sdcard::testwriet(); + sdcard::Mkdir("/up"); + sdcard::Mkdir("/down"); + sdcard::Mkdir("/other"); + sdcard::Mkdir("/gps"); + sdcard::Mkdir("/log"); + beginWIFI(); + // sdcard::mylistDir("/",2); + { + } + // pinMode(21, OUTPUT); + // digitalWrite(21, HIGH); + +//////////////////////////////////////////////////////////// + + + // return; + //重启esp8266现在不用 + // pinMode(5, OUTPUT); + // digitalWrite(5, LOW); + // delay(500); + // digitalWrite(5, HIGH); + + + // pinMode(22,OUTPUT); + // digitalWrite(22,HIGH); + // pinMode(23,OUTPUT); + // digitalWrite(23,HIGH); + + + //将原来通过esp8266读取美创写成函数esp8266_readmeichaung(),方便调试。 + + // myPort.begin(38400, SWSERIAL_8N1, MYPORT_RX, MYPORT_TX, false); + myslave.init(46,45); + sleep(3); + // esp8266_readmeichaung(); + //原来的SIM800,改为现在的AIR780E4G模块,使用的是串口2。 + gsmmanger = new GSMMannger(2, 19, 20); + + http = new HttpClient(*gsmmanger->client, "82.156.1.111"); + + String Date = getnetData(); + Serial.println("date is :"+Date); + String tem = fenge(Date," ",0); + log_path = "/log/"+tem+".txt"; + log_data = Date+"\r\nSystem starts working."; + write_log(log_path,10,""); + write_log(log_path,10,log_data); + write_log(log_path,10,"AIR780E Init Success."); + vTaskDelay(1000); + + + gsmmanger->modem->sendAT(GF("+CGPIO=1,11,1")); //点灯 + gsmmanger->modem->waitResponse("OK"); + String gpsbac = get_GPS(); + Serial.println(gpsbac); + write_log(log_path,10,"GPS Init Success."); + vTaskDelay(1000); + //////////////////////////////初始化http模块////////////////////////////////////////////// + // http = new HttpClient(*gsmmanger->client, "82.156.1.111"); + ProgrameUper = new UpDateClassByme(http); + + IS1Sensor.initSensor(); + String StationID = IS1Sensor.SensorInfo.serialnumber; + String SensorID = IS1Sensor.SensorInfo.SensorName; + + + ProgrameUper->initme(Curentvsion); + ProgrameUper->StationID=StationID; + ProgrameUper->CheckAndUpdate(); + write_log(log_path,10,"Http Init Success."); + // ProgrameUper->DownloadFirmwareForurl(""); + ////////////////////////////上传IS1设备信息////////////////////////////////////////////// + + //////////////////////////////初始化IS1/////////////////////////////////////////////////// + + // String Date=getnetData(); + String Upheader = StationID + "##" + SensorID + "##" + String(IS1Sensor.SensorInfo.BandNum) + "##" + + String(IS1Sensor.SensorInfo.a1,9) + ":" + String(IS1Sensor.SensorInfo.a2,9) + ":" + String(IS1Sensor.SensorInfo.a3,9) + ":" + String(IS1Sensor.SensorInfo.a4,9)+"##"+ProgrameUper->CurrentVersion; + http->beginRequest(); + http->post("/weather/php/SensorInfoUp.php"); + http->sendHeader(HTTP_HEADER_CONTENT_LENGTH, Upheader.length()); + http->endRequest(); + http->write((const byte *)Upheader.c_str(), Upheader.length()); + http->stop(); + ticker.attach(60 * 60, Reuploaddata); + write_log(log_path,10,"IS1 Init Success."); + /////////////////////////////////////////////////////////////////////////////////////// + + log_data = "System Init Success"; + write_log(log_path,10,log_data); + // Serial.println(gsmmanger->GetDataAndTime()); +} +String lastdate=""; +void loop() +{ + String Date = getnetData(); + String tem = fenge(Date," ",0); + log_path = "/log/"+tem+".txt"; + // //擦除myport缓存 + // while (myPort.read() != -1) + // ; + // myPort.println("YULIANG#"); + // delay(510); //等待500ms + // String yuliang=myPort.readStringUntil('#'); + // delay(1010); + // Serial.println("yuliang "+yuliang); + + /////////////////NOW///////////////////// + write_log(log_path,10,""); + write_log(log_path,10,Date); + + String yuliang = String(myslave.getYuliang()); + delay(1010); + Serial.println("yuliang "+yuliang); + write_log(log_path,10,"getYuliang :"+yuliang); + + // //擦除myport缓存 + // while (myPort.read() != -1) + // ; + // myPort.println("YLFZ#"); + // delay(510); //等待500ms + // String yuliangfz=myPort.readStringUntil('#'); + // delay(1010); + // Serial.println("fuzhao "+yuliangfz); + +/////////////////NOW///////////////////// + String yuliangfz = String(myslave.getYuliang()); + delay(1010); + Serial.println("fuzhao " + yuliangfz); + log_data ="fuzhao :"+yuliangfz; + write_log(log_path,10,log_data); + // while (myPort.read() != -1) + // ; + // myPort.println("WindSensor#"); //发送指令给无参数 + // delay(510); //等待500ms + // for (int j = 0; j < 17; ++j) + // { + // windret[j] = myPort.read(); //读取返回倄1�71ᅣ1�77 + // // Serial.println(ret[j],HEX); + // } + // float VV = (windret[3] * 256 + windret[4]) * 1.0 / 100; + // float DD = (windret[5] * 256 + windret[6]) * 1.0 / 10; + // float TT = (windret[7] * 256 + windret[8]) * 1.0 / 100; + // float HH = (windret[9] * 256 + windret[10]) * 1.0 / 100; + // long PP = (windret[13] * 256 + windret[14]) * 256 * 256 + (windret[11] * 256 + windret[12]); + // Serial.println("VV:" + String(VV) + "DD:" + String(DD) + "TT:" + String(TT) + "HH:" + String(HH) + "PP:" + String(PP)); + // ////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////NOW/////////////////////////// + myslave.getWehter(); + memcpy(windret,myslave.ret,17); + float VV = (windret[3] * 256 + windret[4]) * 1.0 / 100; + float DD = (windret[5] * 256 + windret[6]) * 1.0 / 10; + float TT = (windret[7] * 256 + windret[8]) * 1.0 / 100; + float HH = (windret[9] * 256 + windret[10]) * 1.0 / 100; + long PP = (windret[13] * 256 + windret[14]) * 256 * 256 + (windret[11] * 256 + windret[12]); + Serial.println("VV:" + String(VV) + "DD:" + String(DD) + "TT:" + String(TT) + "HH:" + String(HH) + "PP:" + String(PP)); + write_log(log_path,10,"VV:" + String(VV) + "DD:" + String(DD) + "TT:" + String(TT) + "HH:" + String(HH) + "PP:" + String(PP)); + + // //读取美创模块 + // delay(1010); + // while (myPort.read() != -1) + // ; + // delay(1000); //等待1s 防止下位机反应不过来 + // myPort.println("MLX#"); + // delay(10); + // for (int j = 0; j < 8; ++j) + // { + // ret[j] = myPort.read(); + // } + // double temprature; + // memcpy(&temprature, ret, 8); + // Serial.println("wendu"); + // Serial.println(temprature); + // delay(1000); + +////////////////////////////NOW/////////////////////////// + String temprature =String(myslave.getMLX()); + Serial.println("wendu"); + Serial.println(temprature); + log_data ="wendu :"+temprature; + write_log(log_path,10,log_data); + + ////sim 循环 + + write_log(log_path,10,"start gsmmanger->loop()"); + gsmmanger->loop(); +#ifdef DINBIAO + String Datenow1=getnetData(); + Datenow =fenge(Datenow1, " ", 0) + "_" + fenge(fenge(Datenow1, " ", 1), ":", 0) + "_" + fenge(fenge(Datenow1, " ", 1), ":", 1) + "_" + fenge(fenge(Datenow1, " ", 1), ":", 2); + IS1Sensor.PrintFunc=printbytcp; +#endif + write_log(log_path,10,"start TakeOneJob()"); + IS1Sensor.TakeOneJob(); ////IS1采集一次 + String StationID = IS1Sensor.SensorInfo.serialnumber; + String SensorID = IS1Sensor.SensorInfo.SensorName; + + ///////////////获取时间 + // while (myPort.read() != -1) + // ; + // myPort.println("GETGPS#"); + // String gpsbac = myPort.readStringUntil('\n'); + // Serial.println(gpsbac); + + // String statnumberstr = fenge(gpsbac, "#", 1); + // String statnumber = fenge(statnumberstr, "_", 1); + // Serial.println(statnumber); + // String Date; + // if (statnumber.toInt() < 3) + // { + // Date = getnetData(); + // } + + write_log(log_path,10,"start get_GPS()"); + String gpsbac = get_GPS(); + + Serial.println(gpsbac); + // if (index < 28) + // { + write_log(log_path,10,"start getnetData()"); + Date = getnetData(); + // } + + + // String Date; + // Date = getnetData(); + + // str.substring(0, weizhi); + // else + // { + // String datastr = fenge(gpsbac, "#", 0); + // Date = fenge(datastr, "_", 1); + // if (hassend == 0) + // { + // gpsbac = StationID+"#"+gpsbac; + // int lennn = gpsbac.length(); + // char *temp = new char[lennn]; + // memcpy(temp, gpsbac.c_str(), gpsbac.length()); + // String nameoffile = "/gps/" + fenge(Date, " ", 0) + "_" + fenge(fenge(Date, " ", 1), ":", 0) + "_" + fenge(fenge(Date, " ", 1), ":", 1) + "_" + fenge(fenge(Date, " ", 1), ":", 2) + ".gps"; + // bool flagsucc = UpdateData("/weather/php/StationGPSinfo.php", temp, lennn); + + // if (!flagsucc) + // { + // // sdcard::WriteStringToFile(nameoffile, temp, lennn); + // } + // else{ + // Serial.println("Finish Put StationGPSinfo Data"); + // } + // delete[] temp; + + // } + // if (hassend >= 0) + // { + // hassend--; + // } + // } + + + + // delay(15000); + // if (fenge(Date, " ", 0)!=lastdate) + // { + // lastdate=fenge(Date, " ", 0); + // while (myPort.read() != -1) + // ; + // myPort.println("ClearYL#"); + // ProgrameUper->CheckAndUpdate(); + + // /* code */ + // } + // String Date; + // double temprature; + // String yuliang; + // String yuliangfz; + + + /////////*获取相关信息*////////////////////////// + String datestring=fenge(Date, " ", 0) + "_" + fenge(fenge(Date, " ", 1), ":", 0) + "_" + fenge(fenge(Date, " ", 1), ":", 1) + "_" + fenge(fenge(Date, " ", 1), ":", 2); + String Upheader = Date + "##" + StationID + "##" + SensorID + "##" + "UP" + "##"+String(IS1Sensor.shutterup)+"##"; + String Upname = "/up/" +datestring+ "_" + StationID + "_" + SensorID + "_" + "UP"; + String Downheader = Date + "##" + StationID + "##" + SensorID + "##" + "DOWN" + "##"+String(IS1Sensor.shutterdown)+"##"; + String Downname = "/down/" + datestring + "_" + StationID + "_" + SensorID + "_" + "DOWN"; + String senderID = Date + "##" + StationID + "##" + SensorID + "##" + String(temprature) + "##"+yuliang+"##"+yuliangfz+"##"; + String othername = "/other/" +datestring + "_" + StationID + "_" + SensorID + "_" + String(temprature); + // Serial.println(senderID); + // Serial.println( Upheader); + // Serial.println(Upheader.length()); + + //////////////////////上传up数据////////////////// + write_log(log_path,10,"put up data"); + size_t lennn = IS1Sensor.SensorInfo.BandNum * 2 + Upheader.length(); + char *temp = new char[IS1Sensor.SensorInfo.BandNum * 2 + Upheader.length()]; + memcpy(temp, Upheader.c_str(), Upheader.length()); + char *str=(char *)IS1Sensor.UpData; + int lenofis=IS1Sensor.SensorInfo.BandNum * 2 ; + for (size_t i = 0; i < IS1Sensor.SensorInfo.BandNum * 2; i++) + { + //temp[Upheader.length()+i]=str[i]; + } + memcpy(temp + Upheader.length(), IS1Sensor.UpData,IS1Sensor.SensorInfo.BandNum * 2); + bool flagsucc = UpdateData("/weather/php/SpectralDataUp.php", temp, lennn); + vTaskDelay(3000); + if (!flagsucc) + { + sdcard::WriteStringToFile(Upname, temp, lennn); + log_data ="Up_data upload failed,save to SD."; + write_log(log_path,10,log_data); + } + else + { + Serial.println("finish Put Up Data"); + log_data ="finish Put Up Data."; + write_log(log_path,10,log_data); + } + delete[] temp; + + + + //////////////////////上传Down数据////////////////// + write_log(log_path,10,"put dowm data"); + lennn = IS1Sensor.SensorInfo.BandNum * 2 + Downheader.length(); + temp = new char[lennn]; + memcpy(temp, Downheader.c_str(), Downheader.length()); + str=(char *)IS1Sensor.DownData; + lenofis=IS1Sensor.SensorInfo.BandNum * 2 ; + for (size_t i = 0; i < IS1Sensor.SensorInfo.BandNum * 2; i++) + { + // temp[Downheader.length()+i]=str[i]; + } + memcpy(temp + Downheader.length(), IS1Sensor.DownData,IS1Sensor.SensorInfo.BandNum * 2); + flagsucc = UpdateData("/weather/php/SpectralDataUp.php", temp, lennn); + vTaskDelay(3000); + + if (!flagsucc) + { + sdcard::WriteStringToFile(Downname, temp, lennn); + log_data ="Down_data upload failed,save to SD."; + write_log(log_path,10,log_data); + }else{ + Serial.println("finish Put Down Data"); + log_data ="finish Put Down Data."; + write_log(log_path,10,log_data); + } + delete[] temp; + + //////////////////////上传其他数据////////////////// + lennn = 12 + senderID.length(); + temp = new char[lennn]; + memcpy(temp, senderID.c_str(), senderID.length()); + memcpy(temp + senderID.length(), windret + 3, 12); + flagsucc = UpdateData("/weather/php/WindsensorUp.php", temp, lennn, "application/json"); + vTaskDelay(3000); + if (!flagsucc) + { + sdcard::WriteStringToFile(othername, temp, lennn); + log_data ="put Other Data failed,save to SD."; + write_log(log_path,10,log_data); + }else{ + Serial.println("finish Put Other Data"); + log_data ="finish Put Other Data."; + write_log(log_path,10,log_data); + } + delete[] temp; + + + //结束并等待一定时间 + // http->stop(); delay(100);return; + + delay(120000); +#ifdef DINBIAO + abort(); + ESP.restart(); +#endif + return; + + // //////以下位测试代砄1�71ᅣ1�77 + + // delay(3000); + // // int err = http->get("/weather/php/WindsensorUp.php"); + // // if (err == 0) + // { + // SerialMon.println(F("failed to connect")); + // delay(10000); + // return; + // } + // int status = http->responseStatusCode(); + // SerialMon.print(F("Response status code: ")); + // SerialMon.println(status); + // if (!status) + // { + // delay(10000); + // return; + // } + + // SerialMon.println(F("Response Headers:")); + // while (http->headerAvailable()) + // { + // String headerName = http->readHeaderName(); + // String headerValue = http->readHeaderValue(); + // SerialMon.println(" " + headerName + " : " + headerValue); + // } + + // int length = http->contentLength(); + // if (length >= 0) + // { + // SerialMon.print(F("Content length is: ")); + // SerialMon.println(length); + // } + // if (http->isResponseChunked()) + // { + // SerialMon.println(F("The response is chunked")); + // } + + // String body = http->responseBody(); + // SerialMon.println(F("Response:")); + // SerialMon.println(body); + + // SerialMon.print(F("Body length is: ")); + // SerialMon.println(body.length()); + // delay(5000); + // // Shutdown + + // // http->stop(); +} diff --git a/src/main.cpp1 b/src/main.cpp1 new file mode 100644 index 0000000..1560897 --- /dev/null +++ b/src/main.cpp1 @@ -0,0 +1,294 @@ + +/************************************************************** + * + * For this example, you need to install PubSubClient library: + * https://github.com/knolleary/pubsubclient + * or from http://librarymanager/all#PubSubClient + * + * TinyGSM Getting Started guide: + * https://tiny.cc/tinygsm-readme + * + * For more MQTT examples, see PubSubClient library + * + ************************************************************** + * This example connects to HiveMQ's showcase broker. + * + * You can quickly test sending and receiving messages from the HiveMQ webclient + * available at http://www.hivemq.com/demos/websocket-client/. + * + * Subscribe to the topic GsmClientTest/ledStatus + * Publish "toggle" to the topic GsmClientTest/led and the LED on your board + * should toggle and you should see a new message published to + * GsmClientTest/ledStatus with the newest LED status. + * + **************************************************************/ + +// Select your modem: +#define TINY_GSM_MODEM_SIM800 +// #define TINY_GSM_MODEM_SIM808 +// #define TINY_GSM_MODEM_SIM868 +// #define TINY_GSM_MODEM_SIM900 +// #define TINY_GSM_MODEM_SIM7000 +// #define TINY_GSM_MODEM_SIM7000SSL +// #define TINY_GSM_MODEM_SIM7080 +// #define TINY_GSM_MODEM_SIM5360 +// #define TINY_GSM_MODEM_SIM7600 +// #define TINY_GSM_MODEM_UBLOX +// #define TINY_GSM_MODEM_SARAR4 +// #define TINY_GSM_MODEM_M95 +// #define TINY_GSM_MODEM_BG96 +// #define TINY_GSM_MODEM_A6 +// #define TINY_GSM_MODEM_A7 +// #define TINY_GSM_MODEM_M590 +// #define TINY_GSM_MODEM_MC60 +// #define TINY_GSM_MODEM_MC60E +// #define TINY_GSM_MODEM_ESP8266 +// #define TINY_GSM_MODEM_XBEE +// #define TINY_GSM_MODEM_SEQUANS_MONARCH + +// Set serial for debug console (to the Serial Monitor, default speed 115200) +#define SerialMon Serial + +// Set serial for AT commands (to the module) +// Use Hardware Serial on Mega, Leonardo, Micro +#include +#include +#ifndef __AVR_ATmega328P__ +HardwareSerial MySerial(1); +#define SerialAT MySerial + +// or Software Serial on Uno, Nano +#else +#include +SoftwareSerial SerialAT(2, 3); // RX, TX +#endif + +// See all AT commands, if wanted +// #define DUMP_AT_COMMANDS + +// Define the serial console for debug prints, if needed +#define TINY_GSM_DEBUG SerialMon + +// Range to attempt to autobaud +// NOTE: DO NOT AUTOBAUD in production code. Once you've established +// communication, set a fixed baud rate using modem.setBaud(#). +#define GSM_AUTOBAUD_MIN 9600 +#define GSM_AUTOBAUD_MAX 115200 + +// Add a reception delay, if needed. +// This may be needed for a fast processor at a slow baud rate. +// #define TINY_GSM_YIELD() { delay(2); } + +// Define how you're planning to connect to the internet. +// This is only needed for this example, not in other code. +#define TINY_GSM_USE_GPRS true +#define TINY_GSM_USE_WIFI false + +// set GSM PIN, if any +#define GSM_PIN "" + +// Your GPRS credentials, if any +const char apn[] = "CMNET"; +const char gprsUser[] = ""; +const char gprsPass[] = ""; + +// Your WiFi connection credentials, if applicable +const char wifiSSID[] = "YourSSID"; +const char wifiPass[] = "YourWiFiPass"; + +// MQTT details +const char* broker = "broker.hivemq.com"; + +const char* topicLed = "GsmClientTest/led"; +const char* topicInit = "GsmClientTest/init"; +const char* topicLedStatus = "GsmClientTest/ledStatus"; + + + +// Just in case someone defined the wrong thing.. +#if TINY_GSM_USE_GPRS && not defined TINY_GSM_MODEM_HAS_GPRS +#undef TINY_GSM_USE_GPRS +#undef TINY_GSM_USE_WIFI +#define TINY_GSM_USE_GPRS false +#define TINY_GSM_USE_WIFI true +#endif +#if TINY_GSM_USE_WIFI && not defined TINY_GSM_MODEM_HAS_WIFI +#undef TINY_GSM_USE_GPRS +#undef TINY_GSM_USE_WIFI +#define TINY_GSM_USE_GPRS true +#define TINY_GSM_USE_WIFI false +#endif + +#ifdef DUMP_AT_COMMANDS +#include +StreamDebugger debugger(SerialAT, SerialMon); +TinyGsm modem(debugger); +#else +TinyGsm modem(SerialAT); +#endif +TinyGsmClient client(modem); +PubSubClient mqtt(client); + +#define LED_PIN 13 +int ledStatus = LOW; + +uint32_t lastReconnectAttempt = 0; + +void mqttCallback(char* topic, byte* payload, unsigned int len) { + SerialMon.print("Message arrived ["); + SerialMon.print(topic); + SerialMon.print("]: "); + SerialMon.write(payload, len); + SerialMon.println(); + + // Only proceed if incoming message's topic matches + if (String(topic) == topicLed) { + ledStatus = !ledStatus; + digitalWrite(LED_PIN, ledStatus); + mqtt.publish(topicLedStatus, ledStatus ? "1" : "0"); + } +} + +boolean mqttConnect() { + SerialMon.print("Connecting to "); + SerialMon.print(broker); + + // Connect to MQTT Broker + boolean status = mqtt.connect("GsmClientTest"); + + // Or, if you want to authenticate MQTT: + // boolean status = mqtt.connect("GsmClientName", "mqtt_user", "mqtt_pass"); + + if (status == false) { + SerialMon.println(" fail"); + return false; + } + SerialMon.println(" success"); + mqtt.publish(topicInit, "GsmClientTest started"); + mqtt.subscribe(topicLed); + return mqtt.connected(); +} + + +void setup() { + + MySerial.begin(9600, SERIAL_8N1, 26, 14); + // Set console baud rate + SerialMon.begin(115200); + delay(1010); + + pinMode(LED_PIN, OUTPUT); + + // !!!!!!!!!!! + + pinMode(32, OUTPUT); + digitalWrite(32, HIGH); + Serial.println("Wait..."); pinMode(25, OUTPUT); + pinMode(33, OUTPUT); + digitalWrite(33, LOW); + delay(1800); + Serial.println("Wait...1"); + + digitalWrite(33, HIGH); + // Set your reset, enable, power pins here + // !!!!!!!!!!! + Serial2.begin(9600); + Serial.println("Wait..."); + // MySerial.begin(115200); + delay(5000); + MySerial.print("AT\r\n"); + MySerial.print("AT\r\n"); + MySerial.print("AT\r\n"); + MySerial.print("AT\r\n"); + String input = MySerial.readString(); + Serial.println(input); + Serial.println("Wait..asdfasdf."); + while (1) + { + input =MySerial.readString(); + Serial.println(input); + MySerial.print("AT\r\n"); + delay(10); + } + + + delay(5000); + + + //Serial2.begin(9600); + //Serial2.print("AT\r\n"); + //delay(1000); + + //input = Serial2.readString(); + //Serial.println(input); + +delay(16000); + // Set GSM module baud rate + TinyGsmAutoBaud(SerialAT, 9600, 460800); + // SerialAT.begin(9600); + delay(6000); + + // Restart takes quite some time + // To skip it, call init() instead of restart() + SerialMon.println("Initializing modem..."); + // modem.restart(); + modem.init(); + + String modemInfo = modem.getModemInfo(); + SerialMon.print("Modem Info: "); + SerialMon.println(modemInfo); + +#if TINY_GSM_USE_GPRS + // Unlock your SIM card with a PIN if needed + if (GSM_PIN && modem.getSimStatus() != 3) { modem.simUnlock(GSM_PIN); } +#endif + +#if TINY_GSM_USE_WIFI + // Wifi connection parameters must be set before waiting for the network + SerialMon.print(F("Setting SSID/password...")); + if (!modem.networkConnect(wifiSSID, wifiPass)) { + SerialMon.println(" fail"); + delay(10000); + return; + } + SerialMon.println(" success"); +#endif + +#if TINY_GSM_USE_GPRS && defined TINY_GSM_MODEM_XBEE + // The XBee must run the gprsConnect function BEFORE waiting for network! + modem.gprsConnect(apn, gprsUser, gprsPass); +#endif + + SerialMon.print("Waiting for network..."); + if (!modem.waitForNetwork()) { + SerialMon.println(" fail"); + delay(10000); + return; + } + SerialMon.println(" success"); + + if (modem.isNetworkConnected()) { SerialMon.println("Network connected"); } + +#if TINY_GSM_USE_GPRS + // GPRS connection parameters are usually set after network registration + SerialMon.print(F("Connecting to ")); + SerialMon.print(apn); + if (!modem.gprsConnect(apn, gprsUser, gprsPass)) { + SerialMon.println(" fail"); + delay(10000); + return; + } + SerialMon.println(" success"); + + if (modem.isGprsConnected()) { SerialMon.println("GPRS connected"); } +#endif + + // MQTT Broker setup + mqtt.setServer(broker, 1883); + mqtt.setCallback(mqttCallback); +} + +void loop() { + // Make sure we're still registered on the network + +} diff --git a/src/optoskybase.cpp b/src/optoskybase.cpp new file mode 100644 index 0000000..2b48918 --- /dev/null +++ b/src/optoskybase.cpp @@ -0,0 +1,215 @@ +#include"optoskybase.h" +static byte datatoget[10000]; +byte echtimedata[1000]; +OptoSky::OptoSky() +{ + IsOptoskyinit=false; + result=datatoget; +} +void OptoSky::SetPortName(int serial) +{ + ISserial=new HardwareSerial(1); + ISserial->begin(115200,SERIAL_8N1,17,18); + // ISserial->println("sadfasdfsadfasdf"); + IsOptoskyinit=true; +} +void OptoSky::SendComment(byte *commend,int lenth) +{ + unsigned short lenthsend = lenth + 5; + byte *senddata=new byte[lenthsend](); + + + senddata[0] = 0xaa; + senddata[1] = 0x55; + senddata[2] = (lenth+3) / 256; + senddata[3] = (lenth+3) % 256; + for (size_t i = 0; i < lenth; i++) + { + senddata[i+4]=commend[i]; + + /* code */ + } + + int sum = 0; + for (int i = 0; i < lenth+2; i++) + { + sum = sum+senddata[i+2]; + } + senddata[lenthsend-1]=sum; + if (IsOptoskyinit) + { + while (ISserial->read()!=-1) + { + /* code */ + + } + //Serial.write(senddata,lenthsend); + ISserial->write(senddata,lenthsend); + delay(10); + + } + delete[] senddata; +} + +void OptoSky::SendComment(byte comid) +{ + SendComment(&comid,1); +} + +void OptoSky::SendComment(byte *Comment,int commentlenth, byte *data,int lenth) +{ + byte *commnetdsend=new byte[commentlenth+lenth](); + memcpy(commnetdsend,Comment,commentlenth); + memcpy(commnetdsend+commentlenth,data,lenth); + SendComment(commnetdsend,commentlenth+lenth); + delete[] commnetdsend; + +} + +void OptoSky::SendComment(byte comid, byte *data,int lenth) +{ + byte *commnetdsend=new byte[lenth+1](); + memcpy(commnetdsend,&comid,1); + memcpy(commnetdsend+1,data,lenth); + SendComment(commnetdsend,1+lenth); + delete[] commnetdsend; +} + +bool OptoSky::GetReturn(byte id,int &lenth,int timewaitbefor) +{ + if (!GetReturn(lenth,timewaitbefor)) + { + return false; + } + + if (datatoget[4]!=id) + { + Serial.println("retrun is not correct with ComId:" ); + + return false;//�1�7�1�7�1�7�1�7�1�7�1�7�1�0�1�7�1�7�1�7�1�7�1�7�0�8�1�7�1�7�1�7�5�3�1�2�1�7�1�7�1�7 + } + memcpy(datatoget,datatoget+5,lenth-1); + lenth=lenth-6; + return true; +} + +bool OptoSky::GetReturn(int &lenth,int timewaitbefor) +{ + lenth=0; + delay(timewaitbefor); + while (ISserial->available()) + { + int dataget=ISserial->readBytes(echtimedata,1000); + + for (long i = 0; i < dataget; i++) + { + datatoget[i+lenth]=echtimedata[i]; + /* code */ + } + lenth=lenth+dataget; + + + + delay(40); + + + /* code */ + } + + + + int tiemstry=0; +lable1: + while (lenth < 5) + { + delay(20); + if (ISserial->available()) + { + /* code */ + int dataget=ISserial->readBytes(echtimedata,1000); + + for (long i = 0; i < dataget; i++) + { + datatoget[i+lenth]=echtimedata[i]; + /* code */ + } + lenth=lenth+dataget; + } + + if (tiemstry> 2000) + { + Serial.println("long time no data retrun"); + Serial.print("size now:"); + Serial.println(lenth); + return false; + + } + tiemstry++; + } + if (datatoget[0] != 0xaa || datatoget[1] != 0x55) + { + memcpy(datatoget,datatoget+1,lenth-1); + lenth--; + + goto lable1; + } + + int datalenth = datatoget[2] * 256 + datatoget[3] + 2; + tiemstry=0; + while (lenth < datalenth) + { + delay(20); + if (ISserial->available()) + { + /* code */ + int dataget=ISserial->readBytes(echtimedata,1000); + + for (long i = 0; i < dataget; i++) + { + datatoget[i+lenth]=echtimedata[i]; + /* code */ + } + lenth=lenth+dataget; + } + if (tiemstry> 500) + { + Serial.println("not enouth data retrun"); + Serial.print("size now:"); + Serial.println(lenth); + return false; + + } + tiemstry++; + + } + + if (lenth > datalenth) + { + lenth=datalenth; + } + int checkleth = datalenth - 3; + unsigned int checknum = 0; + for (size_t i = 0; i < checkleth; i++) + { + + checknum = checknum + datatoget[i + 2]; + } + checknum = checknum % 256; + if (checknum != datatoget[lenth-1]) + { + Serial.println("checkerro " ); + //data.clear(); + //return false; + } + return true; + + + + + +} + +bool OptoSky::isSensorInit() +{ + return IsOptoskyinit; +} \ No newline at end of file diff --git a/src/optoskybase.h b/src/optoskybase.h new file mode 100644 index 0000000..721d072 --- /dev/null +++ b/src/optoskybase.h @@ -0,0 +1,77 @@ + + +#ifndef __OPTOSKYBASE_H__ +#define __OPTOSKYBASE_H__ +#include"HardwareSerial.h" + +struct STRSensorInfo +{ + String SensorName; + long maxValue; + long BandNum; + String WavelenthStr; + float *wavelenthlist; + //double *wavelenth; + bool isSensorInit; + String serialnumber; + float a1,a2,a3,a4; + +}; + + + +#define GET_MODEBOARD_TEMP 0x01 +#define GET_PN_NUMBER 0x03 +#define GET_SN_NUMBER 0x04 +#define GET_MANUFACTURE_DATA 0x06 +#define GET_MANUFACTOR_INFO 0x09 +#define GET_PIXEL_LENGTH 0x0a +#define GET_TEC_TEMP 0x13 +#define SET_TEC_TEMP 0x12 +#define GET_OPTICFLAT_TEMP 0x35 +#define GET_CIRCUIT_BOARD_TEMP 0x36 +#define SET_INTEGRAL_TIME 0x14 +#define GET_INTEGRAL_TIME 0x41 +#define GET_MAX_INTEGRAL_TIME 0x42 +#define GET_MIN_INTEGRAL_TIME 0x43 +#define ASYNCHRONOUS_COLLECT_DARK 0x23 +#define ASYNCHRONOUS_START_COLLECTION 0x16 +#define ASYNCHRONOUS_READ_DATA 0x17 +#define SET_AVERAGE_NUMBER 0x28 +#define SYNCHRONIZATION_GET_DATA 0x1e +#define SYNCHRONIZATION_GET_DARK 0x2f +//#define SYNCHRONIZATION_GET_DARK 0x23 +#define EXTERNAL_TRIGGER_ENABLE 0x1f +#define SET_XENON_LAMP_DELAY_TIME 0x24 +#define GET_WAVELENGTH_CALIBRATION_COFF 0x55 +#define GET_STAT_OF_LAMPOUT 0x60 +#define SET_GPIO 0x61 +#define byte u_char + + + + + + + + +class OptoSky +{ + public: + OptoSky(); +byte *result; +HardwareSerial *ISserial; +bool IsOptoskyinit; +void SetPortName(int serial); +void SendComment(byte *commend,int lenth); +void SendComment(byte comid); +void SendComment(byte *Comment,int commentlenth, byte *data,int lenth); +void SendComment(byte comid, byte *data,int lenth); +bool GetReturn(byte id,int &lenth,int timewaitbefor=20); +bool GetReturn(int &lenth,int timewaitbefor); + +bool isSensorInit(); +void RemoveHeaderandEnd(byte *data,int lenth); + +}; +#endif // __OPTOSKYBASE_H__ \ No newline at end of file diff --git a/src/slave.cpp b/src/slave.cpp new file mode 100644 index 0000000..ac76537 --- /dev/null +++ b/src/slave.cpp @@ -0,0 +1,120 @@ +#include "slave.h" + +double new_emissivity =0.95; + + +Adafruit_MLX90614 mlx = Adafruit_MLX90614(); +TwoWire wireme(0); + +u_char a[]={0x01,0x04,0x00,0x00,0x00 ,0x06,0x70,0x08}; +u_char yuliang[]={0x02, 0x03, 0x00, 0x00 ,0x00, 0x01, 0x84, 0x39}; +u_char ClearYL[]={0x02,0x06,0x00, 0x00 ,0x00 ,0x5A ,0X09 ,0Xc2}; +u_char yuliangfuliangdu[]={0x02,0x03,0x00,0x02,0x00,0x02,0x65,0xf8}; + +u_char openGNRMC[]={0xF1,0xD9,0x06,0x01,0x03,0x00,0xF0,0x05,0x01,0x00,0x1A}; +u_char gpsSaveConfig[]={0xF1,0xD9,0x06,0x09,0x08,0x00,0x00,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0x46,0xB7}; + + + +SoftwareSerial *my485Port; +void slave::init(int8_t MY485PORT_RX,int8_t MY485PORT_TX){ + // put your setup code here, to run once: + //Wire.begin(4,5); + + Serial.println("slave init ..."); + my485Port = new SoftwareSerial(MY485PORT_RX ,MY485PORT_TX,false); + my485Port->begin(9600, SWSERIAL_8N1, MY485PORT_RX, MY485PORT_TX, false); + + ///////////// 光谱电源控制,重启 + pinMode(36,OUTPUT); + digitalWrite(36,LOW); + delay(2000); + digitalWrite(36,HIGH); + + + // GPSSeiral.begin(115200, SWSERIAL_8N1, 2, 12, false); + wireme.setPins(7,8); + + if (!mlx.begin(MLX90614_I2CADDR,&wireme)) { + Serial.println("Error connecting to MLX sensor. Check wiring."); + //while (1); + }; + mlx.writeEmissivity(new_emissivity); // this does the 0x0000 erase write + Serial.println(sizeof(openGNRMC)); + +} + +double slave::getMLX(){ + double a =mlx.readObjectTempC(); + return a; + // Serial.write((char*) &a,8); +} + +void slave::getWehter(){ + while (my485Port->read()!=-1); + my485Port->write(a,8); + delay(90); + for (int j = 0; j <17 ; ++j) { + ret[j]=my485Port->read(); + } + float VV=(ret[3]*256+ret[4])*1.0/100; + float DD=(ret[5]*256+ret[6])*1.0/10; + float TT=(ret[7]*256+ret[8])*1.0/100; + float HH=(ret[9]*256+ret[10])*1.0/100; + long PP=(ret[13]*256+ret[14])*256*256+(ret[11]*256+ret[12]); +#ifdef DEBG + String str_getWehter = "VV:"+String(VV)+" DD:"+String(DD)+" TT:"+String(TT)+" HH:"+String(HH)+" PP:"+String(PP); + // return str; + // Serial.println("VV:"+String(VV)+" DD:"+String(DD)+" TT:"+String(TT)+" HH:"+String(HH)+" PP:"+String(PP)); +#endif + // Serial.write(ret,17); +} + +float slave::getYuliang(){ + while (my485Port->read()!=-1); + my485Port->write(yuliang,8); + delay(90); + + for (int j = 0; j <7; ++j) { + ret[j]=my485Port->read(); + } + float Value=ret[3]*256+ret[4]; + Value=Value/10; + // Serial.write(ret,7); + // Serial.print(Value); + // Serial.print("#"); + + return Value; + +} + +int32_t slave::getYuliangfuliang(){ + while (my485Port->read()!=-1); + my485Port->write(yuliangfuliangdu,8); + delay(90); + + for (int j = 0; j <7; ++j) { + ret[j]=my485Port->read(); + } + int32_t Value=(ret[3]*256+ret[4])*256*256+ret[5]*256+ret[6]; + // Value=Value/10; + // Serial.write(ret,7); + // Serial.print(Value); + // Serial.print("#"); + + return Value; +} + +/// 返回1,表示ok +uint8_t slave::claeryuliang(){ + while (my485Port->read()!=-1); + my485Port->write(ClearYL,8); + delay(90); + for (int j = 0; j <8; ++j) { + ret[j]=my485Port->read(); + } + // Serial.print("OK"); + return 1; +} + + diff --git a/src/slave.h b/src/slave.h new file mode 100644 index 0000000..1ca17fc --- /dev/null +++ b/src/slave.h @@ -0,0 +1,30 @@ +#ifndef _SLAVE_H_ +#define _SLAVE_H_ + +#include +#include "SoftwareSerial.h" +#include "Wire.h" +#include +//#define DEBUG_SERIAL Serial +#include +#include "SparkFun_Ublox_Arduino_Library.h" + + +class slave +{ + public: + u_char ret[17]; + String str_getWehter; + + void init(int8_t MYPORT_RX,int8_t MYPORT_TX); + double getMLX(); + void getWehter(); + float getYuliang(); + int32_t getYuliangfuliang(); + uint8_t claeryuliang(); +}; + + + + +#endif \ No newline at end of file diff --git a/src/updatebyme.cpp b/src/updatebyme.cpp new file mode 100644 index 0000000..a71d190 --- /dev/null +++ b/src/updatebyme.cpp @@ -0,0 +1,233 @@ +#include "updatebyme.h" +#include "SDmanger.h" +void UpDateClassByme::performUpdate(Stream &updateSource, size_t updateSize) +{ + if (Update.begin(updateSize)) + { + Serial.println("Writes : "); + size_t written = Update.writeStream(updateSource); + if (written == updateSize) + { + Serial.println("Writes : " + String(written) + " successfully"); + } + else + { + Serial.println("Written only : " + String(written) + "/" + String(updateSize) + ". Retry?"); + } + if (Update.end()) + { + Serial.println("OTA finished!"); + if (Update.isFinished()) + { + Serial.println("Restart ESP device!"); + abort(); + } + else + { + Serial.println("OTA not fiished"); + } + } + else + { + Serial.println("Error occured #: " + String(Update.getError())); + } + } + else + { + Serial.println("Cannot beggin update"); + } +} + + +size_t UpDateClassByme::DownloadFirmwareForurl(String version) +{ + String url="/weather/firmware/esp32/firmware_"+version+".bin"; + int err = http->get(url.c_str()); + if (err != 0) + { + Serial.println(F("Date failed to connect")); + delay(10000); + return 0; + } + int status = http->responseStatusCode(); + if (!status) + { + delay(10000); + return 0; + } + Serial.print(F("Response status code: ")); + Serial.println(status); + // SerialMon.println(F("Response Headers:")); + size_t count=0; + while (http->headerAvailable()) + { + String headerName = http->readHeaderName(); + String headerValue = http->readHeaderValue(); + Serial.println("Date: " + headerName + " : " + headerValue); + if (headerName=="Content-Length") + { + count=headerValue.toInt(); + /* code */ + } + + + } + Serial.println("lenth is "+String(count)); + if (http->isResponseChunked()) + { + Serial.println(F("Date The response is chunked")); + } + char *str=new char[1000]; + int lent=count/1000; + File file; + + file = SD_MMC.open("/update.bin", "wb"); + + for (size_t i = 0; i < lent; i++) + { + http->readBytes(str,1000); + file.write((const byte *)str,1000); + Serial.print("download "); + Serial.println(String(i*100/lent)); + /* code */ + } + http->readBytes(str,count%1000); + file.write((const byte *)str,count%1000); + file.flush(); + file.close(); + //performUpdate(*http,cout); + + + // http->readBytes + Serial.println("adfasdfsadfsdfsd"); + //Serial.write(str,cout); + //Serial.println(body.length()); + http->stop(); + return count; + // return body; +} + +void UpDateClassByme::initme(String Version) +{ + CurrentVersion=Version; + +} +void UpDateClassByme::updateversion() +{ + String Targetversion=GetValueFromNet("/weather/php/upVserion.php",StationID+":"+CurrentVersion); +} +bool UpDateClassByme::CheckAndUpdate() +{ + + + String Targetversion=GetValueFromNet("/weather/php/GetVserion.php",StationID); + if ( Targetversion=="0"||Targetversion==CurrentVersion||Targetversion=="") + { + return true; + + } + Serial.println("targetvesion is:"+Targetversion); + + //size_t countdownload1=375584; + size_t countdownload1=DownloadFirmwareForurl(Targetversion); + if (countdownload1<10000) + { + return false; + } + Serial.println("count download is:"+String(countdownload1)); + + String MD5=GetValueFromNet("/weather/php/GetMD5Value.php",Targetversion); + + if (MD5=="0") + { + return false; + + } + + // updater.setMD5(MD5); + MD5Builder md5my; + + + File file; + + file = SD_MMC.open("/update.bin", "rb"); + md5my.begin(); + md5my.addStream(file,countdownload1); + md5my.calculate(); + String md5com=md5my.toString(); + Serial.println("md5 comput is:"+md5my.toString()); + Serial.println("md5 should is:"+MD5); + file.close(); + if (MD5==md5com) + { + file = SD_MMC.open("/update.bin", "rb"); + performUpdate(file,countdownload1); + return true; + /* code */ + } + + + + + return true; + + + + + + + +} + + + + + + + + + +UpDateClassByme::UpDateClassByme(HttpClient *httptm) +{ + http=httptm; + StationID="000"; +} +String UpDateClassByme::GetValueFromNet(String url,String Key) +{ + + http->beginRequest(); + http->post(url.c_str()); + + + http->sendHeader(HTTP_HEADER_CONTENT_LENGTH, Key.length()); + http->endRequest(); + int err = http->write((const byte *)Key.c_str(), Key.length()); + Serial.print("send date size"); + Serial.println(err); + + if (err == 0) + { + + http->stop(); + return "-1"; + } + int status = http->responseStatusCode(); + if (!status) + { + http->stop(); + return "-1"; + } + + int length = http->contentLength(); + if (length == 0) + { + http->stop(); + return "-1"; + } + + String body = http->responseBody(); + Serial.println("body:"+body); + + http->stop(); + return body; +} diff --git a/src/updatebyme.h b/src/updatebyme.h new file mode 100644 index 0000000..1603bca --- /dev/null +++ b/src/updatebyme.h @@ -0,0 +1,23 @@ +#ifndef UPDATEBYME_H +#define UPDATEBYME_H +#include +#include +class UpDateClassByme{ + public: +UpdateClass updater; +UpDateClassByme(HttpClient *httptm); +void performUpdate(Stream &updateSource, size_t updateSize); +HttpClient *http; +size_t DownloadFirmwareForurl(String version); +String CurrentVersion; +void initme(String Version); +bool CheckAndUpdate(); +String StationID; +String GetValueFromNet(String url,String Key); +void updateversion(); +}; + + + + +#endif \ No newline at end of file diff --git a/src/wifidebug.cpp b/src/wifidebug.cpp new file mode 100644 index 0000000..5677636 --- /dev/null +++ b/src/wifidebug.cpp @@ -0,0 +1,41 @@ +#include +#include + + + +#ifdef DebugCalibration +const char *ssid = "SmartForCalibration"; +const char *password = "123456789"; +IPAddress local_IP(192, 168, 1,2); +IPAddress gateway(192, 168, 1, 2); +IPAddress subnet(255, 255, 255, 0); +TCPserver *tcpserver; +void beginWIFI(){ + tcpserver=new TCPserver(23); + WiFi.mode( WIFI_MODE_AP ); + Serial.println("init webserver ok 33333"); + WiFi.softAPConfig(local_IP, gateway, subnet); + boolean result = WiFi.softAP(ssid, password); + + tcpserver->loop(); + +} +void tcploop(){ + tcpserver->loop(); +} + + +void printbytcpserver(String str) +{ + tcpserver->SendDataToClinet(str); + tcpserver->loop(); + // Serial.println(str); + +} +#endif +#ifndef DebugCalibration +void beginWIFI(){} +void printbytcpserver(String str){} +void tcploop(){} +#endif + diff --git a/src/wifidebug.h b/src/wifidebug.h new file mode 100644 index 0000000..cf5012f --- /dev/null +++ b/src/wifidebug.h @@ -0,0 +1,16 @@ + +#include"Arduino.h" +#include"Define.h" +#ifdef DebugCalibration +#include"WiFi.h" +#endif + +void beginWIFI(); +void printbytcpserver(String str); +void tcploop(); + + + + + + diff --git a/weatherslave/.gitignore b/weatherslave/.gitignore new file mode 100644 index 0000000..179cdd1 --- /dev/null +++ b/weatherslave/.gitignore @@ -0,0 +1,7 @@ +.pio/build +.vscode/.browse.c_cpp.db* +.vscode/c_cpp_properties.json +.vscode/launch.json +.vscode/ipch +/test/ +/.vscode/ diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/.github/ISSUE_TEMPLATE.md b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..f0e2614 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,46 @@ +Thank you for opening an issue on an Adafruit Arduino library repository. To +improve the speed of resolution please review the following guidelines and +common troubleshooting steps below before creating the issue: + +- **Do not use GitHub issues for troubleshooting projects and issues.** Instead use + the forums at http://forums.adafruit.com to ask questions and troubleshoot why + something isn't working as expected. In many cases the problem is a common issue + that you will more quickly receive help from the forum community. GitHub issues + are meant for known defects in the code. If you don't know if there is a defect + in the code then start with troubleshooting on the forum first. + +- **If following a tutorial or guide be sure you didn't miss a step.** Carefully + check all of the steps and commands to run have been followed. Consult the + forum if you're unsure or have questions about steps in a guide/tutorial. + +- **For Arduino projects check these very common issues to ensure they don't apply**: + + - For uploading sketches or communicating with the board make sure you're using + a **USB data cable** and **not** a **USB charge-only cable**. It is sometimes + very hard to tell the difference between a data and charge cable! Try using the + cable with other devices or swapping to another cable to confirm it is not + the problem. + + - **Be sure you are supplying adequate power to the board.** Check the specs of + your board and plug in an external power supply. In many cases just + plugging a board into your computer is not enough to power it and other + peripherals. + + - **Double check all soldering joints and connections.** Flakey connections + cause many mysterious problems. See the [guide to excellent soldering](https://learn.adafruit.com/adafruit-guide-excellent-soldering/tools) for examples of good solder joints. + + - **Ensure you are using an official Arduino or Adafruit board.** We can't + guarantee a clone board will have the same functionality and work as expected + with this code and don't support them. + +If you're sure this issue is a defect in the code and checked the steps above +please fill in the following fields to provide enough troubleshooting information. +You may delete the guideline and text above to just leave the following details: + +- Arduino board: **INSERT ARDUINO BOARD NAME/TYPE HERE** + +- Arduino IDE version (found in Arduino -> About Arduino menu): **INSERT ARDUINO + VERSION HERE** + +- List the steps to reproduce the problem below (if possible attach a sketch or + copy the sketch code in too): **LIST REPRO STEPS BELOW** diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/.github/PULL_REQUEST_TEMPLATE.md b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..7b641eb --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,26 @@ +Thank you for creating a pull request to contribute to Adafruit's GitHub code! +Before you open the request please review the following guidelines and tips to +help it be more easily integrated: + +- **Describe the scope of your change--i.e. what the change does and what parts + of the code were modified.** This will help us understand any risks of integrating + the code. + +- **Describe any known limitations with your change.** For example if the change + doesn't apply to a supported platform of the library please mention it. + +- **Please run any tests or examples that can exercise your modified code.** We + strive to not break users of the code and running tests/examples helps with this + process. + +Thank you again for contributing! We will try to test and integrate the change +as soon as we can, but be aware we have many GitHub repositories to manage and +can't immediately respond to every request. There is no need to bump or check in +on a pull request (it will clutter the discussion of the request). + +Also don't be worried if the request is closed or not integrated--sometimes the +priorities of Adafruit's GitHub code (education, ease of use) might not match the +priorities of the pull request. Don't fret, the open source community thrives on +forks and GitHub makes it easy to keep your changes in a forked repo. + +After reviewing the guidelines above you can delete this text from the pull request. diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/.github/workflows/githubci.yml b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/.github/workflows/githubci.yml new file mode 100644 index 0000000..d0e3229 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/.github/workflows/githubci.yml @@ -0,0 +1,32 @@ +name: Arduino Library CI + +on: [pull_request, push, repository_dispatch] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/setup-python@v1 + with: + python-version: '3.x' + - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + with: + repository: adafruit/ci-arduino + path: ci + + - name: pre-install + run: bash ci/actions_install.sh + + - name: test platforms + run: python3 ci/build_platform.py main_platforms zero feather32u4 + + - name: clang + run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -r . + + - name: doxygen + env: + GH_REPO_TOKEN: ${{ secrets.GH_REPO_TOKEN }} + PRETTYNAME : "Adafruit Bus IO Library" + run: bash ci/doxy_gen_and_deploy.sh diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/.piopm b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/.piopm new file mode 100644 index 0000000..233fbf6 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/.piopm @@ -0,0 +1 @@ +{"type": "library", "name": "Adafruit BusIO", "version": "1.11.4", "spec": {"owner": "adafruit", "id": 6214, "name": "Adafruit BusIO", "requirements": null, "url": null}} \ No newline at end of file diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_BusIO_Register.cpp b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_BusIO_Register.cpp new file mode 100644 index 0000000..a28193f --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_BusIO_Register.cpp @@ -0,0 +1,365 @@ +#include + +#if !defined(SPI_INTERFACES_COUNT) || \ + (defined(SPI_INTERFACES_COUNT) && (SPI_INTERFACES_COUNT > 0)) + +/*! + * @brief Create a register we access over an I2C Device (which defines the + * bus and address) + * @param i2cdevice The I2CDevice to use for underlying I2C access + * @param reg_addr The address pointer value for the I2C/SMBus register, can + * be 8 or 16 bits + * @param width The width of the register data itself, defaults to 1 byte + * @param byteorder The byte order of the register (used when width is > 1), + * defaults to LSBFIRST + * @param address_width The width of the register address itself, defaults + * to 1 byte + */ +Adafruit_BusIO_Register::Adafruit_BusIO_Register(Adafruit_I2CDevice *i2cdevice, + uint16_t reg_addr, + uint8_t width, + uint8_t byteorder, + uint8_t address_width) { + _i2cdevice = i2cdevice; + _spidevice = nullptr; + _addrwidth = address_width; + _address = reg_addr; + _byteorder = byteorder; + _width = width; +} + +/*! + * @brief Create a register we access over an SPI Device (which defines the + * bus and CS pin) + * @param spidevice The SPIDevice to use for underlying SPI access + * @param reg_addr The address pointer value for the SPI register, can + * be 8 or 16 bits + * @param type The method we use to read/write data to SPI (which is not + * as well defined as I2C) + * @param width The width of the register data itself, defaults to 1 byte + * @param byteorder The byte order of the register (used when width is > 1), + * defaults to LSBFIRST + * @param address_width The width of the register address itself, defaults + * to 1 byte + */ +Adafruit_BusIO_Register::Adafruit_BusIO_Register(Adafruit_SPIDevice *spidevice, + uint16_t reg_addr, + Adafruit_BusIO_SPIRegType type, + uint8_t width, + uint8_t byteorder, + uint8_t address_width) { + _spidevice = spidevice; + _spiregtype = type; + _i2cdevice = nullptr; + _addrwidth = address_width; + _address = reg_addr; + _byteorder = byteorder; + _width = width; +} + +/*! + * @brief Create a register we access over an I2C or SPI Device. This is a + * handy function because we can pass in nullptr for the unused interface, + * allowing libraries to mass-define all the registers + * @param i2cdevice The I2CDevice to use for underlying I2C access, if + * nullptr we use SPI + * @param spidevice The SPIDevice to use for underlying SPI access, if + * nullptr we use I2C + * @param reg_addr The address pointer value for the I2C/SMBus/SPI register, + * can be 8 or 16 bits + * @param type The method we use to read/write data to SPI (which is not + * as well defined as I2C) + * @param width The width of the register data itself, defaults to 1 byte + * @param byteorder The byte order of the register (used when width is > 1), + * defaults to LSBFIRST + * @param address_width The width of the register address itself, defaults + * to 1 byte + */ +Adafruit_BusIO_Register::Adafruit_BusIO_Register( + Adafruit_I2CDevice *i2cdevice, Adafruit_SPIDevice *spidevice, + Adafruit_BusIO_SPIRegType type, uint16_t reg_addr, uint8_t width, + uint8_t byteorder, uint8_t address_width) { + _spidevice = spidevice; + _i2cdevice = i2cdevice; + _spiregtype = type; + _addrwidth = address_width; + _address = reg_addr; + _byteorder = byteorder; + _width = width; +} + +/*! + * @brief Write a buffer of data to the register location + * @param buffer Pointer to data to write + * @param len Number of bytes to write + * @return True on successful write (only really useful for I2C as SPI is + * uncheckable) + */ +bool Adafruit_BusIO_Register::write(uint8_t *buffer, uint8_t len) { + + uint8_t addrbuffer[2] = {(uint8_t)(_address & 0xFF), + (uint8_t)(_address >> 8)}; + + if (_i2cdevice) { + return _i2cdevice->write(buffer, len, true, addrbuffer, _addrwidth); + } + if (_spidevice) { + if (_spiregtype == ADDRESSED_OPCODE_BIT0_LOW_TO_WRITE) { + // very special case! + + // pass the special opcode address which we set as the high byte of the + // regaddr + addrbuffer[0] = + (uint8_t)(_address >> 8) & ~0x01; // set bottom bit low to write + // the 'actual' reg addr is the second byte then + addrbuffer[1] = (uint8_t)(_address & 0xFF); + // the address appears to be a byte longer + return _spidevice->write(buffer, len, addrbuffer, _addrwidth + 1); + } + + if (_spiregtype == ADDRBIT8_HIGH_TOREAD) { + addrbuffer[0] &= ~0x80; + } + if (_spiregtype == ADDRBIT8_HIGH_TOWRITE) { + addrbuffer[0] |= 0x80; + } + if (_spiregtype == AD8_HIGH_TOREAD_AD7_HIGH_TOINC) { + addrbuffer[0] &= ~0x80; + addrbuffer[0] |= 0x40; + } + return _spidevice->write(buffer, len, addrbuffer, _addrwidth); + } + return false; +} + +/*! + * @brief Write up to 4 bytes of data to the register location + * @param value Data to write + * @param numbytes How many bytes from 'value' to write + * @return True on successful write (only really useful for I2C as SPI is + * uncheckable) + */ +bool Adafruit_BusIO_Register::write(uint32_t value, uint8_t numbytes) { + if (numbytes == 0) { + numbytes = _width; + } + if (numbytes > 4) { + return false; + } + + // store a copy + _cached = value; + + for (int i = 0; i < numbytes; i++) { + if (_byteorder == LSBFIRST) { + _buffer[i] = value & 0xFF; + } else { + _buffer[numbytes - i - 1] = value & 0xFF; + } + value >>= 8; + } + return write(_buffer, numbytes); +} + +/*! + * @brief Read data from the register location. This does not do any error + * checking! + * @return Returns 0xFFFFFFFF on failure, value otherwise + */ +uint32_t Adafruit_BusIO_Register::read(void) { + if (!read(_buffer, _width)) { + return -1; + } + + uint32_t value = 0; + + for (int i = 0; i < _width; i++) { + value <<= 8; + if (_byteorder == LSBFIRST) { + value |= _buffer[_width - i - 1]; + } else { + value |= _buffer[i]; + } + } + + return value; +} + +/*! + * @brief Read cached data from last time we wrote to this register + * @return Returns 0xFFFFFFFF on failure, value otherwise + */ +uint32_t Adafruit_BusIO_Register::readCached(void) { return _cached; } + +/*! + * @brief Read a buffer of data from the register location + * @param buffer Pointer to data to read into + * @param len Number of bytes to read + * @return True on successful write (only really useful for I2C as SPI is + * uncheckable) + */ +bool Adafruit_BusIO_Register::read(uint8_t *buffer, uint8_t len) { + uint8_t addrbuffer[2] = {(uint8_t)(_address & 0xFF), + (uint8_t)(_address >> 8)}; + + if (_i2cdevice) { + return _i2cdevice->write_then_read(addrbuffer, _addrwidth, buffer, len); + } + if (_spidevice) { + if (_spiregtype == ADDRESSED_OPCODE_BIT0_LOW_TO_WRITE) { + // very special case! + + // pass the special opcode address which we set as the high byte of the + // regaddr + addrbuffer[0] = + (uint8_t)(_address >> 8) | 0x01; // set bottom bit high to read + // the 'actual' reg addr is the second byte then + addrbuffer[1] = (uint8_t)(_address & 0xFF); + // the address appears to be a byte longer + return _spidevice->write_then_read(addrbuffer, _addrwidth + 1, buffer, + len); + } + if (_spiregtype == ADDRBIT8_HIGH_TOREAD) { + addrbuffer[0] |= 0x80; + } + if (_spiregtype == ADDRBIT8_HIGH_TOWRITE) { + addrbuffer[0] &= ~0x80; + } + if (_spiregtype == AD8_HIGH_TOREAD_AD7_HIGH_TOINC) { + addrbuffer[0] |= 0x80 | 0x40; + } + return _spidevice->write_then_read(addrbuffer, _addrwidth, buffer, len); + } + return false; +} + +/*! + * @brief Read 2 bytes of data from the register location + * @param value Pointer to uint16_t variable to read into + * @return True on successful write (only really useful for I2C as SPI is + * uncheckable) + */ +bool Adafruit_BusIO_Register::read(uint16_t *value) { + if (!read(_buffer, 2)) { + return false; + } + + if (_byteorder == LSBFIRST) { + *value = _buffer[1]; + *value <<= 8; + *value |= _buffer[0]; + } else { + *value = _buffer[0]; + *value <<= 8; + *value |= _buffer[1]; + } + return true; +} + +/*! + * @brief Read 1 byte of data from the register location + * @param value Pointer to uint8_t variable to read into + * @return True on successful write (only really useful for I2C as SPI is + * uncheckable) + */ +bool Adafruit_BusIO_Register::read(uint8_t *value) { + if (!read(_buffer, 1)) { + return false; + } + + *value = _buffer[0]; + return true; +} + +/*! + * @brief Pretty printer for this register + * @param s The Stream to print to, defaults to &Serial + */ +void Adafruit_BusIO_Register::print(Stream *s) { + uint32_t val = read(); + s->print("0x"); + s->print(val, HEX); +} + +/*! + * @brief Pretty printer for this register + * @param s The Stream to print to, defaults to &Serial + */ +void Adafruit_BusIO_Register::println(Stream *s) { + print(s); + s->println(); +} + +/*! + * @brief Create a slice of the register that we can address without + * touching other bits + * @param reg The Adafruit_BusIO_Register which defines the bus/register + * @param bits The number of bits wide we are slicing + * @param shift The number of bits that our bit-slice is shifted from LSB + */ +Adafruit_BusIO_RegisterBits::Adafruit_BusIO_RegisterBits( + Adafruit_BusIO_Register *reg, uint8_t bits, uint8_t shift) { + _register = reg; + _bits = bits; + _shift = shift; +} + +/*! + * @brief Read 4 bytes of data from the register + * @return data The 4 bytes to read + */ +uint32_t Adafruit_BusIO_RegisterBits::read(void) { + uint32_t val = _register->read(); + val >>= _shift; + return val & ((1 << (_bits)) - 1); +} + +/*! + * @brief Write 4 bytes of data to the register + * @param data The 4 bytes to write + * @return True on successful write (only really useful for I2C as SPI is + * uncheckable) + */ +bool Adafruit_BusIO_RegisterBits::write(uint32_t data) { + uint32_t val = _register->read(); + + // mask off the data before writing + uint32_t mask = (1 << (_bits)) - 1; + data &= mask; + + mask <<= _shift; + val &= ~mask; // remove the current data at that spot + val |= data << _shift; // and add in the new data + + return _register->write(val, _register->width()); +} + +/*! + * @brief The width of the register data, helpful for doing calculations + * @returns The data width used when initializing the register + */ +uint8_t Adafruit_BusIO_Register::width(void) { return _width; } + +/*! + * @brief Set the default width of data + * @param width the default width of data read from register + */ +void Adafruit_BusIO_Register::setWidth(uint8_t width) { _width = width; } + +/*! + * @brief Set register address + * @param address the address from register + */ +void Adafruit_BusIO_Register::setAddress(uint16_t address) { + _address = address; +} + +/*! + * @brief Set the width of register address + * @param address_width the width for register address + */ +void Adafruit_BusIO_Register::setAddressWidth(uint16_t address_width) { + _addrwidth = address_width; +} + +#endif // SPI exists diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_BusIO_Register.h b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_BusIO_Register.h new file mode 100644 index 0000000..c6d58de --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_BusIO_Register.h @@ -0,0 +1,105 @@ +#ifndef Adafruit_BusIO_Register_h +#define Adafruit_BusIO_Register_h + +#include + +#if !defined(SPI_INTERFACES_COUNT) || \ + (defined(SPI_INTERFACES_COUNT) && (SPI_INTERFACES_COUNT > 0)) + +#include +#include + +typedef enum _Adafruit_BusIO_SPIRegType { + ADDRBIT8_HIGH_TOREAD = 0, + /*!< + * ADDRBIT8_HIGH_TOREAD + * When reading a register you must actually send the value 0x80 + register + * address to the device. e.g. To read the register 0x0B the register value + * 0x8B is sent and to write 0x0B is sent. + */ + AD8_HIGH_TOREAD_AD7_HIGH_TOINC = 1, + + /*!< + * ADDRBIT8_HIGH_TOWRITE + * When writing to a register you must actually send the value 0x80 + + * the register address to the device. e.g. To write to the register 0x19 the + * register value 0x99 is sent and to read 0x19 is sent. + */ + ADDRBIT8_HIGH_TOWRITE = 2, + + /*!< + * ADDRESSED_OPCODE_LOWBIT_TO_WRITE + * Used by the MCP23S series, we send 0x40 |'rd with the opcode + * Then set the lowest bit to write + */ + ADDRESSED_OPCODE_BIT0_LOW_TO_WRITE = 3, + +} Adafruit_BusIO_SPIRegType; + +/*! + * @brief The class which defines a device register (a location to read/write + * data from) + */ +class Adafruit_BusIO_Register { +public: + Adafruit_BusIO_Register(Adafruit_I2CDevice *i2cdevice, uint16_t reg_addr, + uint8_t width = 1, uint8_t byteorder = LSBFIRST, + uint8_t address_width = 1); + + Adafruit_BusIO_Register(Adafruit_SPIDevice *spidevice, uint16_t reg_addr, + Adafruit_BusIO_SPIRegType type, uint8_t width = 1, + uint8_t byteorder = LSBFIRST, + uint8_t address_width = 1); + + Adafruit_BusIO_Register(Adafruit_I2CDevice *i2cdevice, + Adafruit_SPIDevice *spidevice, + Adafruit_BusIO_SPIRegType type, uint16_t reg_addr, + uint8_t width = 1, uint8_t byteorder = LSBFIRST, + uint8_t address_width = 1); + + bool read(uint8_t *buffer, uint8_t len); + bool read(uint8_t *value); + bool read(uint16_t *value); + uint32_t read(void); + uint32_t readCached(void); + bool write(uint8_t *buffer, uint8_t len); + bool write(uint32_t value, uint8_t numbytes = 0); + + uint8_t width(void); + + void setWidth(uint8_t width); + void setAddress(uint16_t address); + void setAddressWidth(uint16_t address_width); + + void print(Stream *s = &Serial); + void println(Stream *s = &Serial); + +private: + Adafruit_I2CDevice *_i2cdevice; + Adafruit_SPIDevice *_spidevice; + Adafruit_BusIO_SPIRegType _spiregtype; + uint16_t _address; + uint8_t _width, _addrwidth, _byteorder; + uint8_t _buffer[4]; // we won't support anything larger than uint32 for + // non-buffered read + uint32_t _cached = 0; +}; + +/*! + * @brief The class which defines a slice of bits from within a device register + * (a location to read/write data from) + */ +class Adafruit_BusIO_RegisterBits { +public: + Adafruit_BusIO_RegisterBits(Adafruit_BusIO_Register *reg, uint8_t bits, + uint8_t shift); + bool write(uint32_t value); + uint32_t read(void); + +private: + Adafruit_BusIO_Register *_register; + uint8_t _bits, _shift; +}; + +#endif // SPI exists +#endif // BusIO_Register_h diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_I2CDevice.cpp b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_I2CDevice.cpp new file mode 100644 index 0000000..95bec17 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_I2CDevice.cpp @@ -0,0 +1,270 @@ +#include "Adafruit_I2CDevice.h" + +//#define DEBUG_SERIAL Serial + +/*! + * @brief Create an I2C device at a given address + * @param addr The 7-bit I2C address for the device + * @param theWire The I2C bus to use, defaults to &Wire + */ +Adafruit_I2CDevice::Adafruit_I2CDevice(uint8_t addr, TwoWire *theWire) { + _addr = addr; + _wire = theWire; + _begun = false; +#ifdef ARDUINO_ARCH_SAMD + _maxBufferSize = 250; // as defined in Wire.h's RingBuffer +#else + _maxBufferSize = 32; +#endif +} + +/*! + * @brief Initializes and does basic address detection + * @param addr_detect Whether we should attempt to detect the I2C address + * with a scan. 99% of sensors/devices don't mind but once in a while, they spaz + * on a scan! + * @return True if I2C initialized and a device with the addr found + */ +bool Adafruit_I2CDevice::begin(bool addr_detect) { + _wire->begin(); + _begun = true; + //Serial.println(addr_detect); + if (addr_detect) { + return detected(); + } + return true; +} + +/*! + * @brief De-initialize device, turn off the Wire interface + */ +void Adafruit_I2CDevice::end(void) { + // Not all port implement Wire::end(), such as + // - ESP8266 + // - AVR core without WIRE_HAS_END + // - ESP32: end() is implemented since 2.0.1 which is latest at the moment. + // Temporarily disable for now to give time for user to update. +#if !(defined(ESP8266) || \ + (defined(ARDUINO_ARCH_AVR) && !defined(WIRE_HAS_END)) || \ + defined(ARDUINO_ARCH_ESP32)) + _wire->end(); + _begun = false; +#endif +} + +/*! + * @brief Scans I2C for the address - note will give a false-positive + * if there's no pullups on I2C + * @return True if I2C initialized and a device with the addr found + */ +bool Adafruit_I2CDevice::detected(void) { + // Init I2C if not done yet + // Serial.println("sadfasdfasdfsdf"); + if (!_begun && !begin()) { + //Serial.println("sadfasdfasdfsdf"); + return false; + } + + // A basic scanner, see if it ACK's + _wire->beginTransmission(_addr); + if (_wire->endTransmission() == 0) { +#ifdef DEBUG_SERIAL + DEBUG_SERIAL.println(F("Detected")); +#endif + return true; + } +#ifdef DEBUG_SERIAL + DEBUG_SERIAL.println(F("Not detected")); +#endif + Serial.println("22222222222222"); + return false; +} + +/*! + * @brief Write a buffer or two to the I2C device. Cannot be more than + * maxBufferSize() bytes. + * @param buffer Pointer to buffer of data to write. This is const to + * ensure the content of this buffer doesn't change. + * @param len Number of bytes from buffer to write + * @param prefix_buffer Pointer to optional array of data to write before + * buffer. Cannot be more than maxBufferSize() bytes. This is const to + * ensure the content of this buffer doesn't change. + * @param prefix_len Number of bytes from prefix buffer to write + * @param stop Whether to send an I2C STOP signal on write + * @return True if write was successful, otherwise false. + */ +bool Adafruit_I2CDevice::write(const uint8_t *buffer, size_t len, bool stop, + const uint8_t *prefix_buffer, + size_t prefix_len) { + if ((len + prefix_len) > maxBufferSize()) { + // currently not guaranteed to work if more than 32 bytes! + // we will need to find out if some platforms have larger + // I2C buffer sizes :/ +#ifdef DEBUG_SERIAL + DEBUG_SERIAL.println(F("\tI2CDevice could not write such a large buffer")); +#endif + return false; + } + + _wire->beginTransmission(_addr); + + // Write the prefix data (usually an address) + if ((prefix_len != 0) && (prefix_buffer != nullptr)) { + if (_wire->write(prefix_buffer, prefix_len) != prefix_len) { +#ifdef DEBUG_SERIAL + DEBUG_SERIAL.println(F("\tI2CDevice failed to write")); +#endif + return false; + } + } + + // Write the data itself + if (_wire->write(buffer, len) != len) { +#ifdef DEBUG_SERIAL + DEBUG_SERIAL.println(F("\tI2CDevice failed to write")); +#endif + return false; + } + +#ifdef DEBUG_SERIAL + + DEBUG_SERIAL.print(F("\tI2CWRITE @ 0x")); + DEBUG_SERIAL.print(_addr, HEX); + DEBUG_SERIAL.print(F(" :: ")); + if ((prefix_len != 0) && (prefix_buffer != nullptr)) { + for (uint16_t i = 0; i < prefix_len; i++) { + DEBUG_SERIAL.print(F("0x")); + DEBUG_SERIAL.print(prefix_buffer[i], HEX); + DEBUG_SERIAL.print(F(", ")); + } + } + for (uint16_t i = 0; i < len; i++) { + DEBUG_SERIAL.print(F("0x")); + DEBUG_SERIAL.print(buffer[i], HEX); + DEBUG_SERIAL.print(F(", ")); + if (i % 32 == 31) { + DEBUG_SERIAL.println(); + } + } + + if (stop) { + DEBUG_SERIAL.print("\tSTOP"); + } +#endif + + if (_wire->endTransmission(stop) == 0) { +#ifdef DEBUG_SERIAL + DEBUG_SERIAL.println(); + // DEBUG_SERIAL.println("Sent!"); +#endif + return true; + } else { +#ifdef DEBUG_SERIAL + DEBUG_SERIAL.println("\tFailed to send!"); +#endif + return false; + } +} + +/*! + * @brief Read from I2C into a buffer from the I2C device. + * Cannot be more than maxBufferSize() bytes. + * @param buffer Pointer to buffer of data to read into + * @param len Number of bytes from buffer to read. + * @param stop Whether to send an I2C STOP signal on read + * @return True if read was successful, otherwise false. + */ +bool Adafruit_I2CDevice::read(uint8_t *buffer, size_t len, bool stop) { + size_t pos = 0; + while (pos < len) { + size_t read_len = + ((len - pos) > maxBufferSize()) ? maxBufferSize() : (len - pos); + bool read_stop = (pos < (len - read_len)) ? false : stop; + if (!_read(buffer + pos, read_len, read_stop)) + return false; + pos += read_len; + } + return true; +} + +bool Adafruit_I2CDevice::_read(uint8_t *buffer, size_t len, bool stop) { +#if defined(TinyWireM_h) + size_t recv = _wire->requestFrom((uint8_t)_addr, (uint8_t)len); +#else + size_t recv = _wire->requestFrom((uint8_t)_addr, (uint8_t)len, (uint8_t)stop); +#endif + + if (recv != len) { + // Not enough data available to fulfill our obligation! +#ifdef DEBUG_SERIAL + DEBUG_SERIAL.print(F("\tI2CDevice did not receive enough data: ")); + DEBUG_SERIAL.println(recv); +#endif + return false; + } + + for (uint16_t i = 0; i < len; i++) { + buffer[i] = _wire->read(); + } + +#ifdef DEBUG_SERIAL + DEBUG_SERIAL.print(F("\tI2CREAD @ 0x")); + DEBUG_SERIAL.print(_addr, HEX); + DEBUG_SERIAL.print(F(" :: ")); + for (uint16_t i = 0; i < len; i++) { + DEBUG_SERIAL.print(F("0x")); + DEBUG_SERIAL.print(buffer[i], HEX); + DEBUG_SERIAL.print(F(", ")); + if (len % 32 == 31) { + DEBUG_SERIAL.println(); + } + } + DEBUG_SERIAL.println(); +#endif + + return true; +} + +/*! + * @brief Write some data, then read some data from I2C into another buffer. + * Cannot be more than maxBufferSize() bytes. The buffers can point to + * same/overlapping locations. + * @param write_buffer Pointer to buffer of data to write from + * @param write_len Number of bytes from buffer to write. + * @param read_buffer Pointer to buffer of data to read into. + * @param read_len Number of bytes from buffer to read. + * @param stop Whether to send an I2C STOP signal between the write and read + * @return True if write & read was successful, otherwise false. + */ +bool Adafruit_I2CDevice::write_then_read(const uint8_t *write_buffer, + size_t write_len, uint8_t *read_buffer, + size_t read_len, bool stop) { + if (!write(write_buffer, write_len, stop)) { + return false; + } + + return read(read_buffer, read_len); +} + +/*! + * @brief Returns the 7-bit address of this device + * @return The 7-bit address of this device + */ +uint8_t Adafruit_I2CDevice::address(void) { return _addr; } + +/*! + * @brief Change the I2C clock speed to desired (relies on + * underlying Wire support! + * @param desiredclk The desired I2C SCL frequency + * @return True if this platform supports changing I2C speed. + * Not necessarily that the speed was achieved! + */ +bool Adafruit_I2CDevice::setSpeed(uint32_t desiredclk) { +#if (ARDUINO >= 157) && !defined(ARDUINO_STM32_FEATHER) && !defined(TinyWireM_h) + _wire->setClock(desiredclk); + return true; +#else + (void)desiredclk; + return false; +#endif +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_I2CDevice.h b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_I2CDevice.h new file mode 100644 index 0000000..6bda7ba --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_I2CDevice.h @@ -0,0 +1,36 @@ +#ifndef Adafruit_I2CDevice_h +#define Adafruit_I2CDevice_h + +#include +#include + +///< The class which defines how we will talk to this device over I2C +class Adafruit_I2CDevice { +public: + Adafruit_I2CDevice(uint8_t addr, TwoWire *theWire = &Wire); + uint8_t address(void); + bool begin(bool addr_detect = true); + void end(void); + bool detected(void); + + bool read(uint8_t *buffer, size_t len, bool stop = true); + bool write(const uint8_t *buffer, size_t len, bool stop = true, + const uint8_t *prefix_buffer = nullptr, size_t prefix_len = 0); + bool write_then_read(const uint8_t *write_buffer, size_t write_len, + uint8_t *read_buffer, size_t read_len, + bool stop = false); + bool setSpeed(uint32_t desiredclk); + + /*! @brief How many bytes we can read in a transaction + * @return The size of the Wire receive/transmit buffer */ + size_t maxBufferSize() { return _maxBufferSize; } + +private: + uint8_t _addr; + TwoWire *_wire; + bool _begun; + size_t _maxBufferSize; + bool _read(uint8_t *buffer, size_t len, bool stop); +}; + +#endif // Adafruit_I2CDevice_h diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_I2CRegister.h b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_I2CRegister.h new file mode 100644 index 0000000..186850f --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_I2CRegister.h @@ -0,0 +1,10 @@ +#ifndef _ADAFRUIT_I2C_REGISTER_H_ +#define _ADAFRUIT_I2C_REGISTER_H_ + +#include +#include + +typedef Adafruit_BusIO_Register Adafruit_I2CRegister; +typedef Adafruit_BusIO_RegisterBits Adafruit_I2CRegisterBits; + +#endif diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_SPIDevice.cpp b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_SPIDevice.cpp new file mode 100644 index 0000000..ab57a99 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_SPIDevice.cpp @@ -0,0 +1,495 @@ +#include "Adafruit_SPIDevice.h" + +#if !defined(SPI_INTERFACES_COUNT) || \ + (defined(SPI_INTERFACES_COUNT) && (SPI_INTERFACES_COUNT > 0)) + +//#define DEBUG_SERIAL Serial + +/*! + * @brief Create an SPI device with the given CS pin and settings + * @param cspin The arduino pin number to use for chip select + * @param freq The SPI clock frequency to use, defaults to 1MHz + * @param dataOrder The SPI data order to use for bits within each byte, + * defaults to SPI_BITORDER_MSBFIRST + * @param dataMode The SPI mode to use, defaults to SPI_MODE0 + * @param theSPI The SPI bus to use, defaults to &theSPI + */ +Adafruit_SPIDevice::Adafruit_SPIDevice(int8_t cspin, uint32_t freq, + BusIOBitOrder dataOrder, + uint8_t dataMode, SPIClass *theSPI) { + _cs = cspin; + _sck = _mosi = _miso = -1; + _spi = theSPI; + _begun = false; + _spiSetting = new SPISettings(freq, dataOrder, dataMode); + _freq = freq; + _dataOrder = dataOrder; + _dataMode = dataMode; +} + +/*! + * @brief Create an SPI device with the given CS pin and settings + * @param cspin The arduino pin number to use for chip select + * @param sckpin The arduino pin number to use for SCK + * @param misopin The arduino pin number to use for MISO, set to -1 if not + * used + * @param mosipin The arduino pin number to use for MOSI, set to -1 if not + * used + * @param freq The SPI clock frequency to use, defaults to 1MHz + * @param dataOrder The SPI data order to use for bits within each byte, + * defaults to SPI_BITORDER_MSBFIRST + * @param dataMode The SPI mode to use, defaults to SPI_MODE0 + */ +Adafruit_SPIDevice::Adafruit_SPIDevice(int8_t cspin, int8_t sckpin, + int8_t misopin, int8_t mosipin, + uint32_t freq, BusIOBitOrder dataOrder, + uint8_t dataMode) { + _cs = cspin; + _sck = sckpin; + _miso = misopin; + _mosi = mosipin; + +#ifdef BUSIO_USE_FAST_PINIO + csPort = (BusIO_PortReg *)portOutputRegister(digitalPinToPort(cspin)); + csPinMask = digitalPinToBitMask(cspin); + if (mosipin != -1) { + mosiPort = (BusIO_PortReg *)portOutputRegister(digitalPinToPort(mosipin)); + mosiPinMask = digitalPinToBitMask(mosipin); + } + if (misopin != -1) { + misoPort = (BusIO_PortReg *)portInputRegister(digitalPinToPort(misopin)); + misoPinMask = digitalPinToBitMask(misopin); + } + clkPort = (BusIO_PortReg *)portOutputRegister(digitalPinToPort(sckpin)); + clkPinMask = digitalPinToBitMask(sckpin); +#endif + + _freq = freq; + _dataOrder = dataOrder; + _dataMode = dataMode; + _begun = false; + _spiSetting = new SPISettings(freq, dataOrder, dataMode); + _spi = nullptr; +} + +/*! + * @brief Release memory allocated in constructors + */ +Adafruit_SPIDevice::~Adafruit_SPIDevice() { delete _spiSetting; } + +/*! + * @brief Initializes SPI bus and sets CS pin high + * @return Always returns true because there's no way to test success of SPI + * init + */ +bool Adafruit_SPIDevice::begin(void) { + if (_cs != -1) { + pinMode(_cs, OUTPUT); + digitalWrite(_cs, HIGH); + } + + if (_spi) { // hardware SPI + _spi->begin(); + } else { + pinMode(_sck, OUTPUT); + + if ((_dataMode == SPI_MODE0) || (_dataMode == SPI_MODE1)) { + // idle low on mode 0 and 1 + digitalWrite(_sck, LOW); + } else { + // idle high on mode 2 or 3 + digitalWrite(_sck, HIGH); + } + if (_mosi != -1) { + pinMode(_mosi, OUTPUT); + digitalWrite(_mosi, HIGH); + } + if (_miso != -1) { + pinMode(_miso, INPUT); + } + } + + _begun = true; + return true; +} + +/*! + * @brief Transfer (send/receive) one byte over hard/soft SPI + * @param buffer The buffer to send and receive at the same time + * @param len The number of bytes to transfer + */ +void Adafruit_SPIDevice::transfer(uint8_t *buffer, size_t len) { + if (_spi) { + // hardware SPI is easy + +#if defined(SPARK) + _spi->transfer(buffer, buffer, len, nullptr); +#elif defined(STM32) + for (size_t i = 0; i < len; i++) { + _spi->transfer(buffer[i]); + } +#else + _spi->transfer(buffer, len); +#endif + return; + } + + uint8_t startbit; + if (_dataOrder == SPI_BITORDER_LSBFIRST) { + startbit = 0x1; + } else { + startbit = 0x80; + } + + bool towrite, lastmosi = !(buffer[0] & startbit); + uint8_t bitdelay_us = (1000000 / _freq) / 2; + + // for softSPI we'll do it by hand + for (size_t i = 0; i < len; i++) { + // software SPI + uint8_t reply = 0; + uint8_t send = buffer[i]; + + /* + Serial.print("\tSending software SPI byte 0x"); + Serial.print(send, HEX); + Serial.print(" -> 0x"); + */ + + // Serial.print(send, HEX); + for (uint8_t b = startbit; b != 0; + b = (_dataOrder == SPI_BITORDER_LSBFIRST) ? b << 1 : b >> 1) { + + if (bitdelay_us) { + delayMicroseconds(bitdelay_us); + } + + if (_dataMode == SPI_MODE0 || _dataMode == SPI_MODE2) { + towrite = send & b; + if ((_mosi != -1) && (lastmosi != towrite)) { +#ifdef BUSIO_USE_FAST_PINIO + if (towrite) + *mosiPort |= mosiPinMask; + else + *mosiPort &= ~mosiPinMask; +#else + digitalWrite(_mosi, towrite); +#endif + lastmosi = towrite; + } + +#ifdef BUSIO_USE_FAST_PINIO + *clkPort |= clkPinMask; // Clock high +#else + digitalWrite(_sck, HIGH); +#endif + + if (bitdelay_us) { + delayMicroseconds(bitdelay_us); + } + + if (_miso != -1) { +#ifdef BUSIO_USE_FAST_PINIO + if (*misoPort & misoPinMask) { +#else + if (digitalRead(_miso)) { +#endif + reply |= b; + } + } + +#ifdef BUSIO_USE_FAST_PINIO + *clkPort &= ~clkPinMask; // Clock low +#else + digitalWrite(_sck, LOW); +#endif + } else { // if (_dataMode == SPI_MODE1 || _dataMode == SPI_MODE3) + +#ifdef BUSIO_USE_FAST_PINIO + *clkPort |= clkPinMask; // Clock high +#else + digitalWrite(_sck, HIGH); +#endif + + if (bitdelay_us) { + delayMicroseconds(bitdelay_us); + } + + if (_mosi != -1) { +#ifdef BUSIO_USE_FAST_PINIO + if (send & b) + *mosiPort |= mosiPinMask; + else + *mosiPort &= ~mosiPinMask; +#else + digitalWrite(_mosi, send & b); +#endif + } + +#ifdef BUSIO_USE_FAST_PINIO + *clkPort &= ~clkPinMask; // Clock low +#else + digitalWrite(_sck, LOW); +#endif + + if (_miso != -1) { +#ifdef BUSIO_USE_FAST_PINIO + if (*misoPort & misoPinMask) { +#else + if (digitalRead(_miso)) { +#endif + reply |= b; + } + } + } + if (_miso != -1) { + buffer[i] = reply; + } + } + } + return; +} + +/*! + * @brief Transfer (send/receive) one byte over hard/soft SPI + * @param send The byte to send + * @return The byte received while transmitting + */ +uint8_t Adafruit_SPIDevice::transfer(uint8_t send) { + uint8_t data = send; + transfer(&data, 1); + return data; +} + +/*! + * @brief Manually begin a transaction (calls beginTransaction if hardware + * SPI) + */ +void Adafruit_SPIDevice::beginTransaction(void) { + if (_spi) { + _spi->beginTransaction(*_spiSetting); + } +} + +/*! + * @brief Manually end a transaction (calls endTransaction if hardware SPI) + */ +void Adafruit_SPIDevice::endTransaction(void) { + if (_spi) { + _spi->endTransaction(); + } +} + +/*! + * @brief Write a buffer or two to the SPI device. + * @param buffer Pointer to buffer of data to write + * @param len Number of bytes from buffer to write + * @param prefix_buffer Pointer to optional array of data to write before + * buffer. + * @param prefix_len Number of bytes from prefix buffer to write + * @return Always returns true because there's no way to test success of SPI + * writes + */ +bool Adafruit_SPIDevice::write(const uint8_t *buffer, size_t len, + const uint8_t *prefix_buffer, + size_t prefix_len) { + if (_spi) { + _spi->beginTransaction(*_spiSetting); + } + + setChipSelect(LOW); + // do the writing +#if defined(ARDUINO_ARCH_ESP32) + if (_spi) { + if (prefix_len > 0) { + _spi->transferBytes(prefix_buffer, nullptr, prefix_len); + } + if (len > 0) { + _spi->transferBytes(buffer, nullptr, len); + } + } else +#endif + { + for (size_t i = 0; i < prefix_len; i++) { + transfer(prefix_buffer[i]); + } + for (size_t i = 0; i < len; i++) { + transfer(buffer[i]); + } + } + setChipSelect(HIGH); + + if (_spi) { + _spi->endTransaction(); + } + +#ifdef DEBUG_SERIAL + DEBUG_SERIAL.print(F("\tSPIDevice Wrote: ")); + if ((prefix_len != 0) && (prefix_buffer != nullptr)) { + for (uint16_t i = 0; i < prefix_len; i++) { + DEBUG_SERIAL.print(F("0x")); + DEBUG_SERIAL.print(prefix_buffer[i], HEX); + DEBUG_SERIAL.print(F(", ")); + } + } + for (uint16_t i = 0; i < len; i++) { + DEBUG_SERIAL.print(F("0x")); + DEBUG_SERIAL.print(buffer[i], HEX); + DEBUG_SERIAL.print(F(", ")); + if (i % 32 == 31) { + DEBUG_SERIAL.println(); + } + } + DEBUG_SERIAL.println(); +#endif + + return true; +} + +/*! + * @brief Read from SPI into a buffer from the SPI device. + * @param buffer Pointer to buffer of data to read into + * @param len Number of bytes from buffer to read. + * @param sendvalue The 8-bits of data to write when doing the data read, + * defaults to 0xFF + * @return Always returns true because there's no way to test success of SPI + * writes + */ +bool Adafruit_SPIDevice::read(uint8_t *buffer, size_t len, uint8_t sendvalue) { + memset(buffer, sendvalue, len); // clear out existing buffer + if (_spi) { + _spi->beginTransaction(*_spiSetting); + } + + setChipSelect(LOW); + transfer(buffer, len); + setChipSelect(HIGH); + + if (_spi) { + _spi->endTransaction(); + } + +#ifdef DEBUG_SERIAL + DEBUG_SERIAL.print(F("\tSPIDevice Read: ")); + for (uint16_t i = 0; i < len; i++) { + DEBUG_SERIAL.print(F("0x")); + DEBUG_SERIAL.print(buffer[i], HEX); + DEBUG_SERIAL.print(F(", ")); + if (len % 32 == 31) { + DEBUG_SERIAL.println(); + } + } + DEBUG_SERIAL.println(); +#endif + + return true; +} + +/*! + * @brief Write some data, then read some data from SPI into another buffer. + * The buffers can point to same/overlapping locations. This does not + * transmit-receive at the same time! + * @param write_buffer Pointer to buffer of data to write from + * @param write_len Number of bytes from buffer to write. + * @param read_buffer Pointer to buffer of data to read into. + * @param read_len Number of bytes from buffer to read. + * @param sendvalue The 8-bits of data to write when doing the data read, + * defaults to 0xFF + * @return Always returns true because there's no way to test success of SPI + * writes + */ +bool Adafruit_SPIDevice::write_then_read(const uint8_t *write_buffer, + size_t write_len, uint8_t *read_buffer, + size_t read_len, uint8_t sendvalue) { + if (_spi) { + _spi->beginTransaction(*_spiSetting); + } + + setChipSelect(LOW); + // do the writing +#if defined(ARDUINO_ARCH_ESP32) + if (_spi) { + if (write_len > 0) { + _spi->transferBytes(write_buffer, nullptr, write_len); + } + } else +#endif + { + for (size_t i = 0; i < write_len; i++) { + transfer(write_buffer[i]); + } + } + +#ifdef DEBUG_SERIAL + DEBUG_SERIAL.print(F("\tSPIDevice Wrote: ")); + for (uint16_t i = 0; i < write_len; i++) { + DEBUG_SERIAL.print(F("0x")); + DEBUG_SERIAL.print(write_buffer[i], HEX); + DEBUG_SERIAL.print(F(", ")); + if (write_len % 32 == 31) { + DEBUG_SERIAL.println(); + } + } + DEBUG_SERIAL.println(); +#endif + + // do the reading + for (size_t i = 0; i < read_len; i++) { + read_buffer[i] = transfer(sendvalue); + } + +#ifdef DEBUG_SERIAL + DEBUG_SERIAL.print(F("\tSPIDevice Read: ")); + for (uint16_t i = 0; i < read_len; i++) { + DEBUG_SERIAL.print(F("0x")); + DEBUG_SERIAL.print(read_buffer[i], HEX); + DEBUG_SERIAL.print(F(", ")); + if (read_len % 32 == 31) { + DEBUG_SERIAL.println(); + } + } + DEBUG_SERIAL.println(); +#endif + + setChipSelect(HIGH); + + if (_spi) { + _spi->endTransaction(); + } + + return true; +} + +/*! + * @brief Write some data and read some data at the same time from SPI + * into the same buffer. This is basicaly a wrapper for transfer() with + * CS-pin and transaction management. + * This /does/ transmit-receive at the same time! + * @param buffer Pointer to buffer of data to write/read to/from + * @param len Number of bytes from buffer to write/read. + * @return Always returns true because there's no way to test success of SPI + * writes + */ +bool Adafruit_SPIDevice::write_and_read(uint8_t *buffer, size_t len) { + if (_spi) { + _spi->beginTransaction(*_spiSetting); + } + + setChipSelect(LOW); + transfer(buffer, len); + setChipSelect(HIGH); + + if (_spi) { + _spi->endTransaction(); + } + + return true; +} + +void Adafruit_SPIDevice::setChipSelect(int value) { + if (_cs == -1) + return; + digitalWrite(_cs, value); +} + +#endif // SPI exists diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_SPIDevice.h b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_SPIDevice.h new file mode 100644 index 0000000..4c8d7bf --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_SPIDevice.h @@ -0,0 +1,109 @@ +#ifndef Adafruit_SPIDevice_h +#define Adafruit_SPIDevice_h + +#include + +#if !defined(SPI_INTERFACES_COUNT) || \ + (defined(SPI_INTERFACES_COUNT) && (SPI_INTERFACES_COUNT > 0)) + +#include + +// some modern SPI definitions don't have BitOrder enum +#if (defined(__AVR__) && !defined(ARDUINO_ARCH_MEGAAVR)) || \ + defined(ESP8266) || defined(TEENSYDUINO) || defined(SPARK) || \ + defined(ARDUINO_ARCH_SPRESENSE) || defined(MEGATINYCORE) || \ + defined(DXCORE) || defined(ARDUINO_AVR_ATmega4809) || \ + defined(ARDUINO_AVR_ATmega4808) || defined(ARDUINO_AVR_ATmega3209) || \ + defined(ARDUINO_AVR_ATmega3208) || defined(ARDUINO_AVR_ATmega1609) || \ + defined(ARDUINO_AVR_ATmega1608) || defined(ARDUINO_AVR_ATmega809) || \ + defined(ARDUINO_AVR_ATmega808) || defined(ARDUINO_ARCH_ARC32) + +typedef enum _BitOrder { + SPI_BITORDER_MSBFIRST = MSBFIRST, + SPI_BITORDER_LSBFIRST = LSBFIRST, +} BusIOBitOrder; + +#elif defined(ESP32) || defined(__ASR6501__) || defined(__ASR6502__) + +// some modern SPI definitions don't have BitOrder enum and have different SPI +// mode defines +typedef enum _BitOrder { + SPI_BITORDER_MSBFIRST = SPI_MSBFIRST, + SPI_BITORDER_LSBFIRST = SPI_LSBFIRST, +} BusIOBitOrder; + +#else +// Some platforms have a BitOrder enum but its named MSBFIRST/LSBFIRST +#define SPI_BITORDER_MSBFIRST MSBFIRST +#define SPI_BITORDER_LSBFIRST LSBFIRST +typedef BitOrder BusIOBitOrder; +#endif + +#if defined(__AVR__) || defined(TEENSYDUINO) +typedef volatile uint8_t BusIO_PortReg; +typedef uint8_t BusIO_PortMask; +#define BUSIO_USE_FAST_PINIO + +#elif defined(ESP8266) || defined(ESP32) || defined(__SAM3X8E__) || \ + defined(ARDUINO_ARCH_SAMD) +typedef volatile uint32_t BusIO_PortReg; +typedef uint32_t BusIO_PortMask; +#define BUSIO_USE_FAST_PINIO + +#elif (defined(__arm__) || defined(ARDUINO_FEATHER52)) && \ + !defined(ARDUINO_ARCH_MBED) && !defined(ARDUINO_ARCH_RP2040) +typedef volatile uint32_t BusIO_PortReg; +typedef uint32_t BusIO_PortMask; +#if !defined(__ASR6501__) && !defined(__ASR6502__) +#define BUSIO_USE_FAST_PINIO +#endif + +#else +#undef BUSIO_USE_FAST_PINIO +#endif + +/**! The class which defines how we will talk to this device over SPI **/ +class Adafruit_SPIDevice { +public: + Adafruit_SPIDevice(int8_t cspin, uint32_t freq = 1000000, + BusIOBitOrder dataOrder = SPI_BITORDER_MSBFIRST, + uint8_t dataMode = SPI_MODE0, SPIClass *theSPI = &SPI); + + Adafruit_SPIDevice(int8_t cspin, int8_t sck, int8_t miso, int8_t mosi, + uint32_t freq = 1000000, + BusIOBitOrder dataOrder = SPI_BITORDER_MSBFIRST, + uint8_t dataMode = SPI_MODE0); + ~Adafruit_SPIDevice(); + + bool begin(void); + bool read(uint8_t *buffer, size_t len, uint8_t sendvalue = 0xFF); + bool write(const uint8_t *buffer, size_t len, + const uint8_t *prefix_buffer = nullptr, size_t prefix_len = 0); + bool write_then_read(const uint8_t *write_buffer, size_t write_len, + uint8_t *read_buffer, size_t read_len, + uint8_t sendvalue = 0xFF); + bool write_and_read(uint8_t *buffer, size_t len); + + uint8_t transfer(uint8_t send); + void transfer(uint8_t *buffer, size_t len); + void beginTransaction(void); + void endTransaction(void); + +private: + SPIClass *_spi; + SPISettings *_spiSetting; + uint32_t _freq; + BusIOBitOrder _dataOrder; + uint8_t _dataMode; + void setChipSelect(int value); + + int8_t _cs, _sck, _mosi, _miso; +#ifdef BUSIO_USE_FAST_PINIO + BusIO_PortReg *mosiPort, *clkPort, *misoPort, *csPort; + BusIO_PortMask mosiPinMask, misoPinMask, clkPinMask, csPinMask; +#endif + bool _begun; +}; + +#endif // has SPI defined +#endif // Adafruit_SPIDevice_h diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/CMakeLists.txt b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/CMakeLists.txt new file mode 100644 index 0000000..a7ea6e9 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/CMakeLists.txt @@ -0,0 +1,11 @@ +# Adafruit Bus IO Library +# https://github.com/adafruit/Adafruit_BusIO +# MIT License + +cmake_minimum_required(VERSION 3.5) + +idf_component_register(SRCS "Adafruit_I2CDevice.cpp" "Adafruit_BusIO_Register.cpp" "Adafruit_SPIDevice.cpp" + INCLUDE_DIRS "." + REQUIRES arduino) + +project(Adafruit_BusIO) diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/LICENSE b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/LICENSE new file mode 100644 index 0000000..860e3e2 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Adafruit Industries + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/README.md b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/README.md new file mode 100644 index 0000000..1cc06a1 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/README.md @@ -0,0 +1,8 @@ +# Adafruit Bus IO Library [![Build Status](https://github.com/adafruit/Adafruit_BusIO/workflows/Arduino%20Library%20CI/badge.svg)](https://github.com/adafruit/Adafruit_BusIO/actions) + + +This is a helper library to abstract away I2C & SPI transactions and registers + +Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! + +MIT license, all text above must be included in any redistribution diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/component.mk b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/component.mk new file mode 100644 index 0000000..004b18e --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/component.mk @@ -0,0 +1 @@ +COMPONENT_ADD_INCLUDEDIRS = . diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/i2c_address_detect/i2c_address_detect.ino b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/i2c_address_detect/i2c_address_detect.ino new file mode 100644 index 0000000..b150525 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/i2c_address_detect/i2c_address_detect.ino @@ -0,0 +1,21 @@ +#include + +Adafruit_I2CDevice i2c_dev = Adafruit_I2CDevice(0x10); + +void setup() { + while (!Serial) { delay(10); } + Serial.begin(115200); + Serial.println("I2C address detection test"); + + if (!i2c_dev.begin()) { + Serial.print("Did not find device at 0x"); + Serial.println(i2c_dev.address(), HEX); + while (1); + } + Serial.print("Device found on address 0x"); + Serial.println(i2c_dev.address(), HEX); +} + +void loop() { + +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/i2c_readwrite/i2c_readwrite.ino b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/i2c_readwrite/i2c_readwrite.ino new file mode 100644 index 0000000..909cf31 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/i2c_readwrite/i2c_readwrite.ino @@ -0,0 +1,41 @@ +#include + +#define I2C_ADDRESS 0x60 +Adafruit_I2CDevice i2c_dev = Adafruit_I2CDevice(I2C_ADDRESS); + + +void setup() { + while (!Serial) { delay(10); } + Serial.begin(115200); + Serial.println("I2C device read and write test"); + + if (!i2c_dev.begin()) { + Serial.print("Did not find device at 0x"); + Serial.println(i2c_dev.address(), HEX); + while (1); + } + Serial.print("Device found on address 0x"); + Serial.println(i2c_dev.address(), HEX); + + uint8_t buffer[32]; + // Try to read 32 bytes + i2c_dev.read(buffer, 32); + Serial.print("Read: "); + for (uint8_t i=0; i<32; i++) { + Serial.print("0x"); Serial.print(buffer[i], HEX); Serial.print(", "); + } + Serial.println(); + + // read a register by writing first, then reading + buffer[0] = 0x0C; // we'll reuse the same buffer + i2c_dev.write_then_read(buffer, 1, buffer, 2, false); + Serial.print("Write then Read: "); + for (uint8_t i=0; i<2; i++) { + Serial.print("0x"); Serial.print(buffer[i], HEX); Serial.print(", "); + } + Serial.println(); +} + +void loop() { + +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/i2c_registers/i2c_registers.ino b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/i2c_registers/i2c_registers.ino new file mode 100644 index 0000000..41a3043 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/i2c_registers/i2c_registers.ino @@ -0,0 +1,38 @@ +#include +#include + +#define I2C_ADDRESS 0x60 +Adafruit_I2CDevice i2c_dev = Adafruit_I2CDevice(I2C_ADDRESS); + + +void setup() { + while (!Serial) { delay(10); } + Serial.begin(115200); + Serial.println("I2C device register test"); + + if (!i2c_dev.begin()) { + Serial.print("Did not find device at 0x"); + Serial.println(i2c_dev.address(), HEX); + while (1); + } + Serial.print("Device found on address 0x"); + Serial.println(i2c_dev.address(), HEX); + + Adafruit_BusIO_Register id_reg = Adafruit_BusIO_Register(&i2c_dev, 0x0C, 2, LSBFIRST); + uint16_t id; + id_reg.read(&id); + Serial.print("ID register = 0x"); Serial.println(id, HEX); + + Adafruit_BusIO_Register thresh_reg = Adafruit_BusIO_Register(&i2c_dev, 0x01, 2, LSBFIRST); + uint16_t thresh; + thresh_reg.read(&thresh); + Serial.print("Initial threshold register = 0x"); Serial.println(thresh, HEX); + + thresh_reg.write(~thresh); + + Serial.print("Post threshold register = 0x"); Serial.println(thresh_reg.read(), HEX); +} + +void loop() { + +} \ No newline at end of file diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/i2corspi_register/i2corspi_register.ino b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/i2corspi_register/i2corspi_register.ino new file mode 100644 index 0000000..992a2e0 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/i2corspi_register/i2corspi_register.ino @@ -0,0 +1,38 @@ +#include + +// Define which interface to use by setting the unused interface to NULL! + +#define SPIDEVICE_CS 10 +Adafruit_SPIDevice *spi_dev = NULL; // new Adafruit_SPIDevice(SPIDEVICE_CS); + +#define I2C_ADDRESS 0x5D +Adafruit_I2CDevice *i2c_dev = new Adafruit_I2CDevice(I2C_ADDRESS); + +void setup() { + while (!Serial) { delay(10); } + Serial.begin(115200); + Serial.println("I2C or SPI device register test"); + + if (spi_dev && !spi_dev->begin()) { + Serial.println("Could not initialize SPI device"); + } + + if (i2c_dev) { + if (i2c_dev->begin()) { + Serial.print("Device found on I2C address 0x"); + Serial.println(i2c_dev->address(), HEX); + } else { + Serial.print("Did not find I2C device at 0x"); + Serial.println(i2c_dev->address(), HEX); + } + } + + Adafruit_BusIO_Register id_reg = Adafruit_BusIO_Register(i2c_dev, spi_dev, ADDRBIT8_HIGH_TOREAD, 0x0F); + uint8_t id=0; + id_reg.read(&id); + Serial.print("ID register = 0x"); Serial.println(id, HEX); +} + +void loop() { + +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/spi_modetest/spi_modetest.ino b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/spi_modetest/spi_modetest.ino new file mode 100644 index 0000000..10168c5 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/spi_modetest/spi_modetest.ino @@ -0,0 +1,29 @@ +#include + +#define SPIDEVICE_CS 10 +Adafruit_SPIDevice spi_dev = Adafruit_SPIDevice(SPIDEVICE_CS, 100000, SPI_BITORDER_MSBFIRST, SPI_MODE1); +//Adafruit_SPIDevice spi_dev = Adafruit_SPIDevice(SPIDEVICE_CS, 13, 12, 11, 100000, SPI_BITORDER_MSBFIRST, SPI_MODE1); + + +void setup() { + while (!Serial) { delay(10); } + Serial.begin(115200); + Serial.println("SPI device mode test"); + + if (!spi_dev.begin()) { + Serial.println("Could not initialize SPI device"); + while (1); + } +} + +void loop() { + Serial.println("\n\nTransfer test"); + for (uint16_t x=0; x<=0xFF; x++) { + uint8_t i = x; + Serial.print("0x"); Serial.print(i, HEX); + spi_dev.read(&i, 1, i); + Serial.print("/"); Serial.print(i, HEX); + Serial.print(", "); + delay(25); + } +} \ No newline at end of file diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/spi_readwrite/spi_readwrite.ino b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/spi_readwrite/spi_readwrite.ino new file mode 100644 index 0000000..6f2c063 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/spi_readwrite/spi_readwrite.ino @@ -0,0 +1,39 @@ +#include + +#define SPIDEVICE_CS 10 +Adafruit_SPIDevice spi_dev = Adafruit_SPIDevice(SPIDEVICE_CS); + + +void setup() { + while (!Serial) { delay(10); } + Serial.begin(115200); + Serial.println("SPI device read and write test"); + + if (!spi_dev.begin()) { + Serial.println("Could not initialize SPI device"); + while (1); + } + + uint8_t buffer[32]; + + // Try to read 32 bytes + spi_dev.read(buffer, 32); + Serial.print("Read: "); + for (uint8_t i=0; i<32; i++) { + Serial.print("0x"); Serial.print(buffer[i], HEX); Serial.print(", "); + } + Serial.println(); + + // read a register by writing first, then reading + buffer[0] = 0x8F; // we'll reuse the same buffer + spi_dev.write_then_read(buffer, 1, buffer, 2, false); + Serial.print("Write then Read: "); + for (uint8_t i=0; i<2; i++) { + Serial.print("0x"); Serial.print(buffer[i], HEX); Serial.print(", "); + } + Serial.println(); +} + +void loop() { + +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/spi_register_bits/spi_register_bits.ino b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/spi_register_bits/spi_register_bits.ino new file mode 100644 index 0000000..e70a17b --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/spi_register_bits/spi_register_bits.ino @@ -0,0 +1,192 @@ +/*************************************************** + + This is an example for how to use Adafruit_BusIO_RegisterBits from Adafruit_BusIO library. + + Designed specifically to work with the Adafruit RTD Sensor + ----> https://www.adafruit.com/products/3328 + uisng a MAX31865 RTD-to-Digital Converter + ----> https://datasheets.maximintegrated.com/en/ds/MAX31865.pdf + + This sensor uses SPI to communicate, 4 pins are required to + interface. + A fifth pin helps to detect when a new conversion is ready. + + Adafruit invests time and resources providing this open source code, + please support Adafruit and open-source hardware by purchasing + products from Adafruit! + + Example written (2020/3) by Andreas Hardtung/AnHard. + BSD license, all text above must be included in any redistribution + ****************************************************/ + +#include +#include + +#define MAX31865_SPI_SPEED (5000000) +#define MAX31865_SPI_BITORDER (SPI_BITORDER_MSBFIRST) +#define MAX31865_SPI_MODE (SPI_MODE1) + +#define MAX31865_SPI_CS (10) +#define MAX31865_READY_PIN (2) + + +Adafruit_SPIDevice spi_dev = Adafruit_SPIDevice( MAX31865_SPI_CS, MAX31865_SPI_SPEED, MAX31865_SPI_BITORDER, MAX31865_SPI_MODE, &SPI); // Hardware SPI +// Adafruit_SPIDevice spi_dev = Adafruit_SPIDevice( MAX31865_SPI_CS, 13, 12, 11, MAX31865_SPI_SPEED, MAX31865_SPI_BITORDER, MAX31865_SPI_MODE); // Software SPI + +// MAX31865 chip related ********************************************************************************************* +Adafruit_BusIO_Register config_reg = Adafruit_BusIO_Register(&spi_dev, 0x00, ADDRBIT8_HIGH_TOWRITE, 1, MSBFIRST); +Adafruit_BusIO_RegisterBits bias_bit = Adafruit_BusIO_RegisterBits(&config_reg, 1, 7); +Adafruit_BusIO_RegisterBits auto_bit = Adafruit_BusIO_RegisterBits(&config_reg, 1, 6); +Adafruit_BusIO_RegisterBits oneS_bit = Adafruit_BusIO_RegisterBits(&config_reg, 1, 5); +Adafruit_BusIO_RegisterBits wire_bit = Adafruit_BusIO_RegisterBits(&config_reg, 1, 4); +Adafruit_BusIO_RegisterBits faultT_bits = Adafruit_BusIO_RegisterBits(&config_reg, 2, 2); +Adafruit_BusIO_RegisterBits faultR_bit = Adafruit_BusIO_RegisterBits(&config_reg, 1, 1); +Adafruit_BusIO_RegisterBits fi50hz_bit = Adafruit_BusIO_RegisterBits(&config_reg, 1, 0); + +Adafruit_BusIO_Register rRatio_reg = Adafruit_BusIO_Register(&spi_dev, 0x01, ADDRBIT8_HIGH_TOWRITE, 2, MSBFIRST); +Adafruit_BusIO_RegisterBits rRatio_bits = Adafruit_BusIO_RegisterBits(&rRatio_reg, 15, 1); +Adafruit_BusIO_RegisterBits fault_bit = Adafruit_BusIO_RegisterBits(&rRatio_reg, 1, 0); + +Adafruit_BusIO_Register maxRratio_reg = Adafruit_BusIO_Register(&spi_dev, 0x03, ADDRBIT8_HIGH_TOWRITE, 2, MSBFIRST); +Adafruit_BusIO_RegisterBits maxRratio_bits = Adafruit_BusIO_RegisterBits(&maxRratio_reg, 15, 1); + +Adafruit_BusIO_Register minRratio_reg = Adafruit_BusIO_Register(&spi_dev, 0x05, ADDRBIT8_HIGH_TOWRITE, 2, MSBFIRST); +Adafruit_BusIO_RegisterBits minRratio_bits = Adafruit_BusIO_RegisterBits(&minRratio_reg, 15, 1); + +Adafruit_BusIO_Register fault_reg = Adafruit_BusIO_Register(&spi_dev, 0x07, ADDRBIT8_HIGH_TOWRITE, 1, MSBFIRST); +Adafruit_BusIO_RegisterBits range_high_fault_bit = Adafruit_BusIO_RegisterBits(&fault_reg, 1, 7); +Adafruit_BusIO_RegisterBits range_low_fault_bit = Adafruit_BusIO_RegisterBits(&fault_reg, 1, 6); +Adafruit_BusIO_RegisterBits refin_high_fault_bit = Adafruit_BusIO_RegisterBits(&fault_reg, 1, 5); +Adafruit_BusIO_RegisterBits refin_low_fault_bit = Adafruit_BusIO_RegisterBits(&fault_reg, 1, 4); +Adafruit_BusIO_RegisterBits rtdin_low_fault_bit = Adafruit_BusIO_RegisterBits(&fault_reg, 1, 3); +Adafruit_BusIO_RegisterBits voltage_fault_bit = Adafruit_BusIO_RegisterBits(&fault_reg, 1, 2); + +// Print the details of the configuration register. +void printConfig( void ) { + Serial.print("BIAS: "); if (bias_bit.read() ) Serial.print("ON"); else Serial.print("OFF"); + Serial.print(", AUTO: "); if (auto_bit.read() ) Serial.print("ON"); else Serial.print("OFF"); + Serial.print(", ONES: "); if (oneS_bit.read() ) Serial.print("ON"); else Serial.print("OFF"); + Serial.print(", WIRE: "); if (wire_bit.read() ) Serial.print("3"); else Serial.print("2/4"); + Serial.print(", FAULTCLEAR: "); if (faultR_bit.read() ) Serial.print("ON"); else Serial.print("OFF"); + Serial.print(", "); if (fi50hz_bit.read() ) Serial.print("50HZ"); else Serial.print("60HZ"); + Serial.println(); +} + +// Check and print faults. Then clear them. +void checkFaults( void ) { + if (fault_bit.read()) { + Serial.print("MAX: "); Serial.println(maxRratio_bits.read()); + Serial.print("VAL: "); Serial.println( rRatio_bits.read()); + Serial.print("MIN: "); Serial.println(minRratio_bits.read()); + + if (range_high_fault_bit.read() ) Serial.println("Range high fault"); + if ( range_low_fault_bit.read() ) Serial.println("Range low fault"); + if (refin_high_fault_bit.read() ) Serial.println("REFIN high fault"); + if ( refin_low_fault_bit.read() ) Serial.println("REFIN low fault"); + if ( rtdin_low_fault_bit.read() ) Serial.println("RTDIN low fault"); + if ( voltage_fault_bit.read() ) Serial.println("Voltage fault"); + + faultR_bit.write(1); // clear fault + } +} + +void setup() { + #if (MAX31865_1_READY_PIN != -1) + pinMode(MAX31865_READY_PIN ,INPUT_PULLUP); + #endif + + while (!Serial) { delay(10); } + Serial.begin(115200); + Serial.println("SPI Adafruit_BusIO_RegisterBits test on MAX31865"); + + if (!spi_dev.begin()) { + Serial.println("Could not initialize SPI device"); + while (1); + } + + // Set up for automode 50Hz. We don't care about selfheating. We want the highest possible sampling rate. + auto_bit.write(0); // Don't switch filtermode while auto_mode is on. + fi50hz_bit.write(1); // Set filter to 50Hz mode. + faultR_bit.write(1); // Clear faults. + bias_bit.write(1); // In automode we want to have the bias current always on. + delay(5); // Wait until bias current settles down. + // 10.5 time constants of the input RC network is required. + // 10ms worst case for 10kω reference resistor and a 0.1µF capacitor across the RTD inputs. + // Adafruit Module has 0.1µF and only 430/4300ω So here 0.43/4.3ms + auto_bit.write(1); // Now we can set automode. Automatically starting first conversion. + + // Test the READY_PIN + #if (defined( MAX31865_READY_PIN ) && (MAX31865_READY_PIN != -1)) + int i = 0; + while (digitalRead(MAX31865_READY_PIN) && i++ <= 100) { delay(1); } + if (i >= 100) { + Serial.print("ERROR: Max31865 Pin detection does not work. PIN:"); + Serial.println(MAX31865_READY_PIN); + } + #else + delay(100); + #endif + + // Set ratio range. + // Setting the temperatures would need some more calculation - not related to Adafruit_BusIO_RegisterBits. + uint16_t ratio = rRatio_bits.read(); + maxRratio_bits.write( (ratio < 0x8fffu-1000u) ? ratio + 1000u : 0x8fffu ); + minRratio_bits.write( (ratio > 1000u) ? ratio - 1000u : 0u ); + + printConfig(); + checkFaults(); +} + +void loop() { + #if (defined( MAX31865_READY_PIN ) && (MAX31865_1_READY_PIN != -1)) + // Is conversion ready? + if (!digitalRead(MAX31865_READY_PIN)) + #else + // Warant conversion is ready. + delay(21); // 21ms for 50Hz-mode. 19ms in 60Hz-mode. + #endif + { + // Read ratio, calculate temperature, scale, filter and print. + Serial.println( rRatio2C( rRatio_bits.read() ) * 100.0f, 0); // Temperature scaled by 100 + // Check, print, clear faults. + checkFaults(); + } + + // Do something else. + //delay(15000); +} + + +// Module/Sensor related. Here Adafruit PT100 module with a 2_Wire PT100 Class C ***************************** +float rRatio2C(uint16_t ratio) { + // A simple linear conversion. + const float R0 = 100.0f; + const float Rref = 430.0f; + const float alphaPT = 0.003850f; + const float ADCmax = (1u << 15) - 1.0f; + const float rscale = Rref / ADCmax; + // Measured temperature in boiling water 101.08°C with factor a = 1 and b = 0. Rref and MAX at about 22±2°C. + // Measured temperature in ice/water bath 0.76°C with factor a = 1 and b = 0. Rref and MAX at about 22±2°C. + //const float a = 1.0f / (alphaPT * R0); + const float a = (100.0f/101.08f) / (alphaPT * R0); + //const float b = 0.0f; // 101.08 + const float b = -0.76f; // 100.32 > 101.08 + + return filterRing( ((ratio * rscale) - R0) * a + b ); +} + +// General purpose ********************************************************************************************* +#define RINGLENGTH 250 +float filterRing( float newVal ) { + static float ring[RINGLENGTH] = { 0.0 }; + static uint8_t ringIndex = 0; + static bool ringFull = false; + + if ( ringIndex == RINGLENGTH ) { ringFull = true; ringIndex = 0; } + ring[ringIndex] = newVal; + uint8_t loopEnd = (ringFull) ? RINGLENGTH : ringIndex + 1; + float ringSum = 0.0f; + for (uint8_t i = 0; i < loopEnd; i++) ringSum += ring[i]; + ringIndex++; + return ringSum / loopEnd; +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/spi_registers/spi_registers.ino b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/spi_registers/spi_registers.ino new file mode 100644 index 0000000..091a353 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/spi_registers/spi_registers.ino @@ -0,0 +1,34 @@ +#include +#include + +#define SPIDEVICE_CS 10 +Adafruit_SPIDevice spi_dev = Adafruit_SPIDevice(SPIDEVICE_CS); + +void setup() { + while (!Serial) { delay(10); } + Serial.begin(115200); + Serial.println("SPI device register test"); + + if (!spi_dev.begin()) { + Serial.println("Could not initialize SPI device"); + while (1); + } + + Adafruit_BusIO_Register id_reg = Adafruit_BusIO_Register(&spi_dev, 0x0F, ADDRBIT8_HIGH_TOREAD); + uint8_t id = 0; + id_reg.read(&id); + Serial.print("ID register = 0x"); Serial.println(id, HEX); + + Adafruit_BusIO_Register thresh_reg = Adafruit_BusIO_Register(&spi_dev, 0x0C, ADDRBIT8_HIGH_TOREAD, 2, LSBFIRST); + uint16_t thresh = 0; + thresh_reg.read(&thresh); + Serial.print("Initial threshold register = 0x"); Serial.println(thresh, HEX); + + thresh_reg.write(~thresh); + + Serial.print("Post threshold register = 0x"); Serial.println(thresh_reg.read(), HEX); +} + +void loop() { + +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/library.properties b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/library.properties new file mode 100644 index 0000000..211378a --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/library.properties @@ -0,0 +1,9 @@ +name=Adafruit BusIO +version=1.11.4 +author=Adafruit +maintainer=Adafruit +sentence=This is a library for abstracting away UART, I2C and SPI interfacing +paragraph=This is a library for abstracting away UART, I2C and SPI interfacing +category=Signal Input/Output +url=https://github.com/adafruit/Adafruit_BusIO +architectures=* diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/.github/ISSUE_TEMPLATE.md b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..f0e2614 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,46 @@ +Thank you for opening an issue on an Adafruit Arduino library repository. To +improve the speed of resolution please review the following guidelines and +common troubleshooting steps below before creating the issue: + +- **Do not use GitHub issues for troubleshooting projects and issues.** Instead use + the forums at http://forums.adafruit.com to ask questions and troubleshoot why + something isn't working as expected. In many cases the problem is a common issue + that you will more quickly receive help from the forum community. GitHub issues + are meant for known defects in the code. If you don't know if there is a defect + in the code then start with troubleshooting on the forum first. + +- **If following a tutorial or guide be sure you didn't miss a step.** Carefully + check all of the steps and commands to run have been followed. Consult the + forum if you're unsure or have questions about steps in a guide/tutorial. + +- **For Arduino projects check these very common issues to ensure they don't apply**: + + - For uploading sketches or communicating with the board make sure you're using + a **USB data cable** and **not** a **USB charge-only cable**. It is sometimes + very hard to tell the difference between a data and charge cable! Try using the + cable with other devices or swapping to another cable to confirm it is not + the problem. + + - **Be sure you are supplying adequate power to the board.** Check the specs of + your board and plug in an external power supply. In many cases just + plugging a board into your computer is not enough to power it and other + peripherals. + + - **Double check all soldering joints and connections.** Flakey connections + cause many mysterious problems. See the [guide to excellent soldering](https://learn.adafruit.com/adafruit-guide-excellent-soldering/tools) for examples of good solder joints. + + - **Ensure you are using an official Arduino or Adafruit board.** We can't + guarantee a clone board will have the same functionality and work as expected + with this code and don't support them. + +If you're sure this issue is a defect in the code and checked the steps above +please fill in the following fields to provide enough troubleshooting information. +You may delete the guideline and text above to just leave the following details: + +- Arduino board: **INSERT ARDUINO BOARD NAME/TYPE HERE** + +- Arduino IDE version (found in Arduino -> About Arduino menu): **INSERT ARDUINO + VERSION HERE** + +- List the steps to reproduce the problem below (if possible attach a sketch or + copy the sketch code in too): **LIST REPRO STEPS BELOW** diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/.github/PULL_REQUEST_TEMPLATE.md b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..7b641eb --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,26 @@ +Thank you for creating a pull request to contribute to Adafruit's GitHub code! +Before you open the request please review the following guidelines and tips to +help it be more easily integrated: + +- **Describe the scope of your change--i.e. what the change does and what parts + of the code were modified.** This will help us understand any risks of integrating + the code. + +- **Describe any known limitations with your change.** For example if the change + doesn't apply to a supported platform of the library please mention it. + +- **Please run any tests or examples that can exercise your modified code.** We + strive to not break users of the code and running tests/examples helps with this + process. + +Thank you again for contributing! We will try to test and integrate the change +as soon as we can, but be aware we have many GitHub repositories to manage and +can't immediately respond to every request. There is no need to bump or check in +on a pull request (it will clutter the discussion of the request). + +Also don't be worried if the request is closed or not integrated--sometimes the +priorities of Adafruit's GitHub code (education, ease of use) might not match the +priorities of the pull request. Don't fret, the open source community thrives on +forks and GitHub makes it easy to keep your changes in a forked repo. + +After reviewing the guidelines above you can delete this text from the pull request. diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/.github/workflows/githubci.yml b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/.github/workflows/githubci.yml new file mode 100644 index 0000000..41014f5 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/.github/workflows/githubci.yml @@ -0,0 +1,32 @@ +name: Arduino Library CI + +on: [pull_request, push, repository_dispatch] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/setup-python@v1 + with: + python-version: '3.x' + - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + with: + repository: adafruit/ci-arduino + path: ci + + - name: pre-install + run: bash ci/actions_install.sh + + - name: test platforms + run: python3 ci/build_platform.py main_platforms + + - name: clang + run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -r . + + - name: doxygen + env: + GH_REPO_TOKEN: ${{ secrets.GH_REPO_TOKEN }} + PRETTYNAME : "Adafruit MLX90614 Arduino Library" + run: bash ci/doxy_gen_and_deploy.sh diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/.piopm b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/.piopm new file mode 100644 index 0000000..62f4aab --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/.piopm @@ -0,0 +1 @@ +{"type": "library", "name": "Adafruit MLX90614 Library", "version": "2.1.3", "spec": {"owner": "adafruit", "id": 782, "name": "Adafruit MLX90614 Library", "requirements": null, "url": null}} \ No newline at end of file diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/Adafruit_MLX90614.cpp b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/Adafruit_MLX90614.cpp new file mode 100644 index 0000000..e143801 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/Adafruit_MLX90614.cpp @@ -0,0 +1,175 @@ +/*************************************************** + This is a library for the MLX90614 Temp Sensor + + Designed specifically to work with the MLX90614 sensors in the + adafruit shop + ----> https://www.adafruit.com/products/1747 (3V) + ----> https://www.adafruit.com/products/1748 (5V) + + These sensors use I2C to communicate, 2 pins are required to + interface + Adafruit invests time and resources providing this open source code, + please support Adafruit and open-source hardware by purchasing + products from Adafruit! + + Written by Limor Fried/Ladyada for Adafruit Industries. + BSD license, all text above must be included in any redistribution + ****************************************************/ + +#include "Adafruit_MLX90614.h" + +Adafruit_MLX90614::~Adafruit_MLX90614() { + if (i2c_dev) + delete i2c_dev; +} + +/** + * @brief Begin the I2C connection + * @param addr I2C address for the device. + * @param wire Pointer to Wire instance + * @return True if the device was successfully initialized, otherwise false. + */ +bool Adafruit_MLX90614::begin(uint8_t addr, TwoWire *wire) { + _addr = addr; // needed for CRC + if (i2c_dev) + delete i2c_dev; + i2c_dev = new Adafruit_I2CDevice(addr, wire); + return i2c_dev->begin(); +} + +/** + * @brief Read the raw value from the emissivity register + * + * @return uint16_t The unscaled emissivity value or '0' if reading failed + */ +uint16_t Adafruit_MLX90614::readEmissivityReg(void) { + return read16(MLX90614_EMISS); +} +/** + * @brief Write the raw unscaled emissivity value to the emissivity register + * + * @param ereg The unscaled emissivity value + */ +void Adafruit_MLX90614::writeEmissivityReg(uint16_t ereg) { + write16(MLX90614_EMISS, 0); // erase + delay(10); + write16(MLX90614_EMISS, ereg); + delay(10); +} +/** + * @brief Read the emissivity value from the sensor's register and scale + * + * @return double The emissivity value, ranging from 0.1 - 1.0 or NAN if reading + * failed + */ +double Adafruit_MLX90614::readEmissivity(void) { + uint16_t ereg = read16(MLX90614_EMISS); + if (ereg == 0) + return NAN; + return ((double)ereg) / 65535.0; +} +/** + * @brief Set the emissivity value + * + * @param emissivity The emissivity value to use, between 0.1 and 1.0 + */ +void Adafruit_MLX90614::writeEmissivity(double emissivity) { + uint16_t ereg = (uint16_t)(0xffff * emissivity); + + writeEmissivityReg(ereg); +} + +/** + * @brief Get the current temperature of an object in degrees Farenheit + * + * @return double The temperature in degrees Farenheit or NAN if reading failed + */ +double Adafruit_MLX90614::readObjectTempF(void) { + return (readTemp(MLX90614_TOBJ1) * 9 / 5) + 32; +} +/** + * @brief Get the current ambient temperature in degrees Farenheit + * + * @return double The temperature in degrees Farenheit or NAN if reading failed + */ +double Adafruit_MLX90614::readAmbientTempF(void) { + return (readTemp(MLX90614_TA) * 9 / 5) + 32; +} + +/** + * @brief Get the current temperature of an object in degrees Celcius + * + * @return double The temperature in degrees Celcius or NAN if reading failed + */ +double Adafruit_MLX90614::readObjectTempC(void) { + return readTemp(MLX90614_TOBJ1); +} + +/** + * @brief Get the current ambient temperature in degrees Celcius + * + * @return double The temperature in degrees Celcius or NAN if reading failed + */ +double Adafruit_MLX90614::readAmbientTempC(void) { + return readTemp(MLX90614_TA); +} + +float Adafruit_MLX90614::readTemp(uint8_t reg) { + float temp; + + temp = read16(reg); + if (temp == 0) + return NAN; + temp *= .02; + temp -= 273.15; + return temp; +} + +/*********************************************************************/ + +uint16_t Adafruit_MLX90614::read16(uint8_t a) { + uint8_t buffer[3]; + buffer[0] = a; + // read two bytes of data + pec + bool status = i2c_dev->write_then_read(buffer, 1, buffer, 3); + if (!status) + return 0; + // return data, ignore pec + return uint16_t(buffer[0]) | (uint16_t(buffer[1]) << 8); +} + +byte Adafruit_MLX90614::crc8(byte *addr, byte len) +// The PEC calculation includes all bits except the START, REPEATED START, STOP, +// ACK, and NACK bits. The PEC is a CRC-8 with polynomial X8+X2+X1+1. +{ + byte crc = 0; + while (len--) { + byte inbyte = *addr++; + for (byte i = 8; i; i--) { + byte carry = (crc ^ inbyte) & 0x80; + crc <<= 1; + if (carry) + crc ^= 0x7; + inbyte <<= 1; + } + } + return crc; +} + +void Adafruit_MLX90614::write16(uint8_t a, uint16_t v) { + uint8_t buffer[4]; + + buffer[0] = _addr << 1; + buffer[1] = a; + buffer[2] = v & 0xff; + buffer[3] = v >> 8; + + uint8_t pec = crc8(buffer, 4); + + buffer[0] = buffer[1]; + buffer[1] = buffer[2]; + buffer[2] = buffer[3]; + buffer[3] = pec; + + i2c_dev->write(buffer, 4); +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/Adafruit_MLX90614.h b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/Adafruit_MLX90614.h new file mode 100644 index 0000000..8b88d0f --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/Adafruit_MLX90614.h @@ -0,0 +1,68 @@ +/*************************************************** + This is a library for the MLX90614 Temp Sensor + + Designed specifically to work with the MLX90614 sensors in the + adafruit shop + ----> https://www.adafruit.com/products/1747 (3V) + ----> https://www.adafruit.com/products/1748 (5V) + + These sensors use I2C to communicate, 2 pins are required to + interface + Adafruit invests time and resources providing this open source code, + please support Adafruit and open-source hardware by purchasing + products from Adafruit! + + Written by Limor Fried/Ladyada for Adafruit in any redistribution + ****************************************************/ + +#include +#include + +#define MLX90614_I2CADDR 0x5A + +// RAM +#define MLX90614_RAWIR1 0x04 +#define MLX90614_RAWIR2 0x05 +#define MLX90614_TA 0x06 +#define MLX90614_TOBJ1 0x07 +#define MLX90614_TOBJ2 0x08 +// EEPROM +#define MLX90614_TOMAX 0x20 +#define MLX90614_TOMIN 0x21 +#define MLX90614_PWMCTRL 0x22 +#define MLX90614_TARANGE 0x23 +#define MLX90614_EMISS 0x24 +#define MLX90614_CONFIG 0x25 +#define MLX90614_ADDR 0x2E +#define MLX90614_ID1 0x3C +#define MLX90614_ID2 0x3D +#define MLX90614_ID3 0x3E +#define MLX90614_ID4 0x3F + +/** + * @brief Class to read from and control a MLX90614 Temp Sensor + * + */ +class Adafruit_MLX90614 { +public: + ~Adafruit_MLX90614(); + bool begin(uint8_t addr = MLX90614_I2CADDR, TwoWire *wire = &Wire); + + double readObjectTempC(void); + double readAmbientTempC(void); + double readObjectTempF(void); + double readAmbientTempF(void); + uint16_t readEmissivityReg(void); + void writeEmissivityReg(uint16_t ereg); + double readEmissivity(void); + void writeEmissivity(double emissivity); + +private: + Adafruit_I2CDevice *i2c_dev = NULL; ///< Pointer to I2C bus interface + float readTemp(uint8_t reg); + + uint16_t read16(uint8_t addr); + void write16(uint8_t addr, uint16_t data); + byte crc8(byte *addr, byte len); + uint8_t _addr; +}; diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/README.md b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/README.md new file mode 100644 index 0000000..26ad469 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/README.md @@ -0,0 +1,51 @@ +# Adafruit-MLX90614-Library [![Build Status](https://github.com/adafruit/Adafruit-MLX90614-Library/workflows/Arduino%20Library%20CI/badge.svg)](https://github.com/adafruit/Adafruit-MLX90614-Library/actions)[![Documentation](https://github.com/adafruit/ci-arduino/blob/master/assets/doxygen_badge.svg)](http://adafruit.github.io/Adafruit-MLX90614-Library/html/index.html) + +This is a library for the MLX90614 temperature sensor + + + +Designed and tested to work with the MLX90614 sensors in the adafruit shop + * https://www.adafruit.com/products/1747 3V version + * https://www.adafruit.com/products/1748 5V version + +Check out the links above for our tutorials and wiring diagrams + +Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! + +# Installation +To install, use the Arduino Library Manager and search for "Adafruit-MLX90614-Library" and install the library. + +# Contributing + +Contributions are welcome! Please read our [Code of Conduct](https://github.com/adafruit/Adafruit-MLX90614-Library/blob/master/CODE_OF_CONDUCT.md>) +before contributing to help this project stay welcoming. + +## Documentation and doxygen +Documentation is produced by doxygen. Contributions should include documentation for any new code added. + +Some examples of how to use doxygen can be found in these guide pages: + +https://learn.adafruit.com/the-well-automated-arduino-library/doxygen + +https://learn.adafruit.com/the-well-automated-arduino-library/doxygen-tips + +## Formatting and clang-format +This library uses [`clang-format`](https://releases.llvm.org/download.html) to standardize the formatting of `.cpp` and `.h` files. +Contributions should be formatted using `clang-format`: + +The `-i` flag will make the changes to the file. +```bash +clang-format -i *.cpp *.h +``` +If you prefer to make the changes yourself, running `clang-format` without the `-i` flag will print out a formatted version of the file. You can save this to a file and diff it against the original to see the changes. + +Note that the formatting output by `clang-format` is what the automated formatting checker will expect. Any diffs from this formatting will result in a failed build until they are addressed. Using the `-i` flag is highly recommended. + +### clang-format resources + * [Binary builds and source available on the LLVM downloads page](https://releases.llvm.org/download.html) + * [Documentation and IDE integration](https://clang.llvm.org/docs/ClangFormat.html) + +## About this Driver +Written by Limor Fried for Adafruit Industries. +BSD license, check license.txt for more information +All text above must be included in any redistribution diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/code-of-conduct.md b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/code-of-conduct.md new file mode 100644 index 0000000..8ee6e44 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/code-of-conduct.md @@ -0,0 +1,127 @@ +# Adafruit Community Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and leaders pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level or type of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +We are committed to providing a friendly, safe and welcoming environment for +all. + +Examples of behavior that contributes to creating a positive environment +include: + +* Be kind and courteous to others +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Collaborating with other community members +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and sexual attention or advances +* The use of inappropriate images, including in a community member's avatar +* The use of inappropriate language, including in a community member's nickname +* Any spamming, flaming, baiting or other attention-stealing behavior +* Excessive or unwelcome helping; answering outside the scope of the question + asked +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate + +The goal of the standards and moderation guidelines outlined here is to build +and maintain a respectful community. We ask that you don’t just aim to be +"technically unimpeachable", but rather try to be your best self. + +We value many things beyond technical expertise, including collaboration and +supporting others within our community. Providing a positive experience for +other community members can have a much more significant impact than simply +providing the correct answer. + +## Our Responsibilities + +Project leaders are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project leaders have the right and responsibility to remove, edit, or +reject messages, comments, commits, code, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any community member for other behaviors that they deem +inappropriate, threatening, offensive, or harmful. + +## Moderation + +Instances of behaviors that violate the Adafruit Community Code of Conduct +may be reported by any member of the community. Community members are +encouraged to report these situations, including situations they witness +involving other community members. + +You may report in the following ways: + +In any situation, you may send an email to . + +On the Adafruit Discord, you may send an open message from any channel +to all Community Helpers by tagging @community helpers. You may also send an +open message from any channel, or a direct message to @kattni#1507, +@tannewt#4653, @Dan Halbert#1614, @cater#2442, @sommersoft#0222, or +@Andon#8175. + +Email and direct message reports will be kept confidential. + +In situations on Discord where the issue is particularly egregious, possibly +illegal, requires immediate action, or violates the Discord terms of service, +you should also report the message directly to Discord. + +These are the steps for upholding our community’s standards of conduct. + +1. Any member of the community may report any situation that violates the +Adafruit Community Code of Conduct. All reports will be reviewed and +investigated. +2. If the behavior is an egregious violation, the community member who +committed the violation may be banned immediately, without warning. +3. Otherwise, moderators will first respond to such behavior with a warning. +4. Moderators follow a soft "three strikes" policy - the community member may +be given another chance, if they are receptive to the warning and change their +behavior. +5. If the community member is unreceptive or unreasonable when warned by a +moderator, or the warning goes unheeded, they may be banned for a first or +second offense. Repeated offenses will result in the community member being +banned. + +## Scope + +This Code of Conduct and the enforcement policies listed above apply to all +Adafruit Community venues. This includes but is not limited to any community +spaces (both public and private), the entire Adafruit Discord server, and +Adafruit GitHub repositories. Examples of Adafruit Community spaces include +but are not limited to meet-ups, audio chats on the Adafruit Discord, or +interaction at a conference. + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. As a community +member, you are representing our community, and are expected to behave +accordingly. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 1.4, available at +, +and the [Rust Code of Conduct](https://www.rust-lang.org/en-US/conduct.html). + +For other projects adopting the Adafruit Community Code of +Conduct, please contact the maintainers of those projects for enforcement. +If you wish to use this code of conduct for your own project, consider +explicitly mentioning your moderation policy or making a copy with your +own moderation policy so as to avoid confusion. diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/examples/mlx_set_emissivity/mlx_set_emissivity.ino b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/examples/mlx_set_emissivity/mlx_set_emissivity.ino new file mode 100644 index 0000000..b89f974 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/examples/mlx_set_emissivity/mlx_set_emissivity.ino @@ -0,0 +1,47 @@ +/* + * See app note: + * https://www.melexis.com/en/documents/documentation/application-notes/application-note-mlx90614-changing-emissivity-setting + * + * 1. Write 0x0000 to address 0x04 (erase the EEPROM cell) + * 2. Write the new value to address 0x04 + * 3. Read the value in address 0x04 in order to check that the correct value is stored + * 4. Restart the module + * + */ + +#include + +//== CHANGE THIS ============ +double new_emissivity = 0.95; +//=========================== + +Adafruit_MLX90614 mlx = Adafruit_MLX90614(); + +void setup() { + Serial.begin(9600); + while (!Serial); + + Serial.println("Adafruit MLX90614 Emissivity Setter.\n"); + + // init sensor + if (!mlx.begin()) { + Serial.println("Error connecting to MLX sensor. Check wiring."); + while (1); + }; + + // read current emissivity + Serial.print("Current emissivity = "); Serial.println(mlx.readEmissivity()); + + // set new emissivity + Serial.print("Setting emissivity = "); Serial.println(new_emissivity); + mlx.writeEmissivity(new_emissivity); // this does the 0x0000 erase write + + // read back + Serial.print("New emissivity = "); Serial.println(mlx.readEmissivity()); + + // done + Serial.print("DONE. Restart the module."); +} + +void loop() { +} \ No newline at end of file diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/examples/mlxtest/mlxtest.ino b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/examples/mlxtest/mlxtest.ino new file mode 100644 index 0000000..594d8fe --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/examples/mlxtest/mlxtest.ino @@ -0,0 +1,46 @@ +/*************************************************** + This is a library example for the MLX90614 Temp Sensor + + Designed specifically to work with the MLX90614 sensors in the + adafruit shop + ----> https://www.adafruit.com/products/1747 3V version + ----> https://www.adafruit.com/products/1748 5V version + + These sensors use I2C to communicate, 2 pins are required to + interface + Adafruit invests time and resources providing this open source code, + please support Adafruit and open-source hardware by purchasing + products from Adafruit! + + Written by Limor Fried/Ladyada for Adafruit Industries. + BSD license, all text above must be included in any redistribution + ****************************************************/ + +#include + +Adafruit_MLX90614 mlx = Adafruit_MLX90614(); + +void setup() { + Serial.begin(9600); + while (!Serial); + + Serial.println("Adafruit MLX90614 test"); + + if (!mlx.begin()) { + Serial.println("Error connecting to MLX sensor. Check wiring."); + while (1); + }; + + Serial.print("Emissivity = "); Serial.println(mlx.readEmissivity()); + Serial.println("================================================"); +} + +void loop() { + Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempC()); + Serial.print("*C\tObject = "); Serial.print(mlx.readObjectTempC()); Serial.println("*C"); + Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempF()); + Serial.print("*F\tObject = "); Serial.print(mlx.readObjectTempF()); Serial.println("*F"); + + Serial.println(); + delay(500); +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/library.properties b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/library.properties new file mode 100644 index 0000000..423d7a6 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/library.properties @@ -0,0 +1,10 @@ +name=Adafruit MLX90614 Library +version=2.1.3 +author=Adafruit +maintainer=Adafruit +sentence=Arduino library for the MLX90614 sensors in the Adafruit shop +paragraph=Arduino library for the MLX90614 sensors in the Adafruit shop +category=Sensors +url=https://github.com/adafruit/Adafruit-MLX90614-Library +architectures=* +depends=Adafruit BusIO diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/license.txt b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/license.txt new file mode 100644 index 0000000..8aafa28 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/license.txt @@ -0,0 +1,26 @@ +Software License Agreement (BSD License) + +Copyright (c) 2020 Limor Fried for Adafruit Industries +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holders nor the +names of its contributors may be used to endorse or promote products +derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/.gitattributes b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/.gitignore b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/.gitignore new file mode 100644 index 0000000..58b4bef --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/.gitignore @@ -0,0 +1,58 @@ +# Visual Studio Code files +.vscode + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# ========================= +# Operating System Files +# ========================= + +# OSX +# ========================= + +.DS_Store +.AppleDouble +.LSOverride + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# VIM backup files +*~ +[._]*.un~ +*.swp + +# Zephyr build files +examples/Zephyr/*/build/* \ No newline at end of file diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/.piopm b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/.piopm new file mode 100644 index 0000000..90b31e4 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/.piopm @@ -0,0 +1 @@ +{"type": "library", "name": "SparkFun u-blox Arduino Library", "version": "1.8.11", "spec": {"owner": "sparkfun", "id": 5746, "name": "SparkFun u-blox Arduino Library", "requirements": null, "uri": null}} \ No newline at end of file diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/CONTRIBUTING.md b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/CONTRIBUTING.md new file mode 100644 index 0000000..ff79aea --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/CONTRIBUTING.md @@ -0,0 +1,20 @@ +# How to Contribute + +Thank you so *much* for offering to help out. We truly appreciate it. + +If you'd like to contribute, start by searching through the [issues](https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library/issues) and [pull requests](https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library/pulls) to see whether someone else has raised a similar idea or question. +Please check the [closed issues](https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library/issues?q=is%3Aissue+is%3Aclosed) +and [closed pull requests](https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library/pulls?q=is%3Apr+is%3Aclosed) too - you may find that your issue or feature has already been discussed. + +If you decide to add a feature to this library, please create a PR and follow these best practices: + +* Change as little as possible. Do not submit a PR that changes 100 lines of whitespace. Break up into multiple PRs if necessary. +* If you've added a new feature document it with a simple example sketch. This serves both as a test of your PR and as a quick way for users to quickly learn how to use your new feature. +* If you add new functions also add them to _keywords.txt_ so that they are properly highlighted in Arduino. [Read more](https://www.arduino.cc/en/Hacking/libraryTutorial). +* **Important:** Please submit your PR using the [release_candidate branch](https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library/tree/release_candidate). That way, we can merge and test your PR quickly without changing the _master_ branch + +![Contributing.JPG](./img/Contributing.JPG) + +## Style guide + +Please read and follow the [Arduino API style guide](https://www.arduino.cc/en/Reference/APIStyleGuide). Also read and consider the [Arduino style guide](https://www.arduino.cc/en/Reference/StyleGuide). diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/ISSUE_TEMPLATE.md b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..84ae55b --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/ISSUE_TEMPLATE.md @@ -0,0 +1,18 @@ +### Subject of the issue +Describe your issue here. If you reference a datasheet please specify which one and in which section (ie, the protocol manual, section 5.1.2). Additionally, screenshots are easy to paste into github. + +### Your workbench +* What development board or microcontroller are you using? +* What version of hardware or breakout board are you using? +* How is the breakout board wired to your microcontroller? +* How is everything being powered? +* Are there any additional details that may help us help you? + +### Steps to reproduce +Tell us how to reproduce this issue. Please post stripped down example code demonstrating your issue. + +### Expected behavior +Tell us what should happen + +### Actual behavior +Tell us what happens instead diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/LICENSE.md b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/LICENSE.md new file mode 100644 index 0000000..e64bd4e --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/LICENSE.md @@ -0,0 +1,55 @@ +SparkFun License Information +============================ + +SparkFun uses two different licenses for our files — one for hardware and one for code. + +Hardware +--------- + +**SparkFun hardware is released under [Creative Commons Share-alike 4.0 International](http://creativecommons.org/licenses/by-sa/4.0/).** + +Note: This is a human-readable summary of (and not a substitute for) the [license](http://creativecommons.org/licenses/by-sa/4.0/legalcode). + +You are free to: + +Share — copy and redistribute the material in any medium or format +Adapt — remix, transform, and build upon the material +for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. +ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. +No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. +Notices: + +You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material. + + +Code +-------- + +**SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT).** + +The MIT License (MIT) + +Copyright (c) 2016 SparkFun Electronics + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/README.md b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/README.md new file mode 100644 index 0000000..b25ecf3 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/README.md @@ -0,0 +1,163 @@ +SparkFun u-blox Arduino Library +=========================================================== + +**Please note: this library is now deprecated. Please migrate to the new [SparkFun u-blox GNSS Arduino Library](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library).** + +**You can find details on how to migrate to v2.0 [here](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library#migrating-to-v20).** + +You can install v2.0 via the Arduino Library Manager. Search for **SparkFun u-blox GNSS**. + + + + + + + + + + + + + + + + +
SparkFun GPS-RTK2 - ZED-F9P (GPS-15136)SparkFun GPS-RTK - NEO-M8P-2 (GPS-15005)SparkFun ZOE-M8Q Breakout (GPS-15193)SparkFun SAM-M8Q Breakout (GPS-15210)SparkFun NEO-M9N Breakout (GPS-15733)
+ +U-blox makes some incredible GPS receivers covering everything from low-cost, highly configurable modules such as the SAM-M8Q all the way up to the surveyor grade ZED-F9P with precision of the diameter of a dime. This library focuses on configuration and control of u-blox devices over I2C (called DDC by u-blox) and Serial. The UBX protocol is supported over both I2C and serial, and is a much easier and lighterweight interface to a GPS module. Stop parsing NMEA data! And simply ask for the datums you need. + +This library can be installed via the Arduino Library manager. Search for **SparkFun u-blox GNSS**. + +Although not an integrated part of the library, you will find an example of how to communicate with the older series 6 and 7 modules in the [examples folder](./examples/Series_6_7). + +Max (400kHz) I2C Support +------------------- + +To achieve 400kHz I2C speed please be sure to remove all pull-ups on the I2C bus. Most, if not all, u-blox modules include pull ups on the I2C lines (sometimes called DDC in their manuals). Cut all I2C pull up jumpers and/or remove them from peripheral boards. Otherwise, various data glitches can occur. See issues [38](https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library/issues/38) and [40](https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library/issues/40) for more information. If possible, run the I2C bus at 100kHz. + +------------------- + +Want to help? Please do! We are always looking for ways to improve and build out features of this library. + +* We are always interested in adding SPI support with a checkUbloxSPI() function + +Thanks to: + +* [trycoon](https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library/pull/7) for fixing the lack of I2C buffer length defines. +* [tve](https://github.com/tve) for building out serial additions and examples. +* [Redstoned](https://github.com/Redstoned) and [davidallenmann](https://github.com/davidallenmann) for adding PVT date and time. +* [wittend](https://forum.sparkfun.com/viewtopic.php?t=49874) for pointing out the RTCM print bug. +* Big thanks to [PaulZC](https://github.com/PaulZC) for implementing the combined key ValSet method, geofence functions, better saveConfig handling, as well as a bunch of small fixes. +* [RollieRowland](https://github.com/RollieRowland) for adding HPPOSLLH (High Precision Geodetic Position). +* [tedder](https://github.com/tedder) for moving iTOW to PVT instead of HPPOS and comment cleanup. +* [grexjmo](https://github.com/grexjmo) for pushing for a better NMEA sentence configuration method. +* [averywallis](https://github.com/averywallis) for adding good comments to the various constants. +* [blazczak](https://github.com/blazczak) and [geeksville](https://github.com/geeksville) for adding support for the series 6 and 7 modules. +* [bjorn@unsurv](https://github.com/unsurv) for adding powerOff and powerOffWithInterrupt. +* [dotMorten](https://github.com/dotMorten) for the MSGOUT keys, autoHPPOSLLH, autoDOP and upgrades to autoPVT. +* [markuckermann](https://github.com/markuckermann) for spotting the config layer gremlins +* [vid553](https://github.com/vid553) for the Zephyr port +* [balamuruganky](https://github.com/balamuruganky) for the NAV-PVT velocity parameters, getSpeedAccEst, getHeadingAccEst, getInvalidLlh, getHeadVeh, getMagDec and getMagAcc +* [nelarsen](https://github.com/nelarsen) for the buffer overrun improvements +* [mstranne](https://github.com/mstranne) and [shaneperera](https://github.com/shaneperera) for the pushRawData suggestion +* [rubienr](https://github.com/rubienr) for spotting the logical AND issues + +Need a Python version for Raspberry Pi? Checkout the [Qwiic Ublox GPS Py module](https://github.com/sparkfun/Qwiic_Ublox_Gps_Py). + +Need a library for the u-blox and Particle? Checkout the [Particle library](https://github.com/aseelye/SparkFun_Ublox_Particle_Library) fork. + +Need a C++ version which runs on Linux? Checkout the [Ublox_Linux_Library](https://github.com/balamuruganky/Ublox_Linux_Library). + +Contributing +-------------- + +If you would like to contribute to this library: please do, we truly appreciate it, but please follow [these guidelines](./CONTRIBUTING.md). Thanks! + +Repository Contents +------------------- + +* **/examples** - Example sketches for the library (.ino). Run these from the Arduino IDE. +* **/src** - Source files for the library (.cpp, .h). +* **[keywords.txt](./keywords.txt)** - Keywords from this library that will be highlighted in the Arduino IDE. +* **[library.properties](./library.properties)** - General library properties for the Arduino package manager. +* **[CONTRIBUTING.md](./CONTRIBUTING.md)** - Guidelines on how to contribute to this library. +* **[Theory.md](./Theory.md)** - provides detail on how data is processed by the library. + +Documentation +-------------- + +* **[Installing an Arduino Library Guide](https://learn.sparkfun.com/tutorials/installing-an-arduino-library)** - Basic information on how to install an Arduino library. + +Polling vs. Auto-Reporting +-------------------------- + +This library supports two modes of operation for getting navigation information with the `getPVT` +function (based on the `UBX_NAV_PVT` protocol packet): polling and auto-reporting. + +The standard method is for the sketch to call `getPVT` (or one of the `getLatitude`, `getLongitude`, +etc. methods) when it needs a fresh navigation solution. At that point the library sends a request +to the GPS to produce a fresh solution. The GPS then waits until the next measurement occurs (e.g. +once per second or as set using `setNavigationFrequency`) and then sends the fresh data. +The advantage of this method is that the data received is always fresh, the downside is that getPVT +can block until the next measurement is made by the GPS, e.g. up to 1 second if the nav frequency is +set to one second. + +An alternate method can be chosen using `setAutoPVT(true)` which instructs the GPS to send the +navigation information (`UBX_NAV_PVT` packet) as soon as it is produced. This is the way the older +NMEA navigation data has been used for years. The sketch continues to call `getPVT` as before but +under the hood the library returns the data of the last solution received from the GPS, which may be +a bit out of date (how much depends on the `setNavigationFrequency` value). + +The advantage of this method is that getPVT does not block: it returns true if new data is available +and false otherwise. The disadvantages are that the data may be a bit old and that buffering for +these spontaneus `UBX_NAV_PVT` packets is required (100 bytes each). When using Serial the buffering +is an issue because the std serial buffer is 32 or 64 bytes long depending on Arduino version. When +using I2C the buffering is not an issue because the GPS device has at least 1KB of internal buffering +(possibly as large as 4KB). + +As an example, assume that the GPS is set to produce 5 navigation +solutions per second and that the sketch only calls getPVT once a second, then the GPS will queue 5 +packets in its internal buffer (about 500 bytes) and the library will read those when getPVT is +called, update its internal copy of the nav data 5 times, and return `true` to the sketch. The +sketch calls `getLatitude`, etc. and retrieve the data of the most recent of those 5 packets. + +The library also supports: +* `autoHPPOSLLH` +* `autoDOP` +* `autoHNRAtt` +* `autoHNRDyn` +* `autoHNRPVT` + +Memory Usage +--------------------------------- + +Version 1.8.9 introduced support for `autoHNR` on the NEO-M8U, and that tipped the balance in terms of RAM use on the ATmega328. +The library does still run on the ATmega328 but you will see _**Low memory available, stability problems may occur**_ warnings +as the global variables now occupy 1540 bytes of RAM. If you do want to run this library on the ATmega328, you may need to regress +to Version 1.8.8 via the Library Manager. + +Products That Use This Library +--------------------------------- +* [GPS-16481](https://www.sparkfun.com/products/16481) - SparkFun GPS-RTK-SMA Breakout - ZED-F9P (Qwiic) +* [GPS-15136](https://www.sparkfun.com/products/15136) - SparkFun GPS-RTK2 Board - ZED-F9P (Qwiic) +* [GPS-15005](https://www.sparkfun.com/products/15005) - SparkFun GPS-RTK Board - NEO-M8P-2 (Qwiic) +* [GPS-15210](https://www.sparkfun.com/products/15210) - SparkFun GPS Breakout - Chip Antenna, SAM-M8Q (Qwiic) +* [GPS-15193](https://www.sparkfun.com/products/15193) - SparkFun GPS Breakout - Chip Antenna, ZOE-M8Q (Qwiic) +* [GPS-15733](https://www.sparkfun.com/products/15733) - SparkFun GPS Breakout - NEO-M9N, Chip Antenna (Qwiic) +* [GPS-15712](https://www.sparkfun.com/products/15712) - SparkFun GPS Breakout - NEO-M9N, U.FL (Qwiic) +* [GPS-16329](https://www.sparkfun.com/products/16329) - SparkFun GPS Dead Reckoning Breakout - NEO-M8U (Qwiic) +* [SPX-14980](https://www.sparkfun.com/products/14980) - SparkX GPS-RTK Black +* [SPX-15106](https://www.sparkfun.com/products/15106) - SparkX SAM-M8Q + +License Information +------------------- + +This product is _**open source**_! + +Various bits of the code have different licenses applied. Anything SparkFun wrote is beerware; if you see me (or any other SparkFun employee) at the local, and you've found our code helpful, please buy us a round! + +Please use, reuse, and modify these files as you see fit. Please maintain attribution to SparkFun Electronics and release anything derivative under the same license. + +Distributed as-is; no warranty is given. + +- Your friends at SparkFun. diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/Theory.md b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/Theory.md new file mode 100644 index 0000000..6469b3e --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/Theory.md @@ -0,0 +1,39 @@ +How I2C (aka DDC) communication works with a u-blox module +=========================================================== + +When the user calls one of the methods the library will poll the u-blox module for new data. + +* Wait for a minimum of 25 ms between polls (configured dynamically when update rate is set) +* Write 0xFD to module +* Read two bytes (0xFD and 0xFE) for bytes available +* If 0x7F or 0xFF then no bytes are available +* Otherwise, read number of bytes and process into NMEA, UBX, or RTCM frame. +* If checksum is valid, flag frame as complete. + +This library was originally written to use the I2C interface but Serial has been implemented as well. + +How data is processed by this library +=========================================================== + +A method will call **sendCommand()**. This will begin waiting for a response with either **waitForACKResponse()** or **waitForNoACKResponse()** depending on the command we have sent (CFG commands generate an ACK where others like PVT do not). + +Once **waitForACKResponse()** or **waitForNoACKResponse()** is called the library will start checking the u-blox module for new bytes. These bytes may be part of a NMEA sentence, an RTCM sentence, or a UBX packet. The library will file each byte into the appropriate container. Once a given sentence or packet is complete, the appropriate processUBX(), processNMEA() will be called. These functions deal with specific processing for each type. + +Note: When interfacing to a u-blox module over I2C **checkUbloxI2C()** will read all bytes currently sitting in the I2C buffer. This may pick up multiple UBX packets. For example, an ACK for a VALSET may be mixed in with an **AutoPVT** response. We cannot tell **checkUbloxI2C()** to stop once a given ACK is found because we run the risk of leaving unprocessed bytes in the I2C buffer and losing them. We don't have this issue with **checkUbloxSerial()**. + +**processUBX()** will check the CRC of the UBX packet. If validated, the packet will be marked as valid. Once a packet is marked as valid then **processUBXpacket()** is called to extract the contents. This is most commonly used to get the position, velocity, and time (PVT) out of the packet but is also used to check the nature of an ACK packet. + +Once a packet has been processed, **waitForACKResponse()/waitForNoACKResponse()** makes the appropriate decision what to do with it. If a packet satisfies the CLS/ID and characteristics of what **waitForACKResponse()/waitForNoACKResponse()** is waiting for, then it returns back to **sendCommand()**. If the packet didn't match or was invalid then **waitForACKResponse()/waitForNoACKResponse()** will continue to wait until the correct packet is received or we time out. **sendCommand()** then returns with a value from the **sfe_ublox_status_e** enum depending on the success of **waitForACKResponse()/waitForNoACKResponse()**. + +If we are getting / polling data from the module, **sendCommand()** will return **SFE_UBLOX_STATUS_DATA_RECEIVED** if the get was successful. + +If we are setting / writing data to the module, **sendCommand()** will return **SFE_UBLOX_STATUS_DATA_SENT** if the set was successful. + +We are proud that this library still compiles and runs on the original RedBoard (ATmega328P). We achieve that by being very careful about how much RAM we allocate to packet storage. We use only three buffers or containers to store the incoming data: +- **packetBuf** (packetBuffer) - is small and is used to store only the head (and tail) of incoming UBX packets until we know they are. If the packet is _expected_ (i.e. it matches the Class and ID in the packet passed in **sendCommand()**) then the incoming bytes are diverted into **packetCfg** or **packetAck**. Unexpected packets are ignored. +- **packetCfg** (packetConfiguration) - is used to store an _expected_ incoming UBX packet of up to 256 bytes. E.g. **getProtocolVersion()** returns about 220 bytes. Message data requested by a higher function is returned in packetCfg. +- **packetAck** (packetAcknowledge) - is small and is used to store the ACK or NACK accompanying any _expected_ packetCfg. + +**AutoPVT**, **AutoHPPOSLLH** and **AutoDOP** packets can arrive at any time. They too _have_ to be stored and processed in **packetCfg**. This means there are circumstances where the library can get the data it is expecting from the module, but it is overwritten (e.g. by an **AutoPVT** packet) before **sendCommand()** is able to return. In this case, **sendCommand()** will return the error **SFE_UBLOX_STATUS_DATA_OVERWRITTEN**. We should simply call the library function again, but we will need to reset the packet contents first as they will indeed have been overwritten as the error implies. + +Need a command that is not currently "built-in" to the library? You can do that using a Custom Command. Check out [Example20_SendCustomCommand](https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library/blob/master/examples/Example20_SendCustomCommand/Example20_SendCustomCommand.ino) for further details. Note: this will of course increase your RAM use. diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example1_calibrateSensor/Example1_calibrateSensor.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example1_calibrateSensor/Example1_calibrateSensor.ino new file mode 100644 index 0000000..d3448dd --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example1_calibrateSensor/Example1_calibrateSensor.ino @@ -0,0 +1,66 @@ +/* + By: Elias Santistevan + SparkFun Electronics + Date: May, 2020 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + NEO-M8U: https://www.sparkfun.com/products/16329 + ZED-F9R: https://www.sparkfun.com/products/16344 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a Redboard Qwiic + If you don't have a platform with a Qwiic connection use the + SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output + + To take advantage of the internal IMU of either the Dead Reckoning GPS + boards (ZED-F9R, NEO-M8U), you must first calibrate it. This includes securing the GPS module + to your vehicle so that it is stable within 2 degrees and that the frame of + reference of the board is consistent with the picture outlined in the + Receiver-Description-Prot-Spec Datasheet under Automotive/Untethered Dead + Reckoning. You may also check either the ZED-F9R or NEO-M8U Hookup Guide for + more information. After the board is secure, you'll need to put the module + through certain conditions for proper calibration: acceleration, turning, + stopping for a few minutes, getting to a speed over 30km/h all under a clear sky + with good GNSS signal. This example simply looks at the + "fusionMode" status which indicates whether the SparkFun Dead Reckoning is + not-calibrated - 0, or calibrated - 1. +*/ + +#include //Needed for I2C to GPS + +#include //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println(F("SparkFun Ublox Example")); + + Wire.begin(); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) +} + +void loop() +{ + + if (myGPS.getEsfInfo()){ + Serial.print(F("Fusion Mode: ")); + Serial.println(myGPS.imuMeas.fusionMode); + if (myGPS.imuMeas.fusionMode == 1) + Serial.println(F("Sensor is calibrated!")); + } + + delay(250); +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example2_getIMUData/Example2_getIMUData.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example2_getIMUData/Example2_getIMUData.ino new file mode 100644 index 0000000..e023f1d --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example2_getIMUData/Example2_getIMUData.ino @@ -0,0 +1,84 @@ +/* + By: Elias Santistevan + SparkFun Electronics + Date: May, 2020 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + NEO-M8U: https://www.sparkfun.com/products/16329 + ZED-F9R: https://www.sparkfun.com/products/16344 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a Redboard Qwiic + If you don't have a platform with a Qwiic connection use the + SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output + + After calibrating the module, also known as "Fusion Mode", you can get + data directly from the IMU. This data is integrated directly into the GNSS + output, but is provided by the module as well. + +*/ + +#include //Needed for I2C to GPS + +#include //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println(F("SparkFun Ublox Example")); + + Wire.begin(); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + + if (myGPS.getEsfInfo()){ + + Serial.print(F("Fusion Mode: ")); + Serial.println(myGPS.imuMeas.fusionMode); + + if (myGPS.imuMeas.fusionMode == 1){ + Serial.println(F("Fusion Mode is Initialized!")); + } + else { + Serial.println(F("Fusion Mode is either disabled or not initialized - Freezing!")); + Serial.println(F("Please see Example 1 description at top for more information.")); + } + } +} + +void loop() +{ + + if (myGPS.getEsfIns()) + { + Serial.print(F("X: ")); + Serial.println(myGPS.imuMeas.xAngRate); + Serial.print(F("Y: ")); + Serial.println(myGPS.imuMeas.yAngRate); + Serial.print(F("Z: ")); + Serial.println(myGPS.imuMeas.zAngRate); + Serial.print(F("X Acceleration: ")); + Serial.println(myGPS.imuMeas.xAccel); + Serial.print(F("Y Acceleration: ")); + Serial.println(myGPS.imuMeas.yAccel); + Serial.print(F("Z Acceleration: ")); + Serial.println(myGPS.imuMeas.zAccel); + // These values also have "validity checks" that can be provided by the + // ublox library, add "Vald" to values: e.g. xAngRateVald or xAccelVald. + } + + delay(250); +} + diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example3_getSensorStatus/Example3_getSensorStatus.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example3_getSensorStatus/Example3_getSensorStatus.ino new file mode 100644 index 0000000..24d8ca3 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example3_getSensorStatus/Example3_getSensorStatus.ino @@ -0,0 +1,97 @@ +/* + By: Elias Santistevan + SparkFun Electronics + Date: May, 2020 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + NEO-M8U: https://www.sparkfun.com/products/16329 + ZED-F9R: https://www.sparkfun.com/products/16344 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a Redboard Qwiic + If you don't have a platform with a Qwiic connection use the + SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output + + After calibrating the module, also known as "Fusion Mode", you can get + data directly from the IMU. This example code walks you through trouble + shooting or identifying the different states of any individual + "external" (which include internal) sensors you've hooked up (vehicle speed + sensor) or the internal IMU used by the modules. You can see if the sensor is + being used, if it's calibrated, ready, what data type it returns, the state + of the measurement etc. + +*/ + +#include //Needed for I2C to GPS + +#include //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println(F("SparkFun Ublox Example")); + + Wire.begin(); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + + // GetEsfInfo also gets the number of sensors used by the ublox module, this + // includes (in the case of the ZED-F9R) wheel tick input from the vehicle + // speed sensor attached to the module. + if (myGPS.getEsfInfo()){ + + Serial.print(F("Fusion Mode: ")); + Serial.println(myGPS.imuMeas.fusionMode); + + if (myGPS.imuMeas.fusionMode == 1){ + Serial.println(F("Fusion Mode is Initialized!")); + } + else { + Serial.println(F("Fusion Mode is either disabled or not initialized - Freezing!")); + Serial.println(F("Please see Example 1 description at top for more information.")); + } + } +} + +void loop() +{ + + for(int i=1; i<=myGPS.ubloxSen.numSens; i++){ + myGPS.getSensState(i); // Give the sensor you want to check on. + Serial.print(F("Sensor Data Type: ")); //See ublox receiver description + //or our hookup guide for information on the + //return value. + Serial.println(myGPS.ubloxSen.senType); + Serial.print(F("Being Used: ")); + Serial.println(myGPS.ubloxSen.isUsed); + Serial.print(F("Is Ready: ")); + Serial.println(myGPS.ubloxSen.isReady); + Serial.print(F("Calibration Status: ")); + Serial.println(myGPS.ubloxSen.calibStatus); + Serial.print(F("Time Status: ")); + Serial.println(myGPS.ubloxSen.timeStatus); + Serial.print(F("Bad Measure: ")); + Serial.println(myGPS.ubloxSen.timeStatus); + Serial.print(F("Bad Time Tag: ")); + Serial.println(myGPS.ubloxSen.badTag); + Serial.print(F("Missed Measure : ")); + Serial.println(myGPS.ubloxSen.missMeas); + Serial.print(F("Noisy Measure: ")); + Serial.println(myGPS.ubloxSen.noisyMeas); + } + +} + + diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example4_vehicleDynamics/Example4_vehicleDynamics.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example4_vehicleDynamics/Example4_vehicleDynamics.ino new file mode 100644 index 0000000..2225348 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example4_vehicleDynamics/Example4_vehicleDynamics.ino @@ -0,0 +1,82 @@ +/* + By: Elias Santistevan + SparkFun Electronics + Date: May, 2020 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + NEO-M8U: https://www.sparkfun.com/products/16329 + ZED-F9R: https://www.sparkfun.com/products/16344 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a Redboard Qwiic + If you don't have a platform with a Qwiic connection use the + SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output + + After calibrating the module and securing it to your vehicle such that it's + stable within 2 degrees, and the board is oriented correctly with regards to + the vehicle's frame, you can now read the vehicle's "attitude". The attitude + includes the vehicle's heading, pitch, and roll. You can also check the + accuracy of those readings. + +*/ + +#include //Needed for I2C to GPS + +#include //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println(F("SparkFun Ublox Example")); + + Wire.begin(); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + + if (myGPS.getEsfInfo()){ + + Serial.print(F("Fusion Mode: ")); + Serial.println(myGPS.imuMeas.fusionMode); + + if (myGPS.imuMeas.fusionMode == 1){ + Serial.println(F("Fusion Mode is Initialized!")); + } + else { + Serial.println(F("Fusion Mode is either disabled or not initialized - Freezing!")); + Serial.println(F("Please see Example 1 description at top for more information.")); + } + } +} + +void loop() +{ + myGPS.getVehAtt(); // Give the sensor you want to check on. + Serial.print(F("Roll: ")); + Serial.println(myGPS.vehAtt.roll); + Serial.print(F("Pitch: ")); + Serial.println(myGPS.vehAtt.pitch); + Serial.print(F("Heading: ")); + Serial.println(myGPS.vehAtt.heading); + Serial.print(F("Roll Accuracy: ")); + Serial.println(myGPS.vehAtt.accRoll); + Serial.print(F("Pitch Accuracy: ")); + Serial.println(myGPS.vehAtt.accPitch); + Serial.print(F("Heading Accuracy: ")); + Serial.println(myGPS.vehAtt.accHeading); + + delay(250); +} + + diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example5_getHNRData/Example5_getHNRData.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example5_getHNRData/Example5_getHNRData.ino new file mode 100644 index 0000000..5acbf28 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example5_getHNRData/Example5_getHNRData.ino @@ -0,0 +1,90 @@ +/* + By: Paul Clark + SparkFun Electronics + Date: December, 2020 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example configures the High Navigation Rate on the NEO-M8U and then + polls and displays the attitude solution, vehicle dynamics information + and high rate position, velocity and time. + + This example polls the high rate data. + (The next example uses "autoHNR" to receive the HNR data automatically.) + + Please make sure your NEO-M8U is running UDR firmware >= 1.31. Please update using u-center if necessary: + https://www.u-blox.com/en/product/neo-m8u-module#tab-documentation-resources + + Feel like supporting open source hardware? + Buy a board from SparkFun! + NEO-M8U: https://www.sparkfun.com/products/16329 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a Redboard Qwiic + If you don't have a platform with a Qwiic connection use the + SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output + +*/ + +#include //Needed for I2C to GPS + +#include //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println(F("SparkFun u-blox Example")); + + Wire.begin(); + + //myGPS.enableDebugging(); // Uncomment this line to enable debug messages on Serial + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Warning! u-blox GPS did not begin correctly.")); + Serial.println(F("(This may be because the I2C port is busy with HNR messages.)")); + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.saveConfigSelective(VAL_CFG_SUBSEC_IOPORT); //Save (only) the communications port settings to flash and BBR + + if (myGPS.setHNRNavigationRate(10) == true) //Set the High Navigation Rate to 10Hz + Serial.println(F("setHNRNavigationRate was successful")); + else + Serial.println(F("setHNRNavigationRate was NOT successful")); +} + +void loop() +{ + // Poll and print selected HNR data + if (myGPS.getHNRAtt(125) == true) // Request HNR Att data using a 125ms timeout + { + Serial.print(F("Roll: ")); + Serial.print(myGPS.hnrAtt.roll); + Serial.print(F(" Pitch: ")); + Serial.print(myGPS.hnrAtt.pitch); + Serial.print(F(" Heading: ")); + Serial.println(myGPS.hnrAtt.heading); + } + if (myGPS.getHNRDyn(125) == true) // Request HNR Dyn data using a 125ms timeout + { + Serial.print(F("xAccel: ")); + Serial.print(myGPS.hnrVehDyn.xAccel); + Serial.print(F(" yAccel: ")); + Serial.print(myGPS.hnrVehDyn.yAccel); + Serial.print(F(" zAccel: ")); + Serial.println(myGPS.hnrVehDyn.zAccel); + } + if (myGPS.getHNRPVT(125) == true) // Request HNR PVT data using a 125ms timeout + { + Serial.print(F("ns: ")); + Serial.print(myGPS.hnrPVT.nano); + Serial.print(F(" Lat: ")); + Serial.print(myGPS.hnrPVT.lat); + Serial.print(F(" Lon: ")); + Serial.println(myGPS.hnrPVT.lon); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example6_getAutoHNRData/Example6_getAutoHNRData.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example6_getAutoHNRData/Example6_getAutoHNRData.ino new file mode 100644 index 0000000..7180742 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Dead Reckoning/Example6_getAutoHNRData/Example6_getAutoHNRData.ino @@ -0,0 +1,96 @@ +/* + By: Paul Clark + SparkFun Electronics + Date: December, 2020 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example configures the High Navigation Rate on the NEO-M8U and then + reads and displays the attitude solution, vehicle dynamics information + and high rate position, velocity and time. + + This example uses "autoHNR" to receive the HNR data automatically. + + Please make sure your NEO-M8U is running UDR firmware >= 1.31. Please update using u-center if necessary: + https://www.u-blox.com/en/product/neo-m8u-module#tab-documentation-resources + + Feel like supporting open source hardware? + Buy a board from SparkFun! + NEO-M8U: https://www.sparkfun.com/products/16329 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a Redboard Qwiic + If you don't have a platform with a Qwiic connection use the + SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output + +*/ + +#include //Needed for I2C to GPS + +#include //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +boolean usingAutoHNRAtt = false; +boolean usingAutoHNRDyn = false; +boolean usingAutoHNRPVT = false; + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println(F("SparkFun u-blox Example")); + + Wire.begin(); + + //myGPS.enableDebugging(); // Uncomment this line to enable debug messages on Serial + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Warning! u-blox GPS did not begin correctly.")); + Serial.println(F("(This may be because the I2C port is busy with HNR messages.)")); + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.saveConfigSelective(VAL_CFG_SUBSEC_IOPORT); //Save (only) the communications port settings to flash and BBR + + if (myGPS.setHNRNavigationRate(10) == true) //Set the High Navigation Rate to 10Hz + Serial.println(F("setHNRNavigationRate was successful")); + else + Serial.println(F("setHNRNavigationRate was NOT successful")); + + usingAutoHNRAtt = myGPS.setAutoHNRAtt(true); //Attempt to enable auto HNR attitude messages + usingAutoHNRDyn = myGPS.setAutoHNRDyn(true); //Attempt to enable auto HNR vehicle dynamics messages + usingAutoHNRPVT = myGPS.setAutoHNRPVT(true); //Attempt to enable auto HNR PVT messages +} + +void loop() +{ + if (usingAutoHNRAtt && (myGPS.getHNRAtt() == true)) // If setAutoHNRAtt was successful and new data is available + { + Serial.print(F("Roll: ")); // Print selected data + Serial.print(myGPS.hnrAtt.roll); + Serial.print(F(" Pitch: ")); + Serial.print(myGPS.hnrAtt.pitch); + Serial.print(F(" Heading: ")); + Serial.println(myGPS.hnrAtt.heading); + } + if (usingAutoHNRDyn && (myGPS.getHNRDyn() == true)) // If setAutoHNRDyn was successful and new data is available + { + Serial.print(F("xAccel: ")); // Print selected data + Serial.print(myGPS.hnrVehDyn.xAccel); + Serial.print(F(" yAccel: ")); + Serial.print(myGPS.hnrVehDyn.yAccel); + Serial.print(F(" zAccel: ")); + Serial.println(myGPS.hnrVehDyn.zAccel); + } + if (usingAutoHNRPVT && (myGPS.getHNRPVT() == true)) // If setAutoHNRPVT was successful and new data is available + { + Serial.print(F("ns: ")); // Print selected data + Serial.print(myGPS.hnrPVT.nano); + Serial.print(F(" Lat: ")); + Serial.print(myGPS.hnrPVT.lat); + Serial.print(F(" Lon: ")); + Serial.println(myGPS.hnrPVT.lon); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example10_AltitudeMSL/Example10_AltitudeMSL.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example10_AltitudeMSL/Example10_AltitudeMSL.ino new file mode 100644 index 0000000..e435a8b --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example10_AltitudeMSL/Example10_AltitudeMSL.ino @@ -0,0 +1,82 @@ +/* + Reading two altitudes - Mean Sea Level and Ellipsode + By: Nathan Seidle + SparkFun Electronics + Date: January 3rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to query a Ublox module for its lat/long/altitude. + + getAltitude() reports mm above ellipsode model of the globe. There are some + instances where altitude above Mean Sea Level is better. This example shows how + to use getAltitudeMSL(). The difference varies but is ~20m. + Ellipsoid model: https://www.esri.com/news/arcuser/0703/geoid1of3.html + Difference between Ellipsoid Model and Mean Sea Level: https://eos-gnss.com/elevation-for-beginners/ + + Leave NMEA parsing behind. Now you can simply ask the module for the datums you want! + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Tracks the passing of 2000ms (2 seconds) + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } +} + +void loop() +{ + //Query module only every second. Doing it more often will just cause I2C traffic. + //The module only responds when a new position is available + if (millis() - lastTime > 1000) + { + lastTime = millis(); //Update the timer + + long latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + Serial.print(F(" (degrees * 10^-7)")); + + long altitude = myGPS.getAltitude(); + Serial.print(F(" Alt: ")); + Serial.print(altitude); + Serial.print(F(" (mm)")); + + long altitudeMSL = myGPS.getAltitudeMSL(); + Serial.print(F(" AltMSL: ")); + Serial.print(altitudeMSL); + Serial.print(F(" (mm)")); + + Serial.println(); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example11_ResetModule/Example1_FactoryDefaultviaI2C/Example1_FactoryDefaultviaI2C.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example11_ResetModule/Example1_FactoryDefaultviaI2C/Example1_FactoryDefaultviaI2C.ino new file mode 100644 index 0000000..0400379 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example11_ResetModule/Example1_FactoryDefaultviaI2C/Example1_FactoryDefaultviaI2C.ino @@ -0,0 +1,58 @@ +/* + Send command to reset module over I2C + By: Nathan Seidle + Date: January 29rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to reset the U-Blox module to factory defaults over I2C. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GNSS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + while (Serial.available()) Serial.read(); //Trash any incoming chars + Serial.println("Press a key to reset module to factory defaults"); + while (Serial.available() == false) ; //Wait for user to send character + + myGPS.factoryReset(); //Reset everything: baud rate, I2C address, update rate, everything. + + if (myGPS.begin() == false) //Attempt to re-connect + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + Serial.println("Unit has now been factory reset. Freezing..."); + while(1); +} + +void loop() +{ + +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example11_ResetModule/Example2_FactoryDefaultsviaSerial/Example2_FactoryDefaultsviaSerial.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example11_ResetModule/Example2_FactoryDefaultsviaSerial/Example2_FactoryDefaultsviaSerial.ino new file mode 100644 index 0000000..4773f72 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example11_ResetModule/Example2_FactoryDefaultsviaSerial/Example2_FactoryDefaultsviaSerial.ino @@ -0,0 +1,95 @@ +/* + Test baud rate changes on serial, factory reset, and hard reset. + By: Thorsten von Eicken + Date: January 29rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to reset the U-Blox module to factory defaults over serial. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Connect the U-Blox serial port to Serial1 + If you're using an Uno or don't have a 2nd serial port (Serial1), consider using software serial + Open the serial monitor at 115200 baud to see the output +*/ + +#include //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +int state = 0; // steps through auto-baud, reset, etc states + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); +} + +void loop() +{ + Serial.print("===== STATE "); + Serial.println(state); + switch (state) { + case 0: // auto-baud connection, then switch to 38400 and save config + do { + Serial.println("GPS: trying 38400 baud"); + Serial1.begin(38400); + if (myGPS.begin(Serial1)) break; + + delay(100); + Serial.println("GPS: trying 9600 baud"); + Serial1.begin(9600); + if (myGPS.begin(Serial1)) { + Serial.println("GPS: connected at 9600 baud, switching to 38400"); + myGPS.setSerialRate(38400); + delay(100); + } else { + delay(2000); //Wait a bit before trying again to limit the Serial output flood + } + } while(1); + myGPS.setUART1Output(COM_TYPE_UBX); //Set the UART port to output UBX only + myGPS.saveConfiguration(); //Save the current settings to flash and BBR + Serial.println("GPS serial connected, saved config"); + state++; + break; + case 1: // hardReset, expect to see GPS back at 38400 baud + Serial.println("Issuing hardReset (cold start)"); + myGPS.hardReset(); + delay(1000); + Serial1.begin(38400); + if (myGPS.begin(Serial1)) { + Serial.println("Success."); + state++; + } else { + Serial.println("*** GPS did not respond at 38400 baud, starting over."); + state = 0; + } + break; + case 2: // factoryReset, expect to see GPS back at 9600 baud + Serial.println("Issuing factoryReset"); + myGPS.factoryReset(); + delay(2000); // takes more than one second... a loop to resync would be best + Serial1.begin(9600); + if (myGPS.begin(Serial1)) { + Serial.println("Success."); + state++; + } else { + Serial.println("*** GPS did not come back at 9600 baud, starting over."); + state = 0; + } + break; + case 3: // print version info + Serial.print("GPS protocol version: "); + Serial.print(myGPS.getProtocolVersionHigh()); + Serial.print('.'); + Serial.print(myGPS.getProtocolVersionLow()); + state = 0; + } + delay(1000); +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example12_UseUart/Example12_UseUart.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example12_UseUart/Example12_UseUart.ino new file mode 100644 index 0000000..05bf3b0 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example12_UseUart/Example12_UseUart.ino @@ -0,0 +1,98 @@ +/* + Reading lat and long via UBX binary commands using UART @38400 baud - free from I2C + By: Nathan Seidle, Adapted from Example3_GetPosition by Thorsten von Eicken + SparkFun Electronics + Date: January 28rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to configure the library and U-Blox for serial port use as well as + switching the module from the default 9600 baud to 38400. + + Note: Long/lat are large numbers because they are * 10^7. To convert lat/long + to something google maps understands simply divide the numbers by 10,000,000. We + do this so that we don't have to use floating point numbers. + + Leave NMEA parsing behind. Now you can simply ask the module for the datums you want! + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Connect the U-Blox serial TX pin to Uno pin 10 + Connect the U-Blox serial RX pin to Uno pin 11 + Open the serial monitor at 115200 baud to see the output +*/ + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +#include +SoftwareSerial mySerial(10, 11); // RX, TX. Pin 10 on Uno goes to TX pin on GPS module. + +long lastTime = 0; //Simple local timer. Limits amount of I2C traffic to Ublox module. + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + //Assume that the U-Blox GPS is running at 9600 baud (the default) or at 38400 baud. + //Loop until we're in sync and then ensure it's at 38400 baud. + do { + Serial.println("GPS: trying 38400 baud"); + mySerial.begin(38400); + if (myGPS.begin(mySerial) == true) break; + + delay(100); + Serial.println("GPS: trying 9600 baud"); + mySerial.begin(9600); + if (myGPS.begin(mySerial) == true) { + Serial.println("GPS: connected at 9600 baud, switching to 38400"); + myGPS.setSerialRate(38400); + delay(100); + } else { + //myGPS.factoryReset(); + delay(2000); //Wait a bit before trying again to limit the Serial output + } + } while(1); + Serial.println("GPS serial connected"); + + myGPS.setUART1Output(COM_TYPE_UBX); //Set the UART port to output UBX only + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.saveConfiguration(); //Save the current settings to flash and BBR +} + +void loop() +{ + //Query module only every second. Doing it more often will just cause I2C traffic. + //The module only responds when a new position is available + if (millis() - lastTime > 1000) + { + lastTime = millis(); //Update the timer + + long latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + Serial.print(F(" (degrees * 10^-7)")); + + long altitude = myGPS.getAltitude(); + Serial.print(F(" Alt: ")); + Serial.print(altitude); + Serial.print(F(" (mm)")); + + byte SIV = myGPS.getSIV(); + Serial.print(F(" SIV: ")); + Serial.print(SIV); + + Serial.println(); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example13_PVT/Example1_AutoPVT/Example1_AutoPVT.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example13_PVT/Example1_AutoPVT/Example1_AutoPVT.ino new file mode 100644 index 0000000..168f8ac --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example13_PVT/Example1_AutoPVT/Example1_AutoPVT.ino @@ -0,0 +1,141 @@ +/* + Configuring the GPS to automatically send position reports over I2C + By: Nathan Seidle and Thorsten von Eicken + SparkFun Electronics + Date: January 3rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to configure the U-Blox GPS the send navigation reports automatically + and retrieving the latest one via getPVT. This eliminates the blocking in getPVT while the GPS + produces a fresh navigation solution at the expense of returning a slighly old solution. + + This can be used over serial or over I2C, this example shows the I2C use. With serial the GPS + simply outputs the UBX_NAV_PVT packet. With I2C it queues it into its internal I2C buffer (4KB in + size?) where it can be retrieved in the next I2C poll. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.setNavigationFrequency(2); //Produce two solutions per second + myGPS.setAutoPVT(true); //Tell the GPS to "send" each solution + myGPS.saveConfiguration(); //Save the current settings to flash and BBR +} + +void loop() +{ + // Calling getPVT returns true if there actually is a fresh navigation solution available. + // Start the reading only when valid LLH is available + if (myGPS.getPVT() && (myGPS.getInvalidLlh() == false)) + { + Serial.println(); + long latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + Serial.print(F(" (degrees * 10^-7)")); + + long altitude = myGPS.getAltitude(); + Serial.print(F(" Alt: ")); + Serial.print(altitude); + Serial.print(F(" (mm)")); + + byte SIV = myGPS.getSIV(); + Serial.print(F(" SIV: ")); + Serial.print(SIV); + + int PDOP = myGPS.getPDOP(); + Serial.print(F(" PDOP: ")); + Serial.print(PDOP); + Serial.print(F(" (10^-2)")); + + int nedNorthVel = myGPS.getNedNorthVel(); + Serial.print(F(" VelN: ")); + Serial.print(nedNorthVel); + Serial.print(F(" (mm/s)")); + + int nedEastVel = myGPS.getNedEastVel(); + Serial.print(F(" VelE: ")); + Serial.print(nedEastVel); + Serial.print(F(" (mm/s)")); + + int nedDownVel = myGPS.getNedDownVel(); + Serial.print(F(" VelD: ")); + Serial.print(nedDownVel); + Serial.print(F(" (mm/s)")); + + int verticalAccEst = myGPS.getVerticalAccEst(); + Serial.print(F(" VAccEst: ")); + Serial.print(verticalAccEst); + Serial.print(F(" (mm)")); + + int horizontalAccEst = myGPS.getHorizontalAccEst(); + Serial.print(F(" HAccEst: ")); + Serial.print(horizontalAccEst); + Serial.print(F(" (mm)")); + + int speedAccEst = myGPS.getSpeedAccEst(); + Serial.print(F(" SpeedAccEst: ")); + Serial.print(speedAccEst); + Serial.print(F(" (mm/s)")); + + int headAccEst = myGPS.getHeadingAccEst(); + Serial.print(F(" HeadAccEst: ")); + Serial.print(headAccEst); + Serial.print(F(" (degrees * 10^-5)")); + + if (myGPS.getHeadVehValid() == true) { + int headVeh = myGPS.getHeadVeh(); + Serial.print(F(" HeadVeh: ")); + Serial.print(headVeh); + Serial.print(F(" (degrees * 10^-5)")); + + int magDec = myGPS.getMagDec(); + Serial.print(F(" MagDec: ")); + Serial.print(magDec); + Serial.print(F(" (degrees * 10^-2)")); + + int magAcc = myGPS.getMagAcc(); + Serial.print(F(" MagAcc: ")); + Serial.print(magAcc); + Serial.print(F(" (degrees * 10^-2)")); + } + + Serial.println(); + } else { + Serial.print("."); + delay(50); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example13_PVT/Example2_AutoPVT_ExplicitUpdate/Example2_AutoPVT_ExplicitUpdate.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example13_PVT/Example2_AutoPVT_ExplicitUpdate/Example2_AutoPVT_ExplicitUpdate.ino new file mode 100644 index 0000000..97df056 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example13_PVT/Example2_AutoPVT_ExplicitUpdate/Example2_AutoPVT_ExplicitUpdate.ino @@ -0,0 +1,103 @@ +/* + Configuring the GPS to automatically send position reports over I2C, with explicit data parsing calls + By: Nathan Seidle Thorsten von Eicken and Felix Jirka + SparkFun Electronics + Date: July 1st, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to configure the U-Blox GPS the send navigation reports automatically + and retrieving the latest one via checkUblox when available. + This eliminates the implicit update in getPVT when accessing data fields twice. + Also this reduces the memory overhead of a separate buffer while introducing a slight error by inconsistencies because of the unsynchronized updates (on a multi core system). + + This can be used over serial or over I2C, this example shows the I2C use. With serial the GPS + simply outputs the UBX_NAV_PVT packet. With I2C it queues it into its internal I2C buffer (4KB in + size?) where it can be retrieved in the next I2C poll. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + Serial.begin(115200); + while (!Serial) + ; //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1) + ; + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.setNavigationFrequency(2); //Produce two solutions per second + myGPS.setAutoPVT(true, false); //Tell the GPS to "send" each solution and the lib not to update stale data implicitly + myGPS.saveConfiguration(); //Save the current settings to flash and BBR +} + +/* + Calling getPVT would return false now (compare to previous example where it would return true), so we just use the data provided + If you are using a threaded OS eg. FreeRTOS on an ESP32, the explicit mode of autoPVT allows you to use the data provided on both cores and inside multiple threads + The data update in background creates an inconsistent state, but that should not cause issues for most applications as they usually won't change the GPS location significantly within a 2Hz - 5Hz update rate. + Also you could oversample (10Hz - 20Hz) the data to smooth out such issues... +*/ +void loop() +{ + static uint16_t counter = 0; + + if (counter % 10 == 0) + { + // update your AHRS filter here for a ~100Hz update rate + // GPS data will be quasi static but data from your IMU will be changing + } + // debug output each half second + if (counter % 500 == 0) + { + Serial.println(); + long latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + Serial.print(F(" (degrees * 10^-7)")); + + long altitude = myGPS.getAltitude(); + Serial.print(F(" Alt: ")); + Serial.print(altitude); + Serial.print(F(" (mm)")); + + byte SIV = myGPS.getSIV(); + Serial.print(F(" SIV: ")); + Serial.print(SIV); + + Serial.println(); + } + // call checkUblox all 50ms to capture the gps data + if (counter % 50 == 0) + { + myGPS.checkUblox(); + } + delay(1); + counter++; +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example13_PVT/Example3_AssumeAutoPVTviaUart/Example3_AssumeAutoPVTviaUart.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example13_PVT/Example3_AssumeAutoPVTviaUart/Example3_AssumeAutoPVTviaUart.ino new file mode 100644 index 0000000..6b77290 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example13_PVT/Example3_AssumeAutoPVTviaUart/Example3_AssumeAutoPVTviaUart.ino @@ -0,0 +1,79 @@ +/* + Reading lat and long via UBX binary commands using an RX-only UART + By: Nathan Seidle, Adapted from Example11 by Felix Jirka + SparkFun Electronics + Date: July 2nd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to configure the library for serial port use with a single wire connection using the assumeAutoPVT method. + Saving your pins for other stuff :-) + + Leave NMEA parsing behind. Now you can simply ask the module for the datums you want! + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Preconditions: + U-Blox module is configured to send cyclical PVT message + Hardware Connections: + Connect the U-Blox serial TX pin to Rx of Serial2 (default: GPIO16) on your ESP32 + Open the serial monitor at 115200 baud to see the output +*/ + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example 17"); + + //Use any Serial port with at least a Rx Pin connected or a receive only version of SoftwareSerial here + //Assume that the U-Blox GPS is running at 9600 baud (the default) + Serial2.begin(9600); + // no need to check return value as internal call to isConnected() will not succeed + myGPS.begin(Serial2); + + // tell lib, we are expecting the module to send PVT messages by itself to our Rx pin + // you can set second parameter to "false" if you want to control the parsing and eviction of the data (need to call checkUblox cyclically) + myGPS.assumeAutoPVT(true, true); + +} + +void loop() +{ + // if implicit updates are allowed, this will trigger parsing the incoming messages + // and be true once a PVT message has been parsed + // In case you want to use explicit updates, wrap this in a timer and call checkUblox as often as needed, not to overflow your UART buffers + if (myGPS.getPVT()) + { + long latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + Serial.print(F(" (degrees * 10^-7)")); + + long altitude = myGPS.getAltitude(); + Serial.print(F(" Alt: ")); + Serial.print(altitude); + Serial.print(F(" (mm)")); + + byte SIV = myGPS.getSIV(); + Serial.print(F(" SIV: ")); + Serial.print(SIV); + + Serial.println(); + } + else { + Serial.println(F("Wait for GPS data")); + delay(500); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example14_DebugOutput/Example14_DebugOutput.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example14_DebugOutput/Example14_DebugOutput.ino new file mode 100644 index 0000000..50c87d3 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example14_DebugOutput/Example14_DebugOutput.ino @@ -0,0 +1,93 @@ +/* + Reading lat and long via UBX binary commands using UART @38400 baud - free from I2C + By: Nathan Seidle, Adapted from Example3_GetPosition by Thorsten von Eicken + SparkFun Electronics + Date: January 28rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to configure the debug output from the library. + Debug shows various packet and status outputs. These prints can be directed + towards Serial (as in Serial.print) or any other port (Serial1, SerialUSB, etc). + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Connect the U-Blox serial TX pin to Uno pin 10 + Connect the U-Blox serial RX pin to Uno pin 11 + Open the serial monitor at 115200 baud to see the output +*/ + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module. + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.saveConfiguration(); //Save the current settings to flash and BBR + + myGPS.enableDebugging(); //Enable debug messages over Serial (default) + //myGPS.enableDebugging(SerialUSB); //Enable debug messages over Serial USB + +} + +void loop() +{ + //Query module only every second. Doing it more often will just cause I2C traffic. + //The module only responds when a new position is available + if (millis() - lastTime > 1000) + { + lastTime = millis(); //Update the timer + + long latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + Serial.print(F(" (degrees * 10^-7)")); + + long altitude = myGPS.getAltitude(); + Serial.print(F(" Alt: ")); + Serial.print(altitude); + Serial.print(F(" (mm)")); + + byte SIV = myGPS.getSIV(); + Serial.print(F(" SIV: ")); + Serial.print(SIV); + + Serial.println(); + Serial.print(myGPS.getYear()); + Serial.print("-"); + Serial.print(myGPS.getMonth()); + Serial.print("-"); + Serial.print(myGPS.getDay()); + Serial.print(" "); + Serial.print(myGPS.getHour()); + Serial.print(":"); + Serial.print(myGPS.getMinute()); + Serial.print(":"); + Serial.println(myGPS.getSecond()); + + Serial.println(); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example15_GetDateTime/Example15_GetDateTime.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example15_GetDateTime/Example15_GetDateTime.ino new file mode 100644 index 0000000..5e5b943 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example15_GetDateTime/Example15_GetDateTime.ino @@ -0,0 +1,107 @@ +/* + Getting time and date using Ublox commands + By: davidallenmann + SparkFun Electronics + Date: April 16th, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to query a Ublox module for the current time and date. We also + turn off the NMEA output on the I2C port. This decreases the amount of I2C traffic + dramatically. + + Leave NMEA parsing behind. Now you can simply ask the module for the datums you want! + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module. + +void setup() +{ + Serial.begin(115200); + while (!Serial) + ; //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1) + ; + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.saveConfiguration(); //Save the current settings to flash and BBR +} + +void loop() +{ + //Query module only every second. Doing it more often will just cause I2C traffic. + //The module only responds when a new position is available + if (millis() - lastTime > 1000) + { + lastTime = millis(); //Update the timer + + long latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + Serial.print(F(" (degrees * 10^-7)")); + + long altitude = myGPS.getAltitude(); + Serial.print(F(" Alt: ")); + Serial.print(altitude); + Serial.print(F(" (mm)")); + + byte SIV = myGPS.getSIV(); + Serial.print(F(" SIV: ")); + Serial.print(SIV); + + Serial.println(); + Serial.print(myGPS.getYear()); + Serial.print("-"); + Serial.print(myGPS.getMonth()); + Serial.print("-"); + Serial.print(myGPS.getDay()); + Serial.print(" "); + Serial.print(myGPS.getHour()); + Serial.print(":"); + Serial.print(myGPS.getMinute()); + Serial.print(":"); + Serial.print(myGPS.getSecond()); + + Serial.print(" Time is "); + if (myGPS.getTimeValid() == false) + { + Serial.print("not "); + } + Serial.print("valid Date is "); + if (myGPS.getDateValid() == false) + { + Serial.print("not "); + } + Serial.print("valid"); + + Serial.println(); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example16_Nanosecond_MaxOutput/Example16_Nanosecond_MaxOutput.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example16_Nanosecond_MaxOutput/Example16_Nanosecond_MaxOutput.ino new file mode 100644 index 0000000..533b82d --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example16_Nanosecond_MaxOutput/Example16_Nanosecond_MaxOutput.ino @@ -0,0 +1,106 @@ +/* + Getting time and date using Ublox commands + By: davidallenmann + SparkFun Electronics + Date: April 16th, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to query a Ublox module for the current time and date. We also + turn off the NMEA output on the I2C port. This decreases the amount of I2C traffic + dramatically. + + Leave NMEA parsing behind. Now you can simply ask the module for the datums you want! + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module. + +void setup() +{ + Serial.begin(500000); //Increase serial speed to maximize + while (!Serial) + ; //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + Wire.setClock(400000); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1) + ; + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.saveConfiguration(); //Save the current settings to flash and BBR + + //myGPS.enableDebugging(); //Enable debug messages over Serial (default) + + myGPS.setNavigationFrequency(10); //Set output to 10 times a second + byte rate = myGPS.getNavigationFrequency(); //Get the update rate of this module + Serial.print("Current update rate:"); + Serial.println(rate); +} + +void loop() +{ + // Calling getPVT returns true if there actually is a fresh navigation solution available. + if (myGPS.getPVT()) + { + lastTime = millis(); //Update the timer + + long latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + Serial.print(F(" (degrees * 10^-7)")); + + long altitude = myGPS.getAltitude(); + Serial.print(F(" Alt: ")); + Serial.print(altitude); + Serial.print(F(" (mm)")); + + byte SIV = myGPS.getSIV(); + Serial.print(F(" SIV: ")); + Serial.print(SIV); + + Serial.print(" "); + Serial.print(myGPS.getYear()); + Serial.print("-"); + Serial.print(myGPS.getMonth()); + Serial.print("-"); + Serial.print(myGPS.getDay()); + Serial.print(" "); + Serial.print(myGPS.getHour()); + Serial.print(":"); + Serial.print(myGPS.getMinute()); + Serial.print(":"); + Serial.print(myGPS.getSecond()); + Serial.print("."); + Serial.print(myGPS.getNanosecond()); + + myGPS.flushPVT(); + + Serial.println(); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example16_PartialSecond_MaxOutput/Example16_PartialSecond_MaxOutput.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example16_PartialSecond_MaxOutput/Example16_PartialSecond_MaxOutput.ino new file mode 100644 index 0000000..04b5602 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example16_PartialSecond_MaxOutput/Example16_PartialSecond_MaxOutput.ino @@ -0,0 +1,116 @@ +/* + Getting time and date using Ublox commands + By: Nathan Seidle + SparkFun Electronics + Date: April 16th, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to use the Millisecond and Nanosecond output as well as increase the + I2C speed (100 to 400kHz), and serial output (115200 to 500kbps). + + Leave NMEA parsing behind. Now you can simply ask the module for the datums you want! + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module. + +void setup() +{ + Serial.begin(500000); //Increase serial speed to maximize + while (!Serial) + ; //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + Wire.setClock(400000); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1) + ; + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + + //myGPS.enableDebugging(); //Enable debug messages over Serial (default) + + myGPS.setNavigationFrequency(10); //Set output to 10 times a second + byte rate = myGPS.getNavigationFrequency(); //Get the update rate of this module + Serial.print("Current update rate:"); + Serial.println(rate); + + myGPS.saveConfiguration(); //Save the current settings to flash and BBR + + pinMode(2, OUTPUT); //For debug capture + digitalWrite(2, HIGH); +} + +void loop() +{ + // Calling getPVT returns true if there actually is a fresh navigation solution available. + if (myGPS.getPVT()) + { + lastTime = millis(); //Update the timer + + long latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + Serial.print(F(" (degrees * 10^-7)")); + + long altitude = myGPS.getAltitude(); + Serial.print(F(" Alt: ")); + Serial.print(altitude); + Serial.print(F(" (mm)")); + + byte SIV = myGPS.getSIV(); + Serial.print(F(" SIV: ")); + Serial.print(SIV); + + Serial.print(" "); + Serial.print(myGPS.getYear()); + Serial.print("-"); + Serial.print(myGPS.getMonth()); + Serial.print("-"); + Serial.print(myGPS.getDay()); + Serial.print(" "); + Serial.print(myGPS.getHour()); + Serial.print(":"); + Serial.print(myGPS.getMinute()); + Serial.print(":"); + Serial.print(myGPS.getSecond()); + Serial.print("."); + //Pretty print leading zeros + int mseconds = myGPS.getMillisecond(); + if (mseconds < 100) + Serial.print("0"); + if (mseconds < 10) + Serial.print("0"); + Serial.print(mseconds); + + Serial.print(" nanoSeconds: "); + Serial.print(myGPS.getNanosecond()); + + Serial.println(); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example17_Geofence/Example17_Geofence.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example17_Geofence/Example17_Geofence.ino new file mode 100644 index 0000000..0592601 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example17_Geofence/Example17_Geofence.ino @@ -0,0 +1,169 @@ +/* + u-blox M8 geofence example + + Written by Paul Clark (PaulZC) + 10th December 2019 + + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example demonstrates how to use the addGeofence and getGeofenceState functions + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15210 + ZOE-M8Q: https://www.sparkfun.com/products/15193 + + This example powers up the GPS and reads the fix. + Once a valid 3D fix has been found, the code reads the latitude and longitude. + The code then sets four geofences around that position with a radii of 5m, 10m, 15m and 20m with 95% confidence. + The code then monitors the geofence status. + The LED will be illuminated if you are inside the _combined_ geofence (i.e. within the 20m radius). + + This code has been tested on the ZOE-M8Q. +*/ + +#define LED LED_BUILTIN // Change this if your LED is on a different pin + +#include // Needed for I2C + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + pinMode(LED, OUTPUT); + + // Set up the I2C pins + Wire.begin(); + + // Start the console serial port + Serial.begin(115200); + while (!Serial); // Wait for the user to open the serial monitor + delay(100); + Serial.println(); + Serial.println(); + Serial.println(F("u-blox M8 geofence example")); + Serial.println(); + Serial.println(); + + delay(1000); // Let the GPS power up + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + //myGPS.enableDebugging(); // Enable debug messages + myGPS.setI2COutput(COM_TYPE_UBX); // Limit I2C output to UBX (disable the NMEA noise) + + Serial.println(F("Waiting for a 3D fix...")); + + byte fixType = 0; + + while (fixType < 3) + { + fixType = myGPS.getFixType(); // Get the fix type + Serial.print(F("Fix: ")); // Print it + Serial.print(fixType); + if(fixType == 0) Serial.print(F(" = No fix")); + else if(fixType == 1) Serial.print(F(" = Dead reckoning")); + else if(fixType == 2) Serial.print(F(" = 2D")); + else if(fixType == 3) Serial.print(F(" = 3D")); + else if(fixType == 4) Serial.print(F(" = GNSS + Dead reckoning")); + else if(fixType == 5) Serial.print(F(" = Time only")); + Serial.println(); + delay(1000); + } + + Serial.println(F("3D fix found!")); + + long latitude = myGPS.getLatitude(); // Get the latitude in degrees * 10^-7 + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); // Get the longitude in degrees * 10^-7 + Serial.print(F(" Long: ")); + Serial.println(longitude); + + uint32_t radius = 500; // Set the radius to 5m (radius is in m * 10^-2 i.e. cm) + + byte confidence = 2; // Set the confidence level: 0=none, 1=68%, 2=95%, 3=99.7%, 4=99.99% + + // Call clearGeofences() to clear all existing geofences. + Serial.print(F("Clearing any existing geofences. clearGeofences returned: ")); + Serial.println(myGPS.clearGeofences()); + + // It is possible to define up to four geofences. + // Call addGeofence up to four times to define them. + Serial.println(F("Setting the geofences:")); + + Serial.print(F("addGeofence for geofence 1 returned: ")); + Serial.println(myGPS.addGeofence(latitude, longitude, radius, confidence)); + + radius = 1000; // 10m + Serial.print(F("addGeofence for geofence 2 returned: ")); + Serial.println(myGPS.addGeofence(latitude, longitude, radius, confidence)); + + radius = 1500; // 15m + Serial.print(F("addGeofence for geofence 3 returned: ")); + Serial.println(myGPS.addGeofence(latitude, longitude, radius, confidence)); + + radius = 2000; // 20m + Serial.print(F("addGeofence for geofence 4 returned: ")); + Serial.println(myGPS.addGeofence(latitude, longitude, radius, confidence)); +} + +void loop() +{ + geofenceState currentGeofenceState; // Create storage for the geofence state + + boolean result = myGPS.getGeofenceState(currentGeofenceState); + + Serial.print(F("getGeofenceState returned: ")); // Print the combined state + Serial.print(result); // Get the geofence state + + if (!result) // If getGeofenceState did not return true + { + Serial.println(F(".")); // Tidy up + return; // and go round the loop again + } + + Serial.print(F(". status is: ")); // Print the status + Serial.print(currentGeofenceState.status); + + Serial.print(F(". numFences is: ")); // Print the numFences + Serial.print(currentGeofenceState.numFences); + + Serial.print(F(". combState is: ")); // Print the combined state + Serial.print(currentGeofenceState.combState); + + if (currentGeofenceState.combState == 0) + { + Serial.print(F(" = Unknown")); + digitalWrite(LED, LOW); + } + if (currentGeofenceState.combState == 1) + { + Serial.print(F(" = Inside")); + digitalWrite(LED, HIGH); + } + else if (currentGeofenceState.combState == 2) + { + Serial.print(F(" = Outside")); + digitalWrite(LED, LOW); + } + + Serial.print(F(". The individual states are: ")); // Print the state of each geofence + for(int i = 0; i < currentGeofenceState.numFences; i++) + { + if (i > 0) Serial.print(F(",")); + Serial.print(currentGeofenceState.states[i]); + } + Serial.println(); + + delay(1000); +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example18_PowerSaveMode/Example18_PowerSaveMode.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example18_PowerSaveMode/Example18_PowerSaveMode.ino new file mode 100644 index 0000000..03dd5cb --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example18_PowerSaveMode/Example18_PowerSaveMode.ino @@ -0,0 +1,163 @@ +/* + Power Save Mode + By: Paul Clark (PaulZC) + Date: April 22nd, 2020 + + Based extensively on Example3_GetPosition + By: Nathan Seidle + SparkFun Electronics + Date: January 3rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to put the Ublox module into power save mode and then + query its lat/long/altitude. We also turn off the NMEA output on the I2C port. + This decreases the amount of I2C traffic dramatically. + + ** When it is able to ** the module will reduce its current draw. + For the ZOE-M8Q with a passive antenna, you should see the current drop + from (approx.) 25-28mA to (approx.) 9mA when power save mode kicks in. + + Note: this will fail on the ZED (protocol version >= 27) as UBX-CFG-RXM is not supported + + Note: Long/lat are large numbers because they are * 10^7. To convert lat/long + to something google maps understands simply divide the numbers by 10,000,000. We + do this so that we don't have to use floating point numbers. + + Leave NMEA parsing behind. Now you can simply ask the module for the datums you want! + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module. + +void setup() +{ + Serial.begin(115200); + while (!Serial) + ; //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1) + ; + } + + //myGPS.enableDebugging(); // Uncomment this line to enable debug messages + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + //myGPS.saveConfiguration(); //Uncomment this line to save the current settings to flash and BBR + + Serial.println("Power save example."); + Serial.println("1) Enable power saving"); + Serial.println("2) Disable power saving"); +} + +void loop() +{ + if (Serial.available()) + { + byte incoming = Serial.read(); + + if (incoming == '1') + { + // Put the GNSS into power save mode + // (If you want to disable power save mode, call myGPS.powerSaveMode(false) instead) + // This will fail on the ZED (protocol version >= 27) as UBX-CFG-RXM is not supported + if (myGPS.powerSaveMode()) // Defaults to true + Serial.println(F("Power Save Mode enabled.")); + else + Serial.println(F("***!!! Power Save Mode FAILED !!!***")); + } + else if (incoming == '2') + { + //Go to normal power mode (not power saving mode) + if (myGPS.powerSaveMode(false)) + Serial.println(F("Power Save Mode disabled.")); + else + Serial.println(F("***!!! Power Save Disable FAILED !!!***")); + } + + // Read and print the new low power mode + uint8_t lowPowerMode = myGPS.getPowerSaveMode(); + if (lowPowerMode == 255) + { + Serial.println(F("***!!! getPowerSaveMode FAILED !!!***")); + } + else + { + Serial.print(F("The low power mode is: ")); + Serial.print(lowPowerMode); + if (lowPowerMode == 0) + { + Serial.println(F(" (Continuous)")); + } + else if (lowPowerMode == 1) + { + Serial.println(F(" (Power Save)")); + } + else if (lowPowerMode == 4) + { + Serial.println(F(" (Continuous)")); + } + else + { + Serial.println(F(" (Unknown!)")); + } + } + } + + //Query module every 10 seconds so it is easier to monitor the current draw + if (millis() - lastTime > 10000) + { + lastTime = millis(); //Update the timer + + byte fixType = myGPS.getFixType(); // Get the fix type + Serial.print(F("Fix: ")); + Serial.print(fixType); + if (fixType == 0) + Serial.print(F("(No fix)")); + else if (fixType == 1) + Serial.print(F("(Dead reckoning)")); + else if (fixType == 2) + Serial.print(F("(2D)")); + else if (fixType == 3) + Serial.print(F("(3D)")); + else if (fixType == 4) + Serial.print(F("(GNSS + Dead reckoning)")); + + long latitude = myGPS.getLatitude(); + Serial.print(F(" Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + Serial.print(F(" (degrees * 10^-7)")); + + long altitude = myGPS.getAltitude(); + Serial.print(F(" Alt: ")); + Serial.print(altitude); + Serial.print(F(" (mm)")); + + Serial.println(); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example19_DynamicModel/Example19_DynamicModel.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example19_DynamicModel/Example19_DynamicModel.ino new file mode 100644 index 0000000..20cbad6 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example19_DynamicModel/Example19_DynamicModel.ino @@ -0,0 +1,117 @@ +/* + Set Dynamic Model + By: Paul Clark (PaulZC) + Date: April 22nd, 2020 + + Based extensively on Example3_GetPosition + By: Nathan Seidle + SparkFun Electronics + Date: January 3rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to change the Ublox module's dynamic platform model and then + query its lat/long/altitude. We also turn off the NMEA output on the I2C port. + This decreases the amount of I2C traffic dramatically. + + Possible values for the dynamic model are: PORTABLE, STATIONARY, PEDESTRIAN, AUTOMOTIVE, + SEA, AIRBORNE1g, AIRBORNE2g, AIRBORNE4g, WRIST, BIKE + + Note: Long/lat are large numbers because they are * 10^7. To convert lat/long + to something google maps understands simply divide the numbers by 10,000,000. We + do this so that we don't have to use floating point numbers. + + Leave NMEA parsing behind. Now you can simply ask the module for the datums you want! + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module. + +void setup() +{ + Serial.begin(115200); + while (!Serial) + ; //Wait for user to open terminal + Serial.println(F("SparkFun Ublox Example")); + + Wire.begin(); + + //myGPS.enableDebugging(); // Uncomment this line to enable debug messages + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1) + ; + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + + // If we are going to change the dynamic platform model, let's do it here. + // Possible values are: + // PORTABLE, STATIONARY, PEDESTRIAN, AUTOMOTIVE, SEA, AIRBORNE1g, AIRBORNE2g, AIRBORNE4g, WRIST, BIKE + + if (myGPS.setDynamicModel(DYN_MODEL_PORTABLE) == false) // Set the dynamic model to PORTABLE + { + Serial.println(F("***!!! Warning: setDynamicModel failed !!!***")); + } + else + { + Serial.println(F("Dynamic platform model changed successfully!")); + } + + // Let's read the new dynamic model to see if it worked + uint8_t newDynamicModel = myGPS.getDynamicModel(); + if (newDynamicModel == 255) + { + Serial.println(F("***!!! Warning: getDynamicModel failed !!!***")); + } + else + { + Serial.print(F("The new dynamic model is: ")); + Serial.println(newDynamicModel); + } + + //myGPS.saveConfigSelective(VAL_CFG_SUBSEC_NAVCONF); //Uncomment this line to save only the NAV settings to flash and BBR +} + +void loop() +{ + //Query module only every second. Doing it more often will just cause I2C traffic. + //The module only responds when a new position is available + if (millis() - lastTime > 1000) + { + lastTime = millis(); //Update the timer + + long latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + Serial.print(F(" (degrees * 10^-7)")); + + long altitude = myGPS.getAltitude(); + Serial.print(F(" Alt: ")); + Serial.print(altitude); + Serial.print(F(" (mm)")); + + Serial.println(); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example1_BasicNMEARead/Example1_BasicNMEARead.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example1_BasicNMEARead/Example1_BasicNMEARead.ino new file mode 100644 index 0000000..2f1d22f --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example1_BasicNMEARead/Example1_BasicNMEARead.ino @@ -0,0 +1,51 @@ +/* + Read NMEA sentences over I2C using Ublox module SAM-M8Q, NEO-M8P, ZED-F9P, etc + By: Nathan Seidle + SparkFun Electronics + Date: August 22nd, 2018 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example reads the NMEA setences from the Ublox module over I2c and outputs + them to the serial port + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + Serial.begin(115200); + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + if (myGPS.begin() == false) + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + //This will pipe all NMEA sentences to the serial port so we can see them + myGPS.setNMEAOutputPort(Serial); +} + +void loop() +{ + myGPS.checkUblox(); //See if new data is available. Process bytes as they come in. + + delay(250); //Don't pound too hard on the I2C bus +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example20_SendCustomCommand/Example20_SendCustomCommand.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example20_SendCustomCommand/Example20_SendCustomCommand.ino new file mode 100644 index 0000000..82ef4a8 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example20_SendCustomCommand/Example20_SendCustomCommand.ino @@ -0,0 +1,161 @@ +/* + Send Custom Command + By: Paul Clark (PaulZC) + Date: April 20th, 2020 + + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how you can create and send a custom UBX packet + using the SparkFun u-blox library. + + Previously it was possible to create and send a custom packet + through the library but it would always appear to timeout as + some of the internal functions referred to the internal private + struct packetCfg. + The most recent version of the library allows sendCommand to + use a custom packet as if it were packetCfg and so: + - sendCommand will return a sfe_ublox_status_e enum as if + it had been called from within the library + - the custom packet will be updated with data returned by the module + (previously this was not possible from outside the library) + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#define NAV_RATE 20 // The new navigation rate in Hz (measurements per second) + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + Serial.begin(115200); // You may need to increase this for high navigation rates! + while (!Serial) + ; //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + //myGPS.enableDebugging(); // Uncomment this line to enable debug messages + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1) + ; + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + + // Let's configure the module's navigation rate as if we were using setNavigationFrequency + + // Let's create our custom packet + uint8_t customPayload[MAX_PAYLOAD_SIZE]; // This array holds the payload data bytes + // The next line creates and initialises the packet information which wraps around the payload + ubxPacket customCfg = {0, 0, 0, 0, 0, customPayload, 0, 0, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED}; + + // The structure of ubxPacket is: + // uint8_t cls : The message Class + // uint8_t id : The message ID + // uint16_t len : Length of the payload. Does not include cls, id, or checksum bytes + // uint16_t counter : Keeps track of number of overall bytes received. Some responses are larger than 255 bytes. + // uint16_t startingSpot : The counter value needed to go past before we begin recording into payload array + // uint8_t *payload : The payload + // uint8_t checksumA : Given to us by the module. Checked against the rolling calculated A/B checksums. + // uint8_t checksumB + // sfe_ublox_packet_validity_e valid : Goes from NOT_DEFINED to VALID or NOT_VALID when checksum is checked + // sfe_ublox_packet_validity_e classAndIDmatch : Goes from NOT_DEFINED to VALID or NOT_VALID when the Class and ID match the requestedClass and requestedID + + // sendCommand will return: + // SFE_UBLOX_STATUS_DATA_RECEIVED if the data we requested was read / polled successfully + // SFE_UBLOX_STATUS_DATA_SENT if the data we sent was writted successfully (ACK'd) + // Other values indicate errors. Please see the sfe_ublox_status_e enum for further details. + + // Referring to the u-blox M8 Receiver Description and Protocol Specification we see that + // the navigation rate is configured using the UBX-CFG-RATE message. So let's load our + // custom packet with the correct information so we can read (poll / get) the current settings. + + customCfg.cls = UBX_CLASS_CFG; // This is the message Class + customCfg.id = UBX_CFG_RATE; // This is the message ID + customCfg.len = 0; // Setting the len (length) to zero let's us poll the current settings + customCfg.startingSpot = 0; // Always set the startingSpot to zero (unless you really know what you are doing) + + // We also need to tell sendCommand how long it should wait for a reply + uint16_t maxWait = 250; // Wait for up to 250ms (Serial may need a lot longer e.g. 1100) + + // Now let's read the current navigation rate. The results will be loaded into customCfg. + if (myGPS.sendCommand(&customCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + { + Serial.println(F("sendCommand (poll / get) failed! Freezing...")); + while (1) + ; + } + + // Referring to the message definition for UBX-CFG-RATE we see that the measurement rate + // is stored in payload bytes 0 and 1 as a uint16_t in LSB-first (little endian) format + + uint16_t rate = (customPayload[1] << 8) | customPayload[0]; // Extract the current rate (ms) + float f_rate = 1000.0 / ((float)rate); // Convert the navigation rate to Hz (measurements per second) + + // Print the current measurement rate + Serial.print(F("The current measurement rate is: ")); + Serial.println(f_rate, 1); + + // Let's change it + rate = 1000 / NAV_RATE; // Load the new value into rate + customPayload[0] = rate & 0xFF; // Store it in the payload + customPayload[1] = rate >> 8; + + // Print the new measurement rate + Serial.print(F("The new measurement rate will be: ")); + Serial.println(NAV_RATE); + + // We don't need to update customCfg.len as it will have been set to 6 + // when sendCommand read the data + + // Now we write the custom packet back again to change the setting + if (myGPS.sendCommand(&customCfg, maxWait) != SFE_UBLOX_STATUS_DATA_SENT) // This time we are only expecting an ACK + { + Serial.println(F("sendCommand (set) failed! Freezing.")); + while (1) + ; + } + else + { + Serial.println(F("Navigation rate updated. Here we go...")); + } + + myGPS.setAutoPVT(true); // Enable AutoPVT. The module will generate measurements automatically without being polled. + + //myGPS.saveConfigSelective(VAL_CFG_SUBSEC_NAVCONF); //Uncomment this line to save only the NAV settings to flash and BBR +} + +void loop() +{ + //Query the module as fast as possible + int32_t latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + int32_t longitude = myGPS.getLongitude(); + Serial.print(F(" Lon: ")); + Serial.print(longitude); + Serial.print(F(" (degrees * 10^-7)")); + + int32_t altitude = myGPS.getAltitude(); + Serial.print(F(" Alt: ")); + Serial.print(altitude); + Serial.println(F(" (mm)")); +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example21_ModuleInfo/Example21_ModuleInfo.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example21_ModuleInfo/Example21_ModuleInfo.ino new file mode 100644 index 0000000..ca487c3 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example21_ModuleInfo/Example21_ModuleInfo.ino @@ -0,0 +1,183 @@ +/* + Module Info - extracts and prints the full module information from UBX_MON_VER + using a custom command. + By: @mayopan + Date: May 9th, 2020 + + Based on: + Send Custom Command + By: Paul Clark (PaulZC) + Date: April 20th, 2020 + + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + Previously it was possible to create and send a custom packet + through the library but it would always appear to timeout as + some of the internal functions referred to the internal private + struct packetCfg. + The most recent version of the library allows sendCommand to + use a custom packet as if it were packetCfg and so: + - sendCommand will return a sfe_ublox_status_e enum as if + it had been called from within the library + - the custom packet will be updated with data returned by the module + (previously this was not possible from outside the library) + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#define MAX_PAYLOAD_SIZE 384 // Override MAX_PAYLOAD_SIZE for getModuleInfo which can return up to 348 bytes + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS + +// Extend the class for getModuleInfo +class SFE_UBLOX_GPS_ADD : public SFE_UBLOX_GPS +{ +public: + boolean getModuleInfo(uint16_t maxWait = 1100); //Queries module, texts + + struct minfoStructure // Structure to hold the module info (uses 341 bytes of RAM) + { + char swVersion[30]; + char hwVersion[10]; + uint8_t extensionNo = 0; + char extension[10][30]; + } minfo; +}; + +SFE_UBLOX_GPS_ADD myGPS; + +void setup() +{ + Serial.begin(115200); // You may need to increase this for high navigation rates! + while (!Serial) + ; //Wait for user to open terminal + Serial.println(F("SparkFun Ublox Example")); + + Wire.begin(); + + //myGPS.enableDebugging(); // Uncomment this line to enable debug messages + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1) + ; + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + + Serial.print(F("Polling module info")); + if (myGPS.getModuleInfo(1100) == false) // Try to get the module info + { + Serial.print(F("getModuleInfo failed! Freezing...")); + while (1) + ; + } + + Serial.println(); + Serial.println(); + Serial.println(F("Module Info : ")); + Serial.print(F("Soft version: ")); + Serial.println(myGPS.minfo.swVersion); + Serial.print(F("Hard version: ")); + Serial.println(myGPS.minfo.hwVersion); + Serial.print(F("Extensions:")); + Serial.println(myGPS.minfo.extensionNo); + for (int i = 0; i < myGPS.minfo.extensionNo; i++) + { + Serial.print(" "); + Serial.println(myGPS.minfo.extension[i]); + } + Serial.println(); + Serial.println(F("Done!")); +} + +void loop() +{ +} + +boolean SFE_UBLOX_GPS_ADD::getModuleInfo(uint16_t maxWait) +{ + myGPS.minfo.hwVersion[0] = 0; + myGPS.minfo.swVersion[0] = 0; + for (int i = 0; i < 10; i++) + myGPS.minfo.extension[i][0] = 0; + myGPS.minfo.extensionNo = 0; + + // Let's create our custom packet + uint8_t customPayload[MAX_PAYLOAD_SIZE]; // This array holds the payload data bytes + + // The next line creates and initialises the packet information which wraps around the payload + ubxPacket customCfg = {0, 0, 0, 0, 0, customPayload, 0, 0, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED}; + + // The structure of ubxPacket is: + // uint8_t cls : The message Class + // uint8_t id : The message ID + // uint16_t len : Length of the payload. Does not include cls, id, or checksum bytes + // uint16_t counter : Keeps track of number of overall bytes received. Some responses are larger than 255 bytes. + // uint16_t startingSpot : The counter value needed to go past before we begin recording into payload array + // uint8_t *payload : The payload + // uint8_t checksumA : Given to us by the module. Checked against the rolling calculated A/B checksums. + // uint8_t checksumB + // sfe_ublox_packet_validity_e valid : Goes from NOT_DEFINED to VALID or NOT_VALID when checksum is checked + // sfe_ublox_packet_validity_e classAndIDmatch : Goes from NOT_DEFINED to VALID or NOT_VALID when the Class and ID match the requestedClass and requestedID + + // sendCommand will return: + // SFE_UBLOX_STATUS_DATA_RECEIVED if the data we requested was read / polled successfully + // SFE_UBLOX_STATUS_DATA_SENT if the data we sent was writted successfully (ACK'd) + // Other values indicate errors. Please see the sfe_ublox_status_e enum for further details. + + // Referring to the u-blox M8 Receiver Description and Protocol Specification we see that + // the module information can be read using the UBX-MON-VER message. So let's load our + // custom packet with the correct information so we can read (poll / get) the module information. + + customCfg.cls = UBX_CLASS_MON; // This is the message Class + customCfg.id = UBX_MON_VER; // This is the message ID + customCfg.len = 0; // Setting the len (length) to zero let's us poll the current settings + customCfg.startingSpot = 0; // Always set the startingSpot to zero (unless you really know what you are doing) + + // Now let's send the command. The module info is returned in customPayload + + if (sendCommand(&customCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (false); //If command send fails then bail + + // Now let's extract the module info from customPayload + + uint16_t position = 0; + for (int i = 0; i < 30; i++) + { + minfo.swVersion[i] = customPayload[position]; + position++; + } + for (int i = 0; i < 10; i++) + { + minfo.hwVersion[i] = customPayload[position]; + position++; + } + + while (customCfg.len >= position + 30) + { + for (int i = 0; i < 30; i++) + { + minfo.extension[minfo.extensionNo][i] = customPayload[position]; + position++; + } + minfo.extensionNo++; + if (minfo.extensionNo > 9) + break; + } + + return (true); //Success! +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example22_PowerOff/Example22_PowerOff.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example22_PowerOff/Example22_PowerOff.ino new file mode 100644 index 0000000..1cd5a8c --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example22_PowerOff/Example22_PowerOff.ino @@ -0,0 +1,87 @@ +/* + Powering off a ublox GPS module + By: bjorn + unsurv.org + Date: July 20th, 2020 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows you how to turn off the ublox module to lower the power consumption. + There are two functions: one just specifies a duration in milliseconds the other also specifies a pin on the GPS device to wake it up with. + By driving a voltage from LOW to HIGH or HIGH to LOW on the chosen module pin you wake the device back up. + Note: Doing so on the INT0 pin when using the regular powerOff(durationInMs) function will wake the device anyway. (tested on SAM-M8Q) + Note: While powered off, you should not query the device for data or it might wake up. This can be used to wake the device but is not recommended. + Works best when also putting your microcontroller to sleep. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard. + To force the device to wake up you need to connect to a pin (for example INT0) seperately on the module. + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS + +// define a digital pin capable of driving HIGH and LOW +#define WAKEUP_PIN 5 + +// Possible GNSS interrupt pins for powerOffWithInterrupt are: +// VAL_RXM_PMREQ_WAKEUPSOURCE_UARTRX = uartrx +// VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT0 = extint0 (default) +// VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT1 = extint1 +// VAL_RXM_PMREQ_WAKEUPSOURCE_SPICS = spics +// These values can be or'd (|) together to enable interrupts on multiple pins + +void wakeUp() { + + Serial.print("-- waking up module via pin " + String(WAKEUP_PIN)); + Serial.println(" on your microcontroller --"); + + digitalWrite(WAKEUP_PIN, LOW); + delay(1000); + digitalWrite(WAKEUP_PIN, HIGH); + delay(1000); + digitalWrite(WAKEUP_PIN, LOW); +} + + +void setup() { + + pinMode(WAKEUP_PIN, OUTPUT); + digitalWrite(WAKEUP_PIN, LOW); + + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + //myGPS.enableDebugging(); // Enable debug messages + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + // Powering off for 20s, you should see the power consumption drop. + Serial.println("-- Powering off module for 20s --"); + + myGPS.powerOff(20000); + //myGPS.powerOffWithInterrupt(20000, VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT0); + + delay(10000); + + // After 10 seconds wake the device via the specified pin on your microcontroller and module. + wakeUp(); +} + +void loop() { + //Do nothing +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example2_NMEAParsing/Example2_NMEAParsing.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example2_NMEAParsing/Example2_NMEAParsing.ino new file mode 100644 index 0000000..84e3f51 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example2_NMEAParsing/Example2_NMEAParsing.ino @@ -0,0 +1,83 @@ +/* + Read NMEA sentences over I2C using Ublox module SAM-M8Q, NEO-M8P, etc + By: Nathan Seidle + SparkFun Electronics + Date: August 22nd, 2018 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example reads the NMEA characters over I2C and pipes them to MicroNMEA + This example will output your current long/lat and satellites in view + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + For more MicroNMEA info see https://github.com/stevemarple/MicroNMEA + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output + Go outside! Wait ~25 seconds and you should see your lat/long +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +#include //http://librarymanager/All#MicroNMEA +char nmeaBuffer[100]; +MicroNMEA nmea(nmeaBuffer, sizeof(nmeaBuffer)); + +void setup() +{ + Serial.begin(115200); + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + if (myGPS.begin() == false) + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } +} + +void loop() +{ + myGPS.checkUblox(); //See if new data is available. Process bytes as they come in. + + if(nmea.isValid() == true) + { + long latitude_mdeg = nmea.getLatitude(); + long longitude_mdeg = nmea.getLongitude(); + + Serial.print("Latitude (deg): "); + Serial.println(latitude_mdeg / 1000000., 6); + Serial.print("Longitude (deg): "); + Serial.println(longitude_mdeg / 1000000., 6); + } + else + { + Serial.print("No Fix - "); + Serial.print("Num. satellites: "); + Serial.println(nmea.getNumSatellites()); + } + + delay(250); //Don't pound too hard on the I2C bus +} + +//This function gets called from the SparkFun Ublox Arduino Library +//As each NMEA character comes in you can specify what to do with it +//Useful for passing to other libraries like tinyGPS, MicroNMEA, or even +//a buffer, radio, etc. +void SFE_UBLOX_GPS::processNMEA(char incoming) +{ + //Take the incoming char from the Ublox I2C port and pass it on to the MicroNMEA lib + //for sentence cracking + nmea.process(incoming); +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example3_GetPosition/Example3_GetPosition.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example3_GetPosition/Example3_GetPosition.ino new file mode 100644 index 0000000..b87e6eb --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example3_GetPosition/Example3_GetPosition.ino @@ -0,0 +1,84 @@ +/* + Reading lat and long via UBX binary commands - no more NMEA parsing! + By: Nathan Seidle + SparkFun Electronics + Date: January 3rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to query a Ublox module for its lat/long/altitude. We also + turn off the NMEA output on the I2C port. This decreases the amount of I2C traffic + dramatically. + + Note: Long/lat are large numbers because they are * 10^7. To convert lat/long + to something google maps understands simply divide the numbers by 10,000,000. We + do this so that we don't have to use floating point numbers. + + Leave NMEA parsing behind. Now you can simply ask the module for the datums you want! + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module. + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.saveConfiguration(); //Save the current settings to flash and BBR +} + +void loop() +{ + //Query module only every second. Doing it more often will just cause I2C traffic. + //The module only responds when a new position is available + if (millis() - lastTime > 1000) + { + lastTime = millis(); //Update the timer + + long latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + Serial.print(F(" (degrees * 10^-7)")); + + long altitude = myGPS.getAltitude(); + Serial.print(F(" Alt: ")); + Serial.print(altitude); + Serial.print(F(" (mm)")); + + byte SIV = myGPS.getSIV(); + Serial.print(F(" SIV: ")); + Serial.print(SIV); + + Serial.println(); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example4_FixType/Example4_FixType.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example4_FixType/Example4_FixType.ino new file mode 100644 index 0000000..1fd99db --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example4_FixType/Example4_FixType.ino @@ -0,0 +1,94 @@ +/* + Get fix type and RTK fix type if available + By: Nathan Seidle + SparkFun Electronics + Date: January 3rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to query a Ublox module for fix type and RTK fix type. + The fix type is as follows: + 0 = no fix + 1 = dead reckoning (requires external sensors) + 2 = 2D (not quite enough satellites in view) + 3 = 3D (the standard fix) + 4 = GNSS + dead reckoning (requires external sensors) + 5 = Time fix only + + Additionally, if we are doing RTK, we can figure out if we have a floating + RTK solution or if we have been able to resolve a fixec solution (better precision). + + Leave NMEA parsing behind. Now you can simply ask the module for the datums you want! + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module. + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + Wire.setClock(400000); //Optional. Increase I2C clock speed to 400kHz. + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } +} + +void loop() +{ + //Query module only every second. Doing it more often will just cause I2C traffic. + if (millis() - lastTime > 1000) + { + lastTime = millis(); //Update the timer + + long latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + + long altitude = myGPS.getAltitude(); + Serial.print(F(" Alt: ")); + Serial.print(altitude); + + byte fixType = myGPS.getFixType(); + Serial.print(F(" Fix: ")); + if(fixType == 0) Serial.print(F("No fix")); + else if(fixType == 1) Serial.print(F("Dead reckoning")); + else if(fixType == 2) Serial.print(F("2D")); + else if(fixType == 3) Serial.print(F("3D")); + else if(fixType == 4) Serial.print(F("GNSS+Dead reckoning")); + + byte RTK = myGPS.getCarrierSolutionType(); + Serial.print(" RTK: "); + Serial.print(RTK); + if (RTK == 1) Serial.print(F("High precision float fix!")); + if (RTK == 2) Serial.print(F("High precision fix!")); + + Serial.println(); + } + +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example5_SpeedHeadingPrecision/Example5_SpeedHeadingPrecision.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example5_SpeedHeadingPrecision/Example5_SpeedHeadingPrecision.ino new file mode 100644 index 0000000..0c5d996 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example5_SpeedHeadingPrecision/Example5_SpeedHeadingPrecision.ino @@ -0,0 +1,83 @@ +/* + Get Speed/Heading and dilution of precision via UBX binary commands - no more NMEA parsing! + By: Nathan Seidle + SparkFun Electronics + Date: January 3rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to query a Ublox module for its lat/long/altitude. + + Note: Long/lat are large numbers because they are * 10^7. To convert lat/long + to something google maps understands simply divide the numbers by 1,000,000. We + do this so that we don't have to use floating point numbers. + + Leave NMEA parsing behind. Now you can simply ask the module for the datums you want! + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module. + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } +} + +void loop() +{ + //Query module only every second. Doing it more often will just cause I2C traffic. + //The module only responds when a new position is available + if (millis() - lastTime > 1000) + { + lastTime = millis(); //Update the timer + + long latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + + long speed = myGPS.getGroundSpeed(); + Serial.print(F(" Speed: ")); + Serial.print(speed); + Serial.print(F(" (mm/s)")); + + long heading = myGPS.getHeading(); + Serial.print(F(" Heading: ")); + Serial.print(heading); + Serial.print(F(" (degrees * 10^-5)")); + + int pDOP = myGPS.getPDOP(); + Serial.print(F(" pDOP: ")); + Serial.print(pDOP / 100.0, 2); + + Serial.println(); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example6_EnableNMEASentences/Example6_EnableNMEASentences.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example6_EnableNMEASentences/Example6_EnableNMEASentences.ino new file mode 100644 index 0000000..7ba4b2e --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example6_EnableNMEASentences/Example6_EnableNMEASentences.ino @@ -0,0 +1,79 @@ +/* + Turn on/off various NMEA sentences. + By: Nathan Seidle + SparkFun Electronics + Date: January 3rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to turn on/off the NMEA sentences being output + over UART1. We use the I2C interface on the Ublox module for configuration + but you won't see any output from this sketch. You'll need to hook up + a Serial Basic or other USB to Serial device to UART1 on your Ublox module + to see the output. + + This example turns off all sentences except for the GPGGA and GPVTG sentences. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a RedBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output + Hookup a Serial Basic (https://www.sparkfun.com/products/15096) to UART1 on the Ublox module. Open a terminal at 57600bps + and see GPGGA and GPVTG sentences. +*/ +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +unsigned long lastGPSSend = 0; + +void setup() +{ + Serial.begin(115200); // Serial debug output over USB visible from Arduino IDE + Serial.println("Example showing how to enable/disable certain NMEA sentences"); + + Wire.begin(); + + if (myGPS.begin() == false) + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1) + ; + } + + //Disable or enable various NMEA sentences over the UART1 interface + myGPS.disableNMEAMessage(UBX_NMEA_GLL, COM_PORT_UART1); //Several of these are on by default on virgin ublox board so let's disable them + myGPS.disableNMEAMessage(UBX_NMEA_GSA, COM_PORT_UART1); + myGPS.disableNMEAMessage(UBX_NMEA_GSV, COM_PORT_UART1); + myGPS.disableNMEAMessage(UBX_NMEA_RMC, COM_PORT_UART1); + myGPS.enableNMEAMessage(UBX_NMEA_GGA, COM_PORT_UART1); //Only leaving GGA/VTG enabled at current navigation rate + myGPS.enableNMEAMessage(UBX_NMEA_VTG, COM_PORT_UART1); + + //Here's the advanced configure method + //Some of the other examples in this library enable the PVT message so let's disable it + myGPS.configureMessage(UBX_CLASS_NAV, UBX_NAV_PVT, COM_PORT_UART1, 0); //Message Class, ID, and port we want to configure, sendRate of 0 (disable). + + myGPS.setUART1Output(COM_TYPE_NMEA); //Turn off UBX and RTCM sentences on the UART1 interface + + myGPS.setSerialRate(57600); //Set UART1 to 57600bps. + + myGPS.saveConfiguration(); //Save these settings to NVM + + Serial.println(F("Messages configured. NMEA now being output over the UART1 port on the Ublox module at 57600bps.")); +} + +void loop() +{ + if (millis() - lastGPSSend > 200) + { + myGPS.checkUblox(); //See if new data is available, but we don't want to get NMEA here. Go check UART1. + lastGPSSend = millis(); + } +} \ No newline at end of file diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example7_OutputRate/Example7_OutputRate.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example7_OutputRate/Example7_OutputRate.ino new file mode 100644 index 0000000..4ad90ee --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example7_OutputRate/Example7_OutputRate.ino @@ -0,0 +1,91 @@ +/* + Set update rate to 10Hz + By: Nathan Seidle + SparkFun Electronics + Date: January 3rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to increase the output of the module from 1Hz to 4Hz. + The max output rate various from model to model. RTFM! But you cannot do harm + to the module. + + We also disable NMEA output on the I2C bus and use only UBX. This dramatically + decreases the amount of data that needs to be transmitted. + + Leave NMEA parsing behind. Now you can simply ask the module for the datums you want! + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module. +long startTime = 0; //Used to calc the actual update rate. +long updateCount = 0; //Used to calc the actual update rate. + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + Wire.setClock(400000); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.setNavigationFrequency(10); //Set output to 10 times a second + + byte rate = myGPS.getNavigationFrequency(); //Get the update rate of this module + Serial.print("Current update rate:"); + Serial.println(rate); + + startTime = millis(); +} + +void loop() +{ + //Query module only every second. Doing it more often will just cause I2C traffic. + //The module only responds when a new position is available. This is defined + //by the update freq. + if (millis() - lastTime > 25) + { + lastTime = millis(); //Update the timer + + long latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + + updateCount++; + + //Calculate the actual update rate based on the sketch start time and the + //number of updates we've received. + Serial.print(F(" Rate: ")); + Serial.print( updateCount / ((millis() - startTime) / 1000.0), 2); + Serial.print(F("Hz")); + + Serial.println(); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example8_GetProtocolVersion/Example8_GetProtocolVersion.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example8_GetProtocolVersion/Example8_GetProtocolVersion.ino new file mode 100644 index 0000000..ec35235 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example8_GetProtocolVersion/Example8_GetProtocolVersion.ino @@ -0,0 +1,61 @@ +/* + Reading the protocol version of a Ublox module + By: Nathan Seidle + SparkFun Electronics + Date: January 3rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to query a Ublox module for its protocol version. + + Various modules have various protocol version. We've seen v18 up to v27. Depending + on the protocol version there are different commands available. This is a handy + way to predict which commands will or won't work. + + Leave NMEA parsing behind. Now you can simply ask the module for the datums you want! + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module. + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + Serial.print(F("Version: ")); + byte versionHigh = myGPS.getProtocolVersionHigh(); + Serial.print(versionHigh); + Serial.print("."); + byte versionLow = myGPS.getProtocolVersionLow(); + Serial.print(versionLow); +} + +void loop() +{ + //Do nothing +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example9_ChangeI2CAddress/Example9_ChangeI2CAddress.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example9_ChangeI2CAddress/Example9_ChangeI2CAddress.ino new file mode 100644 index 0000000..19a2c33 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Example9_ChangeI2CAddress/Example9_ChangeI2CAddress.ino @@ -0,0 +1,112 @@ +/* + Change the I2C address of a Ublox module using I2C + By: Nathan Seidle + SparkFun Electronics + Date: January 3rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to change the I2C address of a Ublox module + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Tracks the passing of 2000ms (2 seconds) + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + byte oldAddress = 0x42; //The default address for Ublox modules is 0x42 + byte newAddress = 0x3F; //Address you want to change to. Valid is 0x08 to 0x77. + + while (Serial.available()) Serial.read(); //Trash any incoming chars + Serial.print("Press a key to change address to 0x"); + Serial.println(newAddress, HEX); + while (Serial.available() == false) ; //Wait for user to send character + + if (myGPS.begin(Wire, oldAddress) == true) //Connect to the Ublox module using Wire port and the old address + { + Serial.print("GPS found at address 0x"); + Serial.println(oldAddress, HEX); + + myGPS.setI2CAddress(newAddress); //Change I2C address of this device + //Device's I2C address is stored to memory and loaded on each power-on + + if (myGPS.begin(Wire, newAddress) == true) + { + myGPS.saveConfiguration(); //Save the current settings to flash and BBR + + Serial.print("Address successfully changed to 0x"); + Serial.println(newAddress, HEX); + Serial.print("Now load another example sketch using .begin(Wire, 0x"); + Serial.print(newAddress, HEX); + Serial.println(") to use this GPS module"); + Serial.println("Freezing..."); + while (1); + } + } + + //Something went wrong, begin looking for the I2C device + Serial.println("Address change failed. Beginning an I2C scan."); + + Wire.begin(); +} + +void loop() { + + byte address; + int nDevices; + + Serial.println("Scanning..."); + + nDevices = 0; + for (address = 1; address < 127; address++ ) + { + Wire.beginTransmission(address); + byte error = Wire.endTransmission(); + + if (error == 0) + { + Serial.print("I2C device found at address 0x"); + if (address < 16) + Serial.print("0"); + Serial.print(address, HEX); + Serial.println(" !"); + + nDevices++; + } + else if (error == 4) + { + Serial.print("Unknown error at address 0x"); + if (address < 16) + Serial.print("0"); + Serial.println(address, HEX); + } + } + + if (nDevices == 0) + Serial.println("No I2C devices found\n"); + else + Serial.println("done\n"); + + delay(5000); // wait 5 seconds for next scan +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/NEO-M8P-2/Example1_EnableRTCM/Example1_EnableRTCM.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/NEO-M8P-2/Example1_EnableRTCM/Example1_EnableRTCM.ino new file mode 100644 index 0000000..368cb8d --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/NEO-M8P-2/Example1_EnableRTCM/Example1_EnableRTCM.ino @@ -0,0 +1,77 @@ +/* + Send UBX binary commands to enable RTCM sentences on Ublox NEO-M8P module + By: Nathan Seidle + SparkFun Electronics + Date: September 7th, 2018 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example sends the command to enable the four RTCM messages needed for RTK. This + is the first part of a larger tutorial and example to setup an RTK base station. + These commands are only accepted by the NEO-M8P module. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + Serial.begin(115200); + while(!Serial); //Wait for user to open terminal + Serial.println("Ublox RTCM Enable Example"); + + Wire.begin(); + Wire.setClock(400000); //Increase I2C clock speed to 400kHz + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + while(Serial.available()) Serial.read(); //Clear any latent chars in serial buffer + Serial.println("Press any key to send commands to enable RTCM 3.x"); + while(Serial.available() == 0) ; //Wait for user to press a key + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.saveConfiguration(); //Save the current settings to flash and BBR + + boolean response = true; + response &= myGPS.enableRTCMmessage(UBX_RTCM_1005, COM_PORT_I2C, 1); //Enable message 1005 to output through I2C port, message every second + response &= myGPS.enableRTCMmessage(UBX_RTCM_1077, COM_PORT_I2C, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1087, COM_PORT_I2C, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1230, COM_PORT_I2C, 10); //Enable message every 10 seconds + + if (response == true) + { + Serial.println("RTCM messages enabled"); + } + else + { + Serial.println("RTCM failed to enable. Are you sure you have an NEO-M8P?"); + while(1); //Freeze + } + + //RTCM is now enabled but we haven't done a 'survey-in' + //See example 4 for the full Base RTK setup +} + +void loop() +{ + myGPS.checkUblox(); //See if new data is available. Process bytes as they come in. + + delay(250); //Don't pound too hard on the I2C bus +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/NEO-M8P-2/Example2_StartRTCMBase/Example2_StartRTCMBase.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/NEO-M8P-2/Example2_StartRTCMBase/Example2_StartRTCMBase.ino new file mode 100644 index 0000000..b54d9cb --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/NEO-M8P-2/Example2_StartRTCMBase/Example2_StartRTCMBase.ino @@ -0,0 +1,153 @@ +/* + Send UBX binary commands to enable RTCM sentences on Ublox NEO-M8P-2 module + By: Nathan Seidle + SparkFun Electronics + Date: September 7th, 2018 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example does all steps to configure and enable a NEO-M8P-2 as a base station: + Begin Survey-In + Once we've achieved 2m accuracy and 300s have passed, survey is complete + Enable four RTCM messages + Begin outputting RTCM bytes + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("Ublox NEO-M8P-2 base station example"); + + Wire.begin(); + Wire.setClock(400000); //Increase I2C clock speed to 400kHz + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.saveConfiguration(); //Save the current settings to flash and BBR + + while (Serial.available()) Serial.read(); //Clear any latent chars in serial buffer + Serial.println("Press any key to send commands to begin Survey-In"); + while (Serial.available() == 0) ; //Wait for user to press a key + + boolean response; + + //Check if Survey is in Progress before initiating one + response = myGPS.getSurveyStatus(2000); //Query module for SVIN status with 2000ms timeout (request can take a long time) + if (response == false) + { + Serial.println("Failed to get Survey In status"); + while (1); //Freeze + } + + if (myGPS.svin.active == true) + { + Serial.print("Survey already in progress."); + } + else + { + //Start survey + response = myGPS.enableSurveyMode(300, 2.000); //Enable Survey in, 300 seconds, 2.0m + if (response == false) + { + Serial.println("Survey start failed"); + while (1); + } + Serial.println("Survey started. This will run until 300s has passed and less than 2m accuracy is achieved."); + } + + while(Serial.available()) Serial.read(); //Clear buffer + + //Begin waiting for survey to complete + while (myGPS.svin.valid == false) + { + if(Serial.available()) + { + byte incoming = Serial.read(); + if(incoming == 'x') + { + //Stop survey mode + response = myGPS.disableSurveyMode(); //Disable survey + Serial.println("Survey stopped"); + break; + } + } + + response = myGPS.getSurveyStatus(2000); //Query module for SVIN status with 2000ms timeout (req can take a long time) + if (response == true) + { + Serial.print("Press x to end survey - "); + Serial.print("Time elapsed: "); + Serial.print((String)myGPS.svin.observationTime); + + Serial.print(" Accuracy: "); + Serial.print((String)myGPS.svin.meanAccuracy); + Serial.println(); + } + else + { + Serial.println("SVIN request failed"); + } + + delay(1000); + } + Serial.println("Survey valid!"); + + response = true; + response &= myGPS.enableRTCMmessage(UBX_RTCM_1005, COM_PORT_I2C, 1); //Enable message 1005 to output through I2C port, message every second + response &= myGPS.enableRTCMmessage(UBX_RTCM_1077, COM_PORT_I2C, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1087, COM_PORT_I2C, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1230, COM_PORT_I2C, 10); //Enable message every 10 seconds + + if (response == true) + { + Serial.println("RTCM messages enabled"); + } + else + { + Serial.println("RTCM failed to enable. Are you sure you have an NEO-M8P?"); + while (1); //Freeze + } + + Serial.println("Base survey complete! RTCM now broadcasting."); +} + +void loop() +{ + myGPS.checkUblox(); //See if new data is available. Process bytes as they come in. + + delay(250); //Don't pound too hard on the I2C bus +} + +//This function gets called from the SparkFun Ublox Arduino Library. +//As each RTCM byte comes in you can specify what to do with it +//Useful for passing the RTCM correction data to a radio, Ntrip broadcaster, etc. +void SFE_UBLOX_GPS::processRTCM(uint8_t incoming) +{ + //Let's just pretty-print the HEX values for now + if (myGPS.rtcmFrameCounter % 16 == 0) Serial.println(); + Serial.print(" "); + if (incoming < 0x10) Serial.print("0"); + Serial.print(incoming, HEX); +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/NEO-M8P-2/Example3_BaseWithLCD/Example3_BaseWithLCD.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/NEO-M8P-2/Example3_BaseWithLCD/Example3_BaseWithLCD.ino new file mode 100644 index 0000000..b3163e8 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/NEO-M8P-2/Example3_BaseWithLCD/Example3_BaseWithLCD.ino @@ -0,0 +1,185 @@ +/* + Send UBX binary commands to enable RTCM sentences on Ublox NEO-M8P-2 module + By: Nathan Seidle + SparkFun Electronics + Date: September 7th, 2018 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example does all steps to configure and enable a NEO-M8P-2 as a base station: + Begin Survey-In + Once we've achieved 2m accuracy and 300s have passed, survey is complete + Enable four RTCM messages + Begin outputting RTCM bytes + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + Plug a SerLCD onto the Qwiic bus + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Watch the output on the LCD or open the serial monitor at 115200 baud to see the output +*/ + +#define STAT_LED 13 + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +#include //Click here to get the library: http://librarymanager/All#SparkFun_SerLCD +SerLCD lcd; // Initialize the library with default I2C address 0x72 + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("Ublox GPS I2C Test"); + + Wire.begin(); + + pinMode(STAT_LED, OUTPUT); + digitalWrite(STAT_LED, LOW); + + lcd.begin(Wire); //Set up the LCD for Serial communication at 9600bps + lcd.setBacklight(0x4B0082); //indigo, a kind of dark purplish blue + lcd.clear(); + lcd.print(F("LCD Ready")); + + myGPS.begin(Wire); + if (myGPS.isConnected() == false) + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + lcd.setCursor(0, 1); + lcd.print(F("No GPS detected")); + while (1); + } + + Wire.setClock(400000); //Increase I2C clock speed to 400kHz + + lcd.setCursor(0, 1); + lcd.print("GPS Detected"); + + //Check if Survey is in Progress before initiating one + boolean response; + response = myGPS.getSurveyStatus(2000); //Query module for SVIN status with 2000ms timeout (request can take a long time) + if (response == false) + { + Serial.println(F("Failed to get Survey In status")); + while (1); //Freeze + } + + if (myGPS.svin.active == true) + { + Serial.print(F("Survey already in progress.")); + lcd.setCursor(0, 2); + lcd.print(F("Survey already going")); + } + else + { + //Start survey + response = myGPS.enableSurveyMode(300, 2.000); //Enable Survey in, 300 seconds, 2.0m + if (response == false) + { + Serial.println(F("Survey start failed")); + lcd.setCursor(0, 3); + lcd.print(F("Survey start failed")); + while (1); + } + Serial.println(F("Survey started. This will run until 300s has passed and less than 2m accuracy is achieved.")); + } + + while (Serial.available()) Serial.read(); //Clear buffer + + lcd.clear(); + lcd.print(F("Survey in progress")); + + //Begin waiting for survey to complete + while (myGPS.svin.valid == false) + { + if (Serial.available()) + { + byte incoming = Serial.read(); + if (incoming == 'x') + { + //Stop survey mode + response = myGPS.disableSurveyMode(); //Disable survey + Serial.println(F("Survey stopped")); + break; + } + } + + response = myGPS.getSurveyStatus(2000); //Query module for SVIN status with 2000ms timeout (req can take a long time) + if (response == true) + { + Serial.print(F("Press x to end survey - ")); + Serial.print(F("Time elapsed: ")); + Serial.print((String)myGPS.svin.observationTime); + + lcd.setCursor(0, 1); + lcd.print(F("Elapsed: ")); + lcd.print((String)myGPS.svin.observationTime); + + Serial.print(F(" Accuracy: ")); + Serial.print((String)myGPS.svin.meanAccuracy); + Serial.println(); + + lcd.setCursor(0, 2); + lcd.print(F("Accuracy: ")); + lcd.print((String)myGPS.svin.meanAccuracy); + } + else + { + Serial.println(F("SVIN request failed")); + } + + delay(1000); + } + Serial.println(F("Survey valid!")); + + response = true; + response &= myGPS.enableRTCMmessage(UBX_RTCM_1005, UBX_RTCM_I2C_PORT, 1); //Enable message 1005 to output through I2C port, message every second + response &= myGPS.enableRTCMmessage(UBX_RTCM_1077, UBX_RTCM_I2C_PORT, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1087, UBX_RTCM_I2C_PORT, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1230, UBX_RTCM_I2C_PORT, 10); //Enable message every 10 seconds + + if (response == true) + { + Serial.println(F("RTCM messages enabled")); + } + else + { + Serial.println(F("RTCM failed to enable. Are you sure you have an NEO-M8P?")); + while (1); //Freeze + } + + Serial.println(F("Base survey complete! RTCM now broadcasting.")); + lcd.clear(); + lcd.print(F("Transmitting RTCM")); +} + +void loop() +{ + myGPS.checkUblox(); //See if new data is available. Process bytes as they come in. + + //Do anything you want. Call checkUblox() every second. NEO-M8P-2 has TX buffer of 4k bytes. + + delay(250); //Don't pound too hard on the I2C bus +} + +//This function gets called from the SparkFun Ublox Arduino Library. +//As each RTCM byte comes in you can specify what to do with it +//Useful for passing the RTCM correction data to a radio, Ntrip broadcaster, etc. +void SFE_UBLOX_GPS::processRTCM(uint8_t incoming) +{ + //Let's just pretty-print the HEX values for now + if (myGPS.rtcmFrameCounter % 16 == 0) Serial.println(); + Serial.print(" "); + if (incoming < 0x10) Serial.print("0"); + Serial.print(incoming, HEX); +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Series_6_7/Example1_GetPositionAndTime_Series_6_7/Example1_GetPositionAndTime_Series_6_7.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Series_6_7/Example1_GetPositionAndTime_Series_6_7/Example1_GetPositionAndTime_Series_6_7.ino new file mode 100644 index 0000000..158e57d --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Series_6_7/Example1_GetPositionAndTime_Series_6_7/Example1_GetPositionAndTime_Series_6_7.ino @@ -0,0 +1,109 @@ +/* + Reading lat, long and UTC time via UBX binary commands - no more NMEA parsing! + By: Paul Clark and Nathan Seidle + Using the library modifications provided by @blazczak and @geeksville + + SparkFun Electronics + Date: June 16th, 2020 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to query a Ublox module for its lat/long/altitude. We also + turn off the NMEA output on the I2C port. This decreases the amount of I2C traffic + dramatically. + + Note: Long/lat are large numbers because they are * 10^7. To convert lat/long + to something google maps understands simply divide the numbers by 10,000,000. We + do this so that we don't have to use floating point numbers. + + Leave NMEA parsing behind. Now you can simply ask the module for the datums you want! + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library_Series_6_7.h" +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module. + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + //myGPS.enableDebugging(); // Uncomment this line to enable debug messages + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.saveConfiguration(); //Save the current settings to flash and BBR +} + +void loop() +{ + //Query module only every second. Doing it more often will just cause I2C traffic. + //The module only responds when a new position is available + if (millis() - lastTime > 1000) + { + lastTime = millis(); //Update the timer + + long latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + Serial.print(F(" (degrees * 10^-7)")); + + long altitude = myGPS.getAltitude(); + Serial.print(F(" Alt: ")); + Serial.print(altitude); + Serial.print(F(" (mm)")); + + Serial.print(F(" Time: ")); + + byte Hour = myGPS.getHour(); + if (Hour < 10) + { + Serial.print(F("0")); + } + Serial.print(Hour); + Serial.print(F(":")); + + byte Minute = myGPS.getMinute(); + if (Minute < 10) + { + Serial.print(F("0")); + } + Serial.print(Minute); + Serial.print(F(":")); + + byte Second = myGPS.getSecond(); + if (Second < 10) + { + Serial.print(F("0")); + } + Serial.print(Second); + + Serial.println(); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Series_6_7/Example1_GetPositionAndTime_Series_6_7/SparkFun_Ublox_Arduino_Library_Series_6_7.cpp b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Series_6_7/Example1_GetPositionAndTime_Series_6_7/SparkFun_Ublox_Arduino_Library_Series_6_7.cpp new file mode 100644 index 0000000..a6c04b6 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Series_6_7/Example1_GetPositionAndTime_Series_6_7/SparkFun_Ublox_Arduino_Library_Series_6_7.cpp @@ -0,0 +1,3477 @@ +/* + This is a library written for the Ublox ZED-F9P and NEO-M8P-2 + + Updated: June 16th, 2020 + + This copy includes changes by @blazczak and @geeksville to + provide support for the older series 6 and 7 modules. + + Disclaimer: SparkFun has not verified this copy of the library on either series 6 or 7. + It should work, it looks like it will work, but we have no way of confirming this. + We cannot guarantee that it will work reliably in your application. + + Do you like this library? Help support SparkFun. Buy a board! + https://www.sparkfun.com/products/15136 + https://www.sparkfun.com/products/15005 + https://www.sparkfun.com/products/15733 + https://www.sparkfun.com/products/15193 + https://www.sparkfun.com/products/15210 + + Original library written by Nathan Seidle @ SparkFun Electronics, September 6th, 2018 + + This library handles configuring and handling the responses + from a Ublox GPS module. Works with most modules from Ublox including + the Zed-F9P, NEO-M8P-2, NEO-M9N, ZOE-M8Q, SAM-M8Q, and many others. + + https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library + + Development environment specifics: + Arduino IDE 1.8.5 + + SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT). + The MIT License (MIT) + Copyright (c) 2016 SparkFun Electronics + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the Software is furnished to + do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial + portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT + NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include "SparkFun_Ublox_Arduino_Library_Series_6_7.h" + +SFE_UBLOX_GPS::SFE_UBLOX_GPS(void) +{ + // Constructor + currentGeofenceParams.numFences = 0; // Zero the number of geofences currently in use + moduleQueried.versionNumber = false; + + if (checksumFailurePin >= 0) + { + pinMode((uint8_t)checksumFailurePin, OUTPUT); + digitalWrite((uint8_t)checksumFailurePin, HIGH); + } +} + +//Initialize the Serial port +boolean SFE_UBLOX_GPS::begin(TwoWire &wirePort, uint8_t deviceAddress) +{ + commType = COMM_TYPE_I2C; + _i2cPort = &wirePort; //Grab which port the user wants us to use + + //We expect caller to begin their I2C port, with the speed of their choice external to the library + //But if they forget, we start the hardware here. + + //We're moving away from the practice of starting Wire hardware in a library. This is to avoid cross platform issues. + //ie, there are some platforms that don't handle multiple starts to the wire hardware. Also, every time you start the wire + //hardware the clock speed reverts back to 100kHz regardless of previous Wire.setClocks(). + //_i2cPort->begin(); + + _gpsI2Caddress = deviceAddress; //Store the I2C address from user + + return (isConnected()); +} + +//Initialize the Serial port +boolean SFE_UBLOX_GPS::begin(Stream &serialPort) +{ + commType = COMM_TYPE_SERIAL; + _serialPort = &serialPort; //Grab which port the user wants us to use + + return (isConnected()); +} + +//Enable or disable the printing of sent/response HEX values. +//Use this in conjunction with 'Transport Logging' from the Universal Reader Assistant to see what they're doing that we're not +void SFE_UBLOX_GPS::enableDebugging(Stream &debugPort, boolean printLimitedDebug) +{ + _debugSerial = &debugPort; //Grab which port the user wants us to use for debugging + if (printLimitedDebug == false) + { + _printDebug = true; //Should we print the commands we send? Good for debugging + } + else + { + _printLimitedDebug = true; //Should we print limited debug messages? Good for debugging high navigation rates + } +} +void SFE_UBLOX_GPS::disableDebugging(void) +{ + _printDebug = false; //Turn off extra print statements + _printLimitedDebug = false; +} + +//Safely print messages +void SFE_UBLOX_GPS::debugPrint(char *message) +{ + if (_printDebug == true) + { + _debugSerial->print(message); + } +} +//Safely print messages +void SFE_UBLOX_GPS::debugPrintln(char *message) +{ + if (_printDebug == true) + { + _debugSerial->println(message); + } +} + +const char *SFE_UBLOX_GPS::statusString(sfe_ublox_status_e stat) +{ + switch (stat) + { + case SFE_UBLOX_STATUS_SUCCESS: + return "Success"; + break; + case SFE_UBLOX_STATUS_FAIL: + return "General Failure"; + break; + case SFE_UBLOX_STATUS_CRC_FAIL: + return "CRC Fail"; + break; + case SFE_UBLOX_STATUS_TIMEOUT: + return "Timeout"; + break; + case SFE_UBLOX_STATUS_COMMAND_NACK: + return "Command not acknowledged (NACK)"; + break; + case SFE_UBLOX_STATUS_OUT_OF_RANGE: + return "Out of range"; + break; + case SFE_UBLOX_STATUS_INVALID_ARG: + return "Invalid Arg"; + break; + case SFE_UBLOX_STATUS_INVALID_OPERATION: + return "Invalid operation"; + break; + case SFE_UBLOX_STATUS_MEM_ERR: + return "Memory Error"; + break; + case SFE_UBLOX_STATUS_HW_ERR: + return "Hardware Error"; + break; + case SFE_UBLOX_STATUS_DATA_SENT: + return "Data Sent"; + break; + case SFE_UBLOX_STATUS_DATA_RECEIVED: + return "Data Received"; + break; + case SFE_UBLOX_STATUS_I2C_COMM_FAILURE: + return "I2C Comm Failure"; + break; + case SFE_UBLOX_STATUS_DATA_OVERWRITTEN: + return "Data Packet Overwritten"; + break; + default: + return "Unknown Status"; + break; + } + return "None"; +} + +void SFE_UBLOX_GPS::factoryReset() +{ + // Copy default settings to permanent + // Note: this does not load the permanent configuration into the current configuration. Calling factoryDefault() will do that. + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_CFG; + packetCfg.len = 13; + packetCfg.startingSpot = 0; + for (uint8_t i = 0; i < 4; i++) + { + payloadCfg[0 + i] = 0xff; // clear mask: copy default config to permanent config + payloadCfg[4 + i] = 0x00; // save mask: don't save current to permanent + payloadCfg[8 + i] = 0x00; // load mask: don't copy permanent config to current + } + payloadCfg[12] = 0xff; // all forms of permanent memory + sendCommand(&packetCfg, 0); // don't expect ACK + hardReset(); // cause factory default config to actually be loaded and used cleanly +} + +void SFE_UBLOX_GPS::hardReset() +{ + // Issue hard reset + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RST; + packetCfg.len = 4; + packetCfg.startingSpot = 0; + payloadCfg[0] = 0xff; // cold start + payloadCfg[1] = 0xff; // cold start + payloadCfg[2] = 0; // 0=HW reset + payloadCfg[3] = 0; // reserved + sendCommand(&packetCfg, 0); // don't expect ACK +} + +//Changes the serial baud rate of the Ublox module, can't return success/fail 'cause ACK from modem +//is lost due to baud rate change +void SFE_UBLOX_GPS::setSerialRate(uint32_t baudrate, uint8_t uartPort, uint16_t maxWait) +{ + //Get the current config values for the UART port + getPortSettings(uartPort, maxWait); //This will load the payloadCfg array with current port settings + + if (_printDebug == true) + { + _debugSerial->print(F("Current baud rate: ")); + _debugSerial->println(((uint32_t)payloadCfg[10] << 16) | ((uint32_t)payloadCfg[9] << 8) | payloadCfg[8]); + } + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_PRT; + packetCfg.len = 20; + packetCfg.startingSpot = 0; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[8] = baudrate; + payloadCfg[9] = baudrate >> 8; + payloadCfg[10] = baudrate >> 16; + payloadCfg[11] = baudrate >> 24; + + if (_printDebug == true) + { + _debugSerial->print(F("New baud rate:")); + _debugSerial->println(((uint32_t)payloadCfg[10] << 16) | ((uint32_t)payloadCfg[9] << 8) | payloadCfg[8]); + } + + sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait); + if (_printDebug == true) + { + _debugSerial->print(F("setSerialRate: sendCommand returned: ")); + _debugSerial->println(statusString(retVal)); + } +} + +//Changes the I2C address that the Ublox module responds to +//0x42 is the default but can be changed with this command +boolean SFE_UBLOX_GPS::setI2CAddress(uint8_t deviceAddress, uint16_t maxWait) +{ + //Get the current config values for the I2C port + getPortSettings(COM_PORT_I2C, maxWait); //This will load the payloadCfg array with current port settings + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_PRT; + packetCfg.len = 20; + packetCfg.startingSpot = 0; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[4] = deviceAddress << 1; //DDC mode LSB + + if (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT) // We are only expecting an ACK + { + //Success! Now change our internal global. + _gpsI2Caddress = deviceAddress; //Store the I2C address from user + return (true); + } + return (false); +} + +//Want to see the NMEA messages on the Serial port? Here's how +void SFE_UBLOX_GPS::setNMEAOutputPort(Stream &nmeaOutputPort) +{ + _nmeaOutputPort = &nmeaOutputPort; //Store the port from user +} + +//Called regularly to check for available bytes on the user' specified port +boolean SFE_UBLOX_GPS::checkUblox(uint8_t requestedClass, uint8_t requestedID) +{ + return checkUbloxInternal(&packetCfg, requestedClass, requestedID); +} + +//Called regularly to check for available bytes on the user' specified port +boolean SFE_UBLOX_GPS::checkUbloxInternal(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +{ + if (commType == COMM_TYPE_I2C) + return (checkUbloxI2C(incomingUBX, requestedClass, requestedID)); + else if (commType == COMM_TYPE_SERIAL) + return (checkUbloxSerial(incomingUBX, requestedClass, requestedID)); + return false; +} + +//Polls I2C for data, passing any new bytes to process() +//Returns true if new bytes are available +boolean SFE_UBLOX_GPS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +{ + if (millis() - lastCheck >= i2cPollingWait) + { + //Get the number of bytes available from the module + uint16_t bytesAvailable = 0; + _i2cPort->beginTransmission(_gpsI2Caddress); + _i2cPort->write(0xFD); //0xFD (MSB) and 0xFE (LSB) are the registers that contain number of bytes available + if (_i2cPort->endTransmission(false) != 0) //Send a restart command. Do not release bus. + return (false); //Sensor did not ACK + + _i2cPort->requestFrom((uint8_t)_gpsI2Caddress, (uint8_t)2); + if (_i2cPort->available()) + { + uint8_t msb = _i2cPort->read(); + uint8_t lsb = _i2cPort->read(); + if (lsb == 0xFF) + { + //I believe this is a Ublox bug. Device should never present an 0xFF. + if ((_printDebug == true) || (_printLimitedDebug == true)) // Print this if doing limited debugging + { + _debugSerial->println(F("checkUbloxI2C: Ublox bug, length lsb is 0xFF")); + } + if (checksumFailurePin >= 0) + { + digitalWrite((uint8_t)checksumFailurePin, LOW); + delay(10); + digitalWrite((uint8_t)checksumFailurePin, HIGH); + } + lastCheck = millis(); //Put off checking to avoid I2C bus traffic + return (false); + } + bytesAvailable = (uint16_t)msb << 8 | lsb; + } + + if (bytesAvailable == 0) + { + if (_printDebug == true) + { + _debugSerial->println(F("checkUbloxI2C: OK, zero bytes available")); + } + lastCheck = millis(); //Put off checking to avoid I2C bus traffic + return (false); + } + + //Check for undocumented bit error. We found this doing logic scans. + //This error is rare but if we incorrectly interpret the first bit of the two 'data available' bytes as 1 + //then we have far too many bytes to check. May be related to I2C setup time violations: https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library/issues/40 + if (bytesAvailable & ((uint16_t)1 << 15)) + { + //Clear the MSbit + bytesAvailable &= ~((uint16_t)1 << 15); + + if ((_printDebug == true) || (_printLimitedDebug == true)) // Print this if doing limited debugging + { + _debugSerial->print(F("checkUbloxI2C: Bytes available error:")); + _debugSerial->println(bytesAvailable); + if (checksumFailurePin >= 0) + { + digitalWrite((uint8_t)checksumFailurePin, LOW); + delay(10); + digitalWrite((uint8_t)checksumFailurePin, HIGH); + } + } + } + + if (bytesAvailable > 100) + { + if (_printDebug == true) + { + _debugSerial->print(F("checkUbloxI2C: Large packet of ")); + _debugSerial->print(bytesAvailable); + _debugSerial->println(F(" bytes received")); + } + } + else + { + if (_printDebug == true) + { + _debugSerial->print(F("checkUbloxI2C: Reading ")); + _debugSerial->print(bytesAvailable); + _debugSerial->println(F(" bytes")); + } + } + + while (bytesAvailable) + { + _i2cPort->beginTransmission(_gpsI2Caddress); + _i2cPort->write(0xFF); //0xFF is the register to read data from + if (_i2cPort->endTransmission(false) != 0) //Send a restart command. Do not release bus. + return (false); //Sensor did not ACK + + //Limit to 32 bytes or whatever the buffer limit is for given platform + uint16_t bytesToRead = bytesAvailable; + if (bytesToRead > I2C_BUFFER_LENGTH) + bytesToRead = I2C_BUFFER_LENGTH; + + TRY_AGAIN: + + _i2cPort->requestFrom((uint8_t)_gpsI2Caddress, (uint8_t)bytesToRead); + if (_i2cPort->available()) + { + for (uint16_t x = 0; x < bytesToRead; x++) + { + uint8_t incoming = _i2cPort->read(); //Grab the actual character + + //Check to see if the first read is 0x7F. If it is, the module is not ready + //to respond. Stop, wait, and try again + if (x == 0) + { + if (incoming == 0x7F) + { + if ((_printDebug == true) || (_printLimitedDebug == true)) // Print this if doing limited debugging + { + _debugSerial->println(F("checkUbloxU2C: Ublox error, module not ready with data")); + } + delay(5); //In logic analyzation, the module starting responding after 1.48ms + if (checksumFailurePin >= 0) + { + digitalWrite((uint8_t)checksumFailurePin, LOW); + delay(10); + digitalWrite((uint8_t)checksumFailurePin, HIGH); + } + goto TRY_AGAIN; + } + } + + process(incoming, incomingUBX, requestedClass, requestedID); //Process this valid character + } + } + else + return (false); //Sensor did not respond + + bytesAvailable -= bytesToRead; + } + } + + return (true); + +} //end checkUbloxI2C() + +//Checks Serial for data, passing any new bytes to process() +boolean SFE_UBLOX_GPS::checkUbloxSerial(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +{ + while (_serialPort->available()) + { + process(_serialPort->read(), incomingUBX, requestedClass, requestedID); + } + return (true); + +} //end checkUbloxSerial() + +//Processes NMEA and UBX binary sentences one byte at a time +//Take a given byte and file it into the proper array +void SFE_UBLOX_GPS::process(uint8_t incoming, ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +{ + if ((currentSentence == NONE) || (currentSentence == NMEA)) + { + if (incoming == 0xB5) //UBX binary frames start with 0xB5, aka μ + { + //This is the start of a binary sentence. Reset flags. + //We still don't know the response class + ubxFrameCounter = 0; + currentSentence = UBX; + //Reset the packetBuf.counter even though we will need to reset it again when ubxFrameCounter == 2 + packetBuf.counter = 0; + ignoreThisPayload = false; //We should not ignore this payload - yet + //Store data in packetBuf until we know if we have a requested class and ID match + activePacketBuffer = SFE_UBLOX_PACKET_PACKETBUF; + } + else if (incoming == '$') + { + currentSentence = NMEA; + } + else if (incoming == 0xD3) //RTCM frames start with 0xD3 + { + rtcmFrameCounter = 0; + currentSentence = RTCM; + } + else + { + //This character is unknown or we missed the previous start of a sentence + } + } + + //Depending on the sentence, pass the character to the individual processor + if (currentSentence == UBX) + { + //Decide what type of response this is + if ((ubxFrameCounter == 0) && (incoming != 0xB5)) //ISO 'μ' + currentSentence = NONE; //Something went wrong. Reset. + else if ((ubxFrameCounter == 1) && (incoming != 0x62)) //ASCII 'b' + currentSentence = NONE; //Something went wrong. Reset. + // Note to future self: + // There may be some duplication / redundancy in the next few lines as processUBX will also + // load information into packetBuf, but we'll do it here too for clarity + else if (ubxFrameCounter == 2) //Class + { + // Record the class in packetBuf until we know what to do with it + packetBuf.cls = incoming; // (Duplication) + rollingChecksumA = 0; //Reset our rolling checksums here (not when we receive the 0xB5) + rollingChecksumB = 0; + packetBuf.counter = 0; //Reset the packetBuf.counter (again) + packetBuf.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; // Reset the packet validity (redundant?) + packetBuf.startingSpot = incomingUBX->startingSpot; //Copy the startingSpot + } + else if (ubxFrameCounter == 3) //ID + { + // Record the ID in packetBuf until we know what to do with it + packetBuf.id = incoming; // (Duplication) + //We can now identify the type of response + //If the packet we are receiving is not an ACK then check for a class and ID match + if (packetBuf.cls != UBX_CLASS_ACK) + { + //This is not an ACK so check for a class and ID match + if ((packetBuf.cls == requestedClass) && (packetBuf.id == requestedID)) + { + //This is not an ACK and we have a class and ID match + //So start diverting data into incomingUBX (usually packetCfg) + activePacketBuffer = SFE_UBLOX_PACKET_PACKETCFG; + incomingUBX->cls = packetBuf.cls; //Copy the class and ID into incomingUBX (usually packetCfg) + incomingUBX->id = packetBuf.id; + incomingUBX->counter = packetBuf.counter; //Copy over the .counter too + } + else + { + //This is not an ACK and we do not have a class and ID match + //so we should keep diverting data into packetBuf and ignore the payload + ignoreThisPayload = true; + } + } + else + { + // This is an ACK so it is to early to do anything with it + // We need to wait until we have received the length and data bytes + // So we should keep diverting data into packetBuf + } + } + else if (ubxFrameCounter == 4) //Length LSB + { + //We should save the length in packetBuf even if activePacketBuffer == SFE_UBLOX_PACKET_PACKETCFG + packetBuf.len = incoming; // (Duplication) + } + else if (ubxFrameCounter == 5) //Length MSB + { + //We should save the length in packetBuf even if activePacketBuffer == SFE_UBLOX_PACKET_PACKETCFG + packetBuf.len |= incoming << 8; // (Duplication) + } + else if (ubxFrameCounter == 6) //This should be the first byte of the payload unless .len is zero + { + if (packetBuf.len == 0) // Check if length is zero (hopefully this is impossible!) + { + if (_printDebug == true) + { + _debugSerial->print(F("process: ZERO LENGTH packet received: Class: 0x")); + _debugSerial->print(packetBuf.cls, HEX); + _debugSerial->print(F(" ID: 0x")); + _debugSerial->println(packetBuf.id, HEX); + } + //If length is zero (!) this will be the first byte of the checksum so record it + packetBuf.checksumA = incoming; + } + else + { + //The length is not zero so record this byte in the payload + packetBuf.payload[0] = incoming; + } + } + else if (ubxFrameCounter == 7) //This should be the second byte of the payload unless .len is zero or one + { + if (packetBuf.len == 0) // Check if length is zero (hopefully this is impossible!) + { + //If length is zero (!) this will be the second byte of the checksum so record it + packetBuf.checksumB = incoming; + } + else if (packetBuf.len == 1) // Check if length is one + { + //The length is one so this is the first byte of the checksum + packetBuf.checksumA = incoming; + } + else // Length is >= 2 so this must be a payload byte + { + packetBuf.payload[1] = incoming; + } + // Now that we have received two payload bytes, we can check for a matching ACK/NACK + if ((activePacketBuffer == SFE_UBLOX_PACKET_PACKETBUF) // If we are not already processing a data packet + && (packetBuf.cls == UBX_CLASS_ACK) // and if this is an ACK/NACK + && (packetBuf.payload[0] == requestedClass) // and if the class matches + && (packetBuf.payload[1] == requestedID)) // and if the ID matches + { + if (packetBuf.len == 2) // Check if .len is 2 + { + // Then this is a matching ACK so copy it into packetAck + activePacketBuffer = SFE_UBLOX_PACKET_PACKETACK; + packetAck.cls = packetBuf.cls; + packetAck.id = packetBuf.id; + packetAck.len = packetBuf.len; + packetAck.counter = packetBuf.counter; + packetAck.payload[0] = packetBuf.payload[0]; + packetAck.payload[1] = packetBuf.payload[1]; + } + else // Length is not 2 (hopefully this is impossible!) + { + if (_printDebug == true) + { + _debugSerial->print(F("process: ACK received with .len != 2: Class: 0x")); + _debugSerial->print(packetBuf.payload[0], HEX); + _debugSerial->print(F(" ID: 0x")); + _debugSerial->print(packetBuf.payload[1], HEX); + _debugSerial->print(F(" len: ")); + _debugSerial->println(packetBuf.len); + } + } + } + } + + //Divert incoming into the correct buffer + if (activePacketBuffer == SFE_UBLOX_PACKET_PACKETACK) + processUBX(incoming, &packetAck, requestedClass, requestedID); + else if (activePacketBuffer == SFE_UBLOX_PACKET_PACKETCFG) + processUBX(incoming, incomingUBX, requestedClass, requestedID); + else // if (activePacketBuffer == SFE_UBLOX_PACKET_PACKETBUF) + processUBX(incoming, &packetBuf, requestedClass, requestedID); + + //Finally, increment the frame counter + ubxFrameCounter++; + } + else if (currentSentence == NMEA) + { + processNMEA(incoming); //Process each NMEA character + } + else if (currentSentence == RTCM) + { + processRTCMframe(incoming); //Deal with RTCM bytes + } +} + +//This is the default or generic NMEA processor. We're only going to pipe the data to serial port so we can see it. +//User could overwrite this function to pipe characters to nmea.process(c) of tinyGPS or MicroNMEA +//Or user could pipe each character to a buffer, radio, etc. +void SFE_UBLOX_GPS::processNMEA(char incoming) +{ + //If user has assigned an output port then pipe the characters there + if (_nmeaOutputPort != NULL) + _nmeaOutputPort->write(incoming); //Echo this byte to the serial port +} + +//We need to be able to identify an RTCM packet and then the length +//so that we know when the RTCM message is completely received and we then start +//listening for other sentences (like NMEA or UBX) +//RTCM packet structure is very odd. I never found RTCM STANDARD 10403.2 but +//http://d1.amobbs.com/bbs_upload782111/files_39/ourdev_635123CK0HJT.pdf is good +//https://dspace.cvut.cz/bitstream/handle/10467/65205/F3-BP-2016-Shkalikava-Anastasiya-Prenos%20polohove%20informace%20prostrednictvim%20datove%20site.pdf?sequence=-1 +//Lead me to: https://forum.u-blox.com/index.php/4348/how-to-read-rtcm-messages-from-neo-m8p +//RTCM 3.2 bytes look like this: +//Byte 0: Always 0xD3 +//Byte 1: 6-bits of zero +//Byte 2: 10-bits of length of this packet including the first two-ish header bytes, + 6. +//byte 3 + 4 bits: Msg type 12 bits +//Example: D3 00 7C 43 F0 ... / 0x7C = 124+6 = 130 bytes in this packet, 0x43F = Msg type 1087 +void SFE_UBLOX_GPS::processRTCMframe(uint8_t incoming) +{ + if (rtcmFrameCounter == 1) + { + rtcmLen = (incoming & 0x03) << 8; //Get the last two bits of this byte. Bits 8&9 of 10-bit length + } + else if (rtcmFrameCounter == 2) + { + rtcmLen |= incoming; //Bits 0-7 of packet length + rtcmLen += 6; //There are 6 additional bytes of what we presume is header, msgType, CRC, and stuff + } + /*else if (rtcmFrameCounter == 3) + { + rtcmMsgType = incoming << 4; //Message Type, MS 4 bits + } + else if (rtcmFrameCounter == 4) + { + rtcmMsgType |= (incoming >> 4); //Message Type, bits 0-7 + }*/ + + rtcmFrameCounter++; + + processRTCM(incoming); //Here is where we expose this byte to the user + + if (rtcmFrameCounter == rtcmLen) + { + //We're done! + currentSentence = NONE; //Reset and start looking for next sentence type + } +} + +//This function is called for each byte of an RTCM frame +//Ths user can overwrite this function and process the RTCM frame as they please +//Bytes can be piped to Serial or other interface. The consumer could be a radio or the internet (Ntrip broadcaster) +void SFE_UBLOX_GPS::processRTCM(uint8_t incoming) +{ + //Radio.sendReliable((String)incoming); //An example of passing this byte to a radio + + //_debugSerial->write(incoming); //An example of passing this byte out the serial port + + //Debug printing + // _debugSerial->print(F(" ")); + // if(incoming < 0x10) _debugSerial->print(F("0")); + // if(incoming < 0x10) _debugSerial->print(F("0")); + // _debugSerial->print(incoming, HEX); + // if(rtcmFrameCounter % 16 == 0) _debugSerial->println(); +} + +//Given a character, file it away into the uxb packet structure +//Set valid to VALID or NOT_VALID once sentence is completely received and passes or fails CRC +//The payload portion of the packet can be 100s of bytes but the max array +//size is MAX_PAYLOAD_SIZE bytes. startingSpot can be set so we only record +//a subset of bytes within a larger packet. +void SFE_UBLOX_GPS::processUBX(uint8_t incoming, ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +{ + //Add all incoming bytes to the rolling checksum + //Stop at len+4 as this is the checksum bytes to that should not be added to the rolling checksum + if (incomingUBX->counter < incomingUBX->len + 4) + addToChecksum(incoming); + + if (incomingUBX->counter == 0) + { + incomingUBX->cls = incoming; + } + else if (incomingUBX->counter == 1) + { + incomingUBX->id = incoming; + } + else if (incomingUBX->counter == 2) //Len LSB + { + incomingUBX->len = incoming; + } + else if (incomingUBX->counter == 3) //Len MSB + { + incomingUBX->len |= incoming << 8; + } + else if (incomingUBX->counter == incomingUBX->len + 4) //ChecksumA + { + incomingUBX->checksumA = incoming; + } + else if (incomingUBX->counter == incomingUBX->len + 5) //ChecksumB + { + incomingUBX->checksumB = incoming; + + currentSentence = NONE; //We're done! Reset the sentence to being looking for a new start char + + //Validate this sentence + if ((incomingUBX->checksumA == rollingChecksumA) && (incomingUBX->checksumB == rollingChecksumB)) + { + incomingUBX->valid = SFE_UBLOX_PACKET_VALIDITY_VALID; // Flag the packet as valid + + // Let's check if the class and ID match the requestedClass and requestedID + // Remember - this could be a data packet or an ACK packet + if ((incomingUBX->cls == requestedClass) && (incomingUBX->id == requestedID)) + { + incomingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_VALID; // If we have a match, set the classAndIDmatch flag to valid + } + + // If this is an ACK then let's check if the class and ID match the requestedClass and requestedID + else if ((incomingUBX->cls == UBX_CLASS_ACK) && (incomingUBX->id == UBX_ACK_ACK) && (incomingUBX->payload[0] == requestedClass) && (incomingUBX->payload[1] == requestedID)) + { + incomingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_VALID; // If we have a match, set the classAndIDmatch flag to valid + } + + // If this is a NACK then let's check if the class and ID match the requestedClass and requestedID + else if ((incomingUBX->cls == UBX_CLASS_ACK) && (incomingUBX->id == UBX_ACK_NACK) && (incomingUBX->payload[0] == requestedClass) && (incomingUBX->payload[1] == requestedID)) + { + incomingUBX->classAndIDmatch = SFE_UBLOX_PACKET_NOTACKNOWLEDGED; // If we have a match, set the classAndIDmatch flag to NOTACKNOWLEDGED + if (_printDebug == true) + { + _debugSerial->print(F("processUBX: NACK received: Requested Class: 0x")); + _debugSerial->print(incomingUBX->payload[0], HEX); + _debugSerial->print(F(" Requested ID: 0x")); + _debugSerial->println(incomingUBX->payload[1], HEX); + } + } + + if (_printDebug == true) + { + _debugSerial->print(F("Incoming: Size: ")); + _debugSerial->print(incomingUBX->len); + _debugSerial->print(F(" Received: ")); + printPacket(incomingUBX); + + if (incomingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID) + { + _debugSerial->println(F("packetCfg now valid")); + } + if (packetAck.valid == SFE_UBLOX_PACKET_VALIDITY_VALID) + { + _debugSerial->println(F("packetAck now valid")); + } + if (incomingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) + { + _debugSerial->println(F("packetCfg classAndIDmatch")); + } + if (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) + { + _debugSerial->println(F("packetAck classAndIDmatch")); + } + } + + //We've got a valid packet, now do something with it but only if ignoreThisPayload is false + if (ignoreThisPayload == false) + { + processUBXpacket(incomingUBX); + } + } + else // Checksum failure + { + incomingUBX->valid = SFE_UBLOX_PACKET_VALIDITY_NOT_VALID; + + // Let's check if the class and ID match the requestedClass and requestedID. + // This is potentially risky as we are saying that we saw the requested Class and ID + // but that the packet checksum failed. Potentially it could be the class or ID bytes + // that caused the checksum error! + if ((incomingUBX->cls == requestedClass) && (incomingUBX->id == requestedID)) + { + incomingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_VALID; // If we have a match, set the classAndIDmatch flag to not valid + } + // If this is an ACK then let's check if the class and ID match the requestedClass and requestedID + else if ((incomingUBX->cls == UBX_CLASS_ACK) && (incomingUBX->payload[0] == requestedClass) && (incomingUBX->payload[1] == requestedID)) + { + incomingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_VALID; // If we have a match, set the classAndIDmatch flag to not valid + } + + if ((_printDebug == true) || (_printLimitedDebug == true)) // Print this if doing limited debugging + { + //Drive an external pin to allow for easier logic analyzation + if (checksumFailurePin >= 0) + { + digitalWrite((uint8_t)checksumFailurePin, LOW); + delay(10); + digitalWrite((uint8_t)checksumFailurePin, HIGH); + } + + _debugSerial->print(F("Checksum failed:")); + _debugSerial->print(F(" checksumA: ")); + _debugSerial->print(incomingUBX->checksumA); + _debugSerial->print(F(" checksumB: ")); + _debugSerial->print(incomingUBX->checksumB); + + _debugSerial->print(F(" rollingChecksumA: ")); + _debugSerial->print(rollingChecksumA); + _debugSerial->print(F(" rollingChecksumB: ")); + _debugSerial->print(rollingChecksumB); + _debugSerial->println(); + + _debugSerial->print(F("Failed : ")); + _debugSerial->print(F("Size: ")); + _debugSerial->print(incomingUBX->len); + _debugSerial->print(F(" Received: ")); + printPacket(incomingUBX); + } + } + } + else //Load this byte into the payload array + { + //If a UBX_NAV_PVT packet comes in asynchronously, we need to fudge the startingSpot + uint16_t startingSpot = incomingUBX->startingSpot; + if (incomingUBX->cls == UBX_CLASS_NAV && incomingUBX->id == UBX_NAV_PVT) + startingSpot = 0; + //Begin recording if counter goes past startingSpot + if ((incomingUBX->counter - 4) >= startingSpot) + { + //Check to see if we have room for this byte + if (((incomingUBX->counter - 4) - startingSpot) < MAX_PAYLOAD_SIZE) //If counter = 208, starting spot = 200, we're good to record. + { + // Check if this is payload data which should be ignored + if (ignoreThisPayload == false) + { + incomingUBX->payload[incomingUBX->counter - 4 - startingSpot] = incoming; //Store this byte into payload array + } + } + } + } + + //Increment the counter + incomingUBX->counter++; + + if (incomingUBX->counter == MAX_PAYLOAD_SIZE) + { + //Something has gone very wrong + currentSentence = NONE; //Reset the sentence to being looking for a new start char + if (_printDebug == true) + { + _debugSerial->println(F("processUBX: counter hit MAX_PAYLOAD_SIZE")); + } + } +} + +//Once a packet has been received and validated, identify this packet's class/id and update internal flags +//Note: if the user requests a PVT or a HPPOSLLH message using a custom packet, the data extraction will +// not work as expected beacuse extractLong etc are hardwired to packetCfg payloadCfg. Ideally +// extractLong etc should be updated so they receive a pointer to the packet buffer. +void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg) +{ + switch (msg->cls) + { + case UBX_CLASS_NAV: + //u-blox8 length == 92 + //u-blox7 length == 84 + if ((msg->id == UBX_NAV_PVT) && ((msg->len == 92) || (msg->len == 84))) + { + //Parse various byte fields into global vars + constexpr int startingSpot = 0; //fixed value used in processUBX + + timeOfWeek = extractLong(0); + gpsMillisecond = extractLong(0) % 1000; //Get last three digits of iTOW + gpsYear = extractInt(4); + gpsMonth = extractByte(6); + gpsDay = extractByte(7); + gpsHour = extractByte(8); + gpsMinute = extractByte(9); + gpsSecond = extractByte(10); + gpsNanosecond = extractLong(16); //Includes milliseconds + + fixType = extractByte(20 - startingSpot); + //Note: the u-blox7 does not support carrSoln. carrierSolution will be zero. + carrierSolution = extractByte(21 - startingSpot) >> 6; //Get 6th&7th bits of this byte + SIV = extractByte(23 - startingSpot); + longitude = extractLong(24 - startingSpot); + latitude = extractLong(28 - startingSpot); + altitude = extractLong(32 - startingSpot); + altitudeMSL = extractLong(36 - startingSpot); + groundSpeed = extractLong(60 - startingSpot); + headingOfMotion = extractLong(64 - startingSpot); + pDOP = extractInt(76 - startingSpot); + + //Mark all datums as fresh (not read before) + moduleQueried.gpsiTOW = true; + moduleQueried.gpsYear = true; + moduleQueried.gpsMonth = true; + moduleQueried.gpsDay = true; + moduleQueried.gpsHour = true; + moduleQueried.gpsMinute = true; + moduleQueried.gpsSecond = true; + moduleQueried.gpsNanosecond = true; + + moduleQueried.all = true; + moduleQueried.longitude = true; + moduleQueried.latitude = true; + moduleQueried.altitude = true; + moduleQueried.altitudeMSL = true; + moduleQueried.SIV = true; + moduleQueried.fixType = true; + moduleQueried.carrierSolution = true; + moduleQueried.groundSpeed = true; + moduleQueried.headingOfMotion = true; + moduleQueried.pDOP = true; + } + else if (msg->id == UBX_NAV_TIMEUTC && msg->len == 20) + { + timeOfWeek = extractLong(0); + gpsMillisecond = extractLong(0) % 1000; //Get last three digits of iTOW + // extractLong(4); // time accuracy estimate + gpsYear = extractInt(12); + gpsMonth = extractByte(14); + gpsDay = extractByte(15); + gpsHour = extractByte(16); + gpsMinute = extractByte(17); + gpsSecond = extractByte(18); + gpsNanosecond = extractLong(8); //Includes milliseconds + uint8_t valid = extractByte(19); + bool gotTime = (valid & 4) ? true : false; // assume all other fields filled once we have TUTC + + //Mark all datums as fresh (not read before) + moduleQueried.gpsiTOW = gotTime; // valid tow + moduleQueried.gpsYear = gotTime; // valid week num + moduleQueried.gpsMonth = gotTime; + moduleQueried.gpsDay = gotTime; // valid UTC + moduleQueried.gpsHour = gotTime; + moduleQueried.gpsMinute = gotTime; + moduleQueried.gpsSecond = gotTime; + moduleQueried.gpsNanosecond = gotTime; + } + else if (msg->id == UBX_NAV_POSLLH && msg->len == 28) + { + timeOfWeek = extractLong(0); + longitude = extractLong(4); + latitude = extractLong(8); + altitude = extractLong(12); + altitudeMSL = extractLong(16); + horizontalAccuracy = extractLong(20); + verticalAccuracy = extractLong(24); + + moduleQueried.gpsiTOW = true; + moduleQueried.longitude = true; + moduleQueried.latitude = true; + moduleQueried.altitude = true; + moduleQueried.altitudeMSL = true; + highResModuleQueried.horizontalAccuracy = true; + highResModuleQueried.verticalAccuracy = true; + } + else if (msg->id == UBX_NAV_HPPOSLLH && msg->len == 36) + { + timeOfWeek = extractLong(4); + highResLongitude = extractLong(8); + highResLatitude = extractLong(12); + elipsoid = extractLong(16); + meanSeaLevel = extractLong(20); + highResLongitudeHp = extractSignedChar(24); + highResLatitudeHp = extractSignedChar(25); + elipsoidHp = extractSignedChar(26); + meanSeaLevelHp = extractSignedChar(27); + horizontalAccuracy = extractLong(28); + verticalAccuracy = extractLong(32); + + highResModuleQueried.all = true; + highResModuleQueried.highResLatitude = true; + highResModuleQueried.highResLatitudeHp = true; + highResModuleQueried.highResLongitude = true; + highResModuleQueried.highResLongitudeHp = true; + highResModuleQueried.elipsoid = true; + highResModuleQueried.elipsoidHp = true; + highResModuleQueried.meanSeaLevel = true; + highResModuleQueried.meanSeaLevelHp = true; + highResModuleQueried.geoidSeparation = true; + highResModuleQueried.horizontalAccuracy = true; + highResModuleQueried.verticalAccuracy = true; + moduleQueried.gpsiTOW = true; // this can arrive via HPPOS too. + + if (_printDebug == true) + { + _debugSerial->print(F("Sec: ")); + _debugSerial->print(((float)extractLong(4)) / 1000.0f); + _debugSerial->print(F(" ")); + _debugSerial->print(F("LON: ")); + _debugSerial->print(((float)(int32_t)extractLong(8)) / 10000000.0f); + _debugSerial->print(F(" ")); + _debugSerial->print(F("LAT: ")); + _debugSerial->print(((float)(int32_t)extractLong(12)) / 10000000.0f); + _debugSerial->print(F(" ")); + _debugSerial->print(F("ELI M: ")); + _debugSerial->print(((float)(int32_t)extractLong(16)) / 1000.0f); + _debugSerial->print(F(" ")); + _debugSerial->print(F("MSL M: ")); + _debugSerial->print(((float)(int32_t)extractLong(20)) / 1000.0f); + _debugSerial->print(F(" ")); + _debugSerial->print(F("LON HP: ")); + _debugSerial->print(extractSignedChar(24)); + _debugSerial->print(F(" ")); + _debugSerial->print(F("LAT HP: ")); + _debugSerial->print(extractSignedChar(25)); + _debugSerial->print(F(" ")); + _debugSerial->print(F("ELI HP: ")); + _debugSerial->print(extractSignedChar(26)); + _debugSerial->print(F(" ")); + _debugSerial->print(F("MSL HP: ")); + _debugSerial->print(extractSignedChar(27)); + _debugSerial->print(F(" ")); + _debugSerial->print(F("HA 2D M: ")); + _debugSerial->print(((float)(int32_t)extractLong(28)) / 10000.0f); + _debugSerial->print(F(" ")); + _debugSerial->print(F("VERT M: ")); + _debugSerial->println(((float)(int32_t)extractLong(32)) / 10000.0f); + } + } + else { + if (_printDebug == true) + { + _debugSerial->print(F("Unexpected nav packet ")); + _debugSerial->println(msg->id); + } + } + break; + } +} + +//Given a packet and payload, send everything including CRC bytes via I2C port +sfe_ublox_status_e SFE_UBLOX_GPS::sendCommand(ubxPacket *outgoingUBX, uint16_t maxWait) +{ + sfe_ublox_status_e retVal = SFE_UBLOX_STATUS_SUCCESS; + + calcChecksum(outgoingUBX); //Sets checksum A and B bytes of the packet + + if (_printDebug == true) + { + _debugSerial->print(F("\nSending: ")); + printPacket(outgoingUBX); + } + + if (commType == COMM_TYPE_I2C) + { + retVal = sendI2cCommand(outgoingUBX, maxWait); + if (retVal != SFE_UBLOX_STATUS_SUCCESS) + { + if (_printDebug == true) + { + _debugSerial->println(F("Send I2C Command failed")); + } + return retVal; + } + } + else if (commType == COMM_TYPE_SERIAL) + { + sendSerialCommand(outgoingUBX); + } + + if (maxWait > 0) + { + //Depending on what we just sent, either we need to look for an ACK or not + if (outgoingUBX->cls == UBX_CLASS_CFG) + { + if (_printDebug == true) + { + _debugSerial->println(F("sendCommand: Waiting for ACK response")); + } + retVal = waitForACKResponse(outgoingUBX, outgoingUBX->cls, outgoingUBX->id, maxWait); //Wait for Ack response + } + else + { + if (_printDebug == true) + { + _debugSerial->println(F("sendCommand: Waiting for No ACK response")); + } + retVal = waitForNoACKResponse(outgoingUBX, outgoingUBX->cls, outgoingUBX->id, maxWait); //Wait for Ack response + } + } + return retVal; +} + +//Returns false if sensor fails to respond to I2C traffic +sfe_ublox_status_e SFE_UBLOX_GPS::sendI2cCommand(ubxPacket *outgoingUBX, uint16_t maxWait) +{ + //Point at 0xFF data register + _i2cPort->beginTransmission((uint8_t)_gpsI2Caddress); //There is no register to write to, we just begin writing data bytes + _i2cPort->write(0xFF); + if (_i2cPort->endTransmission() != 0) //Don't release bus + return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK + + //Write header bytes + _i2cPort->beginTransmission((uint8_t)_gpsI2Caddress); //There is no register to write to, we just begin writing data bytes + _i2cPort->write(UBX_SYNCH_1); //μ - oh ublox, you're funny. I will call you micro-blox from now on. + _i2cPort->write(UBX_SYNCH_2); //b + _i2cPort->write(outgoingUBX->cls); + _i2cPort->write(outgoingUBX->id); + _i2cPort->write(outgoingUBX->len & 0xFF); //LSB + _i2cPort->write(outgoingUBX->len >> 8); //MSB + if (_i2cPort->endTransmission(false) != 0) //Do not release bus + return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK + + //Write payload. Limit the sends into 32 byte chunks + //This code based on ublox: https://forum.u-blox.com/index.php/20528/how-to-use-i2c-to-get-the-nmea-frames + uint16_t bytesToSend = outgoingUBX->len; + + //"The number of data bytes must be at least 2 to properly distinguish + //from the write access to set the address counter in random read accesses." + uint16_t startSpot = 0; + while (bytesToSend > 1) + { + uint8_t len = bytesToSend; + if (len > I2C_BUFFER_LENGTH) + len = I2C_BUFFER_LENGTH; + + _i2cPort->beginTransmission((uint8_t)_gpsI2Caddress); + //_i2cPort->write(outgoingUBX->payload, len); //Write a portion of the payload to the bus + + for (uint16_t x = 0; x < len; x++) + _i2cPort->write(outgoingUBX->payload[startSpot + x]); //Write a portion of the payload to the bus + + if (_i2cPort->endTransmission(false) != 0) //Don't release bus + return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK + + //*outgoingUBX->payload += len; //Move the pointer forward + startSpot += len; //Move the pointer forward + bytesToSend -= len; + } + + //Write checksum + _i2cPort->beginTransmission((uint8_t)_gpsI2Caddress); + if (bytesToSend == 1) + _i2cPort->write(outgoingUBX->payload, 1); + _i2cPort->write(outgoingUBX->checksumA); + _i2cPort->write(outgoingUBX->checksumB); + + //All done transmitting bytes. Release bus. + if (_i2cPort->endTransmission() != 0) + return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK + return (SFE_UBLOX_STATUS_SUCCESS); +} + +//Given a packet and payload, send everything including CRC bytesA via Serial port +void SFE_UBLOX_GPS::sendSerialCommand(ubxPacket *outgoingUBX) +{ + //Write header bytes + _serialPort->write(UBX_SYNCH_1); //μ - oh ublox, you're funny. I will call you micro-blox from now on. + _serialPort->write(UBX_SYNCH_2); //b + _serialPort->write(outgoingUBX->cls); + _serialPort->write(outgoingUBX->id); + _serialPort->write(outgoingUBX->len & 0xFF); //LSB + _serialPort->write(outgoingUBX->len >> 8); //MSB + + //Write payload. + for (int i = 0; i < outgoingUBX->len; i++) + { + _serialPort->write(outgoingUBX->payload[i]); + } + + //Write checksum + _serialPort->write(outgoingUBX->checksumA); + _serialPort->write(outgoingUBX->checksumB); +} + +//Returns true if I2C device ack's +boolean SFE_UBLOX_GPS::isConnected(uint16_t maxWait) +{ + if (commType == COMM_TYPE_I2C) + { + _i2cPort->beginTransmission((uint8_t)_gpsI2Caddress); + if (_i2cPort->endTransmission() != 0) + return false; //Sensor did not ack + } + + // Query navigation rate to see whether we get a meaningful response + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RATE; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_RECEIVED); // We are polling the RATE so we expect data and an ACK +} + +//Given a message, calc and store the two byte "8-Bit Fletcher" checksum over the entirety of the message +//This is called before we send a command message +void SFE_UBLOX_GPS::calcChecksum(ubxPacket *msg) +{ + msg->checksumA = 0; + msg->checksumB = 0; + + msg->checksumA += msg->cls; + msg->checksumB += msg->checksumA; + + msg->checksumA += msg->id; + msg->checksumB += msg->checksumA; + + msg->checksumA += (msg->len & 0xFF); + msg->checksumB += msg->checksumA; + + msg->checksumA += (msg->len >> 8); + msg->checksumB += msg->checksumA; + + for (uint16_t i = 0; i < msg->len; i++) + { + msg->checksumA += msg->payload[i]; + msg->checksumB += msg->checksumA; + } +} + +//Given a message and a byte, add to rolling "8-Bit Fletcher" checksum +//This is used when receiving messages from module +void SFE_UBLOX_GPS::addToChecksum(uint8_t incoming) +{ + rollingChecksumA += incoming; + rollingChecksumB += rollingChecksumA; +} + +//Pretty prints the current ubxPacket +void SFE_UBLOX_GPS::printPacket(ubxPacket *packet) +{ + if (_printDebug == true) + { + _debugSerial->print(F("CLS:")); + if (packet->cls == UBX_CLASS_NAV) //1 + _debugSerial->print(F("NAV")); + else if (packet->cls == UBX_CLASS_ACK) //5 + _debugSerial->print(F("ACK")); + else if (packet->cls == UBX_CLASS_CFG) //6 + _debugSerial->print(F("CFG")); + else if (packet->cls == UBX_CLASS_MON) //0x0A + _debugSerial->print(F("MON")); + else + { + _debugSerial->print(F("0x")); + _debugSerial->print(packet->cls, HEX); + } + + _debugSerial->print(F(" ID:")); + if (packet->cls == UBX_CLASS_NAV && packet->id == UBX_NAV_PVT) + _debugSerial->print(F("PVT")); + else if (packet->cls == UBX_CLASS_CFG && packet->id == UBX_CFG_RATE) + _debugSerial->print(F("RATE")); + else if (packet->cls == UBX_CLASS_CFG && packet->id == UBX_CFG_CFG) + _debugSerial->print(F("SAVE")); + else + { + _debugSerial->print(F("0x")); + _debugSerial->print(packet->id, HEX); + } + + _debugSerial->print(F(" Len: 0x")); + _debugSerial->print(packet->len, HEX); + + // Only print the payload is ignoreThisPayload is false otherwise + // we could be printing gibberish from beyond the end of packetBuf + if (ignoreThisPayload == false) + { + _debugSerial->print(F(" Payload:")); + + for (int x = 0; x < packet->len; x++) + { + _debugSerial->print(F(" ")); + _debugSerial->print(packet->payload[x], HEX); + } + } + else + { + _debugSerial->print(F(" Payload: IGNORED")); + } + _debugSerial->println(); + } +} + +//=-=-=-=-=-=-=-= Specific commands =-=-=-=-=-=-=-==-=-=-=-=-=-=-= +//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +//When messages from the class CFG are sent to the receiver, the receiver will send an "acknowledge"(UBX - ACK - ACK) or a +//"not acknowledge"(UBX-ACK-NAK) message back to the sender, depending on whether or not the message was processed correctly. +//Some messages from other classes also use the same acknowledgement mechanism. + +//When we poll or get a setting, we will receive _both_ a config packet and an ACK +//If the poll or get request is not valid, we will receive _only_ a NACK + +//If we are trying to get or poll a setting, then packetCfg.len will be 0 or 1 when the packetCfg is _sent_. +//If we poll the setting for a particular port using UBX-CFG-PRT then .len will be 1 initially +//For all other gets or polls, .len will be 0 initially +//(It would be possible for .len to be 2 _if_ we were using UBX-CFG-MSG to poll the settings for a particular message - but we don't use that (currently)) + +//If the get or poll _fails_, i.e. is NACK'd, then packetCfg.len could still be 0 or 1 after the NACK is received +//But if the get or poll is ACK'd, then packetCfg.len will have been updated by the incoming data and will always be at least 2 + +//If we are going to set the value for a setting, then packetCfg.len will be at least 3 when the packetCfg is _sent_. +//(UBX-CFG-MSG appears to have the shortest set length of 3 bytes) + +//We need to think carefully about how interleaved PVT packets affect things. +//It is entirely possible that our packetCfg and packetAck were received successfully +//but while we are still in the "if (checkUblox() == true)" loop a PVT packet is processed +//or _starts_ to arrive (remember that Serial data can arrive very slowly). + +//Returns SFE_UBLOX_STATUS_DATA_RECEIVED if we got an ACK and a valid packetCfg (module is responding with register content) +//Returns SFE_UBLOX_STATUS_DATA_SENT if we got an ACK and no packetCfg (no valid packetCfg needed, module absorbs new register data) +//Returns SFE_UBLOX_STATUS_FAIL if something very bad happens (e.g. a double checksum failure) +//Returns SFE_UBLOX_STATUS_COMMAND_NACK if the packet was not-acknowledged (NACK) +//Returns SFE_UBLOX_STATUS_CRC_FAIL if we had a checksum failure +//Returns SFE_UBLOX_STATUS_TIMEOUT if we timed out +//Returns SFE_UBLOX_STATUS_DATA_OVERWRITTEN if we got an ACK and a valid packetCfg but that the packetCfg has been +// or is currently being overwritten (remember that Serial data can arrive very slowly) +sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(ubxPacket *outgoingUBX, uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime) +{ + outgoingUBX->valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; //This will go VALID (or NOT_VALID) when we receive a response to the packet we sent + packetAck.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + packetBuf.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + outgoingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; // This will go VALID (or NOT_VALID) when we receive a packet that matches the requested class and ID + packetAck.classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + packetBuf.classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + + unsigned long startTime = millis(); + while (millis() - startTime < maxTime) + { + if (checkUbloxInternal(outgoingUBX, requestedClass, requestedID) == true) //See if new data is available. Process bytes as they come in. + { + // If both the outgoingUBX->classAndIDmatch and packetAck.classAndIDmatch are VALID + // and outgoingUBX->valid is _still_ VALID and the class and ID _still_ match + // then we can be confident that the data in outgoingUBX is valid + if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->cls == requestedClass) && (outgoingUBX->id == requestedID)) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: valid data and valid ACK received after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_DATA_RECEIVED); //We received valid data and a correct ACK! + } + + // We can be confident that the data packet (if we are going to get one) will always arrive + // before the matching ACK. So if we sent a config packet which only produces an ACK + // then outgoingUBX->classAndIDmatch will be NOT_DEFINED and the packetAck.classAndIDmatch will VALID. + // We should not check outgoingUBX->valid, outgoingUBX->cls or outgoingUBX->id + // as these may have been changed by a PVT packet. + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID)) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: no data and valid ACK after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_DATA_SENT); //We got an ACK but no data... + } + + // If both the outgoingUBX->classAndIDmatch and packetAck.classAndIDmatch are VALID + // but the outgoingUBX->cls or ID no longer match then we can be confident that we had + // valid data but it has been or is currently being overwritten by another packet (e.g. PVT). + // If (e.g.) a PVT packet is _being_ received: outgoingUBX->valid will be NOT_DEFINED + // If (e.g.) a PVT packet _has been_ received: outgoingUBX->valid will be VALID (or just possibly NOT_VALID) + // So we cannot use outgoingUBX->valid as part of this check. + // Note: the addition of packetBuf should make this check redundant! + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && !((outgoingUBX->cls != requestedClass) || (outgoingUBX->id != requestedID))) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: data being OVERWRITTEN after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_DATA_OVERWRITTEN); // Data was valid but has been or is being overwritten + } + + // If packetAck.classAndIDmatch is VALID but both outgoingUBX->valid and outgoingUBX->classAndIDmatch + // are NOT_VALID then we can be confident we have had a checksum failure on the data packet + else if ((packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID)) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: CRC failed after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_CRC_FAIL); //Checksum fail + } + + // If our packet was not-acknowledged (NACK) we do not receive a data packet - we only get the NACK. + // So you would expect outgoingUBX->valid and outgoingUBX->classAndIDmatch to still be NOT_DEFINED + // But if a full PVT packet arrives afterwards outgoingUBX->valid could be VALID (or just possibly NOT_VALID) + // but outgoingUBX->cls and outgoingUBX->id would not match... + // So I think this is telling us we need a special state for packetAck.classAndIDmatch to tell us + // the packet was definitely NACK'd otherwise we are possibly just guessing... + // Note: the addition of packetBuf changes the logic of this, but we'll leave the code as is for now. + else if (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_NOTACKNOWLEDGED) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: data was NOTACKNOWLEDGED (NACK) after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_COMMAND_NACK); //We received a NACK! + } + + // If the outgoingUBX->classAndIDmatch is VALID but the packetAck.classAndIDmatch is NOT_VALID + // then the ack probably had a checksum error. We will take a gamble and return DATA_RECEIVED. + // If we were playing safe, we should return FAIL instead + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->cls == requestedClass) && (outgoingUBX->id == requestedID)) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: VALID data and INVALID ACK received after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_DATA_RECEIVED); //We received valid data and an invalid ACK! + } + + // If the outgoingUBX->classAndIDmatch is NOT_VALID and the packetAck.classAndIDmatch is NOT_VALID + // then we return a FAIL. This must be a double checksum failure? + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID)) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: INVALID data and INVALID ACK received after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_FAIL); //We received invalid data and an invalid ACK! + } + + // If the outgoingUBX->classAndIDmatch is VALID and the packetAck.classAndIDmatch is NOT_DEFINED + // then the ACK has not yet been received and we should keep waiting for it + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED)) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: valid data after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec. Waiting for ACK.")); + } + } + + } //checkUbloxInternal == true + + delayMicroseconds(500); + } //while (millis() - startTime < maxTime) + + // We have timed out... + // If the outgoingUBX->classAndIDmatch is VALID then we can take a gamble and return DATA_RECEIVED + // even though we did not get an ACK + if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->cls == requestedClass) && (outgoingUBX->id == requestedID)) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: TIMEOUT with valid data after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec. ")); + } + return (SFE_UBLOX_STATUS_DATA_RECEIVED); //We received valid data... But no ACK! + } + + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: TIMEOUT after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec.")); + } + + return (SFE_UBLOX_STATUS_TIMEOUT); +} + +//For non-CFG queries no ACK is sent so we use this function +//Returns SFE_UBLOX_STATUS_DATA_RECEIVED if we got a config packet full of response data that has CLS/ID match to our query packet +//Returns SFE_UBLOX_STATUS_CRC_FAIL if we got a corrupt config packet that has CLS/ID match to our query packet +//Returns SFE_UBLOX_STATUS_TIMEOUT if we timed out +//Returns SFE_UBLOX_STATUS_DATA_OVERWRITTEN if we got an a valid packetCfg but that the packetCfg has been +// or is currently being overwritten (remember that Serial data can arrive very slowly) +sfe_ublox_status_e SFE_UBLOX_GPS::waitForNoACKResponse(ubxPacket *outgoingUBX, uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime) +{ + outgoingUBX->valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; //This will go VALID (or NOT_VALID) when we receive a response to the packet we sent + packetAck.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + packetBuf.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + outgoingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; // This will go VALID (or NOT_VALID) when we receive a packet that matches the requested class and ID + packetAck.classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + packetBuf.classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + + unsigned long startTime = millis(); + while (millis() - startTime < maxTime) + { + if (checkUbloxInternal(outgoingUBX, requestedClass, requestedID) == true) //See if new data is available. Process bytes as they come in. + { + + // If outgoingUBX->classAndIDmatch is VALID + // and outgoingUBX->valid is _still_ VALID and the class and ID _still_ match + // then we can be confident that the data in outgoingUBX is valid + if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->cls == requestedClass) && (outgoingUBX->id == requestedID)) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForNoACKResponse: valid data with CLS/ID match after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_DATA_RECEIVED); //We received valid data! + } + + // If the outgoingUBX->classAndIDmatch is VALID + // but the outgoingUBX->cls or ID no longer match then we can be confident that we had + // valid data but it has been or is currently being overwritten by another packet (e.g. PVT). + // If (e.g.) a PVT packet is _being_ received: outgoingUBX->valid will be NOT_DEFINED + // If (e.g.) a PVT packet _has been_ received: outgoingUBX->valid will be VALID (or just possibly NOT_VALID) + // So we cannot use outgoingUBX->valid as part of this check. + // Note: the addition of packetBuf should make this check redundant! + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && !((outgoingUBX->cls != requestedClass) || (outgoingUBX->id != requestedID))) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForNoACKResponse: data being OVERWRITTEN after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_DATA_OVERWRITTEN); // Data was valid but has been or is being overwritten + } + + // If outgoingUBX->classAndIDmatch is NOT_DEFINED + // and outgoingUBX->valid is VALID then this must be (e.g.) a PVT packet + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID)) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForNoACKResponse: valid but UNWANTED data after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->print(F(" msec. Class: ")); + _debugSerial->print(outgoingUBX->cls); + _debugSerial->print(F(" ID: ")); + _debugSerial->print(outgoingUBX->id); + } + } + + // If the outgoingUBX->classAndIDmatch is NOT_VALID then we return CRC failure + else if (outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForNoACKResponse: CLS/ID match but failed CRC after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_CRC_FAIL); //We received invalid data + } + } + + delayMicroseconds(500); + } + + if (_printDebug == true) + { + _debugSerial->print(F("waitForNoACKResponse: TIMEOUT after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec. No packet received.")); + } + + return (SFE_UBLOX_STATUS_TIMEOUT); +} + +//Save current configuration to flash and BBR (battery backed RAM) +//This still works but it is the old way of configuring ublox modules. See getVal and setVal for the new methods +boolean SFE_UBLOX_GPS::saveConfiguration(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_CFG; + packetCfg.len = 12; + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint8_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + packetCfg.payload[4] = 0xFF; //Set any bit in the saveMask field to save current config to Flash and BBR + packetCfg.payload[5] = 0xFF; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Save the selected configuration sub-sections to flash and BBR (battery backed RAM) +//This still works but it is the old way of configuring ublox modules. See getVal and setVal for the new methods +boolean SFE_UBLOX_GPS::saveConfigSelective(uint32_t configMask, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_CFG; + packetCfg.len = 12; + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint8_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + packetCfg.payload[4] = configMask & 0xFF; //Set the appropriate bits in the saveMask field to save current config to Flash and BBR + packetCfg.payload[5] = (configMask >> 8) & 0xFF; + packetCfg.payload[6] = (configMask >> 16) & 0xFF; + packetCfg.payload[7] = (configMask >> 24) & 0xFF; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Reset module to factory defaults +//This still works but it is the old way of configuring ublox modules. See getVal and setVal for the new methods +boolean SFE_UBLOX_GPS::factoryDefault(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_CFG; + packetCfg.len = 12; + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint8_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + packetCfg.payload[0] = 0xFF; //Set any bit in the clearMask field to clear saved config + packetCfg.payload[1] = 0xFF; + packetCfg.payload[8] = 0xFF; //Set any bit in the loadMask field to discard current config and rebuild from lower non-volatile memory layers + packetCfg.payload[9] = 0xFF; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Given a group, ID and size, return the value of this config spot +//The 32-bit key is put together from group/ID/size. See other getVal to send key directly. +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::getVal8(uint16_t group, uint16_t id, uint8_t size, uint8_t layer, uint16_t maxWait) +{ + //Create key + uint32_t key = 0; + key |= (uint32_t)id; + key |= (uint32_t)group << 16; + key |= (uint32_t)size << 28; + + if (_printDebug == true) + { + _debugSerial->print(F("key: 0x")); + _debugSerial->print(key, HEX); + _debugSerial->println(); + } + + return getVal8(key, layer, maxWait); +} + +//Given a key, return its value +//This function takes a full 32-bit key +//Default layer is BBR +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::getVal8(uint32_t key, uint8_t layer, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALGET; + packetCfg.len = 4 + 4 * 1; //While multiple keys are allowed, we will send only one key at a time + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint8_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + //VALGET uses different memory layer definitions to VALSET + //because it can only return the value for one layer. + //So we need to fiddle the layer here. + //And just to complicate things further, the ZED-F9P only responds + //correctly to layer 0 (RAM) and layer 7 (Default)! + uint8_t getLayer = 7; // 7 is the "Default Layer" + if ((layer & VAL_LAYER_RAM) == VAL_LAYER_RAM) // Did the user request the RAM layer? + { + getLayer = 0; // Layer 0 is RAM + } + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = getLayer; //Layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + if (_printDebug == true) + { + _debugSerial->print(F("key: 0x")); + _debugSerial->print(key, HEX); + _debugSerial->println(); + } + + //Send VALGET command with this key + + sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait); + if (_printDebug == true) + { + _debugSerial->print(F("getVal8: sendCommand returned: ")); + _debugSerial->println(statusString(retVal)); + } + if (retVal != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (0); //If command send fails then bail + + //Verify the response is the correct length as compared to what the user called (did the module respond with 8-bits but the user called getVal32?) + //Response is 8 bytes plus cfg data + //if(packet->len > 8+1) + + //Pull the requested value from the response + //Response starts at 4+1*N with the 32-bit key so the actual data we're looking for is at 8+1*N + return (extractByte(8)); +} + +//Given a key, set a 16-bit value +//This function takes a full 32-bit key +//Default layer is BBR +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::setVal(uint32_t key, uint16_t value, uint8_t layer, uint16_t maxWait) +{ + return setVal16(key, value, layer, maxWait); +} + +//Given a key, set a 16-bit value +//This function takes a full 32-bit key +//Default layer is BBR +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::setVal16(uint32_t key, uint16_t value, uint8_t layer, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 2; //4 byte header, 4 byte key ID, 2 bytes of value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value >> 8 * 0; //Value LSB + payloadCfg[9] = value >> 8 * 1; + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Given a key, set an 8-bit value +//This function takes a full 32-bit key +//Default layer is BBR +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::setVal8(uint32_t key, uint8_t value, uint8_t layer, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 1; //4 byte header, 4 byte key ID, 1 byte value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value; //Value + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Given a key, set a 32-bit value +//This function takes a full 32-bit key +//Default layer is BBR +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::setVal32(uint32_t key, uint32_t value, uint8_t layer, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 4; //4 byte header, 4 byte key ID, 4 bytes of value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value >> 8 * 0; //Value LSB + payloadCfg[9] = value >> 8 * 1; + payloadCfg[10] = value >> 8 * 2; + payloadCfg[11] = value >> 8 * 3; + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Start defining a new UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 32-bit value +//Default layer is BBR +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::newCfgValset32(uint32_t key, uint32_t value, uint8_t layer) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 4; //4 byte header, 4 byte key ID, 4 bytes of value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < MAX_PAYLOAD_SIZE; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value >> 8 * 0; //Value LSB + payloadCfg[9] = value >> 8 * 1; + payloadCfg[10] = value >> 8 * 2; + payloadCfg[11] = value >> 8 * 3; + + //All done + return (true); +} + +//Start defining a new UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 16-bit value +//Default layer is BBR +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::newCfgValset16(uint32_t key, uint16_t value, uint8_t layer) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 2; //4 byte header, 4 byte key ID, 2 bytes of value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < MAX_PAYLOAD_SIZE; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value >> 8 * 0; //Value LSB + payloadCfg[9] = value >> 8 * 1; + + //All done + return (true); +} + +//Start defining a new UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 8-bit value +//Default layer is BBR +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::newCfgValset8(uint32_t key, uint8_t value, uint8_t layer) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 1; //4 byte header, 4 byte key ID, 1 byte value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < MAX_PAYLOAD_SIZE; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value; //Value + + //All done + return (true); +} + +//Add another keyID and value to an existing UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 32-bit value +uint8_t SFE_UBLOX_GPS::addCfgValset32(uint32_t key, uint32_t value) +{ + //Load key into outgoing payload + payloadCfg[packetCfg.len + 0] = key >> 8 * 0; //Key LSB + payloadCfg[packetCfg.len + 1] = key >> 8 * 1; + payloadCfg[packetCfg.len + 2] = key >> 8 * 2; + payloadCfg[packetCfg.len + 3] = key >> 8 * 3; + + //Load user's value + payloadCfg[packetCfg.len + 4] = value >> 8 * 0; //Value LSB + payloadCfg[packetCfg.len + 5] = value >> 8 * 1; + payloadCfg[packetCfg.len + 6] = value >> 8 * 2; + payloadCfg[packetCfg.len + 7] = value >> 8 * 3; + + //Update packet length: 4 byte key ID, 4 bytes of value + packetCfg.len = packetCfg.len + 4 + 4; + + //All done + return (true); +} + +//Add another keyID and value to an existing UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 16-bit value +uint8_t SFE_UBLOX_GPS::addCfgValset16(uint32_t key, uint16_t value) +{ + //Load key into outgoing payload + payloadCfg[packetCfg.len + 0] = key >> 8 * 0; //Key LSB + payloadCfg[packetCfg.len + 1] = key >> 8 * 1; + payloadCfg[packetCfg.len + 2] = key >> 8 * 2; + payloadCfg[packetCfg.len + 3] = key >> 8 * 3; + + //Load user's value + payloadCfg[packetCfg.len + 4] = value >> 8 * 0; //Value LSB + payloadCfg[packetCfg.len + 5] = value >> 8 * 1; + + //Update packet length: 4 byte key ID, 2 bytes of value + packetCfg.len = packetCfg.len + 4 + 2; + + //All done + return (true); +} + +//Add another keyID and value to an existing UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 8-bit value +uint8_t SFE_UBLOX_GPS::addCfgValset8(uint32_t key, uint8_t value) +{ + //Load key into outgoing payload + payloadCfg[packetCfg.len + 0] = key >> 8 * 0; //Key LSB + payloadCfg[packetCfg.len + 1] = key >> 8 * 1; + payloadCfg[packetCfg.len + 2] = key >> 8 * 2; + payloadCfg[packetCfg.len + 3] = key >> 8 * 3; + + //Load user's value + payloadCfg[packetCfg.len + 4] = value; //Value + + //Update packet length: 4 byte key ID, 1 byte value + packetCfg.len = packetCfg.len + 4 + 1; + + //All done + return (true); +} + +//Add a final keyID and value to an existing UBX-CFG-VALSET ubxPacket and send it +//This function takes a full 32-bit key and 32-bit value +uint8_t SFE_UBLOX_GPS::sendCfgValset32(uint32_t key, uint32_t value, uint16_t maxWait) +{ + //Load keyID and value into outgoing payload + addCfgValset32(key, value); + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Add a final keyID and value to an existing UBX-CFG-VALSET ubxPacket and send it +//This function takes a full 32-bit key and 16-bit value +uint8_t SFE_UBLOX_GPS::sendCfgValset16(uint32_t key, uint16_t value, uint16_t maxWait) +{ + //Load keyID and value into outgoing payload + addCfgValset16(key, value); + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Add a final keyID and value to an existing UBX-CFG-VALSET ubxPacket and send it +//This function takes a full 32-bit key and 8-bit value +uint8_t SFE_UBLOX_GPS::sendCfgValset8(uint32_t key, uint8_t value, uint16_t maxWait) +{ + //Load keyID and value into outgoing payload + addCfgValset8(key, value); + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Get the current TimeMode3 settings - these contain survey in statuses +boolean SFE_UBLOX_GPS::getSurveyMode(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_TMODE3; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_RECEIVED); // We are expecting data and an ACK +} + +//Control Survey-In for NEO-M8P +boolean SFE_UBLOX_GPS::setSurveyMode(uint8_t mode, uint16_t observationTime, float requiredAccuracy, uint16_t maxWait) +{ + if (getSurveyMode(maxWait) == false) //Ask module for the current TimeMode3 settings. Loads into payloadCfg. + return (false); + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_TMODE3; + packetCfg.len = 40; + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint8_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + //payloadCfg should be loaded with poll response. Now modify only the bits we care about + payloadCfg[2] = mode; //Set mode. Survey-In and Disabled are most common. Use ECEF (not LAT/LON/ALT). + + //svinMinDur is U4 (uint32_t) but we'll only use a uint16_t (waiting more than 65535 seconds seems excessive!) + payloadCfg[24] = observationTime & 0xFF; //svinMinDur in seconds + payloadCfg[25] = observationTime >> 8; //svinMinDur in seconds + payloadCfg[26] = 0; //Truncate to 16 bits + payloadCfg[27] = 0; //Truncate to 16 bits + + //svinAccLimit is U4 (uint32_t) in 0.1mm. + uint32_t svinAccLimit = (uint32_t)(requiredAccuracy * 10000.0); //Convert m to 0.1mm + payloadCfg[28] = svinAccLimit & 0xFF; //svinAccLimit in 0.1mm increments + payloadCfg[29] = svinAccLimit >> 8; + payloadCfg[30] = svinAccLimit >> 16; + payloadCfg[31] = svinAccLimit >> 24; + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Begin Survey-In for NEO-M8P +boolean SFE_UBLOX_GPS::enableSurveyMode(uint16_t observationTime, float requiredAccuracy, uint16_t maxWait) +{ + return (setSurveyMode(SVIN_MODE_ENABLE, observationTime, requiredAccuracy, maxWait)); +} + +//Stop Survey-In for NEO-M8P +boolean SFE_UBLOX_GPS::disableSurveyMode(uint16_t maxWait) +{ + return (setSurveyMode(SVIN_MODE_DISABLE, 0, 0, maxWait)); +} + +//Reads survey in status and sets the global variables +//for status, position valid, observation time, and mean 3D StdDev +//Returns true if commands was successful +boolean SFE_UBLOX_GPS::getSurveyStatus(uint16_t maxWait) +{ + //Reset variables + svin.active = false; + svin.valid = false; + svin.observationTime = 0; + svin.meanAccuracy = 0; + + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_SVIN; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if ((sendCommand(&packetCfg, maxWait)) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); //If command send fails then bail + + //We got a response, now parse the bits into the svin structure + + //dur (Passed survey-in observation time) is U4 (uint32_t) seconds. We truncate to 16 bits + //(waiting more than 65535 seconds (18.2 hours) seems excessive!) + uint32_t tmpObsTime = extractLong(8); + if (tmpObsTime <= 0xFFFF) + { + svin.observationTime = (uint16_t)tmpObsTime; + } + else + { + svin.observationTime = 0xFFFF; + } + + // meanAcc is U4 (uint32_t) in 0.1mm. We convert this to float. + uint32_t tempFloat = extractLong(28); + svin.meanAccuracy = ((float)tempFloat) / 10000.0; //Convert 0.1mm to m + + svin.valid = payloadCfg[36]; //1 if survey-in position is valid, 0 otherwise + svin.active = payloadCfg[37]; //1 if survey-in in progress, 0 otherwise + + return (true); +} + +//Loads the payloadCfg array with the current protocol bits located the UBX-CFG-PRT register for a given port +boolean SFE_UBLOX_GPS::getPortSettings(uint8_t portID, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_PRT; + packetCfg.len = 1; + packetCfg.startingSpot = 0; + + payloadCfg[0] = portID; + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_RECEIVED); // We are expecting data and an ACK +} + +//Configure a given port to output UBX, NMEA, RTCM3 or a combination thereof +//Port 0=I2c, 1=UART1, 2=UART2, 3=USB, 4=SPI +//Bit:0 = UBX, :1=NMEA, :5=RTCM3 +boolean SFE_UBLOX_GPS::setPortOutput(uint8_t portID, uint8_t outStreamSettings, uint16_t maxWait) +{ + //Get the current config values for this port ID + if (getPortSettings(portID, maxWait) == false) + return (false); //Something went wrong. Bail. + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_PRT; + packetCfg.len = 20; + packetCfg.startingSpot = 0; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[14] = outStreamSettings; //OutProtocolMask LSB - Set outStream bits + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Configure a given port to input UBX, NMEA, RTCM3 or a combination thereof +//Port 0=I2c, 1=UART1, 2=UART2, 3=USB, 4=SPI +//Bit:0 = UBX, :1=NMEA, :5=RTCM3 +boolean SFE_UBLOX_GPS::setPortInput(uint8_t portID, uint8_t inStreamSettings, uint16_t maxWait) +{ + //Get the current config values for this port ID + //This will load the payloadCfg array with current port settings + if (getPortSettings(portID, maxWait) == false) + return (false); //Something went wrong. Bail. + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_PRT; + packetCfg.len = 20; + packetCfg.startingSpot = 0; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[12] = inStreamSettings; //InProtocolMask LSB - Set inStream bits + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Configure a port to output UBX, NMEA, RTCM3 or a combination thereof +boolean SFE_UBLOX_GPS::setI2COutput(uint8_t comSettings, uint16_t maxWait) +{ + return (setPortOutput(COM_PORT_I2C, comSettings, maxWait)); +} +boolean SFE_UBLOX_GPS::setUART1Output(uint8_t comSettings, uint16_t maxWait) +{ + return (setPortOutput(COM_PORT_UART1, comSettings, maxWait)); +} +boolean SFE_UBLOX_GPS::setUART2Output(uint8_t comSettings, uint16_t maxWait) +{ + return (setPortOutput(COM_PORT_UART2, comSettings, maxWait)); +} +boolean SFE_UBLOX_GPS::setUSBOutput(uint8_t comSettings, uint16_t maxWait) +{ + return (setPortOutput(COM_PORT_USB, comSettings, maxWait)); +} +boolean SFE_UBLOX_GPS::setSPIOutput(uint8_t comSettings, uint16_t maxWait) +{ + return (setPortOutput(COM_PORT_SPI, comSettings, maxWait)); +} + +//Set the rate at which the module will give us an updated navigation solution +//Expects a number that is the updates per second. For example 1 = 1Hz, 2 = 2Hz, etc. +//Max is 40Hz(?!) +boolean SFE_UBLOX_GPS::setNavigationFrequency(uint8_t navFreq, uint16_t maxWait) +{ + //if(updateRate > 40) updateRate = 40; //Not needed: module will correct out of bounds values + + //Adjust the I2C polling timeout based on update rate + i2cPollingWait = 1000 / (navFreq * 4); //This is the number of ms to wait between checks for new I2C data + + //Query the module for the latest lat/long + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RATE; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //This will load the payloadCfg array with current settings of the given register + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); //If command send fails then bail + + uint16_t measurementRate = 1000 / navFreq; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[0] = measurementRate & 0xFF; //measRate LSB + payloadCfg[1] = measurementRate >> 8; //measRate MSB + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Get the rate at which the module is outputting nav solutions +uint8_t SFE_UBLOX_GPS::getNavigationFrequency(uint16_t maxWait) +{ + //Query the module for the latest lat/long + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RATE; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //This will load the payloadCfg array with current settings of the given register + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); //If command send fails then bail + + uint16_t measurementRate = 0; + + //payloadCfg is now loaded with current bytes. Get what we need + measurementRate = extractInt(0); //Pull from payloadCfg at measRate LSB + + measurementRate = 1000 / measurementRate; //This may return an int when it's a float, but I'd rather not return 4 bytes + return (measurementRate); +} + +//In case no config access to the GPS is possible and PVT is send cyclically already +//set config to suitable parameters +boolean SFE_UBLOX_GPS::assumeAutoPVT(boolean enabled, boolean implicitUpdate) +{ + boolean changes = autoPVT != enabled || autoPVTImplicitUpdate != implicitUpdate; + if (changes) + { + autoPVT = enabled; + autoPVTImplicitUpdate = implicitUpdate; + } + return changes; +} + +//Enable or disable automatic navigation message generation by the GPS. This changes the way getPVT +//works. +boolean SFE_UBLOX_GPS::setAutoPVT(boolean enable, uint16_t maxWait) +{ + return setAutoPVT(enable, true, maxWait); +} + +//Enable or disable automatic navigation message generation by the GPS. This changes the way getPVT +//works. +boolean SFE_UBLOX_GPS::setAutoPVT(boolean enable, boolean implicitUpdate, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_MSG; + packetCfg.len = 3; + packetCfg.startingSpot = 0; + payloadCfg[0] = UBX_CLASS_NAV; + payloadCfg[1] = UBX_NAV_PVT; + payloadCfg[2] = enable ? 1 : 0; // rate relative to navigation freq. + + boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + if (ok) + { + autoPVT = enable; + autoPVTImplicitUpdate = implicitUpdate; + } + moduleQueried.all = false; + return ok; +} + +//Configure a given message type for a given port (UART1, I2C, SPI, etc) +boolean SFE_UBLOX_GPS::configureMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t sendRate, uint16_t maxWait) +{ + //Poll for the current settings for a given message + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_MSG; + packetCfg.len = 2; + packetCfg.startingSpot = 0; + + payloadCfg[0] = msgClass; + payloadCfg[1] = msgID; + + //This will load the payloadCfg array with current settings of the given register + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); //If command send fails then bail + + //Now send it back with new mods + packetCfg.len = 8; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[2 + portID] = sendRate; //Send rate is relative to the event a message is registered on. For example, if the rate of a navigation message is set to 2, the message is sent every 2nd navigation solution. + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Enable a given message type, default of 1 per update rate (usually 1 per second) +boolean SFE_UBLOX_GPS::enableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t rate, uint16_t maxWait) +{ + return (configureMessage(msgClass, msgID, portID, rate, maxWait)); +} +//Disable a given message type on a given port +boolean SFE_UBLOX_GPS::disableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint16_t maxWait) +{ + return (configureMessage(msgClass, msgID, portID, 0, maxWait)); +} + +boolean SFE_UBLOX_GPS::enableNMEAMessage(uint8_t msgID, uint8_t portID, uint8_t rate, uint16_t maxWait) +{ + return (configureMessage(UBX_CLASS_NMEA, msgID, portID, rate, maxWait)); +} +boolean SFE_UBLOX_GPS::disableNMEAMessage(uint8_t msgID, uint8_t portID, uint16_t maxWait) +{ + return (enableNMEAMessage(msgID, portID, 0, maxWait)); +} + +//Given a message number turns on a message ID for output over a given portID (UART, I2C, SPI, USB, etc) +//To disable a message, set secondsBetween messages to 0 +//Note: This function will return false if the message is already enabled +//For base station RTK output we need to enable various sentences + +//NEO-M8P has four: +//1005 = 0xF5 0x05 - Stationary RTK reference ARP +//1077 = 0xF5 0x4D - GPS MSM7 +//1087 = 0xF5 0x57 - GLONASS MSM7 +//1230 = 0xF5 0xE6 - GLONASS code-phase biases, set to once every 10 seconds + +//ZED-F9P has six: +//1005, 1074, 1084, 1094, 1124, 1230 + +//Much of this configuration is not documented and instead discerned from u-center binary console +boolean SFE_UBLOX_GPS::enableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint8_t sendRate, uint16_t maxWait) +{ + return (configureMessage(UBX_RTCM_MSB, messageNumber, portID, sendRate, maxWait)); +} + +//Disable a given message on a given port by setting secondsBetweenMessages to zero +boolean SFE_UBLOX_GPS::disableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint16_t maxWait) +{ + return (enableRTCMmessage(messageNumber, portID, 0, maxWait)); +} + +//Add a new geofence using UBX-CFG-GEOFENCE +boolean SFE_UBLOX_GPS::addGeofence(int32_t latitude, int32_t longitude, uint32_t radius, byte confidence, byte pinPolarity, byte pin, uint16_t maxWait) +{ + if (currentGeofenceParams.numFences >= 4) + return (false); // Quit if we already have four geofences defined + + // Store the new geofence parameters + currentGeofenceParams.lats[currentGeofenceParams.numFences] = latitude; + currentGeofenceParams.longs[currentGeofenceParams.numFences] = longitude; + currentGeofenceParams.rads[currentGeofenceParams.numFences] = radius; + currentGeofenceParams.numFences = currentGeofenceParams.numFences + 1; // Increment the number of fences + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_GEOFENCE; + packetCfg.len = (currentGeofenceParams.numFences * 12) + 8; + packetCfg.startingSpot = 0; + + payloadCfg[0] = 0; // Message version = 0x00 + payloadCfg[1] = currentGeofenceParams.numFences; // numFences + payloadCfg[2] = confidence; // confLvl = Confidence level 0-4 (none, 68%, 95%, 99.7%, 99.99%) + payloadCfg[3] = 0; // reserved1 + if (pin > 0) + { + payloadCfg[4] = 1; // enable PIO combined fence state + } + else + { + payloadCfg[4] = 0; // disable PIO combined fence state + } + payloadCfg[5] = pinPolarity; // PIO pin polarity (0 = low means inside, 1 = low means outside (or unknown)) + payloadCfg[6] = pin; // PIO pin + payloadCfg[7] = 0; //reserved2 + payloadCfg[8] = currentGeofenceParams.lats[0] & 0xFF; + payloadCfg[9] = currentGeofenceParams.lats[0] >> 8; + payloadCfg[10] = currentGeofenceParams.lats[0] >> 16; + payloadCfg[11] = currentGeofenceParams.lats[0] >> 24; + payloadCfg[12] = currentGeofenceParams.longs[0] & 0xFF; + payloadCfg[13] = currentGeofenceParams.longs[0] >> 8; + payloadCfg[14] = currentGeofenceParams.longs[0] >> 16; + payloadCfg[15] = currentGeofenceParams.longs[0] >> 24; + payloadCfg[16] = currentGeofenceParams.rads[0] & 0xFF; + payloadCfg[17] = currentGeofenceParams.rads[0] >> 8; + payloadCfg[18] = currentGeofenceParams.rads[0] >> 16; + payloadCfg[19] = currentGeofenceParams.rads[0] >> 24; + if (currentGeofenceParams.numFences >= 2) + { + payloadCfg[20] = currentGeofenceParams.lats[1] & 0xFF; + payloadCfg[21] = currentGeofenceParams.lats[1] >> 8; + payloadCfg[22] = currentGeofenceParams.lats[1] >> 16; + payloadCfg[23] = currentGeofenceParams.lats[1] >> 24; + payloadCfg[24] = currentGeofenceParams.longs[1] & 0xFF; + payloadCfg[25] = currentGeofenceParams.longs[1] >> 8; + payloadCfg[26] = currentGeofenceParams.longs[1] >> 16; + payloadCfg[27] = currentGeofenceParams.longs[1] >> 24; + payloadCfg[28] = currentGeofenceParams.rads[1] & 0xFF; + payloadCfg[29] = currentGeofenceParams.rads[1] >> 8; + payloadCfg[30] = currentGeofenceParams.rads[1] >> 16; + payloadCfg[31] = currentGeofenceParams.rads[1] >> 24; + } + if (currentGeofenceParams.numFences >= 3) + { + payloadCfg[32] = currentGeofenceParams.lats[2] & 0xFF; + payloadCfg[33] = currentGeofenceParams.lats[2] >> 8; + payloadCfg[34] = currentGeofenceParams.lats[2] >> 16; + payloadCfg[35] = currentGeofenceParams.lats[2] >> 24; + payloadCfg[36] = currentGeofenceParams.longs[2] & 0xFF; + payloadCfg[37] = currentGeofenceParams.longs[2] >> 8; + payloadCfg[38] = currentGeofenceParams.longs[2] >> 16; + payloadCfg[39] = currentGeofenceParams.longs[2] >> 24; + payloadCfg[40] = currentGeofenceParams.rads[2] & 0xFF; + payloadCfg[41] = currentGeofenceParams.rads[2] >> 8; + payloadCfg[42] = currentGeofenceParams.rads[2] >> 16; + payloadCfg[43] = currentGeofenceParams.rads[2] >> 24; + } + if (currentGeofenceParams.numFences >= 4) + { + payloadCfg[44] = currentGeofenceParams.lats[3] & 0xFF; + payloadCfg[45] = currentGeofenceParams.lats[3] >> 8; + payloadCfg[46] = currentGeofenceParams.lats[3] >> 16; + payloadCfg[47] = currentGeofenceParams.lats[3] >> 24; + payloadCfg[48] = currentGeofenceParams.longs[3] & 0xFF; + payloadCfg[49] = currentGeofenceParams.longs[3] >> 8; + payloadCfg[50] = currentGeofenceParams.longs[3] >> 16; + payloadCfg[51] = currentGeofenceParams.longs[3] >> 24; + payloadCfg[52] = currentGeofenceParams.rads[3] & 0xFF; + payloadCfg[53] = currentGeofenceParams.rads[3] >> 8; + payloadCfg[54] = currentGeofenceParams.rads[3] >> 16; + payloadCfg[55] = currentGeofenceParams.rads[3] >> 24; + } + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Clear all geofences using UBX-CFG-GEOFENCE +boolean SFE_UBLOX_GPS::clearGeofences(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_GEOFENCE; + packetCfg.len = 8; + packetCfg.startingSpot = 0; + + payloadCfg[0] = 0; // Message version = 0x00 + payloadCfg[1] = 0; // numFences + payloadCfg[2] = 0; // confLvl + payloadCfg[3] = 0; // reserved1 + payloadCfg[4] = 0; // disable PIO combined fence state + payloadCfg[5] = 0; // PIO pin polarity (0 = low means inside, 1 = low means outside (or unknown)) + payloadCfg[6] = 0; // PIO pin + payloadCfg[7] = 0; //reserved2 + + currentGeofenceParams.numFences = 0; // Zero the number of geofences currently in use + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Clear the antenna control settings using UBX-CFG-ANT +//This function is hopefully redundant but may be needed to release +//any PIO pins pre-allocated for antenna functions +boolean SFE_UBLOX_GPS::clearAntPIO(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_ANT; + packetCfg.len = 4; + packetCfg.startingSpot = 0; + + payloadCfg[0] = 0x10; // Antenna flag mask: set the recovery bit + payloadCfg[1] = 0; + payloadCfg[2] = 0xFF; // Antenna pin configuration: set pinSwitch and pinSCD to 31 + payloadCfg[3] = 0xFF; // Antenna pin configuration: set pinOCD to 31, set reconfig bit + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Returns the combined geofence state using UBX-NAV-GEOFENCE +boolean SFE_UBLOX_GPS::getGeofenceState(geofenceState ¤tGeofenceState, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_GEOFENCE; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the geofence status. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); + + currentGeofenceState.status = payloadCfg[5]; // Extract the status + currentGeofenceState.numFences = payloadCfg[6]; // Extract the number of geofences + currentGeofenceState.combState = payloadCfg[7]; // Extract the combined state of all geofences + if (currentGeofenceState.numFences > 0) + currentGeofenceState.states[0] = payloadCfg[8]; // Extract geofence 1 state + if (currentGeofenceState.numFences > 1) + currentGeofenceState.states[1] = payloadCfg[10]; // Extract geofence 2 state + if (currentGeofenceState.numFences > 2) + currentGeofenceState.states[2] = payloadCfg[12]; // Extract geofence 3 state + if (currentGeofenceState.numFences > 3) + currentGeofenceState.states[3] = payloadCfg[14]; // Extract geofence 4 state + + return (true); +} + +//Power Save Mode +//Enables/Disables Low Power Mode using UBX-CFG-RXM +boolean SFE_UBLOX_GPS::powerSaveMode(bool power_save, uint16_t maxWait) +{ + // Let's begin by checking the Protocol Version as UBX_CFG_RXM is not supported on the ZED (protocol >= 27) + uint8_t protVer = getProtocolVersionHigh(maxWait); + /* + if (_printDebug == true) + { + _debugSerial->print(F("Protocol version is ")); + _debugSerial->println(protVer); + } + */ + if (protVer >= 27) + { + if (_printDebug == true) + { + _debugSerial->println(F("powerSaveMode (UBX-CFG-RXM) is not supported by this protocol version")); + } + return (false); + } + + // Now let's change the power setting using UBX-CFG-RXM + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RXM; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the current power management settings. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); + + if (power_save) + { + payloadCfg[1] = 1; // Power Save Mode + } + else + { + payloadCfg[1] = 0; // Continuous Mode + } + + packetCfg.len = 2; + packetCfg.startingSpot = 0; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +// Get Power Save Mode +// Returns the current Low Power Mode using UBX-CFG-RXM +// Returns 255 if the sendCommand fails +uint8_t SFE_UBLOX_GPS::getPowerSaveMode(uint16_t maxWait) +{ + // Let's begin by checking the Protocol Version as UBX_CFG_RXM is not supported on the ZED (protocol >= 27) + uint8_t protVer = getProtocolVersionHigh(maxWait); + /* + if (_printDebug == true) + { + _debugSerial->print(F("Protocol version is ")); + _debugSerial->println(protVer); + } + */ + if (protVer >= 27) + { + if (_printDebug == true) + { + _debugSerial->println(F("powerSaveMode (UBX-CFG-RXM) is not supported by this protocol version")); + } + return (255); + } + + // Now let's read the power setting using UBX-CFG-RXM + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RXM; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the current power management settings. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (255); + + return (payloadCfg[1]); // Return the low power mode +} + +//Change the dynamic platform model using UBX-CFG-NAV5 +//Possible values are: +//PORTABLE,STATIONARY,PEDESTRIAN,AUTOMOTIVE,SEA, +//AIRBORNE1g,AIRBORNE2g,AIRBORNE4g,WRIST,BIKE +//WRIST is not supported in protocol versions less than 18 +//BIKE is supported in protocol versions 19.2 +boolean SFE_UBLOX_GPS::setDynamicModel(dynModel newDynamicModel, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_NAV5; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the current navigation model settings. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); + + payloadCfg[0] = 0x01; // mask: set only the dyn bit (0) + payloadCfg[1] = 0x00; // mask + payloadCfg[2] = newDynamicModel; // dynModel + + packetCfg.len = 36; + packetCfg.startingSpot = 0; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Get the dynamic platform model using UBX-CFG-NAV5 +//Returns 255 if the sendCommand fails +uint8_t SFE_UBLOX_GPS::getDynamicModel(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_NAV5; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the current navigation model settings. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (255); + + return (payloadCfg[2]); // Return the dynamic model +} + +//Given a spot in the payload array, extract four bytes and build a long +uint32_t SFE_UBLOX_GPS::extractLong(uint8_t spotToStart) +{ + uint32_t val = 0; + val |= (uint32_t)payloadCfg[spotToStart + 0] << 8 * 0; + val |= (uint32_t)payloadCfg[spotToStart + 1] << 8 * 1; + val |= (uint32_t)payloadCfg[spotToStart + 2] << 8 * 2; + val |= (uint32_t)payloadCfg[spotToStart + 3] << 8 * 3; + return (val); +} + +//Given a spot in the payload array, extract two bytes and build an int +uint16_t SFE_UBLOX_GPS::extractInt(uint8_t spotToStart) +{ + uint16_t val = 0; + val |= (uint16_t)payloadCfg[spotToStart + 0] << 8 * 0; + val |= (uint16_t)payloadCfg[spotToStart + 1] << 8 * 1; + return (val); +} + +//Given a spot, extract a byte from the payload +uint8_t SFE_UBLOX_GPS::extractByte(uint8_t spotToStart) +{ + return (payloadCfg[spotToStart]); +} + +//Given a spot, extract a signed 8-bit value from the payload +int8_t SFE_UBLOX_GPS::extractSignedChar(uint8_t spotToStart) +{ + return ((int8_t)payloadCfg[spotToStart]); +} + +//Get the current year +uint16_t SFE_UBLOX_GPS::getYear(uint16_t maxWait) +{ + if (moduleQueried.gpsYear == false) + getTimeData(maxWait); + moduleQueried.gpsYear = false; //Since we are about to give this to user, mark this data as stale + return (gpsYear); +} + +//Get the current month +uint8_t SFE_UBLOX_GPS::getMonth(uint16_t maxWait) +{ + if (moduleQueried.gpsMonth == false) + getTimeData(maxWait); + moduleQueried.gpsMonth = false; //Since we are about to give this to user, mark this data as stale + return (gpsMonth); +} + +//Get the current day +uint8_t SFE_UBLOX_GPS::getDay(uint16_t maxWait) +{ + if (moduleQueried.gpsDay == false) + getTimeData(maxWait); + moduleQueried.gpsDay = false; //Since we are about to give this to user, mark this data as stale + return (gpsDay); +} + +//Get the current hour +uint8_t SFE_UBLOX_GPS::getHour(uint16_t maxWait) +{ + if (moduleQueried.gpsHour == false) + getTimeData(maxWait); + moduleQueried.gpsHour = false; //Since we are about to give this to user, mark this data as stale + return (gpsHour); +} + +//Get the current minute +uint8_t SFE_UBLOX_GPS::getMinute(uint16_t maxWait) +{ + if (moduleQueried.gpsMinute == false) + getTimeData(maxWait); + moduleQueried.gpsMinute = false; //Since we are about to give this to user, mark this data as stale + return (gpsMinute); +} + +//Get the current second +uint8_t SFE_UBLOX_GPS::getSecond(uint16_t maxWait) +{ + if (moduleQueried.gpsSecond == false) + getTimeData(maxWait); + moduleQueried.gpsSecond = false; //Since we are about to give this to user, mark this data as stale + return (gpsSecond); +} + +//Get the current millisecond +uint16_t SFE_UBLOX_GPS::getMillisecond(uint16_t maxWait) +{ + if (moduleQueried.gpsiTOW == false) + getTimeData(maxWait); + moduleQueried.gpsiTOW = false; //Since we are about to give this to user, mark this data as stale + return (gpsMillisecond); +} + +//Get the current nanoseconds - includes milliseconds +int32_t SFE_UBLOX_GPS::getNanosecond(uint16_t maxWait) +{ + if (moduleQueried.gpsNanosecond == false) + getTimeData(maxWait); + moduleQueried.gpsNanosecond = false; //Since we are about to give this to user, mark this data as stale + return (gpsNanosecond); +} + +//Get the latest Position/Velocity/Time solution and fill all global variables +boolean SFE_UBLOX_GPS::getPVT(uint16_t maxWait) +{ + if (autoPVT && autoPVTImplicitUpdate) + { + //The GPS is automatically reporting, we just check whether we got unread data + if (_printDebug == true) + { + _debugSerial->println(F("getPVT: Autoreporting")); + } + checkUbloxInternal(&packetCfg, UBX_CLASS_NAV, UBX_NAV_PVT); + return moduleQueried.all; + } + else if (autoPVT && !autoPVTImplicitUpdate) + { + //Someone else has to call checkUblox for us... + if (_printDebug == true) + { + _debugSerial->println(F("getPVT: Exit immediately")); + } + return (false); + } + else + { + if (_printDebug == true) + { + _debugSerial->println(F("getPVT: Polling")); + } + + //The GPS is not automatically reporting navigation position so we have to poll explicitly + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_PVT; + packetCfg.len = 0; + //packetCfg.startingSpot = 20; //Begin listening at spot 20 so we can record up to 20+MAX_PAYLOAD_SIZE = 84 bytes Note:now hard-coded in processUBX + + //The data is parsed as part of processing the response + sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait); + + if (retVal == SFE_UBLOX_STATUS_DATA_RECEIVED) + return (true); + + if (_printDebug == true) + { + _debugSerial->print(F("getPVT retVal: ")); + _debugSerial->println(statusString(retVal)); + } + return (false); + } +} + +// Update time info (using appropriate call for the chip series) +boolean SFE_UBLOX_GPS::getTimeData(uint16_t maxWait) +{ + return getProtocolVersionHigh(maxWait) < 15 ? getTIMEUTC(maxWait) : getPVT(maxWait); +} + +// Update position info (using appropriate call for the chip series) +boolean SFE_UBLOX_GPS::getPositionData(uint16_t maxWait) +{ + return getProtocolVersionHigh(maxWait) < 20 ? getPOSLLH(maxWait) : getPVT(maxWait); +} + +//Get time (for use on chips with protocol version 14 and earlier) +boolean SFE_UBLOX_GPS::getTIMEUTC(uint16_t maxWait) +{ + debugPrintln((char *)F("getTIMEUTC: Polling")); + + //The GPS is not automatically reporting navigation position so we have to poll explicitly + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_TIMEUTC; + packetCfg.len = 0; + //packetCfg.startingSpot = 20; //Begin listening at spot 20 so we can record up to 20+MAX_PAYLOAD_SIZE = 84 bytes Note:now hard-coded in processUBX + + //The data is parsed as part of processing the response + sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait); + + if (retVal == SFE_UBLOX_STATUS_DATA_RECEIVED) + return (true); + + if (_printDebug == true) + { + _debugSerial->print(F("getTIMEUTC retVal: ")); + _debugSerial->println(statusString(retVal)); + } + return (false); +} + +//Get posllh (fos use on chips with protocol version 19 and earlier) +boolean SFE_UBLOX_GPS::getPOSLLH(uint16_t maxWait) +{ + debugPrintln((char *)F("getPOSLLH: Polling")); + + //The GPS is not automatically reporting navigation position so we have to poll explicitly + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_POSLLH; + packetCfg.len = 0; + //packetCfg.startingSpot = 20; //Begin listening at spot 20 so we can record up to 20+MAX_PAYLOAD_SIZE = 84 bytes Note:now hard-coded in processUBX + + //The data is parsed as part of processing the response + sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait); + + if (retVal == SFE_UBLOX_STATUS_DATA_RECEIVED) + return (true); + + if (_printDebug == true) + { + _debugSerial->print(F("getPOSLLH retVal: ")); + _debugSerial->println(statusString(retVal)); + } + return (false); +} + +uint32_t SFE_UBLOX_GPS::getTimeOfWeek(uint16_t maxWait /* = 250*/) +{ + if (moduleQueried.gpsiTOW == false) + getTimeData(maxWait); + moduleQueried.gpsiTOW = false; //Since we are about to give this to user, mark this data as stale + return (timeOfWeek); +} + +int32_t SFE_UBLOX_GPS::getHighResLatitude(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.highResLatitude == false) + getHPPOSLLH(maxWait); + highResModuleQueried.highResLatitude = false; //Since we are about to give this to user, mark this data as stale + return (highResLatitude); +} + +int8_t SFE_UBLOX_GPS::getHighResLatitudeHp(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.highResLatitudeHp == false) + getHPPOSLLH(maxWait); + highResModuleQueried.highResLatitudeHp = false; //Since we are about to give this to user, mark this data as stale + return (highResLatitudeHp); +} + +int32_t SFE_UBLOX_GPS::getHighResLongitude(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.highResLongitude == false) + getHPPOSLLH(maxWait); + highResModuleQueried.highResLongitude = false; //Since we are about to give this to user, mark this data as stale + return (highResLongitude); +} + +int8_t SFE_UBLOX_GPS::getHighResLongitudeHp(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.highResLongitudeHp == false) + getHPPOSLLH(maxWait); + highResModuleQueried.highResLongitudeHp = false; //Since we are about to give this to user, mark this data as stale + return (highResLongitudeHp); +} + +int32_t SFE_UBLOX_GPS::getElipsoid(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.elipsoid == false) + getHPPOSLLH(maxWait); + highResModuleQueried.elipsoid = false; //Since we are about to give this to user, mark this data as stale + return (elipsoid); +} + +int8_t SFE_UBLOX_GPS::getElipsoidHp(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.elipsoidHp == false) + getHPPOSLLH(maxWait); + highResModuleQueried.elipsoidHp = false; //Since we are about to give this to user, mark this data as stale + return (elipsoidHp); +} + +int32_t SFE_UBLOX_GPS::getMeanSeaLevel(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.meanSeaLevel == false) + getHPPOSLLH(maxWait); + highResModuleQueried.meanSeaLevel = false; //Since we are about to give this to user, mark this data as stale + return (meanSeaLevel); +} + +int8_t SFE_UBLOX_GPS::getMeanSeaLevelHp(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.meanSeaLevelHp == false) + getHPPOSLLH(maxWait); + highResModuleQueried.meanSeaLevelHp = false; //Since we are about to give this to user, mark this data as stale + return (meanSeaLevelHp); +} + +// getGeoidSeparation is currently redundant. The geoid separation seems to only be provided in NMEA GGA and GNS messages. +int32_t SFE_UBLOX_GPS::getGeoidSeparation(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.geoidSeparation == false) + getHPPOSLLH(maxWait); + highResModuleQueried.geoidSeparation = false; //Since we are about to give this to user, mark this data as stale + return (geoidSeparation); +} + +uint32_t SFE_UBLOX_GPS::getHorizontalAccuracy(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.horizontalAccuracy == false) + getHPPOSLLH(maxWait); + highResModuleQueried.horizontalAccuracy = false; //Since we are about to give this to user, mark this data as stale + return (horizontalAccuracy); +} + +uint32_t SFE_UBLOX_GPS::getVerticalAccuracy(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.verticalAccuracy == false) + getHPPOSLLH(maxWait); + highResModuleQueried.verticalAccuracy = false; //Since we are about to give this to user, mark this data as stale + return (verticalAccuracy); +} + +boolean SFE_UBLOX_GPS::getHPPOSLLH(uint16_t maxWait) +{ + //The GPS is not automatically reporting navigation position so we have to poll explicitly + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_HPPOSLLH; + packetCfg.len = 0; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_RECEIVED); // We are only expecting data (no ACK) +} + +//Get the current 3D high precision positional accuracy - a fun thing to watch +//Returns a long representing the 3D accuracy in millimeters +uint32_t SFE_UBLOX_GPS::getPositionAccuracy(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_HPPOSECEF; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are only expecting data (no ACK) + return (0); //If command send fails then bail + + uint32_t tempAccuracy = extractLong(24); //We got a response, now extract a long beginning at a given position + + if ((tempAccuracy % 10) >= 5) + tempAccuracy += 5; //Round fraction of mm up to next mm if .5 or above + tempAccuracy /= 10; //Convert 0.1mm units to mm + + return (tempAccuracy); +} + +//Get the current latitude in degrees +//Returns a long representing the number of degrees *10^-7 +int32_t SFE_UBLOX_GPS::getLatitude(uint16_t maxWait) +{ + if (moduleQueried.latitude == false) + getPositionData(maxWait); + moduleQueried.latitude = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (latitude); +} + +//Get the current longitude in degrees +//Returns a long representing the number of degrees *10^-7 +int32_t SFE_UBLOX_GPS::getLongitude(uint16_t maxWait) +{ + if (moduleQueried.longitude == false) + getPositionData(maxWait); + moduleQueried.longitude = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (longitude); +} + +//Get the current altitude in mm according to ellipsoid model +int32_t SFE_UBLOX_GPS::getAltitude(uint16_t maxWait) +{ + if (moduleQueried.altitude == false) + getPositionData(maxWait); + moduleQueried.altitude = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (altitude); +} + +//Get the current altitude in mm according to mean sea level +//Ellipsoid model: https://www.esri.com/news/arcuser/0703/geoid1of3.html +//Difference between Ellipsoid Model and Mean Sea Level: https://eos-gnss.com/elevation-for-beginners/ +int32_t SFE_UBLOX_GPS::getAltitudeMSL(uint16_t maxWait) +{ + if (moduleQueried.altitudeMSL == false) + getPositionData(maxWait); + moduleQueried.altitudeMSL = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (altitudeMSL); +} + +//Get the number of satellites used in fix +uint8_t SFE_UBLOX_GPS::getSIV(uint16_t maxWait) +{ + if (moduleQueried.SIV == false) + getPVT(maxWait); + moduleQueried.SIV = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (SIV); +} + +//Get the current fix type +//0=no fix, 1=dead reckoning, 2=2D, 3=3D, 4=GNSS, 5=Time fix +uint8_t SFE_UBLOX_GPS::getFixType(uint16_t maxWait) +{ + if (moduleQueried.fixType == false) + { + getPVT(maxWait); + } + moduleQueried.fixType = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (fixType); +} + +//Get the carrier phase range solution status +//Useful when querying module to see if it has high-precision RTK fix +//0=No solution, 1=Float solution, 2=Fixed solution +uint8_t SFE_UBLOX_GPS::getCarrierSolutionType(uint16_t maxWait) +{ + if (moduleQueried.carrierSolution == false) + getPVT(maxWait); + moduleQueried.carrierSolution = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (carrierSolution); +} + +//Get the ground speed in mm/s +int32_t SFE_UBLOX_GPS::getGroundSpeed(uint16_t maxWait) +{ + if (moduleQueried.groundSpeed == false) + getPVT(maxWait); + moduleQueried.groundSpeed = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (groundSpeed); +} + +//Get the heading of motion (as opposed to heading of car) in degrees * 10^-5 +int32_t SFE_UBLOX_GPS::getHeading(uint16_t maxWait) +{ + if (moduleQueried.headingOfMotion == false) + getPVT(maxWait); + moduleQueried.headingOfMotion = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (headingOfMotion); +} + +//Get the positional dillution of precision * 10^-2 (dimensionless) +uint16_t SFE_UBLOX_GPS::getPDOP(uint16_t maxWait) +{ + if (moduleQueried.pDOP == false) + getPVT(maxWait); + moduleQueried.pDOP = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (pDOP); +} + +//Get the current protocol version of the Ublox module we're communicating with +//This is helpful when deciding if we should call the high-precision Lat/Long (HPPOSLLH) or the regular (POSLLH) +uint8_t SFE_UBLOX_GPS::getProtocolVersionHigh(uint16_t maxWait) +{ + if (moduleQueried.versionNumber == false) + getProtocolVersion(maxWait); + return (versionHigh); +} + +//Get the current protocol version of the Ublox module we're communicating with +//This is helpful when deciding if we should call the high-precision Lat/Long (HPPOSLLH) or the regular (POSLLH) +uint8_t SFE_UBLOX_GPS::getProtocolVersionLow(uint16_t maxWait) +{ + if (moduleQueried.versionNumber == false) + getProtocolVersion(maxWait); + return (versionLow); +} + +//Get the current protocol version of the Ublox module we're communicating with +//This is helpful when deciding if we should call the high-precision Lat/Long (HPPOSLLH) or the regular (POSLLH) +boolean SFE_UBLOX_GPS::getProtocolVersion(uint16_t maxWait) +{ + //Send packet with only CLS and ID, length of zero. This will cause the module to respond with the contents of that CLS/ID. + packetCfg.cls = UBX_CLASS_MON; + packetCfg.id = UBX_MON_VER; + + packetCfg.len = 0; + packetCfg.startingSpot = 40; //Start at first "extended software information" string + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are only expecting data (no ACK) + return (false); //If command send fails then bail + + //Payload should now contain ~220 characters (depends on module type) + + // if (_printDebug == true) + // { + // _debugSerial->print(F("MON VER Payload:")); + // for (int location = 0; location < packetCfg.len; location++) + // { + // if (location % 30 == 0) + // _debugSerial->println(); + // _debugSerial->write(payloadCfg[location]); + // } + // _debugSerial->println(); + // } + + //We will step through the payload looking at each extension field of 30 bytes + for (uint8_t extensionNumber = 0; extensionNumber < 10; extensionNumber++) + { + //Now we need to find "PROTVER=18.00" in the incoming byte stream + if (payloadCfg[(30 * extensionNumber) + 0] == 'P' && payloadCfg[(30 * extensionNumber) + 6] == 'R') + { + versionHigh = (payloadCfg[(30 * extensionNumber) + 8] - '0') * 10 + (payloadCfg[(30 * extensionNumber) + 9] - '0'); //Convert '18' to 18 + versionLow = (payloadCfg[(30 * extensionNumber) + 11] - '0') * 10 + (payloadCfg[(30 * extensionNumber) + 12] - '0'); //Convert '00' to 00 + moduleQueried.versionNumber = true; //Mark this data as new + + if (_printDebug == true) + { + _debugSerial->print(F("Protocol version: ")); + _debugSerial->print(versionHigh); + _debugSerial->print(F(".")); + _debugSerial->println(versionLow); + } + return (true); //Success! + } + } + + return (false); //We failed +} + +//Mark all the PVT data as read/stale. This is handy to get data alignment after CRC failure +void SFE_UBLOX_GPS::flushPVT() +{ + //Mark all datums as stale (read before) + moduleQueried.gpsiTOW = false; + moduleQueried.gpsYear = false; + moduleQueried.gpsMonth = false; + moduleQueried.gpsDay = false; + moduleQueried.gpsHour = false; + moduleQueried.gpsMinute = false; + moduleQueried.gpsSecond = false; + moduleQueried.gpsNanosecond = false; + + moduleQueried.all = false; + moduleQueried.longitude = false; + moduleQueried.latitude = false; + moduleQueried.altitude = false; + moduleQueried.altitudeMSL = false; + moduleQueried.SIV = false; + moduleQueried.fixType = false; + moduleQueried.carrierSolution = false; + moduleQueried.groundSpeed = false; + moduleQueried.headingOfMotion = false; + moduleQueried.pDOP = false; +} + +//Relative Positioning Information in NED frame +//Returns true if commands was successful +boolean SFE_UBLOX_GPS::getRELPOSNED(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_RELPOSNED; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are only expecting data (no ACK) + return (false); //If command send fails then bail + + //We got a response, now parse the bits + + uint16_t refStationID = extractInt(2); + //_debugSerial->print(F("refStationID: ")); + //_debugSerial->println(refStationID)); + + int32_t tempRelPos; + + tempRelPos = extractLong(8); + relPosInfo.relPosN = tempRelPos / 100.0; //Convert cm to m + + tempRelPos = extractLong(12); + relPosInfo.relPosE = tempRelPos / 100.0; //Convert cm to m + + tempRelPos = extractLong(16); + relPosInfo.relPosD = tempRelPos / 100.0; //Convert cm to m + + relPosInfo.relPosLength = extractLong(20); + relPosInfo.relPosHeading = extractLong(24); + + relPosInfo.relPosHPN = payloadCfg[32]; + relPosInfo.relPosHPE = payloadCfg[33]; + relPosInfo.relPosHPD = payloadCfg[34]; + relPosInfo.relPosHPLength = payloadCfg[35]; + + uint32_t tempAcc; + + tempAcc = extractLong(36); + relPosInfo.accN = tempAcc / 10000.0; //Convert 0.1 mm to m + + tempAcc = extractLong(40); + relPosInfo.accE = tempAcc / 10000.0; //Convert 0.1 mm to m + + tempAcc = extractLong(44); + relPosInfo.accD = tempAcc / 10000.0; //Convert 0.1 mm to m + + uint8_t flags = payloadCfg[60]; + + relPosInfo.gnssFixOk = flags & (1 << 0); + relPosInfo.diffSoln = flags & (1 << 1); + relPosInfo.relPosValid = flags & (1 << 2); + relPosInfo.carrSoln = (flags & (0b11 << 3)) >> 3; + relPosInfo.isMoving = flags & (1 << 5); + relPosInfo.refPosMiss = flags & (1 << 6); + relPosInfo.refObsMiss = flags & (1 << 7); + + return (true); +} +boolean SFE_UBLOX_GPS::getEsfInfo(uint16_t maxWait) +{ + // Requesting Data from the receiver + packetCfg.cls = UBX_CLASS_ESF; + packetCfg.id = UBX_ESF_STATUS; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (false); //If command send fails then bail + + checkUblox(); + + // payload should be loaded. + imuMeas.version = extractByte(4); + imuMeas.fusionMode = extractByte(12); + ubloxSen.numSens = extractByte(15); + + // Individual Status Sensor in different function + return (true); +} + +// +boolean SFE_UBLOX_GPS::getEsfIns(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_ESF; + packetCfg.id = UBX_ESF_INS; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (false); //If command send fails then bail + + checkUblox(); + + // Validity of each sensor value below + uint32_t validity = extractLong(0); + + imuMeas.xAngRateVald = (validity && 0x0080) >> 8; + imuMeas.yAngRateVald = (validity && 0x0100) >> 9; + imuMeas.zAngRateVald = (validity && 0x0200) >> 10; + imuMeas.xAccelVald = (validity && 0x0400) >> 11; + imuMeas.yAccelVald = (validity && 0x0800) >> 12; + imuMeas.zAccelVald = (validity && 0x1000) >> 13; + + imuMeas.xAngRate = extractLong(12); // deg/s + imuMeas.yAngRate = extractLong(16); // deg/s + imuMeas.zAngRate = extractLong(20); // deg/s + + imuMeas.xAccel = extractLong(24); // m/s + imuMeas.yAccel = extractLong(28); // m/s + imuMeas.zAccel = extractLong(32); // m/s + + return (true); +} + +// +boolean SFE_UBLOX_GPS::getEsfDataInfo(uint16_t maxWait) +{ + + packetCfg.cls = UBX_CLASS_ESF; + packetCfg.id = UBX_ESF_MEAS; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (false); //If command send fails then bail + + checkUblox(); + + uint32_t timeStamp = extractLong(0); + uint32_t flags = extractInt(4); + + uint8_t timeSent = (flags && 0x01) >> 1; + uint8_t timeEdge = (flags && 0x02) >> 2; + uint8_t tagValid = (flags && 0x04) >> 3; + uint8_t numMeas = (flags && 0x1000) >> 15; + + if (numMeas > DEF_NUM_SENS) + numMeas = DEF_NUM_SENS; + + uint8_t byteOffset = 4; + + for (uint8_t i = 0; i < numMeas; i++) + { + + uint32_t bitField = extractLong(4 + byteOffset * i); + imuMeas.dataType[i] = (bitField && 0xFF000000) >> 23; + imuMeas.data[i] = (bitField && 0xFFFFFF); + imuMeas.dataTStamp[i] = extractLong(8 + byteOffset * i); + } + + return (true); +} + +boolean SFE_UBLOX_GPS::getEsfRawDataInfo(uint16_t maxWait) +{ + + // Need to know the number of sensor to get the correct data + // Rate selected in UBX-CFG-MSG is not respected + packetCfg.cls = UBX_CLASS_ESF; + packetCfg.id = UBX_ESF_RAW; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (false); //If command send fails then bail + + checkUblox(); + + uint32_t bitField = extractLong(4); + imuMeas.rawDataType = (bitField && 0xFF000000) >> 23; + imuMeas.rawData = (bitField && 0xFFFFFF); + imuMeas.rawTStamp = extractLong(8); + + return (true); +} + +sfe_ublox_status_e SFE_UBLOX_GPS::getSensState(uint8_t sensor, uint16_t maxWait) +{ + + packetCfg.cls = UBX_CLASS_ESF; + packetCfg.id = UBX_ESF_STATUS; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (SFE_UBLOX_STATUS_FAIL); //If command send fails then bail + + ubloxSen.numSens = extractByte(15); + + if (sensor > ubloxSen.numSens) + return (SFE_UBLOX_STATUS_OUT_OF_RANGE); + + checkUblox(); + + uint8_t offset = 4; + + // Only the last sensor value checked will remain. + for (uint8_t i = 0; i < sensor; i++) + { + + uint8_t sensorFieldOne = extractByte(16 + offset * i); + uint8_t sensorFieldTwo = extractByte(17 + offset * i); + ubloxSen.freq = extractByte(18 + offset * i); + uint8_t sensorFieldThr = extractByte(19 + offset * i); + + ubloxSen.senType = (sensorFieldOne && 0x10) >> 5; + ubloxSen.isUsed = (sensorFieldOne && 0x20) >> 6; + ubloxSen.isReady = (sensorFieldOne && 0x30) >> 7; + + ubloxSen.calibStatus = sensorFieldTwo && 0x03; + ubloxSen.timeStatus = (sensorFieldTwo && 0xC) >> 2; + + ubloxSen.badMeas = (sensorFieldThr && 0x01); + ubloxSen.badTag = (sensorFieldThr && 0x02) >> 1; + ubloxSen.missMeas = (sensorFieldThr && 0x04) >> 2; + ubloxSen.noisyMeas = (sensorFieldThr && 0x08) >> 3; + } + + return (SFE_UBLOX_STATUS_SUCCESS); +} + +boolean SFE_UBLOX_GPS::getVehAtt(uint16_t maxWait) +{ + + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_ATT; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (SFE_UBLOX_STATUS_FAIL); //If command send fails then bail + + checkUblox(); + + vehAtt.roll = extractLong(8); + vehAtt.pitch = extractLong(12); + vehAtt.heading = extractLong(16); + + vehAtt.accRoll = extractLong(20); + vehAtt.accPitch = extractLong(24); + vehAtt.accHeading = extractLong(28); + + return (true); +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Series_6_7/Example1_GetPositionAndTime_Series_6_7/SparkFun_Ublox_Arduino_Library_Series_6_7.h b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Series_6_7/Example1_GetPositionAndTime_Series_6_7/SparkFun_Ublox_Arduino_Library_Series_6_7.h new file mode 100644 index 0000000..159ea46 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Series_6_7/Example1_GetPositionAndTime_Series_6_7/SparkFun_Ublox_Arduino_Library_Series_6_7.h @@ -0,0 +1,932 @@ +/* + This is a library written for the Ublox ZED-F9P and NEO-M8P-2 + + Updated: June 16th, 2020 + + This copy includes changes by @blazczak and @geeksville to + provide support for the older series 6 and 7 modules. + + Disclaimer: SparkFun has not verified this copy of the library on either series 6 or 7. + It should work, it looks like it will work, but we have no way of confirming this. + We cannot guarantee that it will work reliably in your application. + + Do you like this library? Help support SparkFun. Buy a board! + https://www.sparkfun.com/products/15136 + https://www.sparkfun.com/products/15005 + https://www.sparkfun.com/products/15733 + https://www.sparkfun.com/products/15193 + https://www.sparkfun.com/products/15210 + + Original library written by Nathan Seidle @ SparkFun Electronics, September 6th, 2018 + + This library handles configuring and handling the responses + from a Ublox GPS module. Works with most modules from Ublox including + the Zed-F9P, NEO-M8P-2, NEO-M9N, ZOE-M8Q, SAM-M8Q, and many others. + + https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library + + Development environment specifics: + Arduino IDE 1.8.5 + + SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT). + The MIT License (MIT) + Copyright (c) 2016 SparkFun Electronics + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the Software is furnished to + do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial + portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT + NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef SPARKFUN_UBLOX_ARDUINO_LIBRARY_H +#define SPARKFUN_UBLOX_ARDUINO_LIBRARY_H + +#if (ARDUINO >= 100) +#include "Arduino.h" +#else +#include "WProgram.h" +#endif + +#include + +//Platform specific configurations + +//Define the size of the I2C buffer based on the platform the user has +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__) + +//I2C_BUFFER_LENGTH is defined in Wire.H +#define I2C_BUFFER_LENGTH BUFFER_LENGTH + +#elif defined(__SAMD21G18A__) + +//SAMD21 uses RingBuffer.h +#define I2C_BUFFER_LENGTH SERIAL_BUFFER_SIZE + +//#elif __MK20DX256__ +//Teensy + +#endif + +#ifndef I2C_BUFFER_LENGTH + +//The catch-all default is 32 +#define I2C_BUFFER_LENGTH 32 +//#define I2C_BUFFER_LENGTH 16 //For testing on Artemis + +#endif + +// Define Serial for SparkFun SAMD based boards. +// Boards like the RedBoard Turbo use SerialUSB (not Serial). +// But other boards like the SAMD51 Thing Plus use Serial (not SerialUSB). +// The next nine lines let the code compile cleanly on as many SAMD boards as possible. +#if defined(ARDUINO_ARCH_SAMD) // Is this a SAMD board? + #if defined(USB_VID) // Is the USB Vendor ID defined? + #if (USB_VID == 0x1B4F) // Is this a SparkFun board? + #if !defined(ARDUINO_SAMD51_THING_PLUS) // If it is not a SAMD51 Thing Plus + #define Serial SerialUSB // Define Serial as SerialUSB + #endif + #endif + #endif +#endif +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +//Define a digital pin to aid checksum failure capture and analysis +//Leave set to -1 if not needed +const int checksumFailurePin = -1; + +// Global Status Returns +typedef enum +{ + SFE_UBLOX_STATUS_SUCCESS, + SFE_UBLOX_STATUS_FAIL, + SFE_UBLOX_STATUS_CRC_FAIL, + SFE_UBLOX_STATUS_TIMEOUT, + SFE_UBLOX_STATUS_COMMAND_NACK, // Indicates that the command was unrecognised, invalid or that the module is too busy to respond + SFE_UBLOX_STATUS_OUT_OF_RANGE, + SFE_UBLOX_STATUS_INVALID_ARG, + SFE_UBLOX_STATUS_INVALID_OPERATION, + SFE_UBLOX_STATUS_MEM_ERR, + SFE_UBLOX_STATUS_HW_ERR, + SFE_UBLOX_STATUS_DATA_SENT, // This indicates that a 'set' was successful + SFE_UBLOX_STATUS_DATA_RECEIVED, // This indicates that a 'get' (poll) was successful + SFE_UBLOX_STATUS_I2C_COMM_FAILURE, + SFE_UBLOX_STATUS_DATA_OVERWRITTEN // This is an error - the data was valid but has been or _is being_ overwritten by another packet +} sfe_ublox_status_e; + +// ubxPacket validity +typedef enum +{ + SFE_UBLOX_PACKET_VALIDITY_NOT_VALID, + SFE_UBLOX_PACKET_VALIDITY_VALID, + SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, + SFE_UBLOX_PACKET_NOTACKNOWLEDGED // This indicates that we received a NACK +} sfe_ublox_packet_validity_e; + +// Identify which packet buffer is in use: +// packetCfg (or a custom packet), packetAck or packetBuf +typedef enum +{ + SFE_UBLOX_PACKET_PACKETCFG, + SFE_UBLOX_PACKET_PACKETACK, + SFE_UBLOX_PACKET_PACKETBUF +} sfe_ublox_packet_buffer_e; + +//Registers +const uint8_t UBX_SYNCH_1 = 0xB5; +const uint8_t UBX_SYNCH_2 = 0x62; + +//The following are UBX Class IDs. Descriptions taken from ZED-F9P Interface Description Document page 32, NEO-M8P Interface Description page 145 +const uint8_t UBX_CLASS_NAV = 0x01; //Navigation Results Messages: Position, Speed, Time, Acceleration, Heading, DOP, SVs used +const uint8_t UBX_CLASS_RXM = 0x02; //Receiver Manager Messages: Satellite Status, RTC Status +const uint8_t UBX_CLASS_INF = 0x04; //Information Messages: Printf-Style Messages, with IDs such as Error, Warning, Notice +const uint8_t UBX_CLASS_ACK = 0x05; //Ack/Nak Messages: Acknowledge or Reject messages to UBX-CFG input messages +const uint8_t UBX_CLASS_CFG = 0x06; //Configuration Input Messages: Configure the receiver. +const uint8_t UBX_CLASS_UPD = 0x09; //Firmware Update Messages: Memory/Flash erase/write, Reboot, Flash identification, etc. +const uint8_t UBX_CLASS_MON = 0x0A; //Monitoring Messages: Communication Status, CPU Load, Stack Usage, Task Status +const uint8_t UBX_CLASS_AID = 0x0B; //(NEO-M8P ONLY!!!) AssistNow Aiding Messages: Ephemeris, Almanac, other A-GPS data input +const uint8_t UBX_CLASS_TIM = 0x0D; //Timing Messages: Time Pulse Output, Time Mark Results +const uint8_t UBX_CLASS_ESF = 0x10; //(NEO-M8P ONLY!!!) External Sensor Fusion Messages: External Sensor Measurements and Status Information +const uint8_t UBX_CLASS_MGA = 0x13; //Multiple GNSS Assistance Messages: Assistance data for various GNSS +const uint8_t UBX_CLASS_LOG = 0x21; //Logging Messages: Log creation, deletion, info and retrieval +const uint8_t UBX_CLASS_SEC = 0x27; //Security Feature Messages +const uint8_t UBX_CLASS_HNR = 0x28; //(NEO-M8P ONLY!!!) High Rate Navigation Results Messages: High rate time, position speed, heading +const uint8_t UBX_CLASS_NMEA = 0xF0; //NMEA Strings: standard NMEA strings + +//The following are used for configuration. Descriptions are from the ZED-F9P Interface Description pg 33-34 and NEO-M9N Interface Description pg 47-48 +const uint8_t UBX_CFG_ANT = 0x13; //Antenna Control Settings. Used to configure the antenna control settings +const uint8_t UBX_CFG_BATCH = 0x93; //Get/set data batching configuration. +const uint8_t UBX_CFG_CFG = 0x09; //Clear, Save, and Load Configurations. Used to save current configuration +const uint8_t UBX_CFG_DAT = 0x06; //Set User-defined Datum or The currently defined Datum +const uint8_t UBX_CFG_DGNSS = 0x70; //DGNSS configuration +const uint8_t UBX_CFG_GEOFENCE = 0x69; //Geofencing configuration. Used to configure a geofence +const uint8_t UBX_CFG_GNSS = 0x3E; //GNSS system configuration +const uint8_t UBX_CFG_INF = 0x02; //Depending on packet length, either: poll configuration for one protocol, or information message configuration +const uint8_t UBX_CFG_ITFM = 0x39; //Jamming/Interference Monitor configuration +const uint8_t UBX_CFG_LOGFILTER = 0x47; //Data Logger Configuration +const uint8_t UBX_CFG_MSG = 0x01; //Poll a message configuration, or Set Message Rate(s), or Set Message Rate +const uint8_t UBX_CFG_NAV5 = 0x24; //Navigation Engine Settings. Used to configure the navigation engine including the dynamic model. +const uint8_t UBX_CFG_NAVX5 = 0x23; //Navigation Engine Expert Settings +const uint8_t UBX_CFG_NMEA = 0x17; //Extended NMEA protocol configuration V1 +const uint8_t UBX_CFG_ODO = 0x1E; //Odometer, Low-speed COG Engine Settings +const uint8_t UBX_CFG_PM2 = 0x3B; //Extended power management configuration +const uint8_t UBX_CFG_PMS = 0x86; //Power mode setup +const uint8_t UBX_CFG_PRT = 0x00; //Used to configure port specifics. Polls the configuration for one I/O Port, or Port configuration for UART ports, or Port configuration for USB port, or Port configuration for SPI port, or Port configuration for DDC port +const uint8_t UBX_CFG_PWR = 0x57; //Put receiver in a defined power state +const uint8_t UBX_CFG_RATE = 0x08; //Navigation/Measurement Rate Settings. Used to set port baud rates. +const uint8_t UBX_CFG_RINV = 0x34; //Contents of Remote Inventory +const uint8_t UBX_CFG_RST = 0x04; //Reset Receiver / Clear Backup Data Structures. Used to reset device. +const uint8_t UBX_CFG_RXM = 0x11; //RXM configuration +const uint8_t UBX_CFG_SBAS = 0x16; //SBAS configuration +const uint8_t UBX_CFG_TMODE3 = 0x71; //Time Mode Settings 3. Used to enable Survey In Mode +const uint8_t UBX_CFG_TP5 = 0x31; //Time Pulse Parameters +const uint8_t UBX_CFG_USB = 0x1B; //USB Configuration +const uint8_t UBX_CFG_VALDEL = 0x8C; //Used for config of higher version Ublox modules (ie protocol v27 and above). Deletes values corresponding to provided keys/ provided keys with a transaction +const uint8_t UBX_CFG_VALGET = 0x8B; //Used for config of higher version Ublox modules (ie protocol v27 and above). Configuration Items +const uint8_t UBX_CFG_VALSET = 0x8A; //Used for config of higher version Ublox modules (ie protocol v27 and above). Sets values corresponding to provided key-value pairs/ provided key-value pairs within a transaction. + +//The following are used to enable NMEA messages. Descriptions come from the NMEA messages overview in the ZED-F9P Interface Description +const uint8_t UBX_NMEA_MSB = 0xF0; //All NMEA enable commands have 0xF0 as MSB +const uint8_t UBX_NMEA_DTM = 0x0A; //GxDTM (datum reference) +const uint8_t UBX_NMEA_GAQ = 0x45; //GxGAQ (poll a standard message (if the current talker ID is GA)) +const uint8_t UBX_NMEA_GBQ = 0x44; //GxGBQ (poll a standard message (if the current Talker ID is GB)) +const uint8_t UBX_NMEA_GBS = 0x09; //GxGBS (GNSS satellite fault detection) +const uint8_t UBX_NMEA_GGA = 0x00; //GxGGA (Global positioning system fix data) +const uint8_t UBX_NMEA_GLL = 0x01; //GxGLL (latitude and long, whith time of position fix and status) +const uint8_t UBX_NMEA_GLQ = 0x43; //GxGLQ (poll a standard message (if the current Talker ID is GL)) +const uint8_t UBX_NMEA_GNQ = 0x42; //GxGNQ (poll a standard message (if the current Talker ID is GN)) +const uint8_t UBX_NMEA_GNS = 0x0D; //GxGNS (GNSS fix data) +const uint8_t UBX_NMEA_GPQ = 0x040; //GxGPQ (poll a standard message (if the current Talker ID is GP)) +const uint8_t UBX_NMEA_GRS = 0x06; //GxGRS (GNSS range residuals) +const uint8_t UBX_NMEA_GSA = 0x02; //GxGSA (GNSS DOP and Active satellites) +const uint8_t UBX_NMEA_GST = 0x07; //GxGST (GNSS Pseudo Range Error Statistics) +const uint8_t UBX_NMEA_GSV = 0x03; //GxGSV (GNSS satellites in view) +const uint8_t UBX_NMEA_RMC = 0x04; //GxRMC (Recommended minimum data) +const uint8_t UBX_NMEA_TXT = 0x41; //GxTXT (text transmission) +const uint8_t UBX_NMEA_VLW = 0x0F; //GxVLW (dual ground/water distance) +const uint8_t UBX_NMEA_VTG = 0x05; //GxVTG (course over ground and Ground speed) +const uint8_t UBX_NMEA_ZDA = 0x08; //GxZDA (Time and Date) + +//The following are used to configure the NMEA protocol main talker ID and GSV talker ID +const uint8_t UBX_NMEA_MAINTALKERID_NOTOVERRIDDEN = 0x00; //main talker ID is system dependent +const uint8_t UBX_NMEA_MAINTALKERID_GP = 0x01; //main talker ID is GPS +const uint8_t UBX_NMEA_MAINTALKERID_GL = 0x02; //main talker ID is GLONASS +const uint8_t UBX_NMEA_MAINTALKERID_GN = 0x03; //main talker ID is combined receiver +const uint8_t UBX_NMEA_MAINTALKERID_GA = 0x04; //main talker ID is Galileo +const uint8_t UBX_NMEA_MAINTALKERID_GB = 0x05; //main talker ID is BeiDou +const uint8_t UBX_NMEA_GSVTALKERID_GNSS = 0x00; //GNSS specific Talker ID (as defined by NMEA) +const uint8_t UBX_NMEA_GSVTALKERID_MAIN = 0x01; //use the main Talker ID + +//The following are used to configure INF UBX messages (information messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 34) +const uint8_t UBX_INF_CLASS = 0x04; //All INF messages have 0x04 as the class +const uint8_t UBX_INF_DEBUG = 0x04; //ASCII output with debug contents +const uint8_t UBX_INF_ERROR = 0x00; //ASCII output with error contents +const uint8_t UBX_INF_NOTICE = 0x02; //ASCII output with informational contents +const uint8_t UBX_INF_TEST = 0x03; //ASCII output with test contents +const uint8_t UBX_INF_WARNING = 0x01; //ASCII output with warning contents + +//The following are used to configure LOG UBX messages (loggings messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 34) +const uint8_t UBX_LOG_CREATE = 0x07; //Create Log File +const uint8_t UBX_LOG_ERASE = 0x03; //Erase Logged Data +const uint8_t UBX_LOG_FINDTIME = 0x0E; //Find index of a log entry based on a given time, or response to FINDTIME requested +const uint8_t UBX_LOG_INFO = 0x08; //Poll for log information, or Log information +const uint8_t UBX_LOG_RETRIEVEPOSEXTRA = 0x0F; //Odometer log entry +const uint8_t UBX_LOG_RETRIEVEPOS = 0x0B; //Position fix log entry +const uint8_t UBX_LOG_RETRIEVESTRING = 0x0D; //Byte string log entry +const uint8_t UBX_LOG_RETRIEVE = 0x09; //Request log data +const uint8_t UBX_LOG_STRING = 0x04; //Store arbitrary string on on-board flash + +//The following are used to configure MGA UBX messages (Multiple GNSS Assistance Messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 34) +const uint8_t UBX_MGA_ACK_DATA0 = 0x60; //Multiple GNSS Acknowledge message +const uint8_t UBX_MGA_BDS_EPH = 0x03; //BDS Ephemeris Assistance +const uint8_t UBX_MGA_BDS_ALM = 0x03; //BDS Almanac Assistance +const uint8_t UBX_MGA_BDS_HEALTH = 0x03; //BDS Health Assistance +const uint8_t UBX_MGA_BDS_UTC = 0x03; //BDS UTC Assistance +const uint8_t UBX_MGA_BDS_IONO = 0x03; //BDS Ionospheric Assistance +const uint8_t UBX_MGA_DBD = 0x80; //Either: Poll the Navigation Database, or Navigation Database Dump Entry +const uint8_t UBX_MGA_GAL_EPH = 0x02; //Galileo Ephemeris Assistance +const uint8_t UBX_MGA_GAL_ALM = 0x02; //Galileo Almanac Assitance +const uint8_t UBX_MGA_GAL_TIMOFFSET = 0x02; //Galileo GPS time offset assistance +const uint8_t UBX_MGA_GAL_UTC = 0x02; //Galileo UTC Assistance +const uint8_t UBX_MGA_GLO_EPH = 0x06; //GLONASS Ephemeris Assistance +const uint8_t UBX_MGA_GLO_ALM = 0x06; //GLONASS Almanac Assistance +const uint8_t UBX_MGA_GLO_TIMEOFFSET = 0x06; //GLONASS Auxiliary Time Offset Assistance +const uint8_t UBX_MGA_GPS_EPH = 0x00; //GPS Ephemeris Assistance +const uint8_t UBX_MGA_GPS_ALM = 0x00; //GPS Almanac Assistance +const uint8_t UBX_MGA_GPS_HEALTH = 0x00; //GPS Health Assistance +const uint8_t UBX_MGA_GPS_UTC = 0x00; //GPS UTC Assistance +const uint8_t UBX_MGA_GPS_IONO = 0x00; //GPS Ionosphere Assistance +const uint8_t UBX_MGA_INI_POS_XYZ = 0x40; //Initial Position Assistance +const uint8_t UBX_MGA_INI_POS_LLH = 0x40; //Initial Position Assitance +const uint8_t UBX_MGA_INI_TIME_UTC = 0x40; //Initial Time Assistance +const uint8_t UBX_MGA_INI_TIME_GNSS = 0x40; //Initial Time Assistance +const uint8_t UBX_MGA_INI_CLKD = 0x40; //Initial Clock Drift Assitance +const uint8_t UBX_MGA_INI_FREQ = 0x40; //Initial Frequency Assistance +const uint8_t UBX_MGA_INI_EOP = 0x40; //Earth Orientation Parameters Assistance +const uint8_t UBX_MGA_QZSS_EPH = 0x05; //QZSS Ephemeris Assistance +const uint8_t UBX_MGA_QZSS_ALM = 0x05; //QZSS Almanac Assistance +const uint8_t UBX_MGA_QZAA_HEALTH = 0x05; //QZSS Health Assistance + +//The following are used to configure the MON UBX messages (monitoring messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 35) +const uint8_t UBX_MON_COMMS = 0x36; //Comm port information +const uint8_t UBX_MON_GNSS = 0x28; //Information message major GNSS selection +const uint8_t UBX_MON_HW2 = 0x0B; //Extended Hardware Status +const uint8_t UBX_MON_HW3 = 0x37; //HW I/O pin information +const uint8_t UBX_MON_HW = 0x09; //Hardware Status +const uint8_t UBX_MON_IO = 0x02; //I/O Subsystem Status +const uint8_t UBX_MON_MSGPP = 0x06; //Message Parse and Process Status +const uint8_t UBX_MON_PATCH = 0x27; //Output information about installed patches +const uint8_t UBX_MON_RF = 0x38; //RF information +const uint8_t UBX_MON_RXBUF = 0x07; //Receiver Buffer Status +const uint8_t UBX_MON_RXR = 0x21; //Receiver Status Information +const uint8_t UBX_MON_TXBUF = 0x08; //Transmitter Buffer Status. Used for query tx buffer size/state. +const uint8_t UBX_MON_VER = 0x04; //Receiver/Software Version. Used for obtaining Protocol Version. + +//The following are used to configure the NAV UBX messages (navigation results messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 35-36) +const uint8_t UBX_NAV_ATT = 0x05; //Vehicle "Attitude" Solution +const uint8_t UBX_NAV_CLOCK = 0x22; //Clock Solution +const uint8_t UBX_NAV_DOP = 0x04; //Dilution of precision +const uint8_t UBX_NAV_EOE = 0x61; //End of Epoch +const uint8_t UBX_NAV_GEOFENCE = 0x39; //Geofencing status. Used to poll the geofence status +const uint8_t UBX_NAV_HPPOSECEF = 0x13; //High Precision Position Solution in ECEF. Used to find our positional accuracy (high precision). +const uint8_t UBX_NAV_HPPOSLLH = 0x14; //High Precision Geodetic Position Solution. Used for obtaining lat/long/alt in high precision +const uint8_t UBX_NAV_ODO = 0x09; //Odometer Solution +const uint8_t UBX_NAV_ORB = 0x34; //GNSS Orbit Database Info +const uint8_t UBX_NAV_POSECEF = 0x01; //Position Solution in ECEF +const uint8_t UBX_NAV_POSLLH = 0x02; //Geodetic Position Solution +const uint8_t UBX_NAV_PVT = 0x07; //All the things! Position, velocity, time, PDOP, height, h/v accuracies, number of satellites. Navigation Position Velocity Time Solution. +const uint8_t UBX_NAV_RELPOSNED = 0x3C; //Relative Positioning Information in NED frame +const uint8_t UBX_NAV_RESETODO = 0x10; //Reset odometer +const uint8_t UBX_NAV_SAT = 0x35; //Satellite Information +const uint8_t UBX_NAV_SIG = 0x43; //Signal Information +const uint8_t UBX_NAV_STATUS = 0x03; //Receiver Navigation Status +const uint8_t UBX_NAV_SVIN = 0x3B; //Survey-in data. Used for checking Survey In status +const uint8_t UBX_NAV_TIMEBDS = 0x24; //BDS Time Solution +const uint8_t UBX_NAV_TIMEGAL = 0x25; //Galileo Time Solution +const uint8_t UBX_NAV_TIMEGLO = 0x23; //GLO Time Solution +const uint8_t UBX_NAV_TIMEGPS = 0x20; //GPS Time Solution +const uint8_t UBX_NAV_TIMELS = 0x26; //Leap second event information +const uint8_t UBX_NAV_TIMEUTC = 0x21; //UTC Time Solution +const uint8_t UBX_NAV_VELECEF = 0x11; //Velocity Solution in ECEF +const uint8_t UBX_NAV_VELNED = 0x12; //Velocity Solution in NED + +//The following are used to configure the RXM UBX messages (receiver manager messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 36) +const uint8_t UBX_RXM_MEASX = 0x14; //Satellite Measurements for RRLP +const uint8_t UBX_RXM_PMREQ = 0x41; //Requests a Power Management task (two differenent packet sizes) +const uint8_t UBX_RXM_RAWX = 0x15; //Multi-GNSS Raw Measurement Data +const uint8_t UBX_RXM_RLM = 0x59; //Galileo SAR Short-RLM report (two different packet sizes) +const uint8_t UBX_RXM_RTCM = 0x32; //RTCM input status +const uint8_t UBX_RXM_SFRBX = 0x13; //Boradcast Navigation Data Subframe + +//The following are used to configure the SEC UBX messages (security feature messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 36) +const uint8_t UBX_SEC_UNIQID = 0x03; //Unique chip ID + +//The following are used to configure the TIM UBX messages (timing messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 36) +const uint8_t UBX_TIM_TM2 = 0x03; //Time mark data +const uint8_t UBX_TIM_TP = 0x01; //Time Pulse Timedata +const uint8_t UBX_TIM_VRFY = 0x06; //Sourced Time Verification + +//The following are used to configure the UPD UBX messages (firmware update messages). Descriptions from UBX messages overview (ZED-F9P Interface Description Document page 36) +const uint8_t UBX_UPD_SOS = 0x14; //Poll Backup Fil Restore Status, Create Backup File in Flash, Clear Backup File in Flash, Backup File Creation Acknowledge, System Restored from Backup + +//The following are used to enable RTCM messages +const uint8_t UBX_RTCM_MSB = 0xF5; //All RTCM enable commands have 0xF5 as MSB +const uint8_t UBX_RTCM_1005 = 0x05; //Stationary RTK reference ARP +const uint8_t UBX_RTCM_1074 = 0x4A; //GPS MSM4 +const uint8_t UBX_RTCM_1077 = 0x4D; //GPS MSM7 +const uint8_t UBX_RTCM_1084 = 0x54; //GLONASS MSM4 +const uint8_t UBX_RTCM_1087 = 0x57; //GLONASS MSM7 +const uint8_t UBX_RTCM_1094 = 0x5E; //Galileo MSM4 +const uint8_t UBX_RTCM_1097 = 0x61; //Galileo MSM7 +const uint8_t UBX_RTCM_1124 = 0x7C; //BeiDou MSM4 +const uint8_t UBX_RTCM_1127 = 0x7F; //BeiDou MSM7 +const uint8_t UBX_RTCM_1230 = 0xE6; //GLONASS code-phase biases, set to once every 10 seconds +const uint8_t UBX_RTCM_4072_0 = 0xFE; //Reference station PVT (ublox proprietary RTCM message) +const uint8_t UBX_RTCM_4072_1 = 0xFD; //Additional reference station information (ublox proprietary RTCM message) + +const uint8_t UBX_ACK_NACK = 0x00; +const uint8_t UBX_ACK_ACK = 0x01; +const uint8_t UBX_ACK_NONE = 0x02; //Not a real value + +// The following constants are used to get External Sensor Measurements and Status +// Information. +const uint8_t UBX_ESF_MEAS = 0x02; +const uint8_t UBX_ESF_RAW = 0x03; +const uint8_t UBX_ESF_STATUS = 0x10; +const uint8_t UBX_ESF_INS = 0x15; //36 bytes + +const uint8_t SVIN_MODE_DISABLE = 0x00; +const uint8_t SVIN_MODE_ENABLE = 0x01; + +//The following consts are used to configure the various ports and streams for those ports. See -CFG-PRT. +const uint8_t COM_PORT_I2C = 0; +const uint8_t COM_PORT_UART1 = 1; +const uint8_t COM_PORT_UART2 = 2; +const uint8_t COM_PORT_USB = 3; +const uint8_t COM_PORT_SPI = 4; + +const uint8_t COM_TYPE_UBX = (1 << 0); +const uint8_t COM_TYPE_NMEA = (1 << 1); +const uint8_t COM_TYPE_RTCM3 = (1 << 5); + +//The following consts are used to generate KEY values for the advanced protocol functions of VELGET/SET/DEL +const uint8_t VAL_SIZE_1 = 0x01; //One bit +const uint8_t VAL_SIZE_8 = 0x02; //One byte +const uint8_t VAL_SIZE_16 = 0x03; //Two bytes +const uint8_t VAL_SIZE_32 = 0x04; //Four bytes +const uint8_t VAL_SIZE_64 = 0x05; //Eight bytes + +//These are the Bitfield layers definitions for the UBX-CFG-VALSET message (not to be confused with Bitfield deviceMask in UBX-CFG-CFG) +const uint8_t VAL_LAYER_RAM = (1 << 0); +const uint8_t VAL_LAYER_BBR = (1 << 1); +const uint8_t VAL_LAYER_FLASH = (1 << 2); + +//Below are various Groups, IDs, and sizes for various settings +//These can be used to call getVal/setVal/delVal +const uint8_t VAL_GROUP_I2COUTPROT = 0x72; +const uint8_t VAL_GROUP_I2COUTPROT_SIZE = VAL_SIZE_1; //All fields in I2C group are currently 1 bit + +const uint8_t VAL_ID_I2COUTPROT_UBX = 0x01; +const uint8_t VAL_ID_I2COUTPROT_NMEA = 0x02; +const uint8_t VAL_ID_I2COUTPROT_RTCM3 = 0x03; + +const uint8_t VAL_GROUP_I2C = 0x51; +const uint8_t VAL_GROUP_I2C_SIZE = VAL_SIZE_8; //All fields in I2C group are currently 1 byte + +const uint8_t VAL_ID_I2C_ADDRESS = 0x01; + +// Configuration Sub-Section mask definitions for saveConfigSelective (UBX-CFG-CFG) +const uint32_t VAL_CFG_SUBSEC_IOPORT = 0x00000001; // ioPort - communications port settings (causes IO system reset!) +const uint32_t VAL_CFG_SUBSEC_MSGCONF = 0x00000002; // msgConf - message configuration +const uint32_t VAL_CFG_SUBSEC_INFMSG = 0x00000004; // infMsg - INF message configuration +const uint32_t VAL_CFG_SUBSEC_NAVCONF = 0x00000008; // navConf - navigation configuration +const uint32_t VAL_CFG_SUBSEC_RXMCONF = 0x00000010; // rxmConf - receiver manager configuration +const uint32_t VAL_CFG_SUBSEC_SENCONF = 0x00000100; // senConf - sensor interface configuration (requires protocol 19+) +const uint32_t VAL_CFG_SUBSEC_RINVCONF = 0x00000200; // rinvConf - remove inventory configuration +const uint32_t VAL_CFG_SUBSEC_ANTCONF = 0x00000400; // antConf - antenna configuration +const uint32_t VAL_CFG_SUBSEC_LOGCONF = 0x00000800; // logConf - logging configuration +const uint32_t VAL_CFG_SUBSEC_FTSCONF = 0x00001000; // ftsConf - FTS configuration (FTS products only) + +enum dynModel // Possible values for the dynamic platform model, which provide more accuract position output for the situation. Description extracted from ZED-F9P Integration Manual +{ + DYN_MODEL_PORTABLE = 0, //Applications with low acceleration, e.g. portable devices. Suitable for most situations. + // 1 is not defined + DYN_MODEL_STATIONARY = 2, //Used in timing applications (antenna must be stationary) or other stationary applications. Velocity restricted to 0 m/s. Zero dynamics assumed. + DYN_MODEL_PEDESTRIAN, //Applications with low acceleration and speed, e.g. how a pedestrian would move. Low acceleration assumed. + DYN_MODEL_AUTOMOTIVE, //Used for applications with equivalent dynamics to those of a passenger car. Low vertical acceleration assumed + DYN_MODEL_SEA, //Recommended for applications at sea, with zero vertical velocity. Zero vertical velocity assumed. Sea level assumed. + DYN_MODEL_AIRBORNE1g, //Airborne <1g acceleration. Used for applications with a higher dynamic range and greater vertical acceleration than a passenger car. No 2D position fixes supported. + DYN_MODEL_AIRBORNE2g, //Airborne <2g acceleration. Recommended for typical airborne environments. No 2D position fixes supported. + DYN_MODEL_AIRBORNE4g, //Airborne <4g acceleration. Only recommended for extremely dynamic environments. No 2D position fixes supported. + DYN_MODEL_WRIST, // Not supported in protocol versions less than 18. Only recommended for wrist worn applications. Receiver will filter out arm motion. + DYN_MODEL_BIKE, // Supported in protocol versions 19.2 +}; + +#ifndef MAX_PAYLOAD_SIZE + +#define MAX_PAYLOAD_SIZE 256 //We need ~220 bytes for getProtocolVersion on most ublox modules +//#define MAX_PAYLOAD_SIZE 768 //Worst case: UBX_CFG_VALSET packet with 64 keyIDs each with 64 bit values + +#endif + +//-=-=-=-=- UBX binary specific variables +typedef struct +{ + uint8_t cls; + uint8_t id; + uint16_t len; //Length of the payload. Does not include cls, id, or checksum bytes + uint16_t counter; //Keeps track of number of overall bytes received. Some responses are larger than 255 bytes. + uint16_t startingSpot; //The counter value needed to go past before we begin recording into payload array + uint8_t *payload; + uint8_t checksumA; //Given to us from module. Checked against the rolling calculated A/B checksums. + uint8_t checksumB; + sfe_ublox_packet_validity_e valid; //Goes from NOT_DEFINED to VALID or NOT_VALID when checksum is checked + sfe_ublox_packet_validity_e classAndIDmatch; // Goes from NOT_DEFINED to VALID or NOT_VALID when the Class and ID match the requestedClass and requestedID +} ubxPacket; + +// Struct to hold the results returned by getGeofenceState (returned by UBX-NAV-GEOFENCE) +typedef struct +{ + uint8_t status; // Geofencing status: 0 - Geofencing not available or not reliable; 1 - Geofencing active + uint8_t numFences; // Number of geofences + uint8_t combState; // Combined (logical OR) state of all geofences: 0 - Unknown; 1 - Inside; 2 - Outside + uint8_t states[4]; // Geofence states: 0 - Unknown; 1 - Inside; 2 - Outside +} geofenceState; + +// Struct to hold the current geofence parameters +typedef struct +{ + uint8_t numFences; // Number of active geofences + int32_t lats[4]; // Latitudes of geofences (in degrees * 10^-7) + int32_t longs[4]; // Longitudes of geofences (in degrees * 10^-7) + uint32_t rads[4]; // Radii of geofences (in m * 10^-2) +} geofenceParams; + +class SFE_UBLOX_GPS +{ +public: + SFE_UBLOX_GPS(void); + +// A default of 250ms for maxWait seems fine for I2C but is not enough for SerialUSB. +// If you know you are only going to be using I2C / Qwiic communication, you can +// safely reduce defaultMaxWait to 250. +#ifndef defaultMaxWait // Let's allow the user to define their own value if they want to +#define defaultMaxWait 1100 +#endif + + //By default use the default I2C address, and use Wire port + boolean begin(TwoWire &wirePort = Wire, uint8_t deviceAddress = 0x42); //Returns true if module is detected + //serialPort needs to be perviously initialized to correct baud rate + boolean begin(Stream &serialPort); //Returns true if module is detected + + //Returns true if device answers on _gpsI2Caddress address or via Serial + //maxWait is only used for Serial + boolean isConnected(uint16_t maxWait = 1100); + + //Changed in V1.8.1: provides backward compatibility for the examples that call checkUblox directly + //Will default to using packetCfg to look for explicit autoPVT packets so they get processed correctly by processUBX + boolean checkUblox(uint8_t requestedClass = UBX_CLASS_NAV, uint8_t requestedID = UBX_NAV_PVT); //Checks module with user selected commType + + boolean checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Method for I2C polling of data, passing any new bytes to process() + boolean checkUbloxSerial(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Method for serial polling of data, passing any new bytes to process() + + void process(uint8_t incoming, ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Processes NMEA and UBX binary sentences one byte at a time + void processUBX(uint8_t incoming, ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Given a character, file it away into the uxb packet structure + void processRTCMframe(uint8_t incoming); //Monitor the incoming bytes for start and length bytes + void processRTCM(uint8_t incoming) __attribute__((weak)); //Given rtcm byte, do something with it. User can overwrite if desired to pipe bytes to radio, internet, etc. + + void processUBXpacket(ubxPacket *msg); //Once a packet has been received and validated, identify this packet's class/id and update internal flags + void processNMEA(char incoming) __attribute__((weak)); //Given a NMEA character, do something with it. User can overwrite if desired to use something like tinyGPS or MicroNMEA libraries + + void calcChecksum(ubxPacket *msg); //Sets the checksumA and checksumB of a given messages + sfe_ublox_status_e sendCommand(ubxPacket *outgoingUBX, uint16_t maxWait = defaultMaxWait); //Given a packet and payload, send everything including CRC bytes, return true if we got a response + sfe_ublox_status_e sendI2cCommand(ubxPacket *outgoingUBX, uint16_t maxWait = 250); + void sendSerialCommand(ubxPacket *outgoingUBX); + + void printPacket(ubxPacket *packet); //Useful for debugging + + void factoryReset(); //Send factory reset sequence (i.e. load "default" configuration and perform hardReset) + void hardReset(); //Perform a reset leading to a cold start (zero info start-up) + + boolean setI2CAddress(uint8_t deviceAddress, uint16_t maxTime = 250); //Changes the I2C address of the Ublox module + void setSerialRate(uint32_t baudrate, uint8_t uartPort = COM_PORT_UART1, uint16_t maxTime = defaultMaxWait); //Changes the serial baud rate of the Ublox module, uartPort should be COM_PORT_UART1/2 + void setNMEAOutputPort(Stream &nmeaOutputPort); //Sets the internal variable for the port to direct NMEA characters to + + boolean setNavigationFrequency(uint8_t navFreq, uint16_t maxWait = defaultMaxWait); //Set the number of nav solutions sent per second + uint8_t getNavigationFrequency(uint16_t maxWait = defaultMaxWait); //Get the number of nav solutions sent per second currently being output by module + boolean saveConfiguration(uint16_t maxWait = defaultMaxWait); //Save current configuration to flash and BBR (battery backed RAM) + boolean factoryDefault(uint16_t maxWait = defaultMaxWait); //Reset module to factory defaults + boolean saveConfigSelective(uint32_t configMask, uint16_t maxWait = defaultMaxWait); //Save the selected configuration sub-sections to flash and BBR (battery backed RAM) + + sfe_ublox_status_e waitForACKResponse(ubxPacket *outgoingUBX, uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime = defaultMaxWait); //Poll the module until a config packet and an ACK is received + sfe_ublox_status_e waitForNoACKResponse(ubxPacket *outgoingUBX, uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime = defaultMaxWait); //Poll the module until a config packet is received + +// getPVT will only return data once in each navigation cycle. By default, that is once per second. +// Therefore we should set getPVTmaxWait to slightly longer than that. +// If you change the navigation frequency to (e.g.) 4Hz using setNavigationFrequency(4) +// then you should use a shorter maxWait for getPVT. 300msec would be about right: getPVT(300) +// The same is true for getHPPOSLLH. +#define getPVTmaxWait 1100 // Default maxWait for getPVT and all functions which call it +#define getHPPOSLLHmaxWait 1100 // Default maxWait for getHPPOSLLH and all functions which call it + + boolean assumeAutoPVT(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and PVT is send cyclically already + boolean setAutoPVT(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic PVT reports at the navigation frequency + boolean getPVT(uint16_t maxWait = getPVTmaxWait); //Query module for latest group of datums and load global vars: lat, long, alt, speed, SIV, accuracies, etc. If autoPVT is disabled, performs an explicit poll and waits, if enabled does not block. Returns true if new PVT is available. + boolean getTimeData(uint16_t maxWait = getPVTmaxWait); //Query module for latest time data. Calls getPVT or getTIMEUTC depending on which module is attached. + boolean getPositionData(uint16_t maxWait = getPVTmaxWait); //Query module for latest position data. Calls getPVT or getPOSLLH depending on which module is attached. + boolean getTIMEUTC(uint16_t maxWait = getPVTmaxWait); //Query module for current time (for use with older chip series). Returns true if new data is available. + boolean getPOSLLH(uint16_t maxWait = getPVTmaxWait); //Query module for current position (for use with older chip series). Returns true if new data is available. + + boolean setAutoPVT(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic PVT reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + boolean getHPPOSLLH(uint16_t maxWait = getHPPOSLLHmaxWait); //Query module for latest group of datums and load global vars: lat, long, alt, speed, SIV, accuracies, etc. If autoPVT is disabled, performs an explicit poll and waits, if enabled does not block. Returns true if new PVT is available. + void flushPVT(); //Mark all the PVT data as read/stale. This is handy to get data alignment after CRC failure + + int32_t getLatitude(uint16_t maxWait = getPVTmaxWait); //Returns the current latitude in degrees * 10^-7. Auto selects between HighPrecision and Regular depending on ability of module. + int32_t getLongitude(uint16_t maxWait = getPVTmaxWait); //Returns the current longitude in degrees * 10-7. Auto selects between HighPrecision and Regular depending on ability of module. + int32_t getAltitude(uint16_t maxWait = getPVTmaxWait); //Returns the current altitude in mm above ellipsoid + int32_t getAltitudeMSL(uint16_t maxWait = getPVTmaxWait); //Returns the current altitude in mm above mean sea level + uint8_t getSIV(uint16_t maxWait = getPVTmaxWait); //Returns number of sats used in fix + uint8_t getFixType(uint16_t maxWait = getPVTmaxWait); //Returns the type of fix: 0=no, 3=3D, 4=GNSS+Deadreckoning + uint8_t getCarrierSolutionType(uint16_t maxWait = getPVTmaxWait); //Returns RTK solution: 0=no, 1=float solution, 2=fixed solution + int32_t getGroundSpeed(uint16_t maxWait = getPVTmaxWait); //Returns speed in mm/s + int32_t getHeading(uint16_t maxWait = getPVTmaxWait); //Returns heading in degrees * 10^-7 + uint16_t getPDOP(uint16_t maxWait = getPVTmaxWait); //Returns positional dillution of precision * 10^-2 (dimensionless) + uint16_t getYear(uint16_t maxWait = getPVTmaxWait); + uint8_t getMonth(uint16_t maxWait = getPVTmaxWait); + uint8_t getDay(uint16_t maxWait = getPVTmaxWait); + uint8_t getHour(uint16_t maxWait = getPVTmaxWait); + uint8_t getMinute(uint16_t maxWait = getPVTmaxWait); + uint8_t getSecond(uint16_t maxWait = getPVTmaxWait); + uint16_t getMillisecond(uint16_t maxWait = getPVTmaxWait); + int32_t getNanosecond(uint16_t maxWait = getPVTmaxWait); + uint32_t getTimeOfWeek(uint16_t maxWait = getPVTmaxWait); + + int32_t getHighResLatitude(uint16_t maxWait = getHPPOSLLHmaxWait); + int8_t getHighResLatitudeHp(uint16_t maxWait = getHPPOSLLHmaxWait); + int32_t getHighResLongitude(uint16_t maxWait = getHPPOSLLHmaxWait); + int8_t getHighResLongitudeHp(uint16_t maxWait = getHPPOSLLHmaxWait); + int32_t getElipsoid(uint16_t maxWait = getHPPOSLLHmaxWait); + int8_t getElipsoidHp(uint16_t maxWait = getHPPOSLLHmaxWait); + int32_t getMeanSeaLevel(uint16_t maxWait = getHPPOSLLHmaxWait); + int8_t getMeanSeaLevelHp(uint16_t maxWait = getHPPOSLLHmaxWait); + int32_t getGeoidSeparation(uint16_t maxWait = getHPPOSLLHmaxWait); + uint32_t getHorizontalAccuracy(uint16_t maxWait = getHPPOSLLHmaxWait); + uint32_t getVerticalAccuracy(uint16_t maxWait = getHPPOSLLHmaxWait); + + //Port configurations + boolean setPortOutput(uint8_t portID, uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure a given port to output UBX, NMEA, RTCM3 or a combination thereof + boolean setPortInput(uint8_t portID, uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure a given port to input UBX, NMEA, RTCM3 or a combination thereof + boolean getPortSettings(uint8_t portID, uint16_t maxWait = defaultMaxWait); //Returns the current protocol bits in the UBX-CFG-PRT command for a given port + + boolean setI2COutput(uint8_t comSettings, uint16_t maxWait = 250); //Configure I2C port to output UBX, NMEA, RTCM3 or a combination thereof + boolean setUART1Output(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure UART1 port to output UBX, NMEA, RTCM3 or a combination thereof + boolean setUART2Output(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure UART2 port to output UBX, NMEA, RTCM3 or a combination thereof + boolean setUSBOutput(uint8_t comSettings, uint16_t maxWait = 250); //Configure USB port to output UBX, NMEA, RTCM3 or a combination thereof + boolean setSPIOutput(uint8_t comSettings, uint16_t maxWait = 250); //Configure SPI port to output UBX, NMEA, RTCM3 or a combination thereof + + //Functions to turn on/off message types for a given port ID (see COM_PORT_I2C, etc above) + boolean configureMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t sendRate, uint16_t maxWait = defaultMaxWait); + boolean enableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t sendRate = 1, uint16_t maxWait = defaultMaxWait); + boolean disableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint16_t maxWait = defaultMaxWait); + boolean enableNMEAMessage(uint8_t msgID, uint8_t portID, uint8_t sendRate = 1, uint16_t maxWait = defaultMaxWait); + boolean disableNMEAMessage(uint8_t msgID, uint8_t portID, uint16_t maxWait = defaultMaxWait); + boolean enableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint8_t sendRate, uint16_t maxWait = defaultMaxWait); //Given a message number turns on a message ID for output over given PortID + boolean disableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint16_t maxWait = defaultMaxWait); //Turn off given RTCM message from a given port + + //General configuration (used only on protocol v27 and higher - ie, ZED-F9P) + //It is probably safe to assume that users of the ZED-F9P will be using I2C / Qwiic. + //If they are using Serial then the higher baud rate will also help. So let's leave maxWait set to 250ms. + uint8_t getVal8(uint16_t group, uint16_t id, uint8_t size, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Returns the value at a given group/id/size location + uint8_t getVal8(uint32_t keyID, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Returns the value at a given group/id/size location + uint8_t setVal(uint32_t keyID, uint16_t value, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Sets the 16-bit value at a given group/id/size location + uint8_t setVal8(uint32_t keyID, uint8_t value, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Sets the 8-bit value at a given group/id/size location + uint8_t setVal16(uint32_t keyID, uint16_t value, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Sets the 16-bit value at a given group/id/size location + uint8_t setVal32(uint32_t keyID, uint32_t value, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Sets the 32-bit value at a given group/id/size location + uint8_t newCfgValset8(uint32_t keyID, uint8_t value, uint8_t layer = VAL_LAYER_BBR); //Define a new UBX-CFG-VALSET with the given KeyID and 8-bit value + uint8_t newCfgValset16(uint32_t keyID, uint16_t value, uint8_t layer = VAL_LAYER_BBR); //Define a new UBX-CFG-VALSET with the given KeyID and 16-bit value + uint8_t newCfgValset32(uint32_t keyID, uint32_t value, uint8_t layer = VAL_LAYER_BBR); //Define a new UBX-CFG-VALSET with the given KeyID and 32-bit value + uint8_t addCfgValset8(uint32_t keyID, uint8_t value); //Add a new KeyID and 8-bit value to an existing UBX-CFG-VALSET ubxPacket + uint8_t addCfgValset16(uint32_t keyID, uint16_t value); //Add a new KeyID and 16-bit value to an existing UBX-CFG-VALSET ubxPacket + uint8_t addCfgValset32(uint32_t keyID, uint32_t value); //Add a new KeyID and 32-bit value to an existing UBX-CFG-VALSET ubxPacket + uint8_t sendCfgValset8(uint32_t keyID, uint8_t value, uint16_t maxWait = 250); //Add the final KeyID and 8-bit value to an existing UBX-CFG-VALSET ubxPacket and send it + uint8_t sendCfgValset16(uint32_t keyID, uint16_t value, uint16_t maxWait = 250); //Add the final KeyID and 16-bit value to an existing UBX-CFG-VALSET ubxPacket and send it + uint8_t sendCfgValset32(uint32_t keyID, uint32_t value, uint16_t maxWait = 250); //Add the final KeyID and 32-bit value to an existing UBX-CFG-VALSET ubxPacket and send it + + //Functions used for RTK and base station setup + //It is probably safe to assume that users of the RTK will be using I2C / Qwiic. So let's leave maxWait set to 250ms. + boolean getSurveyMode(uint16_t maxWait = 250); //Get the current TimeMode3 settings + boolean setSurveyMode(uint8_t mode, uint16_t observationTime, float requiredAccuracy, uint16_t maxWait = 250); //Control survey in mode + boolean enableSurveyMode(uint16_t observationTime, float requiredAccuracy, uint16_t maxWait = 250); //Begin Survey-In for NEO-M8P + boolean disableSurveyMode(uint16_t maxWait = 250); //Stop Survey-In mode + + boolean getSurveyStatus(uint16_t maxWait); //Reads survey in status and sets the global variables + + uint32_t getPositionAccuracy(uint16_t maxWait = 1100); //Returns the 3D accuracy of the current high-precision fix, in mm. Supported on NEO-M8P, ZED-F9P, + + uint8_t getProtocolVersionHigh(uint16_t maxWait = 500); //Returns the PROTVER XX.00 from UBX-MON-VER register + uint8_t getProtocolVersionLow(uint16_t maxWait = 500); //Returns the PROTVER 00.XX from UBX-MON-VER register + boolean getProtocolVersion(uint16_t maxWait = 500); //Queries module, loads low/high bytes + + boolean getRELPOSNED(uint16_t maxWait = 1100); //Get Relative Positioning Information of the NED frame + + void enableDebugging(Stream &debugPort = Serial, boolean printLimitedDebug = false); //Given a port to print to, enable debug messages. Default to all, not limited. + void disableDebugging(void); //Turn off debug statements + void debugPrint(char *message); //Safely print debug statements + void debugPrintln(char *message); //Safely print debug statements + const char *statusString(sfe_ublox_status_e stat); //Pretty print the return value + + //Support for geofences + boolean addGeofence(int32_t latitude, int32_t longitude, uint32_t radius, byte confidence = 0, byte pinPolarity = 0, byte pin = 0, uint16_t maxWait = 1100); // Add a new geofence + boolean clearGeofences(uint16_t maxWait = 1100); //Clears all geofences + boolean getGeofenceState(geofenceState ¤tGeofenceState, uint16_t maxWait = 1100); //Returns the combined geofence state + boolean clearAntPIO(uint16_t maxWait = 1100); //Clears the antenna control pin settings to release the PIOs + geofenceParams currentGeofenceParams; // Global to store the geofence parameters + + boolean powerSaveMode(bool power_save = true, uint16_t maxWait = 1100); + uint8_t getPowerSaveMode(uint16_t maxWait = 1100); // Returns 255 if the sendCommand fails + + //Change the dynamic platform model using UBX-CFG-NAV5 + boolean setDynamicModel(dynModel newDynamicModel = DYN_MODEL_PORTABLE, uint16_t maxWait = 1100); + uint8_t getDynamicModel(uint16_t maxWait = 1100); // Get the dynamic model - returns 255 if the sendCommand fails + + boolean getEsfInfo(uint16_t maxWait = 1100); + boolean getEsfIns(uint16_t maxWait = 1100); + boolean getEsfDataInfo(uint16_t maxWait = 1100); + boolean getEsfRawDataInfo(uint16_t maxWait = 1100); + sfe_ublox_status_e getSensState(uint8_t sensor, uint16_t maxWait = 1100); + boolean getVehAtt(uint16_t maxWait = 1100); + + //Survey-in specific controls + struct svinStructure + { + boolean active; + boolean valid; + uint16_t observationTime; + float meanAccuracy; + } svin; + + //Relative Positioning Info in NED frame specific controls + struct frelPosInfoStructure + { + uint16_t refStationID; + + float relPosN; + float relPosE; + float relPosD; + + long relPosLength; + long relPosHeading; + + int8_t relPosHPN; + int8_t relPosHPE; + int8_t relPosHPD; + int8_t relPosHPLength; + + float accN; + float accE; + float accD; + + bool gnssFixOk; + bool diffSoln; + bool relPosValid; + uint8_t carrSoln; + bool isMoving; + bool refPosMiss; + bool refObsMiss; + } relPosInfo; + + //The major datums we want to globally store + uint16_t gpsYear; + uint8_t gpsMonth; + uint8_t gpsDay; + uint8_t gpsHour; + uint8_t gpsMinute; + uint8_t gpsSecond; + uint16_t gpsMillisecond; + int32_t gpsNanosecond; + + int32_t latitude; //Degrees * 10^-7 (more accurate than floats) + int32_t longitude; //Degrees * 10^-7 (more accurate than floats) + int32_t altitude; //Number of mm above ellipsoid + int32_t altitudeMSL; //Number of mm above Mean Sea Level + uint8_t SIV; //Number of satellites used in position solution + uint8_t fixType; //Tells us when we have a solution aka lock + uint8_t carrierSolution; //Tells us when we have an RTK float/fixed solution + int32_t groundSpeed; //mm/s + int32_t headingOfMotion; //degrees * 10^-5 + uint16_t pDOP; //Positional dilution of precision * 10^-2 (dimensionless) + uint8_t versionLow; //Loaded from getProtocolVersion(). + uint8_t versionHigh; + + uint32_t timeOfWeek; // ms + int32_t highResLatitude; // Degrees * 10^-7 + int32_t highResLongitude; // Degrees * 10^-7 + int32_t elipsoid; // Height above ellipsoid in mm (Typo! Should be eLLipsoid! **Uncorrected for backward-compatibility.**) + int32_t meanSeaLevel; // Height above mean sea level in mm + int32_t geoidSeparation; // This seems to only be provided in NMEA GGA and GNS messages + uint32_t horizontalAccuracy; // mm * 10^-1 (i.e. 0.1mm) + uint32_t verticalAccuracy; // mm * 10^-1 (i.e. 0.1mm) + int8_t elipsoidHp; // High precision component of the height above ellipsoid in mm * 10^-1 (Deliberate typo! Should be eLLipsoidHp!) + int8_t meanSeaLevelHp; // High precision component of Height above mean sea level in mm * 10^-1 + int8_t highResLatitudeHp; // High precision component of latitude: Degrees * 10^-9 + int8_t highResLongitudeHp; // High precision component of longitude: Degrees * 10^-9 + + uint16_t rtcmFrameCounter = 0; //Tracks the type of incoming byte inside RTCM frame + +#define DEF_NUM_SENS 7 + struct deadReckData + { + uint8_t version; + uint8_t fusionMode; + + uint8_t xAngRateVald; + uint8_t yAngRateVald; + uint8_t zAngRateVald; + uint8_t xAccelVald; + uint8_t yAccelVald; + uint8_t zAccelVald; + + int32_t xAngRate; + int32_t yAngRate; + int32_t zAngRate; + + int32_t xAccel; + int32_t yAccel; + int32_t zAccel; + + // The array size is based on testing directly on M8U and F9R + uint32_t rawData; + uint32_t rawDataType; + uint32_t rawTStamp; + + uint32_t data[DEF_NUM_SENS]; + uint32_t dataType[DEF_NUM_SENS]; + uint32_t dataTStamp[DEF_NUM_SENS]; + } imuMeas; + + struct indivImuData + { + + uint8_t numSens; + + uint8_t senType; + boolean isUsed; + boolean isReady; + uint8_t calibStatus; + uint8_t timeStatus; + + uint8_t freq; // Hz + + boolean badMeas; + boolean badTag; + boolean missMeas; + boolean noisyMeas; + } ubloxSen; + + struct vehicleAttitude + { + // All values in degrees + int32_t roll; + int32_t pitch; + int32_t heading; + uint32_t accRoll; + uint32_t accPitch; + uint32_t accHeading; + } vehAtt; + +private: + //Depending on the sentence type the processor will load characters into different arrays + enum SentenceTypes + { + NONE = 0, + NMEA, + UBX, + RTCM + } currentSentence = NONE; + + //Depending on the ubx binary response class, store binary responses into different places + enum classTypes + { + CLASS_NONE = 0, + CLASS_ACK, + CLASS_NOT_AN_ACK + } ubxFrameClass = CLASS_NONE; + + enum commTypes + { + COMM_TYPE_I2C = 0, + COMM_TYPE_SERIAL, + COMM_TYPE_SPI + } commType = COMM_TYPE_I2C; //Controls which port we look to for incoming bytes + + //Functions + boolean checkUbloxInternal(ubxPacket *incomingUBX, uint8_t requestedClass = 255, uint8_t requestedID = 255); //Checks module with user selected commType + uint32_t extractLong(uint8_t spotToStart); //Combine four bytes from payload into long + uint16_t extractInt(uint8_t spotToStart); //Combine two bytes from payload into int + uint8_t extractByte(uint8_t spotToStart); //Get byte from payload + int8_t extractSignedChar(uint8_t spotToStart); //Get signed 8-bit value from payload + void addToChecksum(uint8_t incoming); //Given an incoming byte, adjust rollingChecksumA/B + + //Variables + TwoWire *_i2cPort; //The generic connection to user's chosen I2C hardware + Stream *_serialPort; //The generic connection to user's chosen Serial hardware + Stream *_nmeaOutputPort = NULL; //The user can assign an output port to print NMEA sentences if they wish + Stream *_debugSerial; //The stream to send debug messages to if enabled + + uint8_t _gpsI2Caddress = 0x42; //Default 7-bit unshifted address of the ublox 6/7/8/M8/F9 series + //This can be changed using the ublox configuration software + + boolean _printDebug = false; //Flag to print the serial commands we are sending to the Serial port for debug + boolean _printLimitedDebug = false; //Flag to print limited debug messages. Useful for I2C debugging or high navigation rates + + //The packet buffers + //These are pointed at from within the ubxPacket + uint8_t payloadAck[2]; // Holds the requested ACK/NACK + uint8_t payloadCfg[MAX_PAYLOAD_SIZE]; // Holds the requested data packet + uint8_t payloadBuf[2]; // Temporary buffer used to screen incoming packets or dump unrequested packets + + //Init the packet structures and init them with pointers to the payloadAck, payloadCfg and payloadBuf arrays + ubxPacket packetAck = {0, 0, 0, 0, 0, payloadAck, 0, 0, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED}; + ubxPacket packetCfg = {0, 0, 0, 0, 0, payloadCfg, 0, 0, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED}; + ubxPacket packetBuf = {0, 0, 0, 0, 0, payloadBuf, 0, 0, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED}; + + //Flag if this packet is unrequested (and so should be ignored and not copied into packetCfg or packetAck) + boolean ignoreThisPayload = false; + + //Identify which buffer is in use + //Data is stored in packetBuf until the requested class and ID can be validated + //If a match is seen, data is diverted into packetAck or packetCfg + sfe_ublox_packet_buffer_e activePacketBuffer = SFE_UBLOX_PACKET_PACKETBUF; + + //Limit checking of new data to every X ms + //If we are expecting an update every X Hz then we should check every half that amount of time + //Otherwise we may block ourselves from seeing new data + uint8_t i2cPollingWait = 100; //Default to 100ms. Adjusted when user calls setNavigationFrequency() + + unsigned long lastCheck = 0; + boolean autoPVT = false; //Whether autoPVT is enabled or not + boolean autoPVTImplicitUpdate = true; // Whether autoPVT is triggered by accessing stale data (=true) or by a call to checkUblox (=false) + uint16_t ubxFrameCounter; //It counts all UBX frame. [Fixed header(2bytes), CLS(1byte), ID(1byte), length(2bytes), payload(x bytes), checksums(2bytes)] + + uint8_t rollingChecksumA; //Rolls forward as we receive incoming bytes. Checked against the last two A/B checksum bytes + uint8_t rollingChecksumB; //Rolls forward as we receive incoming bytes. Checked against the last two A/B checksum bytes + + //Create bit field for staleness of each datum in PVT we want to monitor + //moduleQueried.latitude goes true each time we call getPVT() + //This reduces the number of times we have to call getPVT as this can take up to ~1s per read + //depending on update rate + struct + { + uint32_t gpsiTOW : 1; + uint32_t gpsYear : 1; + uint32_t gpsMonth : 1; + uint32_t gpsDay : 1; + uint32_t gpsHour : 1; + uint32_t gpsMinute : 1; + uint32_t gpsSecond : 1; + uint32_t gpsNanosecond : 1; + + uint32_t all : 1; + uint32_t longitude : 1; + uint32_t latitude : 1; + uint32_t altitude : 1; + uint32_t altitudeMSL : 1; + uint32_t SIV : 1; + uint32_t fixType : 1; + uint32_t carrierSolution : 1; + uint32_t groundSpeed : 1; + uint32_t headingOfMotion : 1; + uint32_t pDOP : 1; + uint32_t versionNumber : 1; + } moduleQueried; + + struct + { + uint16_t all : 1; + uint16_t timeOfWeek : 1; + uint16_t highResLatitude : 1; + uint16_t highResLongitude : 1; + uint16_t elipsoid : 1; + uint16_t meanSeaLevel : 1; + uint16_t geoidSeparation : 1; // Redundant but kept for backward-compatibility + uint16_t horizontalAccuracy : 1; + uint16_t verticalAccuracy : 1; + uint16_t elipsoidHp : 1; + uint16_t meanSeaLevelHp : 1; + uint16_t highResLatitudeHp : 1; + uint16_t highResLongitudeHp : 1; + } highResModuleQueried; + + uint16_t rtcmLen = 0; +}; + +#endif diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example10_GetHighPrecisionPositionAndAccuracy/Example10_GetHighPrecisionPositionAndAccuracy.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example10_GetHighPrecisionPositionAndAccuracy/Example10_GetHighPrecisionPositionAndAccuracy.ino new file mode 100644 index 0000000..05f5fb6 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example10_GetHighPrecisionPositionAndAccuracy/Example10_GetHighPrecisionPositionAndAccuracy.ino @@ -0,0 +1,154 @@ +/* + Get the high precision geodetic solution for latitude and longitude + By: Nathan Seidle + Modified by: Steven Rowland and Paul Clark + SparkFun Electronics + Date: April 17th, 2020 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to inspect the accuracy of the high-precision + positional solution. Please see below for information about the units. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module. + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + + Wire.begin(); + + //myGPS.enableDebugging(Serial); + + if (myGPS.begin(Wire) == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.setNavigationFrequency(20); //Set output to 20 times a second + + byte rate = myGPS.getNavigationFrequency(); //Get the update rate of this module + Serial.print("Current update rate: "); + Serial.println(rate); + + //myGPS.saveConfiguration(); //Save the current settings to flash and BBR +} + +void loop() +{ + //Query module only every second. Doing it more often will just cause I2C traffic. + //The module only responds when a new position is available + if (millis() - lastTime > 1000) + { + lastTime = millis(); //Update the timer + + // getHighResLatitude: returns the latitude from HPPOSLLH as an int32_t in degrees * 10^-7 + // getHighResLatitudeHp: returns the high resolution component of latitude from HPPOSLLH as an int8_t in degrees * 10^-9 + // getHighResLongitude: returns the longitude from HPPOSLLH as an int32_t in degrees * 10^-7 + // getHighResLongitudeHp: returns the high resolution component of longitude from HPPOSLLH as an int8_t in degrees * 10^-9 + // getElipsoid: returns the height above ellipsoid as an int32_t in mm + // getElipsoidHp: returns the high resolution component of the height above ellipsoid as an int8_t in mm * 10^-1 + // getMeanSeaLevel: returns the height above mean sea level as an int32_t in mm + // getMeanSeaLevelHp: returns the high resolution component of the height above mean sea level as an int8_t in mm * 10^-1 + // getHorizontalAccuracy: returns the horizontal accuracy estimate from HPPOSLLH as an uint32_t in mm * 10^-1 + + // If you want to use the high precision latitude and longitude with the full 9 decimal places + // you will need to use a 64-bit double - which is not supported on all platforms + + // To allow this example to run on standard platforms, we cheat by converting lat and lon to integer and fractional degrees + + // The high resolution altitudes can be converted into standard 32-bit float + + // First, let's collect the position data + int32_t latitude = myGPS.getHighResLatitude(); + int8_t latitudeHp = myGPS.getHighResLatitudeHp(); + int32_t longitude = myGPS.getHighResLongitude(); + int8_t longitudeHp = myGPS.getHighResLongitudeHp(); + int32_t ellipsoid = myGPS.getElipsoid(); + int8_t ellipsoidHp = myGPS.getElipsoidHp(); + int32_t msl = myGPS.getMeanSeaLevel(); + int8_t mslHp = myGPS.getMeanSeaLevelHp(); + uint32_t accuracy = myGPS.getHorizontalAccuracy(); + + // Defines storage for the lat and lon units integer and fractional parts + int32_t lat_int; // Integer part of the latitude in degrees + int32_t lat_frac; // Fractional part of the latitude + int32_t lon_int; // Integer part of the longitude in degrees + int32_t lon_frac; // Fractional part of the longitude + + // Calculate the latitude and longitude integer and fractional parts + lat_int = latitude / 10000000; // Convert latitude from degrees * 10^-7 to Degrees + lat_frac = latitude - (lat_int * 10000000); // Calculate the fractional part of the latitude + lat_frac = (lat_frac * 100) + latitudeHp; // Now add the high resolution component + if (lat_frac < 0) // If the fractional part is negative, remove the minus sign + { + lat_frac = 0 - lat_frac; + } + lon_int = longitude / 10000000; // Convert latitude from degrees * 10^-7 to Degrees + lon_frac = longitude - (lon_int * 10000000); // Calculate the fractional part of the longitude + lon_frac = (lon_frac * 100) + longitudeHp; // Now add the high resolution component + if (lon_frac < 0) // If the fractional part is negative, remove the minus sign + { + lon_frac = 0 - lon_frac; + } + + // Print the lat and lon + Serial.print("Lat (deg): "); + Serial.print(lat_int); // Print the integer part of the latitude + Serial.print("."); + Serial.print(lat_frac); // Print the fractional part of the latitude + Serial.print(", Lon (deg): "); + Serial.print(lon_int); // Print the integer part of the latitude + Serial.print("."); + Serial.println(lon_frac); // Print the fractional part of the latitude + + // Now define float storage for the heights and accuracy + float f_ellipsoid; + float f_msl; + float f_accuracy; + + // Calculate the height above ellipsoid in mm * 10^-1 + f_ellipsoid = (ellipsoid * 10) + ellipsoidHp; + // Now convert to m + f_ellipsoid = f_ellipsoid / 10000.0; // Convert from mm * 10^-1 to m + + // Calculate the height above mean sea level in mm * 10^-1 + f_msl = (msl * 10) + mslHp; + // Now convert to m + f_msl = f_msl / 10000.0; // Convert from mm * 10^-1 to m + + // Convert the horizontal accuracy (mm * 10^-1) to a float + f_accuracy = accuracy; + // Now convert to m + f_accuracy = f_accuracy / 10000.0; // Convert from mm * 10^-1 to m + + // Finally, do the printing + Serial.print("Ellipsoid (m): "); + Serial.print(f_ellipsoid, 4); // Print the ellipsoid with 4 decimal places + + Serial.print(", Mean Sea Level(m): "); + Serial.print(f_msl, 4); // Print the mean sea level with 4 decimal places + + Serial.print(", Accuracy (m): "); + Serial.println(f_accuracy, 4); // Print the accuracy with 4 decimal places + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example11_GetHighPrecisionPositionUsingDouble/Example11_GetHighPrecisionPositionUsingDouble.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example11_GetHighPrecisionPositionUsingDouble/Example11_GetHighPrecisionPositionUsingDouble.ino new file mode 100644 index 0000000..7da62f1 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example11_GetHighPrecisionPositionUsingDouble/Example11_GetHighPrecisionPositionUsingDouble.ino @@ -0,0 +1,146 @@ +/* + Get the high precision geodetic solution for latitude and longitude using double + By: Nathan Seidle + Modified by: Paul Clark (PaulZC) + SparkFun Electronics + Date: April 17th, 2020 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to inspect the accuracy of the high-precision + positional solution. Please see below for information about the units. + + ** This example will only work correctly on platforms which support 64-bit double ** + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + + Hardware Connections: + Plug a Qwiic cable into the GPS and (e.g.) a Redboard Artemis https://www.sparkfun.com/products/15444 + or an Artemis Thing Plus https://www.sparkfun.com/products/15574 + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include // Needed for I2C to GPS + +#define myWire Wire // This will work on the Redboard Artemis and the Artemis Thing Plus using Qwiic +//#define myWire Wire1 // Uncomment this line if you are using the extra SCL1/SDA1 pins (D17 and D16) on the Thing Plus + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module. + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + + myWire.begin(); + + //myGPS.enableDebugging(Serial); // Uncomment this line to enable debug messages + + if (myGPS.begin(myWire) == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1) + ; + } + + // Check that this platform supports 64-bit (8 byte) double + if (sizeof(double) < 8) + { + Serial.println(F("Warning! Your platform does not support 64-bit double.")); + Serial.println(F("The latitude and longitude will be inaccurate.")); + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + + //myGPS.setNavigationFrequency(20); //Set output to 20 times a second + + byte rate = myGPS.getNavigationFrequency(); //Get the update rate of this module + Serial.print("Current update rate: "); + Serial.println(rate); + + //myGPS.saveConfiguration(); //Save the current settings to flash and BBR +} + +void loop() +{ + //Query module only every second. + //The module only responds when a new position is available. + if (millis() - lastTime > 1000) + { + lastTime = millis(); //Update the timer + + // getHighResLatitude: returns the latitude from HPPOSLLH as an int32_t in degrees * 10^-7 + // getHighResLatitudeHp: returns the high resolution component of latitude from HPPOSLLH as an int8_t in degrees * 10^-9 + // getHighResLongitude: returns the longitude from HPPOSLLH as an int32_t in degrees * 10^-7 + // getHighResLongitudeHp: returns the high resolution component of longitude from HPPOSLLH as an int8_t in degrees * 10^-9 + // getElipsoid: returns the height above ellipsoid as an int32_t in mm + // getElipsoidHp: returns the high resolution component of the height above ellipsoid as an int8_t in mm * 10^-1 + // getMeanSeaLevel: returns the height above mean sea level as an int32_t in mm + // getMeanSeaLevelHp: returns the high resolution component of the height above mean sea level as an int8_t in mm * 10^-1 + // getHorizontalAccuracy: returns the horizontal accuracy estimate from HPPOSLLH as an uint32_t in mm * 10^-1 + + // First, let's collect the position data + int32_t latitude = myGPS.getHighResLatitude(); + int8_t latitudeHp = myGPS.getHighResLatitudeHp(); + int32_t longitude = myGPS.getHighResLongitude(); + int8_t longitudeHp = myGPS.getHighResLongitudeHp(); + int32_t ellipsoid = myGPS.getElipsoid(); + int8_t ellipsoidHp = myGPS.getElipsoidHp(); + int32_t msl = myGPS.getMeanSeaLevel(); + int8_t mslHp = myGPS.getMeanSeaLevelHp(); + uint32_t accuracy = myGPS.getHorizontalAccuracy(); + + // Defines storage for the lat and lon as double + double d_lat; // latitude + double d_lon; // longitude + + // Assemble the high precision latitude and longitude + d_lat = ((double)latitude) / 10000000.0; // Convert latitude from degrees * 10^-7 to degrees + d_lat += ((double)latitudeHp) / 1000000000.0; // Now add the high resolution component (degrees * 10^-9 ) + d_lon = ((double)longitude) / 10000000.0; // Convert longitude from degrees * 10^-7 to degrees + d_lon += ((double)longitudeHp) / 1000000000.0; // Now add the high resolution component (degrees * 10^-9 ) + + // Print the lat and lon + Serial.print("Lat (deg): "); + Serial.print(d_lat, 9); + Serial.print(", Lon (deg): "); + Serial.print(d_lon, 9); + + // Now define float storage for the heights and accuracy + float f_ellipsoid; + float f_msl; + float f_accuracy; + + // Calculate the height above ellipsoid in mm * 10^-1 + f_ellipsoid = (ellipsoid * 10) + ellipsoidHp; + // Now convert to m + f_ellipsoid = f_ellipsoid / 10000.0; // Convert from mm * 10^-1 to m + + // Calculate the height above mean sea level in mm * 10^-1 + f_msl = (msl * 10) + mslHp; + // Now convert to m + f_msl = f_msl / 10000.0; // Convert from mm * 10^-1 to m + + // Convert the horizontal accuracy (mm * 10^-1) to a float + f_accuracy = accuracy; + // Now convert to m + f_accuracy = f_accuracy / 10000.0; // Convert from mm * 10^-1 to m + + // Finally, do the printing + Serial.print(", Ellipsoid (m): "); + Serial.print(f_ellipsoid, 4); // Print the ellipsoid with 4 decimal places + + Serial.print(", Mean Sea Level (m): "); + Serial.print(f_msl, 4); // Print the mean sea level with 4 decimal places + + Serial.print(", Accuracy (m): "); + Serial.println(f_accuracy, 4); // Print the accuracy with 4 decimal places + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example12_setStaticPosition/Example12_setStaticPosition.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example12_setStaticPosition/Example12_setStaticPosition.ino new file mode 100644 index 0000000..1f47f95 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example12_setStaticPosition/Example12_setStaticPosition.ino @@ -0,0 +1,73 @@ +/* + Set the static position of the receiver. + By: SparkFun Electronics / Nathan Seidle + Date: September 26th, 2020 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to set the static position of a receiver + using an Earth-Centered, Earth-Fixed (ECEF) location. This is the + output from a long (24 hour+) survey-in. Setting the static position + immediately causes the receiver to begin outputting RTCM data (if + enabled), perfect for setting up your own RTCM NTRIP caster or CORS. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + Serial.begin(115200); // You may need to increase this for high navigation rates! + while (!Serial) + ; //Wait for user to open terminal + Serial.println(F("SparkFun u-blox Example")); + + Wire.begin(); + + //myGPS.enableDebugging(); // Uncomment this line to enable debug messages + + if (myGPS.begin() == false) //Connect to the u-blox module using Wire port + { + Serial.println(F("u-blox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1) + ; + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + + //-1280208.308,-4716803.847,4086665.811 is SparkFun HQ so... + + //Units are cm so 1234 = 12.34m + //myGPS.setStaticPosition(-128020831, -471680385, 408666581); + + //Units are cm with a high precision extension so -1234.5678 should be called: (-123456, -78) + myGPS.setStaticPosition(-128020830, -80, -471680384, -70, 408666581, 10); //With high precision 0.1mm parts + + //We can also set via lat/long + //40.09029751,-105.18507900,1560.238 + //myGPS.setStaticPosition(400902975, -1051850790, 156024, true); //True at end enables lat/long input + //myGPS.setStaticPosition(400902975, 10, -1051850790, 0, 156023, 80, true); + + //Now let's use getVals to read back the data + //long ecefX = myGPS.getVal32(0x40030003); + //Serial.print("ecefX: "); + //Serial.println(ecefX); + + Serial.println(F("Done!")); +} + +void loop() +{ +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example13_autoHPPOSLLH/Example13_autoHPPOSLLH.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example13_autoHPPOSLLH/Example13_autoHPPOSLLH.ino new file mode 100644 index 0000000..016be5d --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example13_autoHPPOSLLH/Example13_autoHPPOSLLH.ino @@ -0,0 +1,119 @@ +/* + Configuring the GPS to automatically send HPPOSLLH position reports over I2C + By: Paul Clark + Date: October 27th 2020 + + Based on an earlier example: + By: Nathan Seidle and Thorsten von Eicken + SparkFun Electronics + Date: January 3rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to configure the U-Blox GPS the send navigation reports automatically + and retrieving the latest one via getHPPOSLLH. This eliminates the blocking in getHPPOSLLH while the GPS + produces a fresh navigation solution at the expense of returning a slighly old solution. + + This can be used over serial or over I2C, this example shows the I2C use. With serial the GPS + simply outputs the UBX_NAV_HPPOSLLH packet. With I2C it queues it into its internal I2C buffer (4KB in + size?) where it can be retrieved in the next I2C poll. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + //myGPS.enableDebugging(); // Uncomment this line to enable lots of helpful debug messages + //myGPS.enableDebugging(Serial, true); // Uncomment this line to enable the minimum of helpful debug messages + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + // Uncomment the next line if you want to reset your module back to the default settings with 1Hz navigation rate + //myGPS.factoryDefault(); delay(5000); + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.saveConfigSelective(VAL_CFG_SUBSEC_IOPORT); //Save the communications port settings to flash and BBR + + myGPS.setNavigationFrequency(1); //Produce one solution per second + + + // The acid test: all four of these combinations should work seamlessly :-) + + //myGPS.setAutoPVT(false); // Library will poll each reading + //myGPS.setAutoHPPOSLLH(false); // Library will poll each reading + + //myGPS.setAutoPVT(true); // Tell the GPS to "send" each solution automatically + //myGPS.setAutoHPPOSLLH(false); // Library will poll each reading + + //myGPS.setAutoPVT(false); // Library will poll each reading + //myGPS.setAutoHPPOSLLH(true); // Tell the GPS to "send" each hi res solution automatically + + myGPS.setAutoPVT(true); // Tell the GPS to "send" each solution automatically + myGPS.setAutoHPPOSLLH(true); // Tell the GPS to "send" each hi res solution automatically +} + +void loop() +{ + // Calling getHPPOSLLH returns true if there actually is a fresh navigation solution available. + // Calling getPVT returns true if there actually is a fresh navigation solution available. + if ((myGPS.getHPPOSLLH()) || (myGPS.getPVT())) + { + Serial.println(); + + long highResLatitude = myGPS.getHighResLatitude(); + Serial.print(F("Hi Res Lat: ")); + Serial.print(highResLatitude); + + int highResLatitudeHp = myGPS.getHighResLatitudeHp(); + Serial.print(F(" ")); + Serial.print(highResLatitudeHp); + + long highResLongitude = myGPS.getHighResLongitude(); + Serial.print(F(" Hi Res Long: ")); + Serial.print(highResLongitude); + + int highResLongitudeHp = myGPS.getHighResLongitudeHp(); + Serial.print(F(" ")); + Serial.print(highResLongitudeHp); + + unsigned long horizAccuracy = myGPS.getHorizontalAccuracy(); + Serial.print(F(" Horiz accuracy: ")); + Serial.print(horizAccuracy); + + long latitude = myGPS.getLatitude(); + Serial.print(F(" Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.println(longitude); + } + else + { + Serial.print("."); + delay(50); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example14_NTRIPServer/Example14_NTRIPServer.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example14_NTRIPServer/Example14_NTRIPServer.ino new file mode 100644 index 0000000..b6f0be0 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example14_NTRIPServer/Example14_NTRIPServer.ino @@ -0,0 +1,274 @@ +/* + Use ESP32 WiFi to push RTCM data to RTK2Go (caster) as a Server + By: SparkFun Electronics / Nathan Seidle + Date: December 14th, 2020 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to gather RTCM data over I2C and push it to a casting service over WiFi. + It's confusing, but the Arduino is acting as a 'server' to a 'caster'. In this case we will + use RTK2Go.com as our caster because it is free. A rover (car, surveyor stick, etc) can + then connect to RTK2Go as a 'client' and get the RTCM data it needs. + + You will need to register your mountpoint here: http://www.rtk2go.com/new-reservation/ + (They'll probably block the credentials we include in this example) + + To see if your mountpoint is active go here: http://rtk2go.com:2101/ + + This is a proof of concept. Serving RTCM to a caster over WiFi is useful when you need to + set up a high-precision base station. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/16481 + RTK Surveyor: https://www.sparkfun.com/products/17369 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a ESP32 Thing Plus + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include +#include "secrets.h" +WiFiClient client; + +#include //Needed for I2C to GPS +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +//Basic Connection settings to RTK2Go NTRIP Caster - See secrets for mount specific credentials +//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +const uint16_t casterPort = 2101; +const char * casterHost = "rtk2go.com"; +const char * ntrip_server_name = "SparkFun_RTK_Surveyor"; + +long lastSentRTCM_ms = 0; //Time of last data pushed to socket +int maxTimeBeforeHangup_ms = 10000; //If we fail to get a complete RTCM frame after 10s, then disconnect from caster + +uint32_t serverBytesSent = 0; //Just a running total +//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +long lastReport_ms = 0; //Time of last report of bytes sent + +void setup() +{ + Serial.begin(115200); // You may need to increase this for high navigation rates! + while (!Serial) + ; //Wait for user to open terminal + Serial.println(F("SparkFun u-blox Example")); + + Wire.begin(); + + //myGPS.enableDebugging(); // Uncomment this line to enable debug messages + + if (myGPS.begin() == false) //Connect to the u-blox module using Wire port + { + Serial.println(F("u-blox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1) + ; + } + + Serial.print("Connecting to local WiFi"); + WiFi.begin(ssid, password); + while (WiFi.status() != WL_CONNECTED) { + delay(500); + Serial.print("."); + } + + Serial.print("\nWiFi connected with IP: "); + Serial.println(WiFi.localIP()); + + myGPS.setI2COutput(COM_TYPE_UBX | COM_TYPE_NMEA | COM_TYPE_RTCM3); //UBX+RTCM3 is not a valid option so we enable all three. + + myGPS.setNavigationFrequency(1); //Set output in Hz. RTCM rarely benefits from >1Hz. + + //Disable all NMEA sentences + bool response = true; + response &= myGPS.disableNMEAMessage(UBX_NMEA_GGA, COM_PORT_I2C); + response &= myGPS.disableNMEAMessage(UBX_NMEA_GSA, COM_PORT_I2C); + response &= myGPS.disableNMEAMessage(UBX_NMEA_GSV, COM_PORT_I2C); + response &= myGPS.disableNMEAMessage(UBX_NMEA_RMC, COM_PORT_I2C); + response &= myGPS.disableNMEAMessage(UBX_NMEA_GST, COM_PORT_I2C); + response &= myGPS.disableNMEAMessage(UBX_NMEA_GLL, COM_PORT_I2C); + response &= myGPS.disableNMEAMessage(UBX_NMEA_VTG, COM_PORT_I2C); + + if (response == false) + { + Serial.println(F("Failed to disable NMEA. Freezing...")); + while (1); + } + else + Serial.println(F("NMEA disabled")); + + //Enable necessary RTCM sentences + response &= myGPS.enableRTCMmessage(UBX_RTCM_1005, COM_PORT_I2C, 1); //Enable message 1005 to output through UART2, message every second + response &= myGPS.enableRTCMmessage(UBX_RTCM_1074, COM_PORT_I2C, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1084, COM_PORT_I2C, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1094, COM_PORT_I2C, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1124, COM_PORT_I2C, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1230, COM_PORT_I2C, 10); //Enable message every 10 seconds + + if (response == false) + { + Serial.println(F("Failed to enable RTCM. Freezing...")); + while (1); + } + else + Serial.println(F("RTCM sentences enabled")); + + //-1280208.308,-4716803.847,4086665.811 is SparkFun HQ so... + //Units are cm with a high precision extension so -1234.5678 should be called: (-123456, -78) + //For more infomation see Example12_setStaticPosition + //Note: If you leave these coordinates in place and setup your antenna *not* at SparkFun, your receiver + //will be very confused and fail to generate correction data because, well, you aren't at SparkFun... + //See this tutorial on getting PPP coordinates: https://learn.sparkfun.com/tutorials/how-to-build-a-diy-gnss-reference-station/all + response &= myGPS.setStaticPosition(-128020830, -80, -471680384, -70, 408666581, 10); //With high precision 0.1mm parts + if (response == false) + { + Serial.println(F("Failed to enter static position. Freezing...")); + while (1); + } + else + Serial.println(F("Static position set")); + + //You could instead do a survey-in but it takes much longer to start generating RTCM data. See Example4_BaseWithLCD + //myGPS.enableSurveyMode(60, 5.000); //Enable Survey in, 60 seconds, 5.0m + + if (myGPS.saveConfiguration() == false) //Save the current settings to flash and BBR + Serial.println(F("Module failed to save.")); + + Serial.println(F("Module configuration complete")); +} + +void loop() +{ + if (Serial.available()) beginServing(); + + Serial.println(F("Press any key to start serving.")); + + delay(1000); +} + +void beginServing() +{ + Serial.println("Xmit to RTK2Go. Press any key to stop"); + delay(10); //Wait for any serial to arrive + while (Serial.available()) Serial.read(); //Flush + + while (Serial.available() == 0) + { + //Connect if we are not already + if (client.connected() == false) + { + Serial.printf("Opening socket to %s\n", casterHost); + + if (client.connect(casterHost, casterPort) == true) //Attempt connection + { + Serial.printf("Connected to %s:%d\n", casterHost, casterPort); + + const int SERVER_BUFFER_SIZE = 512; + char serverBuffer[SERVER_BUFFER_SIZE]; + + snprintf(serverBuffer, SERVER_BUFFER_SIZE, "SOURCE %s /%s\r\nSource-Agent: NTRIP %s/%s\r\n\r\n", + mntpnt_pw, mntpnt, ntrip_server_name, "App Version 1.0"); + + Serial.printf("Sending credentials:\n%s\n", serverBuffer); + client.write(serverBuffer, strlen(serverBuffer)); + + //Wait for response + unsigned long timeout = millis(); + while (client.available() == 0) + { + if (millis() - timeout > 5000) + { + Serial.println(">>> Client Timeout !"); + client.stop(); + return; + } + delay(10); + } + + //Check reply + bool connectionSuccess = false; + char response[512]; + int responseSpot = 0; + while (client.available()) + { + response[responseSpot++] = client.read(); + if (strstr(response, "200") > 0) //Look for 'ICY 200 OK' + connectionSuccess = true; + if (responseSpot == 512 - 1) break; + } + response[responseSpot] = '\0'; + + if (connectionSuccess == false) + { + Serial.printf("Failed to connect to RTK2Go: %s", response); + } + } //End attempt to connect + else + { + Serial.println("Connection to host failed"); + } + } //End connected == false + + if (client.connected() == true) + { + delay(10); + while (Serial.available()) Serial.read(); //Flush any endlines or carriage returns + + lastReport_ms = millis(); + lastSentRTCM_ms = millis(); + + //This is the main sending loop. We scan for new ublox data but processRTCM() is where the data actually gets sent out. + while (1) + { + if (Serial.available()) break; + + myGPS.checkUblox(); //See if new data is available. Process bytes as they come in. + + //Close socket if we don't have new data for 10s + //RTK2Go will ban your IP address if you abuse it. See http://www.rtk2go.com/how-to-get-your-ip-banned/ + //So let's not leave the socket open/hanging without data + if (millis() - lastSentRTCM_ms > maxTimeBeforeHangup_ms) + { + Serial.println("RTCM timeout. Disconnecting..."); + client.stop(); + return; + } + + delay(10); + + //Report some statistics every 250 + if (millis() - lastReport_ms > 250) + { + lastReport_ms += 250; + Serial.printf("Total sent: %d\n", serverBytesSent); + } + } + } + + delay(10); + } + + Serial.println("User pressed a key"); + Serial.println("Disconnecting..."); + client.stop(); + + delay(10); + while (Serial.available()) Serial.read(); //Flush any endlines or carriage returns +} + +//This function gets called from the SparkFun u-blox Arduino Library. +//As each RTCM byte comes in you can specify what to do with it +//Useful for passing the RTCM correction data to a radio, Ntrip broadcaster, etc. +void SFE_UBLOX_GPS::processRTCM(uint8_t incoming) +{ + if (client.connected() == true) + { + client.write(incoming); //Send this byte to socket + serverBytesSent++; + lastSentRTCM_ms = millis(); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example14_NTRIPServer/secrets.h b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example14_NTRIPServer/secrets.h new file mode 100644 index 0000000..5dcd50e --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example14_NTRIPServer/secrets.h @@ -0,0 +1,7 @@ +//Your WiFi credentials +const char* ssid = "TRex"; +const char* password = "hasBigTeeth"; + +//Your RTK2GO mount point credentials +const char* mntpnt_pw = "WR5wRo4H"; +const char* mntpnt = "bldr_dwntwn2"; diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example1_GetPositionAccuracy/Example1_GetPositionAccuracy.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example1_GetPositionAccuracy/Example1_GetPositionAccuracy.ino new file mode 100644 index 0000000..04a88ee --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example1_GetPositionAccuracy/Example1_GetPositionAccuracy.ino @@ -0,0 +1,77 @@ +/* + Get the high position accuracy of the RTK enhanced position + By: Nathan Seidle + SparkFun Electronics + Date: January 3rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to inspect the accuracy of the high-precision + positional solution. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module. + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.saveConfiguration(); //Save the current settings to flash and BBR +} + +void loop() +{ + //Query module only every second. Doing it more often will just cause I2C traffic. + //The module only responds when a new position is available + if (millis() - lastTime > 1000) + { + lastTime = millis(); //Update the timer + + long latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + Serial.print(F(" (degrees * 10^-7)")); + + long altitude = myGPS.getAltitude(); + Serial.print(F(" Alt: ")); + Serial.print(altitude); + Serial.print(F(" (mm)")); + + long accuracy = myGPS.getPositionAccuracy(); + Serial.print(F(" 3D Positional Accuracy: ")); + Serial.print(accuracy); + Serial.println(F("mm")); + } + +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example2_ValConfigurationMethod/Example2_ValConfigurationMethod.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example2_ValConfigurationMethod/Example2_ValConfigurationMethod.ino new file mode 100644 index 0000000..3cae992 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example2_ValConfigurationMethod/Example2_ValConfigurationMethod.ino @@ -0,0 +1,60 @@ +/* + Configuring Ublox Module using new VALGET / VALSET / VALDEL methods + By: Nathan Seidle + SparkFun Electronics + Date: January 3rd, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + Ublox depricated many -CFG messages and replaced them with new + VALGET, VALSET, VALDEL methods. This shows the basics of how to use + these methods. + + Leave NMEA parsing behind. Now you can simply ask the module for the datums you want! + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module. + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("SparkFun Ublox Example"); + + Wire.begin(); + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + byte response; + response = myGPS.getVal8(VAL_GROUP_I2C, VAL_ID_I2C_ADDRESS, VAL_GROUP_I2C_SIZE, VAL_LAYER_RAM); + Serial.print(F("I2C Address: 0x")); + Serial.println(response >> 1, HEX); //We have to shift by 1 to get the common '7-bit' I2C address format + + response = myGPS.getVal8(VAL_GROUP_I2COUTPROT, VAL_ID_I2COUTPROT_NMEA, VAL_GROUP_I2COUTPROT_SIZE, VAL_LAYER_RAM); + Serial.print(F("Output NMEA over I2C port: 0x")); + Serial.print(response, HEX); +} + +void loop() +{ +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example3_StartRTCMBase/Example3_StartRTCMBase.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example3_StartRTCMBase/Example3_StartRTCMBase.ino new file mode 100644 index 0000000..1e279b5 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example3_StartRTCMBase/Example3_StartRTCMBase.ino @@ -0,0 +1,176 @@ +/* + Send UBX binary commands to enable RTCM sentences on Ublox ZED-F9P module + By: Nathan Seidle + SparkFun Electronics + Date: January 9th, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example does all steps to configure and enable a ZED-F9P as a base station: + Begin Survey-In + Once we've achieved 2m accuracy and 300s have passed, survey is complete + Enable six RTCM messages + Begin outputting RTCM bytes + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +//#define USE_SERIAL1 // Uncomment this line to push the RTCM data to Serial1 + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("Ublox Base station example"); + +#ifdef USE_SERIAL1 + // If our board supports it, we can output the RTCM data on Serial1 + Serial1.begin(115200); +#endif + + Wire.begin(); + Wire.setClock(400000); //Increase I2C clock speed to 400kHz + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + // Uncomment the next line if you want to reset your module back to the default settings with 1Hz navigation rate + //myGPS.factoryDefault(); delay(5000); + + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.saveConfigSelective(VAL_CFG_SUBSEC_IOPORT); //Save the communications port settings to flash and BBR + + while (Serial.available()) Serial.read(); //Clear any latent chars in serial buffer + Serial.println("Press any key to send commands to begin Survey-In"); + while (Serial.available() == 0) ; //Wait for user to press a key + + boolean response = true; + response &= myGPS.enableRTCMmessage(UBX_RTCM_1005, COM_PORT_I2C, 1); //Enable message 1005 to output through I2C port, message every second + response &= myGPS.enableRTCMmessage(UBX_RTCM_1074, COM_PORT_I2C, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1084, COM_PORT_I2C, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1094, COM_PORT_I2C, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1124, COM_PORT_I2C, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1230, COM_PORT_I2C, 10); //Enable message every 10 seconds + + //Use COM_PORT_UART1 for the above six messages to direct RTCM messages out UART1 + //COM_PORT_UART2, COM_PORT_USB, COM_PORT_SPI are also available + //For example: response &= myGPS.enableRTCMmessage(UBX_RTCM_1005, COM_PORT_UART1, 10); + + if (response == true) + { + Serial.println("RTCM messages enabled"); + } + else + { + Serial.println("RTCM failed to enable. Are you sure you have an ZED-F9P?"); + while (1); //Freeze + } + + //Check if Survey is in Progress before initiating one + response = myGPS.getSurveyStatus(2000); //Query module for SVIN status with 2000ms timeout (request can take a long time) + if (response == false) + { + Serial.println("Failed to get Survey In status"); + while (1); //Freeze + } + + if (myGPS.svin.active == true) + { + Serial.print("Survey already in progress."); + } + else + { + //Start survey + //The ZED-F9P is slightly different than the NEO-M8P. See the Integration manual 3.5.8 for more info. + //response = myGPS.enableSurveyMode(300, 2.000); //Enable Survey in on NEO-M8P, 300 seconds, 2.0m + response = myGPS.enableSurveyMode(60, 5.000); //Enable Survey in, 60 seconds, 5.0m + if (response == false) + { + Serial.println("Survey start failed"); + while (1); + } + Serial.println("Survey started. This will run until 60s has passed and less than 5m accuracy is achieved."); + } + + while(Serial.available()) Serial.read(); //Clear buffer + + //Begin waiting for survey to complete + while (myGPS.svin.valid == false) + { + if(Serial.available()) + { + byte incoming = Serial.read(); + if(incoming == 'x') + { + //Stop survey mode + response = myGPS.disableSurveyMode(); //Disable survey + Serial.println("Survey stopped"); + break; + } + } + + response = myGPS.getSurveyStatus(2000); //Query module for SVIN status with 2000ms timeout (req can take a long time) + if (response == true) + { + Serial.print("Press x to end survey - "); + Serial.print("Time elapsed: "); + Serial.print((String)myGPS.svin.observationTime); + + Serial.print(" Accuracy: "); + Serial.print((String)myGPS.svin.meanAccuracy); + Serial.println(); + } + else + { + Serial.println("SVIN request failed"); + } + + delay(1000); + } + Serial.println("Survey valid!"); + + Serial.println("Base survey complete! RTCM now broadcasting."); + + myGPS.setI2COutput(COM_TYPE_UBX | COM_TYPE_RTCM3); //Set the I2C port to output UBX and RTCM sentences (not really an option, turns on NMEA as well) +} + +void loop() +{ + myGPS.checkUblox(); //See if new data is available. Process bytes as they come in. + + delay(250); //Don't pound too hard on the I2C bus +} + +//This function gets called from the SparkFun Ublox Arduino Library. +//As each RTCM byte comes in you can specify what to do with it +//Useful for passing the RTCM correction data to a radio, Ntrip broadcaster, etc. +void SFE_UBLOX_GPS::processRTCM(uint8_t incoming) +{ +#ifdef USE_SERIAL1 + //Push the RTCM data to Serial1 + Serial1.write(incoming); +#endif + + //Pretty-print the HEX values to Serial + if (myGPS.rtcmFrameCounter % 16 == 0) Serial.println(); + Serial.print(" "); + if (incoming < 0x10) Serial.print("0"); + Serial.print(incoming, HEX); +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example4_BaseWithLCD/Example4_BaseWithLCD.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example4_BaseWithLCD/Example4_BaseWithLCD.ino new file mode 100644 index 0000000..67d7f36 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example4_BaseWithLCD/Example4_BaseWithLCD.ino @@ -0,0 +1,200 @@ +/* + Send UBX binary commands to enable RTCM sentences on Ublox ZED-F9P module + By: Nathan Seidle + SparkFun Electronics + Date: January 9th, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example does all steps to configure and enable a ZED-F9P as a base station: + Begin Survey-In + Once we've achieved 2m accuracy and 300s have passed, survey is complete + Enable six RTCM messages + Begin outputting RTCM bytes + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a BlackBoard + Plug a SerLCD onto the Qwiic bus + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Watch the output on the LCD or open the serial monitor at 115200 baud to see the output +*/ + +#define STAT_LED 13 + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +#include //http://librarymanager/All#SparkFun_SerLCD +SerLCD lcd; // Initialize the library with default I2C address 0x72 + +void setup() +{ + Serial.begin(115200); + while (!Serial) + ; //Wait for user to open terminal + Serial.println("Ublox GPS I2C Test"); + + Wire.begin(); + + pinMode(STAT_LED, OUTPUT); + digitalWrite(STAT_LED, LOW); + + lcd.begin(Wire); //Set up the LCD for Serial communication at 9600bps + lcd.setBacklight(0x4B0082); //indigo, a kind of dark purplish blue + lcd.clear(); + lcd.print(F("LCD Ready")); + + myGPS.begin(Wire); + if (myGPS.isConnected() == false) + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + lcd.setCursor(0, 1); + lcd.print(F("No GPS detected")); + while (1) + ; + } + + Wire.setClock(400000); //Increase I2C clock speed to 400kHz + + lcd.setCursor(0, 1); + lcd.print("GPS Detected"); + + //myGPS.setI2COutput(COM_TYPE_RTCM3); //Set the I2C port to output RTCM3 sentences (turn off NMEA noise) + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX sentences (turn off NMEA noise) + myGPS.saveConfiguration(); //Save the current settings to flash and BBR + + boolean response = true; + response &= myGPS.enableRTCMmessage(UBX_RTCM_1005, COM_PORT_I2C, 1); //Enable message 1005 to output through I2C port, message every second + response &= myGPS.enableRTCMmessage(UBX_RTCM_1074, COM_PORT_I2C, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1084, COM_PORT_I2C, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1094, COM_PORT_I2C, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1124, COM_PORT_I2C, 1); + response &= myGPS.enableRTCMmessage(UBX_RTCM_1230, COM_PORT_I2C, 10); //Enable message every 10 seconds + if (response == true) + { + Serial.println(F("RTCM messages enabled")); + } + else + { + Serial.println(F("RTCM failed to enable. Are you sure you have an ZED-F9P? Freezing.")); + while (1) + ; //Freeze + } + + //Check if Survey is in Progress before initiating one + response = myGPS.getSurveyStatus(2000); //Query module for SVIN status with 2000ms timeout (request can take a long time) + if (response == false) + { + Serial.println(F("Failed to get Survey In status. Freezing.")); + while (1) + ; //Freeze + } + + if (myGPS.svin.active == true) + { + Serial.print(F("Survey already in progress.")); + lcd.setCursor(0, 2); + lcd.print(F("Survey already going")); + } + else + { + //Start survey + response = myGPS.enableSurveyMode(60, 5.000); //Enable Survey in, 60 seconds, 5.0m + if (response == false) + { + Serial.println(F("Survey start failed")); + lcd.setCursor(0, 3); + lcd.print(F("Survey start failed. Freezing.")); + while (1) + ; + } + Serial.println(F("Survey started. This will run until 60s has passed and less than 5m accuracy is achieved.")); + } + + while (Serial.available()) + Serial.read(); //Clear buffer + + lcd.clear(); + lcd.print(F("Survey in progress")); + + //Begin waiting for survey to complete + while (myGPS.svin.valid == false) + { + if (Serial.available()) + { + byte incoming = Serial.read(); + if (incoming == 'x') + { + //Stop survey mode + response = myGPS.disableSurveyMode(); //Disable survey + Serial.println(F("Survey stopped")); + break; + } + } + + response = myGPS.getSurveyStatus(2000); //Query module for SVIN status with 2000ms timeout (req can take a long time) + if (response == true) + { + Serial.print(F("Press x to end survey - ")); + Serial.print(F("Time elapsed: ")); + Serial.print((String)myGPS.svin.observationTime); + + lcd.setCursor(0, 1); + lcd.print(F("Elapsed: ")); + lcd.print((String)myGPS.svin.observationTime); + + Serial.print(F(" Accuracy: ")); + Serial.print((String)myGPS.svin.meanAccuracy); + Serial.println(); + + lcd.setCursor(0, 2); + lcd.print(F("Accuracy: ")); + lcd.print((String)myGPS.svin.meanAccuracy); + } + else + { + Serial.println(F("SVIN request failed")); + } + + delay(1000); + } + Serial.println(F("Survey valid!")); + + Serial.println(F("Base survey complete! RTCM now broadcasting.")); + lcd.clear(); + lcd.print(F("Transmitting RTCM")); + + myGPS.setI2COutput(COM_TYPE_UBX | COM_TYPE_RTCM3); //Set the I2C port to output UBX and RTCM sentences (not really an option, turns on NMEA as well) + +} + +void loop() +{ + myGPS.checkUblox(); //See if new data is available. Process bytes as they come in. + + //Do anything you want. Call checkUblox() every second. ZED-F9P has TX buffer of 4k bytes. + + delay(250); //Don't pound too hard on the I2C bus +} + +//This function gets called from the SparkFun Ublox Arduino Library. +//As each RTCM byte comes in you can specify what to do with it +//Useful for passing the RTCM correction data to a radio, Ntrip broadcaster, etc. +void SFE_UBLOX_GPS::processRTCM(uint8_t incoming) +{ + //Let's just pretty-print the HEX values for now + if (myGPS.rtcmFrameCounter % 16 == 0) + Serial.println(); + Serial.print(" "); + if (incoming < 0x10) + Serial.print("0"); + Serial.print(incoming, HEX); +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example5_RelativePositioningInformation/Example5_RelativePositioningInformation.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example5_RelativePositioningInformation/Example5_RelativePositioningInformation.ino new file mode 100644 index 0000000..391f874 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example5_RelativePositioningInformation/Example5_RelativePositioningInformation.ino @@ -0,0 +1,161 @@ +/* + Send UBX binary commands to enable RTCM sentences on Ublox ZED-F9P module + By: Nathan Seidle + SparkFun Electronics + Date: January 9th, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to query the module for RELPOS information in the NED frame. + It assumes you already have RTCM correction data being fed to the receiver. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a RedBoard Qwiic or BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +//#define USE_SERIAL1 // Uncomment this line to push the RTCM data from Serial1 to the module via I2C + +size_t numBytes = 0; // Record the number os bytes received from Serial1 + +void setup() +{ + Serial.begin(115200); + while (!Serial); //Wait for user to open terminal + Serial.println("Ublox Base station example"); + +#ifdef USE_SERIAL1 + // If our board supports it, we can receive the RTCM data on Serial1 + Serial1.begin(115200); +#endif + + Wire.begin(); + Wire.setClock(400000); //Increase I2C clock speed to 400kHz + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("Ublox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1); + } + + // Uncomment the next line if you want to reset your module back to the default settings with 1Hz navigation rate + //myGPS.factoryDefault(); delay(5000); + +#ifdef USE_SERIAL1 + Serial.print(F("Enabling UBX and RTCM input on I2C. Result: ")); + Serial.print(myGPS.setPortInput(COM_PORT_I2C, COM_TYPE_UBX | COM_TYPE_RTCM3)); //Enable UBX and RTCM input on I2C + myGPS.saveConfigSelective(VAL_CFG_SUBSEC_IOPORT); //Save the communications port settings to flash and BBR +#endif +} + +void loop() +{ + if (myGPS.getRELPOSNED() == true) + { + Serial.print("relPosN: "); + Serial.println(myGPS.relPosInfo.relPosN, 4); + Serial.print("relPosE: "); + Serial.println(myGPS.relPosInfo.relPosE, 4); + Serial.print("relPosD: "); + Serial.println(myGPS.relPosInfo.relPosD, 4); + + Serial.print("relPosLength: "); + Serial.println(myGPS.relPosInfo.relPosLength); + Serial.print("relPosHeading: "); + Serial.println(myGPS.relPosInfo.relPosHeading); + + Serial.print("relPosHPN: "); + Serial.println(myGPS.relPosInfo.relPosHPN); + Serial.print("relPosHPE: "); + Serial.println(myGPS.relPosInfo.relPosHPE); + Serial.print("relPosHPD: "); + Serial.println(myGPS.relPosInfo.relPosHPD); + Serial.print("relPosHPLength: "); + Serial.println(myGPS.relPosInfo.relPosHPLength); + + Serial.print("accN: "); + Serial.println(myGPS.relPosInfo.accN, 4); + Serial.print("accE: "); + Serial.println(myGPS.relPosInfo.accE, 4); + Serial.print("accD: "); + Serial.println(myGPS.relPosInfo.accD, 4); + + Serial.print("gnssFixOk: "); + if (myGPS.relPosInfo.gnssFixOk == true) + Serial.println("x"); + else + Serial.println(""); + + Serial.print("diffSolution: "); + if (myGPS.relPosInfo.diffSoln == true) + Serial.println("x"); + else + Serial.println(""); + + Serial.print("relPosValid: "); + if (myGPS.relPosInfo.relPosValid == true) + Serial.println("x"); + else + Serial.println(""); + + Serial.print("carrier Solution Type: "); + if (myGPS.relPosInfo.carrSoln == 0) + Serial.println("None"); + else if (myGPS.relPosInfo.carrSoln == 1) + Serial.println("Float"); + else if (myGPS.relPosInfo.carrSoln == 2) + Serial.println("Fixed"); + + Serial.print("isMoving: "); + if (myGPS.relPosInfo.isMoving == true) + Serial.println("x"); + else + Serial.println(""); + + Serial.print("refPosMiss: "); + if (myGPS.relPosInfo.refPosMiss == true) + Serial.println("x"); + else + Serial.println(""); + + Serial.print("refObsMiss: "); + if (myGPS.relPosInfo.refObsMiss == true) + Serial.println("x"); + else + Serial.println(""); + } + else + Serial.println("RELPOS request failed"); + + for (int i = 0; i < 500; i++) + { +#ifdef USE_SERIAL1 + uint8_t store[256]; + while ((Serial1.available()) && (numBytes < 256)) // Check if data has been received + { + store[numBytes++] = Serial1.read(); // Read a byte from Serial1 and store it + } + if (numBytes > 0) // Check if data was received + { + //Serial.print("Pushing "); + //Serial.print(numBytes); + //Serial.println(" bytes via I2C"); + myGPS.pushRawData(((uint8_t *)&store), numBytes); // Push the RTCM data via I2C + numBytes = 0; // Reset numBytes + } +#endif + delay(10); + } +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example6_GetVal/Example6_GetVal.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example6_GetVal/Example6_GetVal.ino new file mode 100644 index 0000000..7e07e7a --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example6_GetVal/Example6_GetVal.ino @@ -0,0 +1,88 @@ +/* + Get a device's I2C address using advanced getVal method + By: Nathan Seidle + SparkFun Electronics + Date: January 9th, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + u-blox changed how to configure their modules in 2019. As of version 23 of the UBX protocol the + UBX-CFG commands are deprecated; they still work, they just recommend using VALSET, VALGET, and VALDEL + commands instead. This example shows how to use this new command structure. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a RedBoard Qwiic or BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to Ublox module. + +void setup() +{ + Serial.begin(115200); + while (!Serial) + ; //Wait for user to open terminal + Serial.println("u-blox getVal example"); + + Wire.begin(); + Wire.setClock(400000); //Increase I2C clock speed to 400kHz + + if (myGPS.begin() == false) //Connect to the Ublox module using Wire port + { + Serial.println(F("u-blox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1) + ; + } + + myGPS.enableDebugging(); //Enable debug messages over Serial (default) + //myGPS.enableDebugging(SerialUSB); //Enable debug messages over Serial USB + + uint8_t currentI2Caddress = myGPS.getVal8(UBLOX_CFG_I2C_ADDRESS); + Serial.print("Current I2C address (should be 0x42): 0x"); + Serial.println(currentI2Caddress >> 1, HEX); //Ublox module returns a shifted 8-bit address. Make it 7-bit unshifted. + + while (1) + ; +} + +void loop() +{ + //Query module only every second. Doing it more often will just cause I2C traffic. + //The module only responds when a new position is available + if (millis() - lastTime > 1000) + { + lastTime = millis(); //Update the timer + + long latitude = myGPS.getLatitude(); + Serial.print(F("Lat: ")); + Serial.print(latitude); + + long longitude = myGPS.getLongitude(); + Serial.print(F(" Long: ")); + Serial.print(longitude); + Serial.print(F(" (degrees * 10^-7)")); + + long altitude = myGPS.getAltitude(); + Serial.print(F(" Alt: ")); + Serial.print(altitude); + Serial.print(F(" (mm)")); + + byte SIV = myGPS.getSIV(); + Serial.print(F(" SIV: ")); + Serial.print(SIV); + + Serial.println(); + } +} \ No newline at end of file diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example7_SetVal/Example7_SetVal.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example7_SetVal/Example7_SetVal.ino new file mode 100644 index 0000000..cfec549 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example7_SetVal/Example7_SetVal.ino @@ -0,0 +1,76 @@ +/* + Send UBX binary commands to enable RTCM sentences on u-blox ZED-F9P module + By: Nathan Seidle + SparkFun Electronics + Date: January 9th, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + u-blox changed how to configure their modules in 2019. As of version 23 of the UBX protocol the + UBX-CFG commands are deprecated; they still work, they just recommend using VALSET, VALGET, and VALDEL + commands instead. This example shows how to use this new command structure. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a RedBoard Qwiic or BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +long lastTime = 0; //Simple local timer. Limits amount if I2C traffic to u-blox module. + +void setup() +{ + Serial.begin(115200); + while (!Serial) + ; //Wait for user to open terminal + Serial.println("u-blox getVal example"); + + Wire.begin(); + Wire.setClock(400000); //Increase I2C clock speed to 400kHz + + if (myGPS.begin() == false) //Connect to the u-blox module using Wire port + { + Serial.println(F("u-blox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1) + ; + } + + myGPS.enableDebugging(); //Enable debug messages over Serial (default) + //myGPS.enableDebugging(SerialUSB); //Enable debug messages over Serial USB + + bool setValueSuccess; + + //These key values are hard coded and defined in u-blox_config_keys.h. + //You can obtain them from the ZED-F9P interface description doc + //or from u-center's Messages->CFG->VALSET window. Keys must be 32-bit. + //setValueSuccess = myGPS.setVal(UBLOX_CFG_NMEA_HIGHPREC, 0); //Enable high precision NMEA + setValueSuccess = myGPS.setVal(UBLOX_CFG_RATE_MEAS, 100); //Set measurement rate to 100ms (10Hz update rate) + //setValueSuccess = myGPS.setVal(UBLOX_CFG_RATE_MEAS, 1000); //Set measurement rate to 1000ms (1Hz update rate) + + //Below is the original way we enabled the RTCM message on the I2C port. After that, we show how to do the same + //but with setVal(). + //Original: myGPS.enableRTCMmessage(UBX_RTCM_1005, COM_PORT_I2C, 1); //Enable message 1005 to output through I2C port, message every second + //setValueSuccess = myGPS.setVal(0x209102bd, 1); //Set output rate of msg 1005 over the I2C port to once per second + + if (setValueSuccess == true) + { + Serial.println("Value was successfully set"); + } + else + Serial.println("Value set failed"); +} + +void loop() +{ +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example8_GetSetPortSettings/Example8_GetSetPortSettings.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example8_GetSetPortSettings/Example8_GetSetPortSettings.ino new file mode 100644 index 0000000..b2ca2ac --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example8_GetSetPortSettings/Example8_GetSetPortSettings.ino @@ -0,0 +1,98 @@ +/* + Configuring port settings using the newer getVal/setVal methods + By: Nathan Seidle + SparkFun Electronics + Date: October 23rd, 2020 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example shows how to query a u-blox module for its UART1 settings and + then change them if the settings aren't what we want. + + Note: getVal/setVal/delVal are only support in u-blox protocol versions 27 and higher. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a RedBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + Serial.begin(115200); + while (!Serial) + ; //Wait for user to open terminal + Serial.println("SparkFun u-blox Example"); + + Wire.begin(); + + if (myGPS.begin() == false) //Connect to the u-blox module using Wire port + { + Serial.println(F("u-blox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1) + ; + } + + bool response = true; + + //Read the settings from RAM (what the module is running right now, not BBR, Flash, or default) + uint8_t currentUART1Setting_ubx = myGPS.getVal8(UBLOX_CFG_UART1INPROT_UBX); + uint8_t currentUART1Setting_nmea = myGPS.getVal8(UBLOX_CFG_UART1INPROT_NMEA); + uint8_t currentUART1Setting_rtcm3 = myGPS.getVal8(UBLOX_CFG_UART1INPROT_RTCM3X); + + Serial.print("currentUART1Setting_ubx: "); + Serial.println(currentUART1Setting_ubx); + Serial.print("currentUART1Setting_nmea: "); + Serial.println(currentUART1Setting_nmea); + Serial.print("currentUART1Setting_rtcm3: "); + Serial.println(currentUART1Setting_rtcm3); + + //Check if NMEA and RTCM are enabled for UART1 + if (currentUART1Setting_ubx == 0 || currentUART1Setting_nmea == 0) + { + Serial.println("Updating UART1 configuration"); + + //setVal sets the values for RAM, BBR, and Flash automatically so no .saveConfiguration() is needed + response &= myGPS.setVal8(UBLOX_CFG_UART1INPROT_UBX, 1); //Enable UBX on UART1 Input + response &= myGPS.setVal8(UBLOX_CFG_UART1INPROT_NMEA, 1); //Enable NMEA on UART1 Input + response &= myGPS.setVal8(UBLOX_CFG_UART1INPROT_RTCM3X, 0); //Disable RTCM on UART1 Input + + if (response == false) + Serial.println("SetVal failed"); + else + Serial.println("SetVal succeeded"); + } + else + Serial.println("No port change needed"); + + //Change speed of UART2 + uint32_t currentUART2Baud = myGPS.getVal32(UBLOX_CFG_UART2_BAUDRATE); + Serial.print("currentUART2Baud: "); + Serial.println(currentUART2Baud); + + if (currentUART2Baud != 57600) + { + response &= myGPS.setVal32(UBLOX_CFG_UART2_BAUDRATE, 57600); + if (response == false) + Serial.println("SetVal failed"); + else + Serial.println("SetVal succeeded"); + } + else + Serial.println("No baud change needed"); + + Serial.println("Done"); +} + +void loop() +{ +} \ No newline at end of file diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example9_multiSetVal/Example9_multiSetVal.ino b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example9_multiSetVal/Example9_multiSetVal.ino new file mode 100644 index 0000000..1310451 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/ZED-F9P/Example9_multiSetVal/Example9_multiSetVal.ino @@ -0,0 +1,90 @@ +/* + Send UBX binary commands to enable RTCM sentences on u-blox ZED-F9P module + Based on Example7 By: Nathan Seidle + SparkFun Electronics + Updated by Paul Clark to demonstrate setVal8/16/32, newCfgValset8/16/32, addCfgValset8/16/32 and sendCfgValset8/16/32 + Date: July 1st, 2019 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + u-blox changed how to configure their modules in 2019. As of version 23 of the UBX protocol the + UBX-CFG commands are deprecated; they still work, they just recommend using VALSET, VALGET, and VALDEL + commands instead. This example shows how to use this new command structure. + + Feel like supporting open source hardware? + Buy a board from SparkFun! + ZED-F9P RTK2: https://www.sparkfun.com/products/15136 + NEO-M8P RTK: https://www.sparkfun.com/products/15005 + SAM-M8Q: https://www.sparkfun.com/products/15106 + + Hardware Connections: + Plug a Qwiic cable into the GPS and a RedBoard Qwiic or BlackBoard + If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) + Open the serial monitor at 115200 baud to see the output +*/ + +#include //Needed for I2C to GPS + +#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_u-blox_GNSS +SFE_UBLOX_GPS myGPS; + +void setup() +{ + Serial.begin(115200); + while (!Serial) + ; //Wait for user to open terminal + Serial.println("u-blox multi setVal example"); + + Wire.begin(); + Wire.setClock(400000); //Increase I2C clock speed to 400kHz + + if (myGPS.begin() == false) //Connect to the u-blox module using Wire port + { + Serial.println(F("u-blox GPS not detected at default I2C address. Please check wiring. Freezing.")); + while (1) + ; + } + + myGPS.enableDebugging(); //Enable debug messages over Serial (default) + //myGPS.enableDebugging(SerialUSB); //Enable debug messages over Serial USB + + bool setValueSuccess = true; + + //These key values are hard coded. You can obtain them from the ZED-F9P interface description doc + //or from u-center's Messages->CFG->VALSET window. Keys must be 32-bit. + //Choose setVal8, setVal16 or setVal32 depending on the required value data width (1, 2 or 4 bytes) + //L, U1, I1, E1 and X1 values are 8-bit + //U2, I2, E2 and X2 values are 16-bit + //U4, I4, R4, E4, X4 values are 32-bit + + setValueSuccess &= myGPS.setVal8(UBLOX_CFG_NMEA_HIGHPREC, 0); //Enable high precision NMEA (value is 8-bit (L / U1)) + //setValueSuccess &= myGPS.setVal16(UBLOX_CFG_RATE_MEAS, 200); //Set measurement rate to 100ms (10Hz update rate) (value is 16-bit (U2)) + //setValueSuccess &= myGPS.setVal16(UBLOX_CFG_RATE_MEAS, 200, 1); //Set rate setting in RAM instead of BBR + setValueSuccess &= myGPS.setVal16(UBLOX_CFG_RATE_MEAS, 1000); //Set measurement rate to 1000ms (1Hz update rate) (value is 16-bit (U2)) + + //Below is the original way we enabled a single RTCM message on the I2C port. After that, we show how to do the same + //but with multiple messages all in one go using newCfgValset, addCfgValset and sendCfgValset. + //Original: myGPS.enableRTCMmessage(UBX_RTCM_1005, COM_PORT_I2C, 1); //Enable message 1005 to output through I2C port, message every second + + //Begin with newCfgValset8/16/32 + setValueSuccess &= myGPS.newCfgValset8(UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1005_I2C, 1); //Set output rate of msg 1005 over the I2C port to once per measurement (value is 8-bit (U1)) + //setValueSuccess &= myGPS.newCfgValset8(UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1005_I2C, 1, VAL_LAYER_RAM); //Set this and the following settings in RAM only instead of Flash/RAM/BBR + //Add extra keyIDs and values using addCfgValset8/16/32 + setValueSuccess &= myGPS.addCfgValset8(UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1077_I2C, 1); //Set output rate of msg 1077 over the I2C port to once per measurement (value is 8-bit (U1)) + setValueSuccess &= myGPS.addCfgValset8(UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1087_I2C, 1); //Set output rate of msg 1087 over the I2C port to once per measurement (value is 8-bit (U1)) + setValueSuccess &= myGPS.addCfgValset8(UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1127_I2C, 1); //Set output rate of msg 1127 over the I2C port to once per measurement (value is 8-bit (U1)) + setValueSuccess &= myGPS.addCfgValset8(UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1097_I2C, 1); //Set output rate of msg 1097 over the I2C port to once per measurement (value is 8-bit (U1)) + // Add the final value and send the packet using sendCfgValset8/16/32 + setValueSuccess &= myGPS.sendCfgValset8(UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1230_I2C, 10); //Set output rate of msg 1230 over the I2C port to once every 10 measurements (value is 8-bit (U1)) + + if (setValueSuccess == true) + { + Serial.println("Values were successfully set"); + } + else + Serial.println("Value set failed"); +} + +void loop() +{ +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/CMakeLists.txt b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/CMakeLists.txt new file mode 100644 index 0000000..3dd6c0a --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/CMakeLists.txt @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: Apache-2.0 + +cmake_minimum_required(VERSION 3.13.1) + +find_package(Zephyr HINTS $ENV{ZEPHYR_BASE}) +project(sparkfun_ublox_zephyr_library) + +zephyr_compile_options(-fdiagnostics-color=always) + +zephyr_include_directories(.) +target_sources(app PRIVATE src/SparkFun_Ublox_Zephyr_Library.cpp) +target_sources(app PRIVATE src/SparkFun_Ublox_Zephyr_Interface.cpp) + +target_sources(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/main.c) diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/nrf52840dk_nrf52840.overlay b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/nrf52840dk_nrf52840.overlay new file mode 100644 index 0000000..3c95572 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/nrf52840dk_nrf52840.overlay @@ -0,0 +1,4 @@ +&i2c0 { + status = "okay"; + compatible = "nordic,nrf-twim"; +}; \ No newline at end of file diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/prj.conf b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/prj.conf new file mode 100644 index 0000000..e239329 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/prj.conf @@ -0,0 +1,7 @@ +#turn on c++ support +CONFIG_CPLUSPLUS=y + +# turn on peripherals +CONFIG_GPIO=y +CONFIG_I2C=y +CONFIG_I2C_0=y diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/src/SparkFun_Ublox_Zephyr_Interface.cpp b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/src/SparkFun_Ublox_Zephyr_Interface.cpp new file mode 100644 index 0000000..65505be --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/src/SparkFun_Ublox_Zephyr_Interface.cpp @@ -0,0 +1,100 @@ +/* + This is an interface that connects the CPP Ublox library with the main C code. + Added to make it possible to run Ublox lib on Zephyr (NCS) + + This port was made by Vid Rajtmajer , www.irnas.eu +*/ +#include "SparkFun_Ublox_Zephyr_Interface.h" + +#include +#include +#include +#include + +#include "SparkFun_Ublox_Zephyr_Library.h" + + +SFE_UBLOX_GPS myGPS; // driver class instance +long lastTime = 0; // Simple local timer. Limits amount if I2C traffic to Ublox module. + +// init GPIO checksumFailurePin and load GPIO device pointer to the driver +uint8_t set_gpio_dev(struct device *gpio_dev, uint8_t enable_debug) +{ + if (myGPS.init_gpio_pins(*gpio_dev) == false) + { + return -EIO; + } + // turn on debugging if enable_debug is set + if (enable_debug) + { + myGPS.enableDebugging(); + } + return 0; +} + +// initialize I2C and check if GPS device respons +uint8_t gps_begin(struct device *i2c_dev) +{ + if (myGPS.begin(*i2c_dev) == false) + { + return -EIO; + } + return 0; +} + +// This will pipe all NMEA sentences to UART so we can see them +void pipe_nmea_sentences(void) +{ + myGPS.setNMEAOutputPort(); +} + +// Check for available bytes from the device +void check_ublox(void) +{ + myGPS.checkUblox(); +} + +// Get position information when requested, also display number of satellites used in the fix +int get_position(void) +{ + //Query module only every second. Doing it more often will just cause I2C traffic. + //The module only responds when a new position is available, print it to console + if (k_uptime_get_32() - lastTime > 1000) + { + lastTime = k_uptime_get_32(); //Update the timer + + long latitude = myGPS.getLatitude(); + long longitude = myGPS.getLongitude(); + long altitude = myGPS.getAltitude(); + uint8_t SIV = myGPS.getSIV(); + + printk("Position: Lat: %ld, Lon: %ld, Alt: %ld, SIV: %d", latitude, longitude, altitude, SIV); + return 0; + } + return -EBUSY; +} + +// Get date and time information when requested, check if they are valid and print info to console, it returns UNIX time +void get_datetime(void) +{ + int year = myGPS.getYear(); + int month = myGPS.getMonth(); + int day = myGPS.getDay(); + int hour = myGPS.getHour(); + int minute = myGPS.getMinute(); + int second = myGPS.getSecond(); + + printk("DateTime: %d-%d-%d %d:%d:%d\n", year, month, day, hour, minute, second); + + printk("Time is "); + if (myGPS.getTimeValid() == false) + { + printk("not "); + } + printk("valid. Date is "); + if (myGPS.getDateValid() == false) + { + printk("not "); + } + printk("valid.\n"); +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/src/SparkFun_Ublox_Zephyr_Interface.h b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/src/SparkFun_Ublox_Zephyr_Interface.h new file mode 100644 index 0000000..0af3d3c --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/src/SparkFun_Ublox_Zephyr_Interface.h @@ -0,0 +1,29 @@ +/* + This is an interface that connects the CPP Ublox library with the main C code. + Added to make it possible to run Ublox lib on Zephyr (NCS) + + This port was made by Vid Rajtmajer , www.irnas.eu +*/ +#include +#include + +#ifndef _UBLOX_LIB_INTERFACE_H_ +#define _UBLOX_LIB_INTERFACE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + + uint8_t set_gpio_dev(struct device *gpio_dev, uint8_t enable_debug); // init GPIO + uint8_t gps_begin(struct device *i2c_dev); // initialize I2C and check if GPS device respons + void pipe_nmea_sentences(void); // print NMEA sentences + + void check_ublox(void); // Check for available bytes from the device + int get_position(void); // Get position information + void get_datetime(void); // Get date and time information + +#ifdef __cplusplus +} +#endif + +#endif //UBLOX_LIB_INTERFACE_H_ \ No newline at end of file diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/src/SparkFun_Ublox_Zephyr_Library.cpp b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/src/SparkFun_Ublox_Zephyr_Library.cpp new file mode 100644 index 0000000..e2e1d99 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/src/SparkFun_Ublox_Zephyr_Library.cpp @@ -0,0 +1,3492 @@ +/* + This is a library written for the Ublox ZED-F9P and NEO-M8P-2 + SparkFun sells these at its website: www.sparkfun.com + Do you like this library? Help support SparkFun. Buy a board! + https://www.sparkfun.com/products/15136 + https://www.sparkfun.com/products/15005 + https://www.sparkfun.com/products/15733 + https://www.sparkfun.com/products/15193 + https://www.sparkfun.com/products/15210 + + Written by Nathan Seidle @ SparkFun Electronics, September 6th, 2018 + + This library handles configuring and handling the responses + from a Ublox GPS module. Works with most modules from Ublox including + the Zed-F9P, NEO-M8P-2, NEO-M9N, ZOE-M8Q, SAM-M8Q, and many others. + + https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library + + Development environment specifics: + NCS v1.0.3 release - this port + + This port was made by Vid Rajtmajer , www.irnas.eu + + SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT). + The MIT License (MIT) + Copyright (c) 2016 SparkFun Electronics + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the Software is furnished to + do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial + portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT + NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include "SparkFun_Ublox_Zephyr_Library.h" +#include + +SFE_UBLOX_GPS::SFE_UBLOX_GPS(void) +{ + // Constructor + currentGeofenceParams.numFences = 0; // Zero the number of geofences currently in use + moduleQueried.versionNumber = false; +} + +// Get i2c device to the class and configure checksumFailurePin +bool SFE_UBLOX_GPS::init_gpio_pins(struct device &gpio_dev) +{ + _gpio_dev = &gpio_dev; + if (checksumFailurePin >= 0) + { + int err; + err = gpio_pin_configure(_gpio_dev, (uint8_t)checksumFailurePin, GPIO_OUTPUT); + err = gpio_pin_set(_gpio_dev, (uint8_t)checksumFailurePin, HIGH); + if (err) + { + return false; + } + } + return true; +} + +//Initialize the I2C port +bool SFE_UBLOX_GPS::begin(struct device &i2c_dev, uint8_t deviceAddress) +{ + commType = COMM_TYPE_I2C; + _i2cPort = &i2c_dev; //Grab which port the user wants us to use + + //We expect caller to begin their I2C port, with the speed of their choice external to the library + //But if they forget, we start the hardware here. + + //We're moving away from the practice of starting Wire hardware in a library. This is to avoid cross platform issues. + //ie, there are some platforms that don't handle multiple starts to the wire hardware. Also, every time you start the wire + //hardware the clock speed reverts back to 100kHz regardless of previous Wire.setClocks(). + //_i2cPort->begin(); + + _gpsI2Caddress = deviceAddress; //Store the I2C address from user + + return (isConnected()); +} + +//Initialize the Serial port - function not ported +/* +bool SFE_UBLOX_GPS::begin(Stream &serialPort) +{ + commType = COMM_TYPE_SERIAL; + _serialPort = &serialPort; //Grab which port the user wants us to use + + return (isConnected()); +} +*/ + +//Enable or disable the printing of sent/response HEX values. +//Use this in conjunction with 'Transport Logging' from the Universal Reader Assistant to see what they're doing that we're not +void SFE_UBLOX_GPS::enableDebugging(bool printLimitedDebug) +{ + if (printLimitedDebug == false) + { + _printDebug = true; //Should we print the commands we send? Good for debugging + } + else + { + _printLimitedDebug = true; //Should we print limited debug messages? Good for debugging high navigation rates + } +} + +void SFE_UBLOX_GPS::disableDebugging(void) +{ + _printDebug = false; //Turn off extra print statements + _printLimitedDebug = false; +} + +//Safely print messages +void SFE_UBLOX_GPS::debugPrint(char *message) +{ + if (_printDebug == true) + { + printk("%s", message); + } +} +//Safely print messages +void SFE_UBLOX_GPS::debugPrintln(char *message) +{ + if (_printDebug == true) + { + printk("%s\n", message); + } +} + +const char *SFE_UBLOX_GPS::statusString(sfe_ublox_status_e stat) +{ + switch (stat) + { + case SFE_UBLOX_STATUS_SUCCESS: + return "Success"; + break; + case SFE_UBLOX_STATUS_FAIL: + return "General Failure"; + break; + case SFE_UBLOX_STATUS_CRC_FAIL: + return "CRC Fail"; + break; + case SFE_UBLOX_STATUS_TIMEOUT: + return "Timeout"; + break; + case SFE_UBLOX_STATUS_COMMAND_NACK: + return "Command not acknowledged (NACK)"; + break; + case SFE_UBLOX_STATUS_OUT_OF_RANGE: + return "Out of range"; + break; + case SFE_UBLOX_STATUS_INVALID_ARG: + return "Invalid Arg"; + break; + case SFE_UBLOX_STATUS_INVALID_OPERATION: + return "Invalid operation"; + break; + case SFE_UBLOX_STATUS_MEM_ERR: + return "Memory Error"; + break; + case SFE_UBLOX_STATUS_HW_ERR: + return "Hardware Error"; + break; + case SFE_UBLOX_STATUS_DATA_SENT: + return "Data Sent"; + break; + case SFE_UBLOX_STATUS_DATA_RECEIVED: + return "Data Received"; + break; + case SFE_UBLOX_STATUS_I2C_COMM_FAILURE: + return "I2C Comm Failure"; + break; + case SFE_UBLOX_STATUS_DATA_OVERWRITTEN: + return "Data Packet Overwritten"; + break; + default: + return "Unknown Status"; + break; + } + return "None"; +} + +void SFE_UBLOX_GPS::factoryReset() +{ + // Copy default settings to permanent + // Note: this does not load the permanent configuration into the current configuration. Calling factoryDefault() will do that. + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_CFG; + packetCfg.len = 13; + packetCfg.startingSpot = 0; + for (uint8_t i = 0; i < 4; i++) + { + payloadCfg[0 + i] = 0xff; // clear mask: copy default config to permanent config + payloadCfg[4 + i] = 0x00; // save mask: don't save current to permanent + payloadCfg[8 + i] = 0x00; // load mask: don't copy permanent config to current + } + payloadCfg[12] = 0xff; // all forms of permanent memory + sendCommand(&packetCfg, 0); // don't expect ACK + hardReset(); // cause factory default config to actually be loaded and used cleanly +} + +void SFE_UBLOX_GPS::hardReset() +{ + // Issue hard reset + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RST; + packetCfg.len = 4; + packetCfg.startingSpot = 0; + payloadCfg[0] = 0xff; // cold start + payloadCfg[1] = 0xff; // cold start + payloadCfg[2] = 0; // 0=HW reset + payloadCfg[3] = 0; // reserved + sendCommand(&packetCfg, 0); // don't expect ACK +} + +// Write data to I2C, Arguments: buffer - data to write, num_bytes - buffer length, +// stop - if true send STOP, if false send RESTART after message +int SFE_UBLOX_GPS::transferWriteI2C(u8_t *buffer, u32_t num_bytes, bool stop) +{ + struct i2c_msg msgs[1]; + // Data to be written and STOP or RESTART after this. + msgs[0].buf = buffer; + msgs[0].len = num_bytes; + if (stop) { + msgs[0].flags = I2C_MSG_WRITE | I2C_MSG_STOP; + } + else { + msgs[0].flags = I2C_MSG_WRITE | I2C_MSG_RESTART; + } + return i2c_transfer(_i2cPort, &msgs[0], 1, _gpsI2Caddress); +} + +// Read data from I2C, Arguments: buffer - store read data, num_bytes - buffer length +int SFE_UBLOX_GPS::transferReadI2C(u8_t *buffer, u32_t num_bytes) +{ + struct i2c_msg msgs[1]; + // Data to be read and STOP after this + msgs[0].buf = buffer; + msgs[0].len = num_bytes; + msgs[0].flags = I2C_MSG_READ | I2C_MSG_STOP; + + int err = i2c_transfer(_i2cPort, &msgs[0], 1, _gpsI2Caddress); + return err; +} + +//Changes the serial baud rate of the Ublox module, can't return success/fail 'cause ACK from modem +//is lost due to baud rate change +void SFE_UBLOX_GPS::setSerialRate(uint32_t baudrate, uint8_t uartPort, uint16_t maxWait) +{ + //Get the current config values for the UART port + getPortSettings(uartPort, maxWait); //This will load the payloadCfg array with current port settings + + if (_printDebug == true) + { + printk("Current baud rate: "); + printk("%d\n", ((uint32_t)payloadCfg[10] << 16) | ((uint32_t)payloadCfg[9] << 8) | payloadCfg[8]); + } + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_PRT; + packetCfg.len = 20; + packetCfg.startingSpot = 0; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[8] = baudrate; + payloadCfg[9] = baudrate >> 8; + payloadCfg[10] = baudrate >> 16; + payloadCfg[11] = baudrate >> 24; + + if (_printDebug == true) + { + printk("New baud rate: "); + printk("%d\n", ((uint32_t)payloadCfg[10] << 16) | ((uint32_t)payloadCfg[9] << 8) | payloadCfg[8]); + } + + sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait); + if (_printDebug == true) + { + printk("setSerialRate: sendCommand returned: %s\n", statusString(retVal)); + } +} + +//Changes the I2C address that the Ublox module responds to +//0x42 is the default but can be changed with this command +bool SFE_UBLOX_GPS::setI2CAddress(uint8_t deviceAddress, uint16_t maxWait) +{ + //Get the current config values for the I2C port + getPortSettings(COM_PORT_I2C, maxWait); //This will load the payloadCfg array with current port settings + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_PRT; + packetCfg.len = 20; + packetCfg.startingSpot = 0; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[4] = deviceAddress << 1; //DDC mode LSB + + if (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT) // We are only expecting an ACK + { + //Success! Now change our internal global. + _gpsI2Caddress = deviceAddress; //Store the I2C address from user + return (true); + } + return (false); +} + +//Want to see the NMEA messages on the Serial port? Here's how - ported to print to console, here only enable the flag +void SFE_UBLOX_GPS::setNMEAOutputPort() +{ + _nmeaOutputPort = true; +} + +//Called regularly to check for available bytes on the user' specified port +bool SFE_UBLOX_GPS::checkUblox(uint8_t requestedClass, uint8_t requestedID) +{ + return checkUbloxInternal(&packetCfg, requestedClass, requestedID); +} + +//Called regularly to check for available bytes on the user' specified port +bool SFE_UBLOX_GPS::checkUbloxInternal(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +{ + if (commType == COMM_TYPE_I2C) + return (checkUbloxI2C(incomingUBX, requestedClass, requestedID)); + else if (commType == COMM_TYPE_SERIAL) + return (checkUbloxSerial(incomingUBX, requestedClass, requestedID)); + return false; +} + +//Polls I2C for data, passing any new bytes to process() +//Returns true if new bytes are available +bool SFE_UBLOX_GPS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +{ + if (k_uptime_get_32() - lastCheck >= i2cPollingWait) + { + uint16_t bytesAvailable = 0; + int err; + + //Get the number of bytes available from the module + //0xFD (MSB) and 0xFE (LSB) are the registers that contain number of bytes available + u8_t data_buffer[1]; + data_buffer[0] = 0xFD; + err = transferWriteI2C(data_buffer, 1, true); + if (err) { + return (false); + } + + bool data_read_ok = true; + u8_t read_buffer[2]; + err = transferReadI2C(data_buffer, 2); + if (err) { + data_read_ok = false; + } + + if (data_read_ok) + { + uint8_t msb = read_buffer[0]; + uint8_t lsb = read_buffer[1]; + if (lsb == 0xFF) + { + //I believe this is a Ublox bug. Device should never present an 0xFF. + if ((_printDebug == true) || (_printLimitedDebug == true)) // Print this if doing limited debugging + { + printk("checkUbloxI2C: Ublox bug, length lsb is 0xFF\n"); + } + if (checksumFailurePin >= 0) + { + gpio_pin_set(_gpio_dev, (uint8_t)checksumFailurePin, LOW); + k_msleep(10); + gpio_pin_set(_gpio_dev, (uint8_t)checksumFailurePin, HIGH); + } + lastCheck = k_uptime_get_32(); //Put off checking to avoid I2C bus traffic + return (false); + } + bytesAvailable = (uint16_t)msb << 8 | lsb; + } + + if (bytesAvailable == 0) + { + if (_printDebug == true) + { + printk("checkUbloxI2C: OK, zero bytes available\n"); + } + lastCheck = k_uptime_get_32(); //Put off checking to avoid I2C bus traffic + return (false); + } + + //Check for undocumented bit error. We found this doing logic scans. + //This error is rare but if we incorrectly interpret the first bit of the two 'data available' bytes as 1 + //then we have far too many bytes to check. May be related to I2C setup time violations: https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library/issues/40 + if (bytesAvailable & ((uint16_t)1 << 15)) + { + //Clear the MSbit + bytesAvailable &= ~((uint16_t)1 << 15); + + if ((_printDebug == true) || (_printLimitedDebug == true)) // Print this if doing limited debugging + { + printk("checkUbloxI2C: Bytes available error: %d\n", bytesAvailable); + if (checksumFailurePin >= 0) + { + gpio_pin_set(_gpio_dev, (uint8_t)checksumFailurePin, LOW); + k_msleep(10); + gpio_pin_set(_gpio_dev, (uint8_t)checksumFailurePin, HIGH); + } + } + } + + if (bytesAvailable > 100) + { + if (_printDebug == true) + { + printk("checkUbloxI2C: Large packet of %d bytes received\n", bytesAvailable); + } + } + else + { + if (_printDebug == true) + { + printk("checkUbloxI2C: Reading %d bytes\n", bytesAvailable); + } + } + + while (bytesAvailable) + { + u8_t data_buffer[1]; + data_buffer[0] = 0xFF; //0xFF is the register to read data from + err = transferWriteI2C(data_buffer, 1, false); //Send a restart command. Do not release bus. + if (err) { + return (false); + } + + //Limit to 32 bytes or whatever the buffer limit is for given platform + uint16_t bytesToRead = bytesAvailable; + if (bytesToRead > I2C_BUFFER_LENGTH) + bytesToRead = I2C_BUFFER_LENGTH; + + TRY_AGAIN: + bool data_read_ok = true; + u8_t read_buffer[(uint8_t)bytesToRead]; + err = transferReadI2C(read_buffer, (uint8_t)bytesToRead); + if (err) { + data_read_ok = false; + } + + if (data_read_ok) + { + for (uint16_t x = 0; x < bytesToRead; x++) + { + uint8_t incoming = read_buffer[x]; //Grab the actual character + + //Check to see if the first read is 0x7F. If it is, the module is not ready + //to respond. Stop, wait, and try again + if (x == 0) + { + if (incoming == 0x7F) + { + if ((_printDebug == true) || (_printLimitedDebug == true)) // Print this if doing limited debugging + { + printk("checkUbloxU2C: Ublox error, module not ready with data\n"); + } + k_msleep(5); //In logic analyzation, the module starting responding after 1.48ms + if (checksumFailurePin >= 0) + { + gpio_pin_set(_gpio_dev, (uint8_t)checksumFailurePin, LOW); + k_msleep(10); + gpio_pin_set(_gpio_dev, (uint8_t)checksumFailurePin, HIGH); + } + goto TRY_AGAIN; + } + } + process(incoming, incomingUBX, requestedClass, requestedID); //Process this valid character + } + } + else + return (false); //Sensor did not respond + + bytesAvailable -= bytesToRead; + } + } + + return (true); + +} //end checkUbloxI2C() + +//Checks Serial for data, passing any new bytes to process() +bool SFE_UBLOX_GPS::checkUbloxSerial(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +{ + printk("checkUbloxSerial function not ported...\n"); + /* + while (_serialPort->available()) + { + process(_serialPort->read(), incomingUBX, requestedClass, requestedID); + } + */ + return (true); + +} //end checkUbloxSerial() + +//Processes NMEA and UBX binary sentences one byte at a time +//Take a given byte and file it into the proper array +void SFE_UBLOX_GPS::process(uint8_t incoming, ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +{ + if ((currentSentence == NONE) || (currentSentence == NMEA)) + { + if (incoming == 0xB5) //UBX binary frames start with 0xB5, aka μ + { + //This is the start of a binary sentence. Reset flags. + //We still don't know the response class + ubxFrameCounter = 0; + currentSentence = UBX; + //Reset the packetBuf.counter even though we will need to reset it again when ubxFrameCounter == 2 + packetBuf.counter = 0; + ignoreThisPayload = false; //We should not ignore this payload - yet + //Store data in packetBuf until we know if we have a requested class and ID match + activePacketBuffer = SFE_UBLOX_PACKET_PACKETBUF; + } + else if (incoming == '$') + { + currentSentence = NMEA; + } + else if (incoming == 0xD3) //RTCM frames start with 0xD3 + { + rtcmFrameCounter = 0; + currentSentence = RTCM; + } + else + { + //This character is unknown or we missed the previous start of a sentence + } + } + + //Depending on the sentence, pass the character to the individual processor + if (currentSentence == UBX) + { + //Decide what type of response this is + if ((ubxFrameCounter == 0) && (incoming != 0xB5)) //ISO 'μ' + currentSentence = NONE; //Something went wrong. Reset. + else if ((ubxFrameCounter == 1) && (incoming != 0x62)) //ASCII 'b' + currentSentence = NONE; //Something went wrong. Reset. + // Note to future self: + // There may be some duplication / redundancy in the next few lines as processUBX will also + // load information into packetBuf, but we'll do it here too for clarity + else if (ubxFrameCounter == 2) //Class + { + // Record the class in packetBuf until we know what to do with it + packetBuf.cls = incoming; // (Duplication) + rollingChecksumA = 0; //Reset our rolling checksums here (not when we receive the 0xB5) + rollingChecksumB = 0; + packetBuf.counter = 0; //Reset the packetBuf.counter (again) + packetBuf.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; // Reset the packet validity (redundant?) + packetBuf.startingSpot = incomingUBX->startingSpot; //Copy the startingSpot + } + else if (ubxFrameCounter == 3) //ID + { + // Record the ID in packetBuf until we know what to do with it + packetBuf.id = incoming; // (Duplication) + //We can now identify the type of response + //If the packet we are receiving is not an ACK then check for a class and ID match + if (packetBuf.cls != UBX_CLASS_ACK) + { + //This is not an ACK so check for a class and ID match + if ((packetBuf.cls == requestedClass) && (packetBuf.id == requestedID)) + { + //This is not an ACK and we have a class and ID match + //So start diverting data into incomingUBX (usually packetCfg) + activePacketBuffer = SFE_UBLOX_PACKET_PACKETCFG; + incomingUBX->cls = packetBuf.cls; //Copy the class and ID into incomingUBX (usually packetCfg) + incomingUBX->id = packetBuf.id; + incomingUBX->counter = packetBuf.counter; //Copy over the .counter too + } + else + { + //This is not an ACK and we do not have a class and ID match + //so we should keep diverting data into packetBuf and ignore the payload + ignoreThisPayload = true; + } + } + else + { + // This is an ACK so it is to early to do anything with it + // We need to wait until we have received the length and data bytes + // So we should keep diverting data into packetBuf + } + } + else if (ubxFrameCounter == 4) //Length LSB + { + //We should save the length in packetBuf even if activePacketBuffer == SFE_UBLOX_PACKET_PACKETCFG + packetBuf.len = incoming; // (Duplication) + } + else if (ubxFrameCounter == 5) //Length MSB + { + //We should save the length in packetBuf even if activePacketBuffer == SFE_UBLOX_PACKET_PACKETCFG + packetBuf.len |= incoming << 8; // (Duplication) + } + else if (ubxFrameCounter == 6) //This should be the first byte of the payload unless .len is zero + { + if (packetBuf.len == 0) // Check if length is zero (hopefully this is impossible!) + { + if (_printDebug == true) + { + printk("process: ZERO LENGTH packet received: Class: 0x%x ID: 0x%x\n", packetBuf.cls, packetBuf.id); + } + //If length is zero (!) this will be the first byte of the checksum so record it + packetBuf.checksumA = incoming; + } + else + { + //The length is not zero so record this byte in the payload + packetBuf.payload[0] = incoming; + } + } + else if (ubxFrameCounter == 7) //This should be the second byte of the payload unless .len is zero or one + { + if (packetBuf.len == 0) // Check if length is zero (hopefully this is impossible!) + { + //If length is zero (!) this will be the second byte of the checksum so record it + packetBuf.checksumB = incoming; + } + else if (packetBuf.len == 1) // Check if length is one + { + //The length is one so this is the first byte of the checksum + packetBuf.checksumA = incoming; + } + else // Length is >= 2 so this must be a payload byte + { + packetBuf.payload[1] = incoming; + } + // Now that we have received two payload bytes, we can check for a matching ACK/NACK + if ((activePacketBuffer == SFE_UBLOX_PACKET_PACKETBUF) // If we are not already processing a data packet + && (packetBuf.cls == UBX_CLASS_ACK) // and if this is an ACK/NACK + && (packetBuf.payload[0] == requestedClass) // and if the class matches + && (packetBuf.payload[1] == requestedID)) // and if the ID matches + { + if (packetBuf.len == 2) // Check if .len is 2 + { + // Then this is a matching ACK so copy it into packetAck + activePacketBuffer = SFE_UBLOX_PACKET_PACKETACK; + packetAck.cls = packetBuf.cls; + packetAck.id = packetBuf.id; + packetAck.len = packetBuf.len; + packetAck.counter = packetBuf.counter; + packetAck.payload[0] = packetBuf.payload[0]; + packetAck.payload[1] = packetBuf.payload[1]; + } + else // Length is not 2 (hopefully this is impossible!) + { + if (_printDebug == true) + { + printk("process: ACK received with .len != 2: Class: 0x%x ID: 0x%x, len: %d\n", packetBuf.payload[0], packetBuf.payload[1], packetBuf.len); + } + } + } + } + + //Divert incoming into the correct buffer + if (activePacketBuffer == SFE_UBLOX_PACKET_PACKETACK) + processUBX(incoming, &packetAck, requestedClass, requestedID); + else if (activePacketBuffer == SFE_UBLOX_PACKET_PACKETCFG) + processUBX(incoming, incomingUBX, requestedClass, requestedID); + else // if (activePacketBuffer == SFE_UBLOX_PACKET_PACKETBUF) + processUBX(incoming, &packetBuf, requestedClass, requestedID); + + //Finally, increment the frame counter + ubxFrameCounter++; + } + else if (currentSentence == NMEA) + { + processNMEA(incoming); //Process each NMEA character + } + else if (currentSentence == RTCM) + { + processRTCMframe(incoming); //Deal with RTCM bytes + } +} + +//This is the default or generic NMEA processor. We're only going to pipe the data to serial port so we can see it. +//User could overwrite this function to pipe characters to nmea.process(c) of tinyGPS or MicroNMEA +//Or user could pipe each character to a buffer, radio, etc. +void SFE_UBLOX_GPS::processNMEA(char incoming) +{ + //If user has assigned an output port then pipe the characters there + + if (_nmeaOutputPort) + printk("%c", incoming); //Echo this byte to the serial port +} + +//We need to be able to identify an RTCM packet and then the length +//so that we know when the RTCM message is completely received and we then start +//listening for other sentences (like NMEA or UBX) +//RTCM packet structure is very odd. I never found RTCM STANDARD 10403.2 but +//http://d1.amobbs.com/bbs_upload782111/files_39/ourdev_635123CK0HJT.pdf is good +//https://dspace.cvut.cz/bitstream/handle/10467/65205/F3-BP-2016-Shkalikava-Anastasiya-Prenos%20polohove%20informace%20prostrednictvim%20datove%20site.pdf?sequence=-1 +//Lead me to: https://forum.u-blox.com/index.php/4348/how-to-read-rtcm-messages-from-neo-m8p +//RTCM 3.2 bytes look like this: +//Byte 0: Always 0xD3 +//Byte 1: 6-bits of zero +//Byte 2: 10-bits of length of this packet including the first two-ish header bytes, + 6. +//byte 3 + 4 bits: Msg type 12 bits +//Example: D3 00 7C 43 F0 ... / 0x7C = 124+6 = 130 bytes in this packet, 0x43F = Msg type 1087 +void SFE_UBLOX_GPS::processRTCMframe(uint8_t incoming) +{ + if (rtcmFrameCounter == 1) + { + rtcmLen = (incoming & 0x03) << 8; //Get the last two bits of this byte. Bits 8&9 of 10-bit length + } + else if (rtcmFrameCounter == 2) + { + rtcmLen |= incoming; //Bits 0-7 of packet length + rtcmLen += 6; //There are 6 additional bytes of what we presume is header, msgType, CRC, and stuff + } + /*else if (rtcmFrameCounter == 3) + { + rtcmMsgType = incoming << 4; //Message Type, MS 4 bits + } + else if (rtcmFrameCounter == 4) + { + rtcmMsgType |= (incoming >> 4); //Message Type, bits 0-7 + }*/ + + rtcmFrameCounter++; + + processRTCM(incoming); //Here is where we expose this byte to the user + + if (rtcmFrameCounter == rtcmLen) + { + //We're done! + currentSentence = NONE; //Reset and start looking for next sentence type + } +} + +//This function is called for each byte of an RTCM frame +//Ths user can overwrite this function and process the RTCM frame as they please +//Bytes can be piped to Serial or other interface. The consumer could be a radio or the internet (Ntrip broadcaster) +void SFE_UBLOX_GPS::processRTCM(uint8_t incoming) +{ + //Radio.sendReliable((String)incoming); //An example of passing this byte to a radio + + //Debug printing + // printk(" "); + // if(incoming < 0x10) printk("0"); + // if(incoming < 0x10) printk("0"); + // printk("%d", incoming); + // if(rtcmFrameCounter % 16 == 0) printk("\n"); +} + +//Given a character, file it away into the uxb packet structure +//Set valid to VALID or NOT_VALID once sentence is completely received and passes or fails CRC +//The payload portion of the packet can be 100s of bytes but the max array +//size is MAX_PAYLOAD_SIZE bytes. startingSpot can be set so we only record +//a subset of bytes within a larger packet. +void SFE_UBLOX_GPS::processUBX(uint8_t incoming, ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +{ + //Add all incoming bytes to the rolling checksum + //Stop at len+4 as this is the checksum bytes to that should not be added to the rolling checksum + if (incomingUBX->counter < incomingUBX->len + 4) + addToChecksum(incoming); + + if (incomingUBX->counter == 0) + { + incomingUBX->cls = incoming; + } + else if (incomingUBX->counter == 1) + { + incomingUBX->id = incoming; + } + else if (incomingUBX->counter == 2) //Len LSB + { + incomingUBX->len = incoming; + } + else if (incomingUBX->counter == 3) //Len MSB + { + incomingUBX->len |= incoming << 8; + } + else if (incomingUBX->counter == incomingUBX->len + 4) //ChecksumA + { + incomingUBX->checksumA = incoming; + } + else if (incomingUBX->counter == incomingUBX->len + 5) //ChecksumB + { + incomingUBX->checksumB = incoming; + + currentSentence = NONE; //We're done! Reset the sentence to being looking for a new start char + + //Validate this sentence + if ((incomingUBX->checksumA == rollingChecksumA) && (incomingUBX->checksumB == rollingChecksumB)) + { + incomingUBX->valid = SFE_UBLOX_PACKET_VALIDITY_VALID; // Flag the packet as valid + + // Let's check if the class and ID match the requestedClass and requestedID + // Remember - this could be a data packet or an ACK packet + if ((incomingUBX->cls == requestedClass) && (incomingUBX->id == requestedID)) + { + incomingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_VALID; // If we have a match, set the classAndIDmatch flag to valid + } + + // If this is an ACK then let's check if the class and ID match the requestedClass and requestedID + else if ((incomingUBX->cls == UBX_CLASS_ACK) && (incomingUBX->id == UBX_ACK_ACK) && (incomingUBX->payload[0] == requestedClass) && (incomingUBX->payload[1] == requestedID)) + { + incomingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_VALID; // If we have a match, set the classAndIDmatch flag to valid + } + + // If this is a NACK then let's check if the class and ID match the requestedClass and requestedID + else if ((incomingUBX->cls == UBX_CLASS_ACK) && (incomingUBX->id == UBX_ACK_NACK) && (incomingUBX->payload[0] == requestedClass) && (incomingUBX->payload[1] == requestedID)) + { + incomingUBX->classAndIDmatch = SFE_UBLOX_PACKET_NOTACKNOWLEDGED; // If we have a match, set the classAndIDmatch flag to NOTACKNOWLEDGED + if (_printDebug == true) + { + printk("processUBX: NACK received: Requested Class: 0x%x, Requested ID: 0x%x\n", incomingUBX->payload[0], incomingUBX->payload[1]); + } + } + + if (_printDebug == true) + { + printk("Incoming: Size: %d Received: \n", incomingUBX->len); + printPacket(incomingUBX); + + if (incomingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID) + { + printk("packetCfg now valid\n"); + } + if (packetAck.valid == SFE_UBLOX_PACKET_VALIDITY_VALID) + { + printk("packetAck now valid\n"); + } + if (incomingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) + { + printk("packetCfg classAndIDmatch\n"); + } + if (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) + { + printk("packetAck classAndIDmatch\n"); + } + } + + //We've got a valid packet, now do something with it but only if ignoreThisPayload is false + if (ignoreThisPayload == false) + { + processUBXpacket(incomingUBX); + } + } + else // Checksum failure + { + incomingUBX->valid = SFE_UBLOX_PACKET_VALIDITY_NOT_VALID; + + // Let's check if the class and ID match the requestedClass and requestedID. + // This is potentially risky as we are saying that we saw the requested Class and ID + // but that the packet checksum failed. Potentially it could be the class or ID bytes + // that caused the checksum error! + if ((incomingUBX->cls == requestedClass) && (incomingUBX->id == requestedID)) + { + incomingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_VALID; // If we have a match, set the classAndIDmatch flag to not valid + } + // If this is an ACK then let's check if the class and ID match the requestedClass and requestedID + else if ((incomingUBX->cls == UBX_CLASS_ACK) && (incomingUBX->payload[0] == requestedClass) && (incomingUBX->payload[1] == requestedID)) + { + incomingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_VALID; // If we have a match, set the classAndIDmatch flag to not valid + } + + if ((_printDebug == true) || (_printLimitedDebug == true)) // Print this if doing limited debugging + { + //Drive an external pin to allow for easier logic analyzation + if (checksumFailurePin >= 0) + { + gpio_pin_set(_gpio_dev, (uint8_t)checksumFailurePin, LOW); + k_msleep(10); + gpio_pin_set(_gpio_dev, (uint8_t)checksumFailurePin, HIGH); + } + + printk("Checksum failed: checksumA: %d checksumB: %d\n", incomingUBX->checksumA, incomingUBX->checksumB); + printk("rollingChecksumA: %d, rollingChecksumB: %d\n", rollingChecksumA, rollingChecksumB); + printk("Failed: Size: %d Received: \n", incomingUBX->len); + printPacket(incomingUBX); + } + } + } + else //Load this byte into the payload array + { + //If a UBX_NAV_PVT packet comes in asynchronously, we need to fudge the startingSpot + uint16_t startingSpot = incomingUBX->startingSpot; + if (incomingUBX->cls == UBX_CLASS_NAV && incomingUBX->id == UBX_NAV_PVT) + startingSpot = 0; + //Begin recording if counter goes past startingSpot + if ((incomingUBX->counter - 4) >= startingSpot) + { + //Check to see if we have room for this byte + if (((incomingUBX->counter - 4) - startingSpot) < MAX_PAYLOAD_SIZE) //If counter = 208, starting spot = 200, we're good to record. + { + // Check if this is payload data which should be ignored + if (ignoreThisPayload == false) + { + incomingUBX->payload[incomingUBX->counter - 4 - startingSpot] = incoming; //Store this byte into payload array + } + } + } + } + + //Increment the counter + incomingUBX->counter++; + + if (incomingUBX->counter == MAX_PAYLOAD_SIZE) + { + //Something has gone very wrong + currentSentence = NONE; //Reset the sentence to being looking for a new start char + if (_printDebug == true) + { + printk("processUBX: counter hit MAX_PAYLOAD_SIZE\n"); + } + } +} + +//Once a packet has been received and validated, identify this packet's class/id and update internal flags +//Note: if the user requests a PVT or a HPPOSLLH message using a custom packet, the data extraction will +// not work as expected beacuse extractLong etc are hardwired to packetCfg payloadCfg. Ideally +// extractLong etc should be updated so they receive a pointer to the packet buffer. +void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg) +{ + switch (msg->cls) + { + case UBX_CLASS_NAV: + if (msg->id == UBX_NAV_PVT && msg->len == 92) + { + //Parse various byte fields into global vars + constexpr int startingSpot = 0; //fixed value used in processUBX + + timeOfWeek = extractLong(0); + gpsMillisecond = extractLong(0) % 1000; //Get last three digits of iTOW + gpsYear = extractInt(4); + gpsMonth = extractByte(6); + gpsDay = extractByte(7); + gpsHour = extractByte(8); + gpsMinute = extractByte(9); + gpsSecond = extractByte(10); + gpsDateValid = extractByte(11) & 0x01; + gpsTimeValid = (extractByte(11) & 0x02) >> 1; + gpsNanosecond = extractLong(16); //Includes milliseconds + + fixType = extractByte(20 - startingSpot); + carrierSolution = extractByte(21 - startingSpot) >> 6; //Get 6th&7th bits of this byte + SIV = extractByte(23 - startingSpot); + longitude = extractLong(24 - startingSpot); + latitude = extractLong(28 - startingSpot); + altitude = extractLong(32 - startingSpot); + altitudeMSL = extractLong(36 - startingSpot); + groundSpeed = extractLong(60 - startingSpot); + headingOfMotion = extractLong(64 - startingSpot); + pDOP = extractInt(76 - startingSpot); + + //Mark all datums as fresh (not read before) + moduleQueried.gpsiTOW = true; + moduleQueried.gpsYear = true; + moduleQueried.gpsMonth = true; + moduleQueried.gpsDay = true; + moduleQueried.gpsHour = true; + moduleQueried.gpsMinute = true; + moduleQueried.gpsSecond = true; + moduleQueried.gpsDateValid = true; + moduleQueried.gpsTimeValid = true; + moduleQueried.gpsNanosecond = true; + + moduleQueried.all = true; + moduleQueried.longitude = true; + moduleQueried.latitude = true; + moduleQueried.altitude = true; + moduleQueried.altitudeMSL = true; + moduleQueried.SIV = true; + moduleQueried.fixType = true; + moduleQueried.carrierSolution = true; + moduleQueried.groundSpeed = true; + moduleQueried.headingOfMotion = true; + moduleQueried.pDOP = true; + } + else if (msg->id == UBX_NAV_HPPOSLLH && msg->len == 36) + { + timeOfWeek = extractLong(4); + highResLongitude = extractLong(8); + highResLatitude = extractLong(12); + elipsoid = extractLong(16); + meanSeaLevel = extractLong(20); + highResLongitudeHp = extractSignedChar(24); + highResLatitudeHp = extractSignedChar(25); + elipsoidHp = extractSignedChar(26); + meanSeaLevelHp = extractSignedChar(27); + horizontalAccuracy = extractLong(28); + verticalAccuracy = extractLong(32); + + highResModuleQueried.all = true; + highResModuleQueried.highResLatitude = true; + highResModuleQueried.highResLatitudeHp = true; + highResModuleQueried.highResLongitude = true; + highResModuleQueried.highResLongitudeHp = true; + highResModuleQueried.elipsoid = true; + highResModuleQueried.elipsoidHp = true; + highResModuleQueried.meanSeaLevel = true; + highResModuleQueried.meanSeaLevelHp = true; + highResModuleQueried.geoidSeparation = true; + highResModuleQueried.horizontalAccuracy = true; + highResModuleQueried.verticalAccuracy = true; + moduleQueried.gpsiTOW = true; // this can arrive via HPPOS too. + + if (_printDebug == true) + { + printk("Sec: %f", ((float)extractLong(4)) / 1000.0f); + printk("\n"); + printk("LON: %f", ((float)(int32_t)extractLong(8)) / 10000000.0f); + printk("\n"); + printk("LAT: %f", ((float)(int32_t)extractLong(12)) / 10000000.0f); + printk("\n"); + printk("ELI M: %f", ((float)(int32_t)extractLong(16)) / 1000.0f); + printk("\n"); + printk("MSL M: %f", ((float)(int32_t)extractLong(20)) / 1000.0f); + printk("\n"); + printk("LON HP: %c", extractSignedChar(24)); + printk("\n"); + printk("LAT HP: %c", extractSignedChar(25)); + printk("\n"); + printk("ELI HP: %calcChecksum", extractSignedChar(26)); + printk("\n"); + printk("MSL HP: %c", extractSignedChar(27)); + printk("\n"); + printk("HA 2D M: %f", ((float)(int32_t)extractLong(28)) / 10000.0f); + printk("\n"); + printk("VERT M: %f", ((float)(int32_t)extractLong(32)) / 10000.0f); + } + } + break; + } +} + +//Given a packet and payload, send everything including CRC bytes via I2C port +sfe_ublox_status_e SFE_UBLOX_GPS::sendCommand(ubxPacket *outgoingUBX, uint16_t maxWait) +{ + sfe_ublox_status_e retVal = SFE_UBLOX_STATUS_SUCCESS; + + calcChecksum(outgoingUBX); //Sets checksum A and B bytes of the packet + + if (_printDebug == true) + { + printk("\nSending: "); + printPacket(outgoingUBX); + } + + if (commType == COMM_TYPE_I2C) + { + retVal = sendI2cCommand(outgoingUBX, maxWait); + if (retVal != SFE_UBLOX_STATUS_SUCCESS) + { + if (_printDebug == true) + { + printk("Send I2C Command failed\n"); + } + return retVal; + } + } + else if (commType == COMM_TYPE_SERIAL) + { + sendSerialCommand(outgoingUBX); + } + + if (maxWait > 0) + { + //Depending on what we just sent, either we need to look for an ACK or not + if (outgoingUBX->cls == UBX_CLASS_CFG) + { + if (_printDebug == true) + { + printk("sendCommand: Waiting for ACK response\n"); + } + retVal = waitForACKResponse(outgoingUBX, outgoingUBX->cls, outgoingUBX->id, maxWait); //Wait for Ack response + } + else + { + if (_printDebug == true) + { + printk("sendCommand: Waiting for No ACK response\n"); + } + retVal = waitForNoACKResponse(outgoingUBX, outgoingUBX->cls, outgoingUBX->id, maxWait); //Wait for Ack response + } + } + return retVal; +} + +//Returns false if sensor fails to respond to I2C traffic +sfe_ublox_status_e SFE_UBLOX_GPS::sendI2cCommand(ubxPacket *outgoingUBX, uint16_t maxWait) +{ + int err; + //Point at 0xFF data register + u8_t small_buffer[1]; + small_buffer[0] = 0xFF; + err = transferWriteI2C(small_buffer, 1); //There is no register to write to, we just begin writing data bytes + if (err) { + return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK + } + + //Write header bytes + u8_t header_buffer[6]; //There is no register to write to, we just begin writing data bytes + header_buffer[0] = UBX_SYNCH_1; //μ - oh ublox, you're funny. I will call you micro-blox from now on. + header_buffer[1] = UBX_SYNCH_2; //b + header_buffer[2] = outgoingUBX->cls; + header_buffer[3] = outgoingUBX->id; + header_buffer[4] = outgoingUBX->len & 0xFF; //LSB + header_buffer[5] = outgoingUBX->len >> 8; //MSB + + err = transferWriteI2C(header_buffer, 6, false); + k_msleep(1); // added this millisecond sleep to not progress too fast + if (err) { + return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK + } + + //Write payload. Limit the sends into 32 byte chunks + //This code based on ublox: https://forum.u-blox.com/index.php/20528/how-to-use-i2c-to-get-the-nmea-frames + uint16_t bytesToSend = outgoingUBX->len; + + //"The number of data bytes must be at least 2 to properly distinguish + //from the write access to set the address counter in random read accesses." + uint16_t startSpot = 0; + while (bytesToSend > 1) + { + uint8_t len = bytesToSend; + if (len > I2C_BUFFER_LENGTH) + len = I2C_BUFFER_LENGTH; + + u8_t data_buffer[len]; + for (uint16_t x = 0; x < len; x++) { + data_buffer[x] = outgoingUBX->payload[startSpot + x]; + } + err = transferWriteI2C(data_buffer, len, false); //Write a portion of the payload to the bus + if (err) { + return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK + } + + //*outgoingUBX->payload += len; //Move the pointer forward + startSpot += len; //Move the pointer forward + bytesToSend -= len; + } + + //Write checksum + if (bytesToSend == 1) { + u8_t checksum_buffer[3]; + uint8_t payload = *outgoingUBX->payload; + checksum_buffer[0] = payload; + checksum_buffer[1] = outgoingUBX->checksumA; + checksum_buffer[2] = outgoingUBX->checksumB; + err = transferWriteI2C(checksum_buffer, 3, true); + } + else { + u8_t checksum_buffer[2]; + checksum_buffer[0] = outgoingUBX->checksumA; + checksum_buffer[1] = outgoingUBX->checksumB; + err = transferWriteI2C(checksum_buffer, 2, true); + } + if (err) { + return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK + } + + return (SFE_UBLOX_STATUS_SUCCESS); +} + +//Given a packet and payload, send everything including CRC bytesA via Serial port +void SFE_UBLOX_GPS::sendSerialCommand(ubxPacket *outgoingUBX) +{ + printk("sendSerialCommand function not ported...\n"); + /* + //Write header bytes + _serialPort->write(UBX_SYNCH_1); //μ - oh ublox, you're funny. I will call you micro-blox from now on. + _serialPort->write(UBX_SYNCH_2); //b + _serialPort->write(outgoingUBX->cls); + _serialPort->write(outgoingUBX->id); + _serialPort->write(outgoingUBX->len & 0xFF); //LSB + _serialPort->write(outgoingUBX->len >> 8); //MSB + + //Write payload. + for (int i = 0; i < outgoingUBX->len; i++) + { + _serialPort->write(outgoingUBX->payload[i]); + } + + //Write checksum + _serialPort->write(outgoingUBX->checksumA); + _serialPort->write(outgoingUBX->checksumB); + */ +} + +//Returns true if I2C device ack's +bool SFE_UBLOX_GPS::isConnected(uint16_t maxWait) +{ + if (commType == COMM_TYPE_I2C) + { + u8_t buff[1]; + buff[0] = 0x00; + int err = transferWriteI2C(buff, 1); + if (err) { + return false; //Sensor did not ack + } + } + + // Query navigation rate to see whether we get a meaningful response + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RATE; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_RECEIVED); // We are polling the RATE so we expect data and an ACK + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // data send is returned, not data received - +} + +//Given a message, calc and store the two byte "8-Bit Fletcher" checksum over the entirety of the message +//This is called before we send a command message +void SFE_UBLOX_GPS::calcChecksum(ubxPacket *msg) +{ + msg->checksumA = 0; + msg->checksumB = 0; + + msg->checksumA += msg->cls; + msg->checksumB += msg->checksumA; + + msg->checksumA += msg->id; + msg->checksumB += msg->checksumA; + + msg->checksumA += (msg->len & 0xFF); + msg->checksumB += msg->checksumA; + + msg->checksumA += (msg->len >> 8); + msg->checksumB += msg->checksumA; + + for (uint16_t i = 0; i < msg->len; i++) + { + msg->checksumA += msg->payload[i]; + msg->checksumB += msg->checksumA; + } +} + +//Given a message and a byte, add to rolling "8-Bit Fletcher" checksum +//This is used when receiving messages from module +void SFE_UBLOX_GPS::addToChecksum(uint8_t incoming) +{ + rollingChecksumA += incoming; + rollingChecksumB += rollingChecksumA; +} + +//Pretty prints the current ubxPacket +void SFE_UBLOX_GPS::printPacket(ubxPacket *packet) +{ + if (_printDebug == true) + { + printk("CLS:"); + if (packet->cls == UBX_CLASS_NAV) //1 + printk("NAV"); + else if (packet->cls == UBX_CLASS_ACK) //5 + printk("ACK"); + else if (packet->cls == UBX_CLASS_CFG) //6 + printk("CFG"); + else if (packet->cls == UBX_CLASS_MON) //0x0A + printk("MON"); + else + { + printk("0x%x", packet->cls); + } + + printk(" ID:"); + if (packet->cls == UBX_CLASS_NAV && packet->id == UBX_NAV_PVT) + printk("PVT"); + else if (packet->cls == UBX_CLASS_CFG && packet->id == UBX_CFG_RATE) + printk("RATE"); + else if (packet->cls == UBX_CLASS_CFG && packet->id == UBX_CFG_CFG) + printk("SAVE"); + else + { + printk("0x%x", packet->id); + } + + printk(" Len: 0x%x", packet->len); + + // Only print the payload is ignoreThisPayload is false otherwise + // we could be printing gibberish from beyond the end of packetBuf + if (ignoreThisPayload == false) + { + printk(" Payload:"); + + for (int x = 0; x < packet->len; x++) + { + printk(" %x", packet->payload[x]); + } + } + else + { + printk(" Payload: IGNORED"); + } + printk("\n"); + } +} + +//=-=-=-=-=-=-=-= Specific commands =-=-=-=-=-=-=-==-=-=-=-=-=-=-= +//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +//When messages from the class CFG are sent to the receiver, the receiver will send an "acknowledge"(UBX - ACK - ACK) or a +//"not acknowledge"(UBX-ACK-NAK) message back to the sender, depending on whether or not the message was processed correctly. +//Some messages from other classes also use the same acknowledgement mechanism. + +//When we poll or get a setting, we will receive _both_ a config packet and an ACK +//If the poll or get request is not valid, we will receive _only_ a NACK + +//If we are trying to get or poll a setting, then packetCfg.len will be 0 or 1 when the packetCfg is _sent_. +//If we poll the setting for a particular port using UBX-CFG-PRT then .len will be 1 initially +//For all other gets or polls, .len will be 0 initially +//(It would be possible for .len to be 2 _if_ we were using UBX-CFG-MSG to poll the settings for a particular message - but we don't use that (currently)) + +//If the get or poll _fails_, i.e. is NACK'd, then packetCfg.len could still be 0 or 1 after the NACK is received +//But if the get or poll is ACK'd, then packetCfg.len will have been updated by the incoming data and will always be at least 2 + +//If we are going to set the value for a setting, then packetCfg.len will be at least 3 when the packetCfg is _sent_. +//(UBX-CFG-MSG appears to have the shortest set length of 3 bytes) + +//We need to think carefully about how interleaved PVT packets affect things. +//It is entirely possible that our packetCfg and packetAck were received successfully +//but while we are still in the "if (checkUblox() == true)" loop a PVT packet is processed +//or _starts_ to arrive (remember that Serial data can arrive very slowly). + +//Returns SFE_UBLOX_STATUS_DATA_RECEIVED if we got an ACK and a valid packetCfg (module is responding with register content) +//Returns SFE_UBLOX_STATUS_DATA_SENT if we got an ACK and no packetCfg (no valid packetCfg needed, module absorbs new register data) +//Returns SFE_UBLOX_STATUS_FAIL if something very bad happens (e.g. a double checksum failure) +//Returns SFE_UBLOX_STATUS_COMMAND_NACK if the packet was not-acknowledged (NACK) +//Returns SFE_UBLOX_STATUS_CRC_FAIL if we had a checksum failure +//Returns SFE_UBLOX_STATUS_TIMEOUT if we timed out +//Returns SFE_UBLOX_STATUS_DATA_OVERWRITTEN if we got an ACK and a valid packetCfg but that the packetCfg has been +// or is currently being overwritten (remember that Serial data can arrive very slowly) +sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(ubxPacket *outgoingUBX, uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime) +{ + outgoingUBX->valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; //This will go VALID (or NOT_VALID) when we receive a response to the packet we sent + packetAck.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + packetBuf.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + outgoingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; // This will go VALID (or NOT_VALID) when we receive a packet that matches the requested class and ID + packetAck.classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + packetBuf.classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + + unsigned long startTime = k_uptime_get_32(); + while (k_uptime_get_32() - startTime < maxTime) + { + if (checkUbloxInternal(outgoingUBX, requestedClass, requestedID) == true) //See if new data is available. Process bytes as they come in. + { + // If both the outgoingUBX->classAndIDmatch and packetAck.classAndIDmatch are VALID + // and outgoingUBX->valid is _still_ VALID and the class and ID _still_ match + // then we can be confident that the data in outgoingUBX is valid + if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->cls == requestedClass) && (outgoingUBX->id == requestedID)) + { + if (_printDebug == true) + { + printk("waitForACKResponse: valid data and valid ACK received after %lu msec\n", k_uptime_get_32() - startTime); + } + return (SFE_UBLOX_STATUS_DATA_RECEIVED); //We received valid data and a correct ACK! + } + + // We can be confident that the data packet (if we are going to get one) will always arrive + // before the matching ACK. So if we sent a config packet which only produces an ACK + // then outgoingUBX->classAndIDmatch will be NOT_DEFINED and the packetAck.classAndIDmatch will VALID. + // We should not check outgoingUBX->valid, outgoingUBX->cls or outgoingUBX->id + // as these may have been changed by a PVT packet. + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID)) + { + if (_printDebug == true) + { + printk("waitForACKResponse: no data and valid ACK after %lu msec\n", k_uptime_get_32() - startTime); + } + return (SFE_UBLOX_STATUS_DATA_SENT); //We got an ACK but no data... + } + + // If both the outgoingUBX->classAndIDmatch and packetAck.classAndIDmatch are VALID + // but the outgoingUBX->cls or ID no longer match then we can be confident that we had + // valid data but it has been or is currently being overwritten by another packet (e.g. PVT). + // If (e.g.) a PVT packet is _being_ received: outgoingUBX->valid will be NOT_DEFINED + // If (e.g.) a PVT packet _has been_ received: outgoingUBX->valid will be VALID (or just possibly NOT_VALID) + // So we cannot use outgoingUBX->valid as part of this check. + // Note: the addition of packetBuf should make this check redundant! + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && !((outgoingUBX->cls != requestedClass) || (outgoingUBX->id != requestedID))) + { + if (_printDebug == true) + { + printk("waitForACKResponse: data being OVERWRITTEN after %lu msec\n", k_uptime_get_32() - startTime); + } + return (SFE_UBLOX_STATUS_DATA_OVERWRITTEN); // Data was valid but has been or is being overwritten + } + + // If packetAck.classAndIDmatch is VALID but both outgoingUBX->valid and outgoingUBX->classAndIDmatch + // are NOT_VALID then we can be confident we have had a checksum failure on the data packet + else if ((packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID)) + { + if (_printDebug == true) + { + printk("waitForACKResponse: CRC failed after %lu msec\n", k_uptime_get_32() - startTime); + } + return (SFE_UBLOX_STATUS_CRC_FAIL); //Checksum fail + } + + // If our packet was not-acknowledged (NACK) we do not receive a data packet - we only get the NACK. + // So you would expect outgoingUBX->valid and outgoingUBX->classAndIDmatch to still be NOT_DEFINED + // But if a full PVT packet arrives afterwards outgoingUBX->valid could be VALID (or just possibly NOT_VALID) + // but outgoingUBX->cls and outgoingUBX->id would not match... + // So I think this is telling us we need a special state for packetAck.classAndIDmatch to tell us + // the packet was definitely NACK'd otherwise we are possibly just guessing... + // Note: the addition of packetBuf changes the logic of this, but we'll leave the code as is for now. + else if (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_NOTACKNOWLEDGED) + { + if (_printDebug == true) + { + printk("waitForACKResponse: data was NOTACKNOWLEDGED (NACK) after %lu msec\n", k_uptime_get_32() - startTime); + } + return (SFE_UBLOX_STATUS_COMMAND_NACK); //We received a NACK! + } + + // If the outgoingUBX->classAndIDmatch is VALID but the packetAck.classAndIDmatch is NOT_VALID + // then the ack probably had a checksum error. We will take a gamble and return DATA_RECEIVED. + // If we were playing safe, we should return FAIL instead + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->cls == requestedClass) && (outgoingUBX->id == requestedID)) + { + if (_printDebug == true) + { + printk("waitForACKResponse: VALID data and INVALID ACK received after %lu msec\n", k_uptime_get_32() - startTime); + } + return (SFE_UBLOX_STATUS_DATA_RECEIVED); //We received valid data and an invalid ACK! + } + + // If the outgoingUBX->classAndIDmatch is NOT_VALID and the packetAck.classAndIDmatch is NOT_VALID + // then we return a FAIL. This must be a double checksum failure? + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID)) + { + if (_printDebug == true) + { + printk("waitForACKResponse: INVALID data and INVALID ACK received after %lu msec\n", k_uptime_get_32() - startTime); + } + return (SFE_UBLOX_STATUS_FAIL); //We received invalid data and an invalid ACK! + } + + // If the outgoingUBX->classAndIDmatch is VALID and the packetAck.classAndIDmatch is NOT_DEFINED + // then the ACK has not yet been received and we should keep waiting for it + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED)) + { + if (_printDebug == true) + { + printk("waitForACKResponse: valid data after %lu msec. Waiting for ACK\n", k_uptime_get_32() - startTime); + } + } + + } //checkUbloxInternal == true + + k_usleep(500); + } //while (k_uptime_get_32() - startTime < maxTime) + + // We have timed out... + // If the outgoingUBX->classAndIDmatch is VALID then we can take a gamble and return DATA_RECEIVED + // even though we did not get an ACK + if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->cls == requestedClass) && (outgoingUBX->id == requestedID)) + { + if (_printDebug == true) + { + printk("waitForACKResponse: TIMEOUT with valid data after %lu msec.\n", k_uptime_get_32() - startTime); + } + return (SFE_UBLOX_STATUS_DATA_RECEIVED); //We received valid data... But no ACK! + } + + if (_printDebug == true) + { + printk("waitForACKResponse: TIMEOUT after %lu msec.\n", k_uptime_get_32() - startTime); + } + + return (SFE_UBLOX_STATUS_TIMEOUT); +} + +//For non-CFG queries no ACK is sent so we use this function +//Returns SFE_UBLOX_STATUS_DATA_RECEIVED if we got a config packet full of response data that has CLS/ID match to our query packet +//Returns SFE_UBLOX_STATUS_CRC_FAIL if we got a corrupt config packet that has CLS/ID match to our query packet +//Returns SFE_UBLOX_STATUS_TIMEOUT if we timed out +//Returns SFE_UBLOX_STATUS_DATA_OVERWRITTEN if we got an a valid packetCfg but that the packetCfg has been +// or is currently being overwritten (remember that Serial data can arrive very slowly) +sfe_ublox_status_e SFE_UBLOX_GPS::waitForNoACKResponse(ubxPacket *outgoingUBX, uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime) +{ + outgoingUBX->valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; //This will go VALID (or NOT_VALID) when we receive a response to the packet we sent + packetAck.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + packetBuf.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + outgoingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; // This will go VALID (or NOT_VALID) when we receive a packet that matches the requested class and ID + packetAck.classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + packetBuf.classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + + unsigned long startTime = k_uptime_get_32(); + while (k_uptime_get_32() - startTime < maxTime) + { + if (checkUbloxInternal(outgoingUBX, requestedClass, requestedID) == true) //See if new data is available. Process bytes as they come in. + { + + // If outgoingUBX->classAndIDmatch is VALID + // and outgoingUBX->valid is _still_ VALID and the class and ID _still_ match + // then we can be confident that the data in outgoingUBX is valid + if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->cls == requestedClass) && (outgoingUBX->id == requestedID)) + { + if (_printDebug == true) + { + printk("waitForNoACKResponse: valid data with CLS/ID match after %lu msec\n", k_uptime_get_32() - startTime); + } + return (SFE_UBLOX_STATUS_DATA_RECEIVED); //We received valid data! + } + + // If the outgoingUBX->classAndIDmatch is VALID + // but the outgoingUBX->cls or ID no longer match then we can be confident that we had + // valid data but it has been or is currently being overwritten by another packet (e.g. PVT). + // If (e.g.) a PVT packet is _being_ received: outgoingUBX->valid will be NOT_DEFINED + // If (e.g.) a PVT packet _has been_ received: outgoingUBX->valid will be VALID (or just possibly NOT_VALID) + // So we cannot use outgoingUBX->valid as part of this check. + // Note: the addition of packetBuf should make this check redundant! + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && !((outgoingUBX->cls != requestedClass) || (outgoingUBX->id != requestedID))) + { + if (_printDebug == true) + { + printk("waitForNoACKResponse: data being OVERWRITTEN after %lu msec\n", k_uptime_get_32() - startTime); + } + return (SFE_UBLOX_STATUS_DATA_OVERWRITTEN); // Data was valid but has been or is being overwritten + } + + // If outgoingUBX->classAndIDmatch is NOT_DEFINED + // and outgoingUBX->valid is VALID then this must be (e.g.) a PVT packet + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID)) + { + if (_printDebug == true) + { + printk("waitForNoACKResponse: valid but UNWANTED data after %lu msec. Class: %d ID: %d\n", k_uptime_get_32() - startTime, outgoingUBX->cls, outgoingUBX->id); + } + } + + // If the outgoingUBX->classAndIDmatch is NOT_VALID then we return CRC failure + else if (outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID) + { + if (_printDebug == true) + { + printk("waitForNoACKResponse: CLS/ID match but failed CRC after %lu msec\n", k_uptime_get_32() - startTime); + } + return (SFE_UBLOX_STATUS_CRC_FAIL); //We received invalid data + } + } + + k_usleep(500); + } + + if (_printDebug == true) + { + printk("waitForNoACKResponse: TIMEOUT after %lu msec. No packet received.\n", k_uptime_get_32() - startTime); + } + + return (SFE_UBLOX_STATUS_TIMEOUT); +} + +//Save current configuration to flash and BBR (battery backed RAM) +//This still works but it is the old way of configuring ublox modules. See getVal and setVal for the new methods +bool SFE_UBLOX_GPS::saveConfiguration(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_CFG; + packetCfg.len = 12; + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint8_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + packetCfg.payload[4] = 0xFF; //Set any bit in the saveMask field to save current config to Flash and BBR + packetCfg.payload[5] = 0xFF; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Save the selected configuration sub-sections to flash and BBR (battery backed RAM) +//This still works but it is the old way of configuring ublox modules. See getVal and setVal for the new methods +bool SFE_UBLOX_GPS::saveConfigSelective(uint32_t configMask, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_CFG; + packetCfg.len = 12; + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint8_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + packetCfg.payload[4] = configMask & 0xFF; //Set the appropriate bits in the saveMask field to save current config to Flash and BBR + packetCfg.payload[5] = (configMask >> 8) & 0xFF; + packetCfg.payload[6] = (configMask >> 16) & 0xFF; + packetCfg.payload[7] = (configMask >> 24) & 0xFF; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Reset module to factory defaults +//This still works but it is the old way of configuring ublox modules. See getVal and setVal for the new methods +bool SFE_UBLOX_GPS::factoryDefault(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_CFG; + packetCfg.len = 12; + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint8_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + packetCfg.payload[0] = 0xFF; //Set any bit in the clearMask field to clear saved config + packetCfg.payload[1] = 0xFF; + packetCfg.payload[8] = 0xFF; //Set any bit in the loadMask field to discard current config and rebuild from lower non-volatile memory layers + packetCfg.payload[9] = 0xFF; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Given a group, ID and size, return the value of this config spot +//The 32-bit key is put together from group/ID/size. See other getVal to send key directly. +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::getVal8(uint16_t group, uint16_t id, uint8_t size, uint8_t layer, uint16_t maxWait) +{ + //Create key + uint32_t key = 0; + key |= (uint32_t)id; + key |= (uint32_t)group << 16; + key |= (uint32_t)size << 28; + + if (_printDebug == true) + { + printk("key: 0x%x\n", key); + } + + return getVal8(key, layer, maxWait); +} + +//Given a key, return its value +//This function takes a full 32-bit key +//Default layer is BBR +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::getVal8(uint32_t key, uint8_t layer, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALGET; + packetCfg.len = 4 + 4 * 1; //While multiple keys are allowed, we will send only one key at a time + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint8_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + //VALGET uses different memory layer definitions to VALSET + //because it can only return the value for one layer. + //So we need to fiddle the layer here. + //And just to complicate things further, the ZED-F9P only responds + //correctly to layer 0 (RAM) and layer 7 (Default)! + uint8_t getLayer = 7; // 7 is the "Default Layer" + if ((layer & VAL_LAYER_RAM) == VAL_LAYER_RAM) // Did the user request the RAM layer? + { + getLayer = 0; // Layer 0 is RAM + } + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = getLayer; //Layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + if (_printDebug == true) + { + printk("key: 0x%x\n", key); + } + + //Send VALGET command with this key + + sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait); + if (_printDebug == true) + { + printk("getVal8: sendCommand returned: %s\n", statusString(retVal)); + } + if (retVal != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (0); //If command send fails then bail + + //Verify the response is the correct length as compared to what the user called (did the module respond with 8-bits but the user called getVal32?) + //Response is 8 bytes plus cfg data + //if(packet->len > 8+1) + + //Pull the requested value from the response + //Response starts at 4+1*N with the 32-bit key so the actual data we're looking for is at 8+1*N + return (extractByte(8)); +} + +//Given a key, set a 16-bit value +//This function takes a full 32-bit key +//Default layer is BBR +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::setVal(uint32_t key, uint16_t value, uint8_t layer, uint16_t maxWait) +{ + return setVal16(key, value, layer, maxWait); +} + +//Given a key, set a 16-bit value +//This function takes a full 32-bit key +//Default layer is BBR +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::setVal16(uint32_t key, uint16_t value, uint8_t layer, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 2; //4 byte header, 4 byte key ID, 2 bytes of value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value >> 8 * 0; //Value LSB + payloadCfg[9] = value >> 8 * 1; + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Given a key, set an 8-bit value +//This function takes a full 32-bit key +//Default layer is BBR +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::setVal8(uint32_t key, uint8_t value, uint8_t layer, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 1; //4 byte header, 4 byte key ID, 1 byte value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value; //Value + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Given a key, set a 32-bit value +//This function takes a full 32-bit key +//Default layer is BBR +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::setVal32(uint32_t key, uint32_t value, uint8_t layer, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 4; //4 byte header, 4 byte key ID, 4 bytes of value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value >> 8 * 0; //Value LSB + payloadCfg[9] = value >> 8 * 1; + payloadCfg[10] = value >> 8 * 2; + payloadCfg[11] = value >> 8 * 3; + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Start defining a new UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 32-bit value +//Default layer is BBR +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::newCfgValset32(uint32_t key, uint32_t value, uint8_t layer) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 4; //4 byte header, 4 byte key ID, 4 bytes of value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < MAX_PAYLOAD_SIZE; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value >> 8 * 0; //Value LSB + payloadCfg[9] = value >> 8 * 1; + payloadCfg[10] = value >> 8 * 2; + payloadCfg[11] = value >> 8 * 3; + + //All done + return (true); +} + +//Start defining a new UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 16-bit value +//Default layer is BBR +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::newCfgValset16(uint32_t key, uint16_t value, uint8_t layer) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 2; //4 byte header, 4 byte key ID, 2 bytes of value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < MAX_PAYLOAD_SIZE; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value >> 8 * 0; //Value LSB + payloadCfg[9] = value >> 8 * 1; + + //All done + return (true); +} + +//Start defining a new UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 8-bit value +//Default layer is BBR +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::newCfgValset8(uint32_t key, uint8_t value, uint8_t layer) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 1; //4 byte header, 4 byte key ID, 1 byte value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < MAX_PAYLOAD_SIZE; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value; //Value + + //All done + return (true); +} + +//Add another keyID and value to an existing UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 32-bit value +uint8_t SFE_UBLOX_GPS::addCfgValset32(uint32_t key, uint32_t value) +{ + //Load key into outgoing payload + payloadCfg[packetCfg.len + 0] = key >> 8 * 0; //Key LSB + payloadCfg[packetCfg.len + 1] = key >> 8 * 1; + payloadCfg[packetCfg.len + 2] = key >> 8 * 2; + payloadCfg[packetCfg.len + 3] = key >> 8 * 3; + + //Load user's value + payloadCfg[packetCfg.len + 4] = value >> 8 * 0; //Value LSB + payloadCfg[packetCfg.len + 5] = value >> 8 * 1; + payloadCfg[packetCfg.len + 6] = value >> 8 * 2; + payloadCfg[packetCfg.len + 7] = value >> 8 * 3; + + //Update packet length: 4 byte key ID, 4 bytes of value + packetCfg.len = packetCfg.len + 4 + 4; + + //All done + return (true); +} + +//Add another keyID and value to an existing UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 16-bit value +uint8_t SFE_UBLOX_GPS::addCfgValset16(uint32_t key, uint16_t value) +{ + //Load key into outgoing payload + payloadCfg[packetCfg.len + 0] = key >> 8 * 0; //Key LSB + payloadCfg[packetCfg.len + 1] = key >> 8 * 1; + payloadCfg[packetCfg.len + 2] = key >> 8 * 2; + payloadCfg[packetCfg.len + 3] = key >> 8 * 3; + + //Load user's value + payloadCfg[packetCfg.len + 4] = value >> 8 * 0; //Value LSB + payloadCfg[packetCfg.len + 5] = value >> 8 * 1; + + //Update packet length: 4 byte key ID, 2 bytes of value + packetCfg.len = packetCfg.len + 4 + 2; + + //All done + return (true); +} + +//Add another keyID and value to an existing UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 8-bit value +uint8_t SFE_UBLOX_GPS::addCfgValset8(uint32_t key, uint8_t value) +{ + //Load key into outgoing payload + payloadCfg[packetCfg.len + 0] = key >> 8 * 0; //Key LSB + payloadCfg[packetCfg.len + 1] = key >> 8 * 1; + payloadCfg[packetCfg.len + 2] = key >> 8 * 2; + payloadCfg[packetCfg.len + 3] = key >> 8 * 3; + + //Load user's value + payloadCfg[packetCfg.len + 4] = value; //Value + + //Update packet length: 4 byte key ID, 1 byte value + packetCfg.len = packetCfg.len + 4 + 1; + + //All done + return (true); +} + +//Add a final keyID and value to an existing UBX-CFG-VALSET ubxPacket and send it +//This function takes a full 32-bit key and 32-bit value +uint8_t SFE_UBLOX_GPS::sendCfgValset32(uint32_t key, uint32_t value, uint16_t maxWait) +{ + //Load keyID and value into outgoing payload + addCfgValset32(key, value); + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Add a final keyID and value to an existing UBX-CFG-VALSET ubxPacket and send it +//This function takes a full 32-bit key and 16-bit value +uint8_t SFE_UBLOX_GPS::sendCfgValset16(uint32_t key, uint16_t value, uint16_t maxWait) +{ + //Load keyID and value into outgoing payload + addCfgValset16(key, value); + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Add a final keyID and value to an existing UBX-CFG-VALSET ubxPacket and send it +//This function takes a full 32-bit key and 8-bit value +uint8_t SFE_UBLOX_GPS::sendCfgValset8(uint32_t key, uint8_t value, uint16_t maxWait) +{ + //Load keyID and value into outgoing payload + addCfgValset8(key, value); + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Get the current TimeMode3 settings - these contain survey in statuses +bool SFE_UBLOX_GPS::getSurveyMode(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_TMODE3; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_RECEIVED); // We are expecting data and an ACK +} + +//Control Survey-In for NEO-M8P +bool SFE_UBLOX_GPS::setSurveyMode(uint8_t mode, uint16_t observationTime, float requiredAccuracy, uint16_t maxWait) +{ + if (getSurveyMode(maxWait) == false) //Ask module for the current TimeMode3 settings. Loads into payloadCfg. + return (false); + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_TMODE3; + packetCfg.len = 40; + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint8_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + //payloadCfg should be loaded with poll response. Now modify only the bits we care about + payloadCfg[2] = mode; //Set mode. Survey-In and Disabled are most common. Use ECEF (not LAT/LON/ALT). + + //svinMinDur is U4 (uint32_t) but we'll only use a uint16_t (waiting more than 65535 seconds seems excessive!) + payloadCfg[24] = observationTime & 0xFF; //svinMinDur in seconds + payloadCfg[25] = observationTime >> 8; //svinMinDur in seconds + payloadCfg[26] = 0; //Truncate to 16 bits + payloadCfg[27] = 0; //Truncate to 16 bits + + //svinAccLimit is U4 (uint32_t) in 0.1mm. + uint32_t svinAccLimit = (uint32_t)(requiredAccuracy * 10000.0); //Convert m to 0.1mm + payloadCfg[28] = svinAccLimit & 0xFF; //svinAccLimit in 0.1mm increments + payloadCfg[29] = svinAccLimit >> 8; + payloadCfg[30] = svinAccLimit >> 16; + payloadCfg[31] = svinAccLimit >> 24; + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Begin Survey-In for NEO-M8P +bool SFE_UBLOX_GPS::enableSurveyMode(uint16_t observationTime, float requiredAccuracy, uint16_t maxWait) +{ + return (setSurveyMode(SVIN_MODE_ENABLE, observationTime, requiredAccuracy, maxWait)); +} + +//Stop Survey-In for NEO-M8P +bool SFE_UBLOX_GPS::disableSurveyMode(uint16_t maxWait) +{ + return (setSurveyMode(SVIN_MODE_DISABLE, 0, 0, maxWait)); +} + +//Reads survey in status and sets the global variables +//for status, position valid, observation time, and mean 3D StdDev +//Returns true if commands was successful +bool SFE_UBLOX_GPS::getSurveyStatus(uint16_t maxWait) +{ + //Reset variables + svin.active = false; + svin.valid = false; + svin.observationTime = 0; + svin.meanAccuracy = 0; + + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_SVIN; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if ((sendCommand(&packetCfg, maxWait)) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); //If command send fails then bail + + //We got a response, now parse the bits into the svin structure + + //dur (Passed survey-in observation time) is U4 (uint32_t) seconds. We truncate to 16 bits + //(waiting more than 65535 seconds (18.2 hours) seems excessive!) + uint32_t tmpObsTime = extractLong(8); + if (tmpObsTime <= 0xFFFF) + { + svin.observationTime = (uint16_t)tmpObsTime; + } + else + { + svin.observationTime = 0xFFFF; + } + + // meanAcc is U4 (uint32_t) in 0.1mm. We convert this to float. + uint32_t tempFloat = extractLong(28); + svin.meanAccuracy = ((float)tempFloat) / 10000.0; //Convert 0.1mm to m + + svin.valid = payloadCfg[36]; //1 if survey-in position is valid, 0 otherwise + svin.active = payloadCfg[37]; //1 if survey-in in progress, 0 otherwise + + return (true); +} + +//Loads the payloadCfg array with the current protocol bits located the UBX-CFG-PRT register for a given port +bool SFE_UBLOX_GPS::getPortSettings(uint8_t portID, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_PRT; + packetCfg.len = 1; + packetCfg.startingSpot = 0; + + payloadCfg[0] = portID; + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_RECEIVED); // We are expecting data and an ACK +} + +//Configure a given port to output UBX, NMEA, RTCM3 or a combination thereof +//Port 0=I2c, 1=UART1, 2=UART2, 3=USB, 4=SPI +//Bit:0 = UBX, :1=NMEA, :5=RTCM3 +bool SFE_UBLOX_GPS::setPortOutput(uint8_t portID, uint8_t outStreamSettings, uint16_t maxWait) +{ + //Get the current config values for this port ID + if (getPortSettings(portID, maxWait) == false) + return (false); //Something went wrong. Bail. + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_PRT; + packetCfg.len = 20; + packetCfg.startingSpot = 0; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[14] = outStreamSettings; //OutProtocolMask LSB - Set outStream bits + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Configure a given port to input UBX, NMEA, RTCM3 or a combination thereof +//Port 0=I2c, 1=UART1, 2=UART2, 3=USB, 4=SPI +//Bit:0 = UBX, :1=NMEA, :5=RTCM3 +bool SFE_UBLOX_GPS::setPortInput(uint8_t portID, uint8_t inStreamSettings, uint16_t maxWait) +{ + //Get the current config values for this port ID + //This will load the payloadCfg array with current port settings + if (getPortSettings(portID, maxWait) == false) + return (false); //Something went wrong. Bail. + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_PRT; + packetCfg.len = 20; + packetCfg.startingSpot = 0; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[12] = inStreamSettings; //InProtocolMask LSB - Set inStream bits + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Configure a port to output UBX, NMEA, RTCM3 or a combination thereof +bool SFE_UBLOX_GPS::setI2COutput(uint8_t comSettings, uint16_t maxWait) +{ + return (setPortOutput(COM_PORT_I2C, comSettings, maxWait)); +} +bool SFE_UBLOX_GPS::setUART1Output(uint8_t comSettings, uint16_t maxWait) +{ + return (setPortOutput(COM_PORT_UART1, comSettings, maxWait)); +} +bool SFE_UBLOX_GPS::setUART2Output(uint8_t comSettings, uint16_t maxWait) +{ + return (setPortOutput(COM_PORT_UART2, comSettings, maxWait)); +} +bool SFE_UBLOX_GPS::setUSBOutput(uint8_t comSettings, uint16_t maxWait) +{ + return (setPortOutput(COM_PORT_USB, comSettings, maxWait)); +} +bool SFE_UBLOX_GPS::setSPIOutput(uint8_t comSettings, uint16_t maxWait) +{ + return (setPortOutput(COM_PORT_SPI, comSettings, maxWait)); +} + +//Set the rate at which the module will give us an updated navigation solution +//Expects a number that is the updates per second. For example 1 = 1Hz, 2 = 2Hz, etc. +//Max is 40Hz(?!) +bool SFE_UBLOX_GPS::setNavigationFrequency(uint8_t navFreq, uint16_t maxWait) +{ + //if(updateRate > 40) updateRate = 40; //Not needed: module will correct out of bounds values + + //Adjust the I2C polling timeout based on update rate + i2cPollingWait = 1000 / (navFreq * 4); //This is the number of ms to wait between checks for new I2C data + + //Query the module for the latest lat/long + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RATE; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //This will load the payloadCfg array with current settings of the given register + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); //If command send fails then bail + + uint16_t measurementRate = 1000 / navFreq; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[0] = measurementRate & 0xFF; //measRate LSB + payloadCfg[1] = measurementRate >> 8; //measRate MSB + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Get the rate at which the module is outputting nav solutions +uint8_t SFE_UBLOX_GPS::getNavigationFrequency(uint16_t maxWait) +{ + //Query the module for the latest lat/long + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RATE; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //This will load the payloadCfg array with current settings of the given register + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); //If command send fails then bail + + uint16_t measurementRate = 0; + + //payloadCfg is now loaded with current bytes. Get what we need + measurementRate = extractInt(0); //Pull from payloadCfg at measRate LSB + + measurementRate = 1000 / measurementRate; //This may return an int when it's a float, but I'd rather not return 4 bytes + return (measurementRate); +} + +//In case no config access to the GPS is possible and PVT is send cyclically already +//set config to suitable parameters +bool SFE_UBLOX_GPS::assumeAutoPVT(bool enabled, bool implicitUpdate) +{ + bool changes = autoPVT != enabled || autoPVTImplicitUpdate != implicitUpdate; + if (changes) + { + autoPVT = enabled; + autoPVTImplicitUpdate = implicitUpdate; + } + return changes; +} + +//Enable or disable automatic navigation message generation by the GPS. This changes the way getPVT +//works. +bool SFE_UBLOX_GPS::setAutoPVT(bool enable, uint16_t maxWait) +{ + return setAutoPVT(enable, true, maxWait); +} + +//Enable or disable automatic navigation message generation by the GPS. This changes the way getPVT +//works. +bool SFE_UBLOX_GPS::setAutoPVT(bool enable, bool implicitUpdate, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_MSG; + packetCfg.len = 3; + packetCfg.startingSpot = 0; + payloadCfg[0] = UBX_CLASS_NAV; + payloadCfg[1] = UBX_NAV_PVT; + payloadCfg[2] = enable ? 1 : 0; // rate relative to navigation freq. + + bool ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + if (ok) + { + autoPVT = enable; + autoPVTImplicitUpdate = implicitUpdate; + } + moduleQueried.all = false; + return ok; +} + +//Configure a given message type for a given port (UART1, I2C, SPI, etc) +bool SFE_UBLOX_GPS::configureMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t sendRate, uint16_t maxWait) +{ + //Poll for the current settings for a given message + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_MSG; + packetCfg.len = 2; + packetCfg.startingSpot = 0; + + payloadCfg[0] = msgClass; + payloadCfg[1] = msgID; + + //This will load the payloadCfg array with current settings of the given register + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); //If command send fails then bail + + //Now send it back with new mods + packetCfg.len = 8; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[2 + portID] = sendRate; //Send rate is relative to the event a message is registered on. For example, if the rate of a navigation message is set to 2, the message is sent every 2nd navigation solution. + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Enable a given message type, default of 1 per update rate (usually 1 per second) +bool SFE_UBLOX_GPS::enableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t rate, uint16_t maxWait) +{ + return (configureMessage(msgClass, msgID, portID, rate, maxWait)); +} +//Disable a given message type on a given port +bool SFE_UBLOX_GPS::disableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint16_t maxWait) +{ + return (configureMessage(msgClass, msgID, portID, 0, maxWait)); +} + +bool SFE_UBLOX_GPS::enableNMEAMessage(uint8_t msgID, uint8_t portID, uint8_t rate, uint16_t maxWait) +{ + return (configureMessage(UBX_CLASS_NMEA, msgID, portID, rate, maxWait)); +} +bool SFE_UBLOX_GPS::disableNMEAMessage(uint8_t msgID, uint8_t portID, uint16_t maxWait) +{ + return (enableNMEAMessage(msgID, portID, 0, maxWait)); +} + +//Given a message number turns on a message ID for output over a given portID (UART, I2C, SPI, USB, etc) +//To disable a message, set secondsBetween messages to 0 +//Note: This function will return false if the message is already enabled +//For base station RTK output we need to enable various sentences + +//NEO-M8P has four: +//1005 = 0xF5 0x05 - Stationary RTK reference ARP +//1077 = 0xF5 0x4D - GPS MSM7 +//1087 = 0xF5 0x57 - GLONASS MSM7 +//1230 = 0xF5 0xE6 - GLONASS code-phase biases, set to once every 10 seconds + +//ZED-F9P has six: +//1005, 1074, 1084, 1094, 1124, 1230 + +//Much of this configuration is not documented and instead discerned from u-center binary console +bool SFE_UBLOX_GPS::enableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint8_t sendRate, uint16_t maxWait) +{ + return (configureMessage(UBX_RTCM_MSB, messageNumber, portID, sendRate, maxWait)); +} + +//Disable a given message on a given port by setting secondsBetweenMessages to zero +bool SFE_UBLOX_GPS::disableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint16_t maxWait) +{ + return (enableRTCMmessage(messageNumber, portID, 0, maxWait)); +} + +//Add a new geofence using UBX-CFG-GEOFENCE +bool SFE_UBLOX_GPS::addGeofence(int32_t latitude, int32_t longitude, uint32_t radius, uint8_t confidence, uint8_t pinPolarity, uint8_t pin, uint16_t maxWait) +{ + if (currentGeofenceParams.numFences >= 4) + return (false); // Quit if we already have four geofences defined + + // Store the new geofence parameters + currentGeofenceParams.lats[currentGeofenceParams.numFences] = latitude; + currentGeofenceParams.longs[currentGeofenceParams.numFences] = longitude; + currentGeofenceParams.rads[currentGeofenceParams.numFences] = radius; + currentGeofenceParams.numFences = currentGeofenceParams.numFences + 1; // Increment the number of fences + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_GEOFENCE; + packetCfg.len = (currentGeofenceParams.numFences * 12) + 8; + packetCfg.startingSpot = 0; + + payloadCfg[0] = 0; // Message version = 0x00 + payloadCfg[1] = currentGeofenceParams.numFences; // numFences + payloadCfg[2] = confidence; // confLvl = Confidence level 0-4 (none, 68%, 95%, 99.7%, 99.99%) + payloadCfg[3] = 0; // reserved1 + if (pin > 0) + { + payloadCfg[4] = 1; // enable PIO combined fence state + } + else + { + payloadCfg[4] = 0; // disable PIO combined fence state + } + payloadCfg[5] = pinPolarity; // PIO pin polarity (0 = low means inside, 1 = low means outside (or unknown)) + payloadCfg[6] = pin; // PIO pin + payloadCfg[7] = 0; //reserved2 + payloadCfg[8] = currentGeofenceParams.lats[0] & 0xFF; + payloadCfg[9] = currentGeofenceParams.lats[0] >> 8; + payloadCfg[10] = currentGeofenceParams.lats[0] >> 16; + payloadCfg[11] = currentGeofenceParams.lats[0] >> 24; + payloadCfg[12] = currentGeofenceParams.longs[0] & 0xFF; + payloadCfg[13] = currentGeofenceParams.longs[0] >> 8; + payloadCfg[14] = currentGeofenceParams.longs[0] >> 16; + payloadCfg[15] = currentGeofenceParams.longs[0] >> 24; + payloadCfg[16] = currentGeofenceParams.rads[0] & 0xFF; + payloadCfg[17] = currentGeofenceParams.rads[0] >> 8; + payloadCfg[18] = currentGeofenceParams.rads[0] >> 16; + payloadCfg[19] = currentGeofenceParams.rads[0] >> 24; + if (currentGeofenceParams.numFences >= 2) + { + payloadCfg[20] = currentGeofenceParams.lats[1] & 0xFF; + payloadCfg[21] = currentGeofenceParams.lats[1] >> 8; + payloadCfg[22] = currentGeofenceParams.lats[1] >> 16; + payloadCfg[23] = currentGeofenceParams.lats[1] >> 24; + payloadCfg[24] = currentGeofenceParams.longs[1] & 0xFF; + payloadCfg[25] = currentGeofenceParams.longs[1] >> 8; + payloadCfg[26] = currentGeofenceParams.longs[1] >> 16; + payloadCfg[27] = currentGeofenceParams.longs[1] >> 24; + payloadCfg[28] = currentGeofenceParams.rads[1] & 0xFF; + payloadCfg[29] = currentGeofenceParams.rads[1] >> 8; + payloadCfg[30] = currentGeofenceParams.rads[1] >> 16; + payloadCfg[31] = currentGeofenceParams.rads[1] >> 24; + } + if (currentGeofenceParams.numFences >= 3) + { + payloadCfg[32] = currentGeofenceParams.lats[2] & 0xFF; + payloadCfg[33] = currentGeofenceParams.lats[2] >> 8; + payloadCfg[34] = currentGeofenceParams.lats[2] >> 16; + payloadCfg[35] = currentGeofenceParams.lats[2] >> 24; + payloadCfg[36] = currentGeofenceParams.longs[2] & 0xFF; + payloadCfg[37] = currentGeofenceParams.longs[2] >> 8; + payloadCfg[38] = currentGeofenceParams.longs[2] >> 16; + payloadCfg[39] = currentGeofenceParams.longs[2] >> 24; + payloadCfg[40] = currentGeofenceParams.rads[2] & 0xFF; + payloadCfg[41] = currentGeofenceParams.rads[2] >> 8; + payloadCfg[42] = currentGeofenceParams.rads[2] >> 16; + payloadCfg[43] = currentGeofenceParams.rads[2] >> 24; + } + if (currentGeofenceParams.numFences >= 4) + { + payloadCfg[44] = currentGeofenceParams.lats[3] & 0xFF; + payloadCfg[45] = currentGeofenceParams.lats[3] >> 8; + payloadCfg[46] = currentGeofenceParams.lats[3] >> 16; + payloadCfg[47] = currentGeofenceParams.lats[3] >> 24; + payloadCfg[48] = currentGeofenceParams.longs[3] & 0xFF; + payloadCfg[49] = currentGeofenceParams.longs[3] >> 8; + payloadCfg[50] = currentGeofenceParams.longs[3] >> 16; + payloadCfg[51] = currentGeofenceParams.longs[3] >> 24; + payloadCfg[52] = currentGeofenceParams.rads[3] & 0xFF; + payloadCfg[53] = currentGeofenceParams.rads[3] >> 8; + payloadCfg[54] = currentGeofenceParams.rads[3] >> 16; + payloadCfg[55] = currentGeofenceParams.rads[3] >> 24; + } + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Clear all geofences using UBX-CFG-GEOFENCE +bool SFE_UBLOX_GPS::clearGeofences(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_GEOFENCE; + packetCfg.len = 8; + packetCfg.startingSpot = 0; + + payloadCfg[0] = 0; // Message version = 0x00 + payloadCfg[1] = 0; // numFences + payloadCfg[2] = 0; // confLvl + payloadCfg[3] = 0; // reserved1 + payloadCfg[4] = 0; // disable PIO combined fence state + payloadCfg[5] = 0; // PIO pin polarity (0 = low means inside, 1 = low means outside (or unknown)) + payloadCfg[6] = 0; // PIO pin + payloadCfg[7] = 0; //reserved2 + + currentGeofenceParams.numFences = 0; // Zero the number of geofences currently in use + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Clear the antenna control settings using UBX-CFG-ANT +//This function is hopefully redundant but may be needed to release +//any PIO pins pre-allocated for antenna functions +bool SFE_UBLOX_GPS::clearAntPIO(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_ANT; + packetCfg.len = 4; + packetCfg.startingSpot = 0; + + payloadCfg[0] = 0x10; // Antenna flag mask: set the recovery bit + payloadCfg[1] = 0; + payloadCfg[2] = 0xFF; // Antenna pin configuration: set pinSwitch and pinSCD to 31 + payloadCfg[3] = 0xFF; // Antenna pin configuration: set pinOCD to 31, set reconfig bit + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Returns the combined geofence state using UBX-NAV-GEOFENCE +bool SFE_UBLOX_GPS::getGeofenceState(geofenceState ¤tGeofenceState, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_GEOFENCE; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the geofence status. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); + + currentGeofenceState.status = payloadCfg[5]; // Extract the status + currentGeofenceState.numFences = payloadCfg[6]; // Extract the number of geofences + currentGeofenceState.combState = payloadCfg[7]; // Extract the combined state of all geofences + if (currentGeofenceState.numFences > 0) + currentGeofenceState.states[0] = payloadCfg[8]; // Extract geofence 1 state + if (currentGeofenceState.numFences > 1) + currentGeofenceState.states[1] = payloadCfg[10]; // Extract geofence 2 state + if (currentGeofenceState.numFences > 2) + currentGeofenceState.states[2] = payloadCfg[12]; // Extract geofence 3 state + if (currentGeofenceState.numFences > 3) + currentGeofenceState.states[3] = payloadCfg[14]; // Extract geofence 4 state + + return (true); +} + +//Power Save Mode +//Enables/Disables Low Power Mode using UBX-CFG-RXM +bool SFE_UBLOX_GPS::powerSaveMode(bool power_save, uint16_t maxWait) +{ + // Let's begin by checking the Protocol Version as UBX_CFG_RXM is not supported on the ZED (protocol >= 27) + uint8_t protVer = getProtocolVersionHigh(maxWait); + /* + if (_printDebug == true) + { + printk"(Protocol version is %d\n", protVer); + } + */ + if (protVer >= 27) + { + if (_printDebug == true) + { + printk("powerSaveMode (UBX-CFG-RXM) is not supported by this protocol version\n"); + } + return (false); + } + + // Now let's change the power setting using UBX-CFG-RXM + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RXM; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the current power management settings. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); + + if (power_save) + { + payloadCfg[1] = 1; // Power Save Mode + } + else + { + payloadCfg[1] = 0; // Continuous Mode + } + + packetCfg.len = 2; + packetCfg.startingSpot = 0; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +// Get Power Save Mode +// Returns the current Low Power Mode using UBX-CFG-RXM +// Returns 255 if the sendCommand fails +uint8_t SFE_UBLOX_GPS::getPowerSaveMode(uint16_t maxWait) +{ + // Let's begin by checking the Protocol Version as UBX_CFG_RXM is not supported on the ZED (protocol >= 27) + uint8_t protVer = getProtocolVersionHigh(maxWait); + /* + if (_printDebug == true) + { + printk("Protocol version is %d\n", protVer); + } + */ + if (protVer >= 27) + { + if (_printDebug == true) + { + printk("powerSaveMode (UBX-CFG-RXM) is not supported by this protocol version\n"); + } + return (255); + } + + // Now let's read the power setting using UBX-CFG-RXM + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RXM; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the current power management settings. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (255); + + return (payloadCfg[1]); // Return the low power mode +} + +// Powers off the GPS device for a given duration to reduce power consumption. +// NOTE: Querying the device before the duration is complete, for example by "getLatitude()" will wake it up! +// Returns true if command has not been not acknowledged. +// Returns false if command has not been acknowledged or maxWait = 0. +bool SFE_UBLOX_GPS::powerOff(uint32_t durationInMs, uint16_t maxWait) +{ + // use durationInMs = 0 for infinite duration + if (_printDebug == true) + { + printk("Powering off for %d ms\n", durationInMs); + } + + // Power off device using UBX-RXM-PMREQ + packetCfg.cls = UBX_CLASS_RXM; // 0x02 + packetCfg.id = UBX_RXM_PMREQ; // 0x41 + packetCfg.len = 8; + packetCfg.startingSpot = 0; + + // duration + // big endian to little endian, switch byte order + payloadCfg[0] = (durationInMs >> (8 * 0)) & 0xff; + payloadCfg[1] = (durationInMs >> (8 * 1)) & 0xff; + payloadCfg[2] = (durationInMs >> (8 * 2)) & 0xff; + payloadCfg[3] = (durationInMs >> (8 * 3)) & 0xff; + + payloadCfg[4] = 0x02; //Flags : set the backup bit + payloadCfg[5] = 0x00; //Flags + payloadCfg[6] = 0x00; //Flags + payloadCfg[7] = 0x00; //Flags + + if (maxWait != 0) + { + // check for "not acknowledged" command + return (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_COMMAND_NACK); + } + else + { + sendCommand(&packetCfg, maxWait); + return false; // can't tell if command not acknowledged if maxWait = 0 + } +} + +// Powers off the GPS device for a given duration to reduce power consumption. +// While powered off it can be woken up by creating a falling or rising voltage edge on the specified pin. +// NOTE: The GPS seems to be sensitve to signals on the pins while powered off. Works best when Microcontroller is in deepsleep. +// NOTE: Querying the device before the duration is complete, for example by "getLatitude()" will wake it up! +// Returns true if command has not been not acknowledged. +// Returns false if command has not been acknowledged or maxWait = 0. +bool SFE_UBLOX_GPS::powerOffWithInterrupt(uint32_t durationInMs, uint32_t wakeupSources, bool forceWhileUsb, uint16_t maxWait) +{ + // use durationInMs = 0 for infinite duration + if (_printDebug == true) + { + printk("Powering off for %d ms\n", durationInMs); + } + + // Power off device using UBX-RXM-PMREQ + packetCfg.cls = UBX_CLASS_RXM; // 0x02 + packetCfg.id = UBX_RXM_PMREQ; // 0x41 + packetCfg.len = 16; + packetCfg.startingSpot = 0; + + payloadCfg[0] = 0x00; // message version + + // bytes 1-3 are reserved - and must be set to zero + payloadCfg[1] = 0x00; + payloadCfg[2] = 0x00; + payloadCfg[3] = 0x00; + + // duration + // big endian to little endian, switch byte order + payloadCfg[4] = (durationInMs >> (8 * 0)) & 0xff; + payloadCfg[5] = (durationInMs >> (8 * 1)) & 0xff; + payloadCfg[6] = (durationInMs >> (8 * 2)) & 0xff; + payloadCfg[7] = (durationInMs >> (8 * 3)) & 0xff; + + // flags + + // disables USB interface when powering off, defaults to true + if (forceWhileUsb) + { + payloadCfg[8] = 0x06; // force | backup + } + else + { + payloadCfg[8] = 0x02; // backup only (leave the force bit clear - module will stay on if USB is connected) + } + + payloadCfg[9] = 0x00; + payloadCfg[10] = 0x00; + payloadCfg[11] = 0x00; + + // wakeUpSources + + // wakeupPin mapping, defaults to VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT0 + + // Possible values are: + // VAL_RXM_PMREQ_WAKEUPSOURCE_UARTRX + // VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT0 + // VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT1 + // VAL_RXM_PMREQ_WAKEUPSOURCE_SPICS + + payloadCfg[12] = (wakeupSources >> (8 * 0)) & 0xff; + payloadCfg[13] = (wakeupSources >> (8 * 1)) & 0xff; + payloadCfg[14] = (wakeupSources >> (8 * 2)) & 0xff; + payloadCfg[15] = (wakeupSources >> (8 * 3)) & 0xff; + + if (maxWait != 0) + { + // check for "not acknowledged" command + return (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_COMMAND_NACK); + } + else + { + sendCommand(&packetCfg, maxWait); + return false; // can't tell if command not acknowledged if maxWait = 0 + } +} + +//Change the dynamic platform model using UBX-CFG-NAV5 +//Possible values are: +//PORTABLE,STATIONARY,PEDESTRIAN,AUTOMOTIVE,SEA, +//AIRBORNE1g,AIRBORNE2g,AIRBORNE4g,WRIST,BIKE +//WRIST is not supported in protocol versions less than 18 +//BIKE is supported in protocol versions 19.2 +bool SFE_UBLOX_GPS::setDynamicModel(dynModel newDynamicModel, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_NAV5; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the current navigation model settings. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); + + payloadCfg[0] = 0x01; // mask: set only the dyn bit (0) + payloadCfg[1] = 0x00; // mask + payloadCfg[2] = newDynamicModel; // dynModel + + packetCfg.len = 36; + packetCfg.startingSpot = 0; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Get the dynamic platform model using UBX-CFG-NAV5 +//Returns 255 if the sendCommand fails +uint8_t SFE_UBLOX_GPS::getDynamicModel(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_NAV5; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the current navigation model settings. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (255); + + return (payloadCfg[2]); // Return the dynamic model +} + +//Given a spot in the payload array, extract four bytes and build a long +uint32_t SFE_UBLOX_GPS::extractLong(uint8_t spotToStart) +{ + uint32_t val = 0; + val |= (uint32_t)payloadCfg[spotToStart + 0] << 8 * 0; + val |= (uint32_t)payloadCfg[spotToStart + 1] << 8 * 1; + val |= (uint32_t)payloadCfg[spotToStart + 2] << 8 * 2; + val |= (uint32_t)payloadCfg[spotToStart + 3] << 8 * 3; + return (val); +} + +//Given a spot in the payload array, extract two bytes and build an int +uint16_t SFE_UBLOX_GPS::extractInt(uint8_t spotToStart) +{ + uint16_t val = 0; + val |= (uint16_t)payloadCfg[spotToStart + 0] << 8 * 0; + val |= (uint16_t)payloadCfg[spotToStart + 1] << 8 * 1; + return (val); +} + +//Given a spot, extract a byte from the payload +uint8_t SFE_UBLOX_GPS::extractByte(uint8_t spotToStart) +{ + return (payloadCfg[spotToStart]); +} + +//Given a spot, extract a signed 8-bit value from the payload +int8_t SFE_UBLOX_GPS::extractSignedChar(uint8_t spotToStart) +{ + return ((int8_t)payloadCfg[spotToStart]); +} + +//Get the current year +uint16_t SFE_UBLOX_GPS::getYear(uint16_t maxWait) +{ + if (moduleQueried.gpsYear == false) + getPVT(maxWait); + moduleQueried.gpsYear = false; //Since we are about to give this to user, mark this data as stale + return (gpsYear); +} + +//Get the current month +uint8_t SFE_UBLOX_GPS::getMonth(uint16_t maxWait) +{ + if (moduleQueried.gpsMonth == false) + getPVT(maxWait); + moduleQueried.gpsMonth = false; //Since we are about to give this to user, mark this data as stale + return (gpsMonth); +} + +//Get the current day +uint8_t SFE_UBLOX_GPS::getDay(uint16_t maxWait) +{ + if (moduleQueried.gpsDay == false) + getPVT(maxWait); + moduleQueried.gpsDay = false; //Since we are about to give this to user, mark this data as stale + return (gpsDay); +} + +//Get the current hour +uint8_t SFE_UBLOX_GPS::getHour(uint16_t maxWait) +{ + if (moduleQueried.gpsHour == false) + getPVT(maxWait); + moduleQueried.gpsHour = false; //Since we are about to give this to user, mark this data as stale + return (gpsHour); +} + +//Get the current minute +uint8_t SFE_UBLOX_GPS::getMinute(uint16_t maxWait) +{ + if (moduleQueried.gpsMinute == false) + getPVT(maxWait); + moduleQueried.gpsMinute = false; //Since we are about to give this to user, mark this data as stale + return (gpsMinute); +} + +//Get the current second +uint8_t SFE_UBLOX_GPS::getSecond(uint16_t maxWait) +{ + if (moduleQueried.gpsSecond == false) + getPVT(maxWait); + moduleQueried.gpsSecond = false; //Since we are about to give this to user, mark this data as stale + return (gpsSecond); +} + +//Get the current date validity +bool SFE_UBLOX_GPS::getDateValid(uint16_t maxWait) +{ + if (moduleQueried.gpsDateValid == false) + getPVT(maxWait); + moduleQueried.gpsDateValid = false; //Since we are about to give this to user, mark this data as stale + return (gpsDateValid); +} + +//Get the current time validity +bool SFE_UBLOX_GPS::getTimeValid(uint16_t maxWait) +{ + if (moduleQueried.gpsTimeValid == false) + getPVT(maxWait); + moduleQueried.gpsTimeValid = false; //Since we are about to give this to user, mark this data as stale + return (gpsTimeValid); +} + +//Get the current millisecond +uint16_t SFE_UBLOX_GPS::getMillisecond(uint16_t maxWait) +{ + if (moduleQueried.gpsiTOW == false) + getPVT(maxWait); + moduleQueried.gpsiTOW = false; //Since we are about to give this to user, mark this data as stale + return (gpsMillisecond); +} + +//Get the current nanoseconds - includes milliseconds +int32_t SFE_UBLOX_GPS::getNanosecond(uint16_t maxWait) +{ + if (moduleQueried.gpsNanosecond == false) + getPVT(maxWait); + moduleQueried.gpsNanosecond = false; //Since we are about to give this to user, mark this data as stale + return (gpsNanosecond); +} + +//Get the latest Position/Velocity/Time solution and fill all global variables +bool SFE_UBLOX_GPS::getPVT(uint16_t maxWait) +{ + if (autoPVT && autoPVTImplicitUpdate) + { + //The GPS is automatically reporting, we just check whether we got unread data + if (_printDebug == true) + { + printk("getPVT: Autoreporting\n"); + } + checkUbloxInternal(&packetCfg, UBX_CLASS_NAV, UBX_NAV_PVT); + return moduleQueried.all; + } + else if (autoPVT && !autoPVTImplicitUpdate) + { + //Someone else has to call checkUblox for us... + if (_printDebug == true) + { + printk("getPVT: Exit immediately\n"); + } + return (false); + } + else + { + if (_printDebug == true) + { + printk("getPVT: Polling\n"); + } + + //The GPS is not automatically reporting navigation position so we have to poll explicitly + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_PVT; + packetCfg.len = 0; + //packetCfg.startingSpot = 20; //Begin listening at spot 20 so we can record up to 20+MAX_PAYLOAD_SIZE = 84 bytes Note:now hard-coded in processUBX + + //The data is parsed as part of processing the response + sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait); + + if (retVal == SFE_UBLOX_STATUS_DATA_RECEIVED) + return (true); + + if (_printDebug == true) + { + printk("getPVT retVal: %s\n", statusString(retVal)); + } + return (false); + } +} + +uint32_t SFE_UBLOX_GPS::getTimeOfWeek(uint16_t maxWait /* = 250*/) +{ + if (moduleQueried.gpsiTOW == false) + getPVT(maxWait); + moduleQueried.gpsiTOW = false; //Since we are about to give this to user, mark this data as stale + return (timeOfWeek); +} + +int32_t SFE_UBLOX_GPS::getHighResLatitude(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.highResLatitude == false) + getHPPOSLLH(maxWait); + highResModuleQueried.highResLatitude = false; //Since we are about to give this to user, mark this data as stale + return (highResLatitude); +} + +int8_t SFE_UBLOX_GPS::getHighResLatitudeHp(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.highResLatitudeHp == false) + getHPPOSLLH(maxWait); + highResModuleQueried.highResLatitudeHp = false; //Since we are about to give this to user, mark this data as stale + return (highResLatitudeHp); +} + +int32_t SFE_UBLOX_GPS::getHighResLongitude(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.highResLongitude == false) + getHPPOSLLH(maxWait); + highResModuleQueried.highResLongitude = false; //Since we are about to give this to user, mark this data as stale + return (highResLongitude); +} + +int8_t SFE_UBLOX_GPS::getHighResLongitudeHp(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.highResLongitudeHp == false) + getHPPOSLLH(maxWait); + highResModuleQueried.highResLongitudeHp = false; //Since we are about to give this to user, mark this data as stale + return (highResLongitudeHp); +} + +int32_t SFE_UBLOX_GPS::getElipsoid(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.elipsoid == false) + getHPPOSLLH(maxWait); + highResModuleQueried.elipsoid = false; //Since we are about to give this to user, mark this data as stale + return (elipsoid); +} + +int8_t SFE_UBLOX_GPS::getElipsoidHp(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.elipsoidHp == false) + getHPPOSLLH(maxWait); + highResModuleQueried.elipsoidHp = false; //Since we are about to give this to user, mark this data as stale + return (elipsoidHp); +} + +int32_t SFE_UBLOX_GPS::getMeanSeaLevel(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.meanSeaLevel == false) + getHPPOSLLH(maxWait); + highResModuleQueried.meanSeaLevel = false; //Since we are about to give this to user, mark this data as stale + return (meanSeaLevel); +} + +int8_t SFE_UBLOX_GPS::getMeanSeaLevelHp(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.meanSeaLevelHp == false) + getHPPOSLLH(maxWait); + highResModuleQueried.meanSeaLevelHp = false; //Since we are about to give this to user, mark this data as stale + return (meanSeaLevelHp); +} + +// getGeoidSeparation is currently redundant. The geoid separation seems to only be provided in NMEA GGA and GNS messages. +int32_t SFE_UBLOX_GPS::getGeoidSeparation(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.geoidSeparation == false) + getHPPOSLLH(maxWait); + highResModuleQueried.geoidSeparation = false; //Since we are about to give this to user, mark this data as stale + return (geoidSeparation); +} + +uint32_t SFE_UBLOX_GPS::getHorizontalAccuracy(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.horizontalAccuracy == false) + getHPPOSLLH(maxWait); + highResModuleQueried.horizontalAccuracy = false; //Since we are about to give this to user, mark this data as stale + return (horizontalAccuracy); +} + +uint32_t SFE_UBLOX_GPS::getVerticalAccuracy(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.verticalAccuracy == false) + getHPPOSLLH(maxWait); + highResModuleQueried.verticalAccuracy = false; //Since we are about to give this to user, mark this data as stale + return (verticalAccuracy); +} + +bool SFE_UBLOX_GPS::getHPPOSLLH(uint16_t maxWait) +{ + //The GPS is not automatically reporting navigation position so we have to poll explicitly + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_HPPOSLLH; + packetCfg.len = 0; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_RECEIVED); // We are only expecting data (no ACK) +} + +//Get the current 3D high precision positional accuracy - a fun thing to watch +//Returns a long representing the 3D accuracy in millimeters +uint32_t SFE_UBLOX_GPS::getPositionAccuracy(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_HPPOSECEF; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are only expecting data (no ACK) + return (0); //If command send fails then bail + + uint32_t tempAccuracy = extractLong(24); //We got a response, now extract a long beginning at a given position + + if ((tempAccuracy % 10) >= 5) + tempAccuracy += 5; //Round fraction of mm up to next mm if .5 or above + tempAccuracy /= 10; //Convert 0.1mm units to mm + + return (tempAccuracy); +} + +//Get the current latitude in degrees +//Returns a long representing the number of degrees *10^-7 +int32_t SFE_UBLOX_GPS::getLatitude(uint16_t maxWait) +{ + if (moduleQueried.latitude == false) + getPVT(maxWait); + moduleQueried.latitude = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (latitude); +} + +//Get the current longitude in degrees +//Returns a long representing the number of degrees *10^-7 +int32_t SFE_UBLOX_GPS::getLongitude(uint16_t maxWait) +{ + if (moduleQueried.longitude == false) + getPVT(maxWait); + moduleQueried.longitude = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (longitude); +} + +//Get the current altitude in mm according to ellipsoid model +int32_t SFE_UBLOX_GPS::getAltitude(uint16_t maxWait) +{ + if (moduleQueried.altitude == false) + getPVT(maxWait); + moduleQueried.altitude = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (altitude); +} + +//Get the current altitude in mm according to mean sea level +//Ellipsoid model: https://www.esri.com/news/arcuser/0703/geoid1of3.html +//Difference between Ellipsoid Model and Mean Sea Level: https://eos-gnss.com/elevation-for-beginners/ +int32_t SFE_UBLOX_GPS::getAltitudeMSL(uint16_t maxWait) +{ + if (moduleQueried.altitudeMSL == false) + getPVT(maxWait); + moduleQueried.altitudeMSL = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (altitudeMSL); +} + +//Get the number of satellites used in fix +uint8_t SFE_UBLOX_GPS::getSIV(uint16_t maxWait) +{ + if (moduleQueried.SIV == false) + getPVT(maxWait); + moduleQueried.SIV = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (SIV); +} + +//Get the current fix type +//0=no fix, 1=dead reckoning, 2=2D, 3=3D, 4=GNSS, 5=Time fix +uint8_t SFE_UBLOX_GPS::getFixType(uint16_t maxWait) +{ + if (moduleQueried.fixType == false) + { + getPVT(maxWait); + } + moduleQueried.fixType = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (fixType); +} + +//Get the carrier phase range solution status +//Useful when querying module to see if it has high-precision RTK fix +//0=No solution, 1=Float solution, 2=Fixed solution +uint8_t SFE_UBLOX_GPS::getCarrierSolutionType(uint16_t maxWait) +{ + if (moduleQueried.carrierSolution == false) + getPVT(maxWait); + moduleQueried.carrierSolution = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (carrierSolution); +} + +//Get the ground speed in mm/s +int32_t SFE_UBLOX_GPS::getGroundSpeed(uint16_t maxWait) +{ + if (moduleQueried.groundSpeed == false) + getPVT(maxWait); + moduleQueried.groundSpeed = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (groundSpeed); +} + +//Get the heading of motion (as opposed to heading of car) in degrees * 10^-5 +int32_t SFE_UBLOX_GPS::getHeading(uint16_t maxWait) +{ + if (moduleQueried.headingOfMotion == false) + getPVT(maxWait); + moduleQueried.headingOfMotion = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (headingOfMotion); +} + +//Get the positional dillution of precision * 10^-2 +uint16_t SFE_UBLOX_GPS::getPDOP(uint16_t maxWait) +{ + if (moduleQueried.pDOP == false) + getPVT(maxWait); + moduleQueried.pDOP = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (pDOP); +} + +//Get the current protocol version of the Ublox module we're communicating with +//This is helpful when deciding if we should call the high-precision Lat/Long (HPPOSLLH) or the regular (POSLLH) +uint8_t SFE_UBLOX_GPS::getProtocolVersionHigh(uint16_t maxWait) +{ + if (moduleQueried.versionNumber == false) + getProtocolVersion(maxWait); + return (versionHigh); +} + +//Get the current protocol version of the Ublox module we're communicating with +//This is helpful when deciding if we should call the high-precision Lat/Long (HPPOSLLH) or the regular (POSLLH) +uint8_t SFE_UBLOX_GPS::getProtocolVersionLow(uint16_t maxWait) +{ + if (moduleQueried.versionNumber == false) + getProtocolVersion(maxWait); + return (versionLow); +} + +//Get the current protocol version of the Ublox module we're communicating with +//This is helpful when deciding if we should call the high-precision Lat/Long (HPPOSLLH) or the regular (POSLLH) +bool SFE_UBLOX_GPS::getProtocolVersion(uint16_t maxWait) +{ + //Send packet with only CLS and ID, length of zero. This will cause the module to respond with the contents of that CLS/ID. + packetCfg.cls = UBX_CLASS_MON; + packetCfg.id = UBX_MON_VER; + + packetCfg.len = 0; + packetCfg.startingSpot = 40; //Start at first "extended software information" string + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are only expecting data (no ACK) + return (false); //If command send fails then bail + + //Payload should now contain ~220 characters (depends on module type) + + // if (_printDebug == true) + // { + // printk("MON VER Payload:")); + // for (int location = 0; location < packetCfg.len; location++) + // { + // if (location % 30 == 0) + // printk("\n"); + // printk("%d", payloadCfg[location]); + // } + // printk("\n"); + // } + + //We will step through the payload looking at each extension field of 30 bytes + for (uint8_t extensionNumber = 0; extensionNumber < 10; extensionNumber++) + { + //Now we need to find "PROTVER=18.00" in the incoming byte stream + if (payloadCfg[(30 * extensionNumber) + 0] == 'P' && payloadCfg[(30 * extensionNumber) + 6] == 'R') + { + versionHigh = (payloadCfg[(30 * extensionNumber) + 8] - '0') * 10 + (payloadCfg[(30 * extensionNumber) + 9] - '0'); //Convert '18' to 18 + versionLow = (payloadCfg[(30 * extensionNumber) + 11] - '0') * 10 + (payloadCfg[(30 * extensionNumber) + 12] - '0'); //Convert '00' to 00 + moduleQueried.versionNumber = true; //Mark this data as new + + if (_printDebug == true) + { + printk("Protocol version: %d.%d\n", versionHigh, versionLow); + } + return (true); //Success! + } + } + + return (false); //We failed +} + +//Mark all the PVT data as read/stale. This is handy to get data alignment after CRC failure +void SFE_UBLOX_GPS::flushPVT() +{ + //Mark all datums as stale (read before) + moduleQueried.gpsiTOW = false; + moduleQueried.gpsYear = false; + moduleQueried.gpsMonth = false; + moduleQueried.gpsDay = false; + moduleQueried.gpsHour = false; + moduleQueried.gpsMinute = false; + moduleQueried.gpsSecond = false; + moduleQueried.gpsDateValid = false; + moduleQueried.gpsTimeValid = false; + moduleQueried.gpsNanosecond = false; + + moduleQueried.all = false; + moduleQueried.longitude = false; + moduleQueried.latitude = false; + moduleQueried.altitude = false; + moduleQueried.altitudeMSL = false; + moduleQueried.SIV = false; + moduleQueried.fixType = false; + moduleQueried.carrierSolution = false; + moduleQueried.groundSpeed = false; + moduleQueried.headingOfMotion = false; + moduleQueried.pDOP = false; +} + +//Relative Positioning Information in NED frame +//Returns true if commands was successful +bool SFE_UBLOX_GPS::getRELPOSNED(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_RELPOSNED; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are only expecting data (no ACK) + return (false); //If command send fails then bail + + //We got a response, now parse the bits + + uint16_t refStationID = extractInt(2); + //printk("refStationID: %d\n", refStationID); + + int32_t tempRelPos; + + tempRelPos = extractLong(8); + relPosInfo.relPosN = tempRelPos / 100.0; //Convert cm to m + + tempRelPos = extractLong(12); + relPosInfo.relPosE = tempRelPos / 100.0; //Convert cm to m + + tempRelPos = extractLong(16); + relPosInfo.relPosD = tempRelPos / 100.0; //Convert cm to m + + relPosInfo.relPosLength = extractLong(20); + relPosInfo.relPosHeading = extractLong(24); + + relPosInfo.relPosHPN = payloadCfg[32]; + relPosInfo.relPosHPE = payloadCfg[33]; + relPosInfo.relPosHPD = payloadCfg[34]; + relPosInfo.relPosHPLength = payloadCfg[35]; + + uint32_t tempAcc; + + tempAcc = extractLong(36); + relPosInfo.accN = tempAcc / 10000.0; //Convert 0.1 mm to m + + tempAcc = extractLong(40); + relPosInfo.accE = tempAcc / 10000.0; //Convert 0.1 mm to m + + tempAcc = extractLong(44); + relPosInfo.accD = tempAcc / 10000.0; //Convert 0.1 mm to m + + uint8_t flags = payloadCfg[60]; + + relPosInfo.gnssFixOk = flags & (1 << 0); + relPosInfo.diffSoln = flags & (1 << 1); + relPosInfo.relPosValid = flags & (1 << 2); + relPosInfo.carrSoln = (flags & (0b11 << 3)) >> 3; + relPosInfo.isMoving = flags & (1 << 5); + relPosInfo.refPosMiss = flags & (1 << 6); + relPosInfo.refObsMiss = flags & (1 << 7); + + return (true); +} +bool SFE_UBLOX_GPS::getEsfInfo(uint16_t maxWait) +{ + // Requesting Data from the receiver + packetCfg.cls = UBX_CLASS_ESF; + packetCfg.id = UBX_ESF_STATUS; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (false); //If command send fails then bail + + checkUblox(); + + // payload should be loaded. + imuMeas.version = extractByte(4); + imuMeas.fusionMode = extractByte(12); + ubloxSen.numSens = extractByte(15); + + // Individual Status Sensor in different function + return (true); +} + +// +bool SFE_UBLOX_GPS::getEsfIns(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_ESF; + packetCfg.id = UBX_ESF_INS; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (false); //If command send fails then bail + + checkUblox(); + + // Validity of each sensor value below + uint32_t validity = extractLong(0); + + imuMeas.xAngRateVald = (validity && 0x0080) >> 8; + imuMeas.yAngRateVald = (validity && 0x0100) >> 9; + imuMeas.zAngRateVald = (validity && 0x0200) >> 10; + imuMeas.xAccelVald = (validity && 0x0400) >> 11; + imuMeas.yAccelVald = (validity && 0x0800) >> 12; + imuMeas.zAccelVald = (validity && 0x1000) >> 13; + + imuMeas.xAngRate = extractLong(12); // deg/s + imuMeas.yAngRate = extractLong(16); // deg/s + imuMeas.zAngRate = extractLong(20); // deg/s + + imuMeas.xAccel = extractLong(24); // m/s + imuMeas.yAccel = extractLong(28); // m/s + imuMeas.zAccel = extractLong(32); // m/s + + return (true); +} + +// +bool SFE_UBLOX_GPS::getEsfDataInfo(uint16_t maxWait) +{ + + packetCfg.cls = UBX_CLASS_ESF; + packetCfg.id = UBX_ESF_MEAS; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (false); //If command send fails then bail + + checkUblox(); + + uint32_t timeStamp = extractLong(0); + uint32_t flags = extractInt(4); + + uint8_t timeSent = (flags && 0x01) >> 1; + uint8_t timeEdge = (flags && 0x02) >> 2; + uint8_t tagValid = (flags && 0x04) >> 3; + uint8_t numMeas = (flags && 0x1000) >> 15; + + if (numMeas > DEF_NUM_SENS) + numMeas = DEF_NUM_SENS; + + uint8_t byteOffset = 4; + + for (uint8_t i = 0; i < numMeas; i++) + { + + uint32_t bitField = extractLong(4 + byteOffset * i); + imuMeas.dataType[i] = (bitField && 0xFF000000) >> 23; + imuMeas.data[i] = (bitField && 0xFFFFFF); + imuMeas.dataTStamp[i] = extractLong(8 + byteOffset * i); + } + + return (true); +} + +bool SFE_UBLOX_GPS::getEsfRawDataInfo(uint16_t maxWait) +{ + + // Need to know the number of sensor to get the correct data + // Rate selected in UBX-CFG-MSG is not respected + packetCfg.cls = UBX_CLASS_ESF; + packetCfg.id = UBX_ESF_RAW; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (false); //If command send fails then bail + + checkUblox(); + + uint32_t bitField = extractLong(4); + imuMeas.rawDataType = (bitField && 0xFF000000) >> 23; + imuMeas.rawData = (bitField && 0xFFFFFF); + imuMeas.rawTStamp = extractLong(8); + + return (true); +} + +sfe_ublox_status_e SFE_UBLOX_GPS::getSensState(uint8_t sensor, uint16_t maxWait) +{ + + packetCfg.cls = UBX_CLASS_ESF; + packetCfg.id = UBX_ESF_STATUS; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (SFE_UBLOX_STATUS_FAIL); //If command send fails then bail + + ubloxSen.numSens = extractByte(15); + + if (sensor > ubloxSen.numSens) + return (SFE_UBLOX_STATUS_OUT_OF_RANGE); + + checkUblox(); + + uint8_t offset = 4; + + // Only the last sensor value checked will remain. + for (uint8_t i = 0; i < sensor; i++) + { + + uint8_t sensorFieldOne = extractByte(16 + offset * i); + uint8_t sensorFieldTwo = extractByte(17 + offset * i); + ubloxSen.freq = extractByte(18 + offset * i); + uint8_t sensorFieldThr = extractByte(19 + offset * i); + + ubloxSen.senType = (sensorFieldOne && 0x10) >> 5; + ubloxSen.isUsed = (sensorFieldOne && 0x20) >> 6; + ubloxSen.isReady = (sensorFieldOne && 0x30) >> 7; + + ubloxSen.calibStatus = sensorFieldTwo && 0x03; + ubloxSen.timeStatus = (sensorFieldTwo && 0xC) >> 2; + + ubloxSen.badMeas = (sensorFieldThr && 0x01); + ubloxSen.badTag = (sensorFieldThr && 0x02) >> 1; + ubloxSen.missMeas = (sensorFieldThr && 0x04) >> 2; + ubloxSen.noisyMeas = (sensorFieldThr && 0x08) >> 3; + } + + return (SFE_UBLOX_STATUS_SUCCESS); +} + +bool SFE_UBLOX_GPS::getVehAtt(uint16_t maxWait) +{ + + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_ATT; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (SFE_UBLOX_STATUS_FAIL); //If command send fails then bail + + checkUblox(); + + vehAtt.roll = extractLong(8); + vehAtt.pitch = extractLong(12); + vehAtt.heading = extractLong(16); + + vehAtt.accRoll = extractLong(20); + vehAtt.accPitch = extractLong(24); + vehAtt.accHeading = extractLong(28); + + return (true); +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/src/SparkFun_Ublox_Zephyr_Library.h b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/src/SparkFun_Ublox_Zephyr_Library.h new file mode 100644 index 0000000..7bd3958 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/src/SparkFun_Ublox_Zephyr_Library.h @@ -0,0 +1,901 @@ +/* + This is a library written for the Ublox ZED-F9P and NEO-M8P-2 + SparkFun sells these at its website: www.sparkfun.com + Do you like this library? Help support SparkFun. Buy a board! + https://www.sparkfun.com/products/15136 + https://www.sparkfun.com/products/15005 + https://www.sparkfun.com/products/15733 + https://www.sparkfun.com/products/15193 + https://www.sparkfun.com/products/15210 + + Written by Nathan Seidle @ SparkFun Electronics, September 6th, 2018 + + This library handles configuring and handling the responses + from a Ublox GPS module. Works with most modules from Ublox including + the Zed-F9P, NEO-M8P-2, NEO-M9N, ZOE-M8Q, SAM-M8Q, and many others. + + https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library + + Development environment specifics: + NCS v1.0.3 release + + This port was made by Vid Rajtmajer , IRNAS www.irnas.eu + + SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT). + The MIT License (MIT) + Copyright (c) 2016 SparkFun Electronics + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the Software is furnished to + do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial + portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT + NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef SPARKFUN_UBLOX_ZEPHYR_LIBRARY_H +#define SPARKFUN_UBLOX_ZEPHYR_LIBRARY_H + +#include +#include + +//The catch-all default is 32 +#define I2C_BUFFER_LENGTH 32 + +//Define pin states +#define LOW 0 +#define HIGH 1 + +//Define a digital pin to aid checksum failure capture and analysis +//Leave set to -1 if not needed +const int checksumFailurePin = -1; + +// Global Status Returns +typedef enum +{ + SFE_UBLOX_STATUS_SUCCESS, + SFE_UBLOX_STATUS_FAIL, + SFE_UBLOX_STATUS_CRC_FAIL, + SFE_UBLOX_STATUS_TIMEOUT, + SFE_UBLOX_STATUS_COMMAND_NACK, // Indicates that the command was unrecognised, invalid or that the module is too busy to respond + SFE_UBLOX_STATUS_OUT_OF_RANGE, + SFE_UBLOX_STATUS_INVALID_ARG, + SFE_UBLOX_STATUS_INVALID_OPERATION, + SFE_UBLOX_STATUS_MEM_ERR, + SFE_UBLOX_STATUS_HW_ERR, + SFE_UBLOX_STATUS_DATA_SENT, // This indicates that a 'set' was successful + SFE_UBLOX_STATUS_DATA_RECEIVED, // This indicates that a 'get' (poll) was successful + SFE_UBLOX_STATUS_I2C_COMM_FAILURE, + SFE_UBLOX_STATUS_DATA_OVERWRITTEN // This is an error - the data was valid but has been or _is being_ overwritten by another packet +} sfe_ublox_status_e; + +// ubxPacket validity +typedef enum +{ + SFE_UBLOX_PACKET_VALIDITY_NOT_VALID, + SFE_UBLOX_PACKET_VALIDITY_VALID, + SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, + SFE_UBLOX_PACKET_NOTACKNOWLEDGED // This indicates that we received a NACK +} sfe_ublox_packet_validity_e; + +// Identify which packet buffer is in use: +// packetCfg (or a custom packet), packetAck or packetBuf +typedef enum +{ + SFE_UBLOX_PACKET_PACKETCFG, + SFE_UBLOX_PACKET_PACKETACK, + SFE_UBLOX_PACKET_PACKETBUF +} sfe_ublox_packet_buffer_e; + +//Registers +const uint8_t UBX_SYNCH_1 = 0xB5; +const uint8_t UBX_SYNCH_2 = 0x62; + +//The following are UBX Class IDs. Descriptions taken from ZED-F9P Interface Description Document page 32, NEO-M8P Interface Description page 145 +const uint8_t UBX_CLASS_NAV = 0x01; //Navigation Results Messages: Position, Speed, Time, Acceleration, Heading, DOP, SVs used +const uint8_t UBX_CLASS_RXM = 0x02; //Receiver Manager Messages: Satellite Status, RTC Status +const uint8_t UBX_CLASS_INF = 0x04; //Information Messages: Printf-Style Messages, with IDs such as Error, Warning, Notice +const uint8_t UBX_CLASS_ACK = 0x05; //Ack/Nak Messages: Acknowledge or Reject messages to UBX-CFG input messages +const uint8_t UBX_CLASS_CFG = 0x06; //Configuration Input Messages: Configure the receiver. +const uint8_t UBX_CLASS_UPD = 0x09; //Firmware Update Messages: Memory/Flash erase/write, Reboot, Flash identification, etc. +const uint8_t UBX_CLASS_MON = 0x0A; //Monitoring Messages: Communication Status, CPU Load, Stack Usage, Task Status +const uint8_t UBX_CLASS_AID = 0x0B; //(NEO-M8P ONLY!!!) AssistNow Aiding Messages: Ephemeris, Almanac, other A-GPS data input +const uint8_t UBX_CLASS_TIM = 0x0D; //Timing Messages: Time Pulse Output, Time Mark Results +const uint8_t UBX_CLASS_ESF = 0x10; //(NEO-M8P ONLY!!!) External Sensor Fusion Messages: External Sensor Measurements and Status Information +const uint8_t UBX_CLASS_MGA = 0x13; //Multiple GNSS Assistance Messages: Assistance data for various GNSS +const uint8_t UBX_CLASS_LOG = 0x21; //Logging Messages: Log creation, deletion, info and retrieval +const uint8_t UBX_CLASS_SEC = 0x27; //Security Feature Messages +const uint8_t UBX_CLASS_HNR = 0x28; //(NEO-M8P ONLY!!!) High Rate Navigation Results Messages: High rate time, position speed, heading +const uint8_t UBX_CLASS_NMEA = 0xF0; //NMEA Strings: standard NMEA strings + +//The following are used for configuration. Descriptions are from the ZED-F9P Interface Description pg 33-34 and NEO-M9N Interface Description pg 47-48 +const uint8_t UBX_CFG_ANT = 0x13; //Antenna Control Settings. Used to configure the antenna control settings +const uint8_t UBX_CFG_BATCH = 0x93; //Get/set data batching configuration. +const uint8_t UBX_CFG_CFG = 0x09; //Clear, Save, and Load Configurations. Used to save current configuration +const uint8_t UBX_CFG_DAT = 0x06; //Set User-defined Datum or The currently defined Datum +const uint8_t UBX_CFG_DGNSS = 0x70; //DGNSS configuration +const uint8_t UBX_CFG_GEOFENCE = 0x69; //Geofencing configuration. Used to configure a geofence +const uint8_t UBX_CFG_GNSS = 0x3E; //GNSS system configuration +const uint8_t UBX_CFG_INF = 0x02; //Depending on packet length, either: poll configuration for one protocol, or information message configuration +const uint8_t UBX_CFG_ITFM = 0x39; //Jamming/Interference Monitor configuration +const uint8_t UBX_CFG_LOGFILTER = 0x47; //Data Logger Configuration +const uint8_t UBX_CFG_MSG = 0x01; //Poll a message configuration, or Set Message Rate(s), or Set Message Rate +const uint8_t UBX_CFG_NAV5 = 0x24; //Navigation Engine Settings. Used to configure the navigation engine including the dynamic model. +const uint8_t UBX_CFG_NAVX5 = 0x23; //Navigation Engine Expert Settings +const uint8_t UBX_CFG_NMEA = 0x17; //Extended NMEA protocol configuration V1 +const uint8_t UBX_CFG_ODO = 0x1E; //Odometer, Low-speed COG Engine Settings +const uint8_t UBX_CFG_PM2 = 0x3B; //Extended power management configuration +const uint8_t UBX_CFG_PMS = 0x86; //Power mode setup +const uint8_t UBX_CFG_PRT = 0x00; //Used to configure port specifics. Polls the configuration for one I/O Port, or Port configuration for UART ports, or Port configuration for USB port, or Port configuration for SPI port, or Port configuration for DDC port +const uint8_t UBX_CFG_PWR = 0x57; //Put receiver in a defined power state +const uint8_t UBX_CFG_RATE = 0x08; //Navigation/Measurement Rate Settings. Used to set port baud rates. +const uint8_t UBX_CFG_RINV = 0x34; //Contents of Remote Inventory +const uint8_t UBX_CFG_RST = 0x04; //Reset Receiver / Clear Backup Data Structures. Used to reset device. +const uint8_t UBX_CFG_RXM = 0x11; //RXM configuration +const uint8_t UBX_CFG_SBAS = 0x16; //SBAS configuration +const uint8_t UBX_CFG_TMODE3 = 0x71; //Time Mode Settings 3. Used to enable Survey In Mode +const uint8_t UBX_CFG_TP5 = 0x31; //Time Pulse Parameters +const uint8_t UBX_CFG_USB = 0x1B; //USB Configuration +const uint8_t UBX_CFG_VALDEL = 0x8C; //Used for config of higher version Ublox modules (ie protocol v27 and above). Deletes values corresponding to provided keys/ provided keys with a transaction +const uint8_t UBX_CFG_VALGET = 0x8B; //Used for config of higher version Ublox modules (ie protocol v27 and above). Configuration Items +const uint8_t UBX_CFG_VALSET = 0x8A; //Used for config of higher version Ublox modules (ie protocol v27 and above). Sets values corresponding to provided key-value pairs/ provided key-value pairs within a transaction. + +//The following are used to enable NMEA messages. Descriptions come from the NMEA messages overview in the ZED-F9P Interface Description +const uint8_t UBX_NMEA_MSB = 0xF0; //All NMEA enable commands have 0xF0 as MSB +const uint8_t UBX_NMEA_DTM = 0x0A; //GxDTM (datum reference) +const uint8_t UBX_NMEA_GAQ = 0x45; //GxGAQ (poll a standard message (if the current talker ID is GA)) +const uint8_t UBX_NMEA_GBQ = 0x44; //GxGBQ (poll a standard message (if the current Talker ID is GB)) +const uint8_t UBX_NMEA_GBS = 0x09; //GxGBS (GNSS satellite fault detection) +const uint8_t UBX_NMEA_GGA = 0x00; //GxGGA (Global positioning system fix data) +const uint8_t UBX_NMEA_GLL = 0x01; //GxGLL (latitude and long, whith time of position fix and status) +const uint8_t UBX_NMEA_GLQ = 0x43; //GxGLQ (poll a standard message (if the current Talker ID is GL)) +const uint8_t UBX_NMEA_GNQ = 0x42; //GxGNQ (poll a standard message (if the current Talker ID is GN)) +const uint8_t UBX_NMEA_GNS = 0x0D; //GxGNS (GNSS fix data) +const uint8_t UBX_NMEA_GPQ = 0x040; //GxGPQ (poll a standard message (if the current Talker ID is GP)) +const uint8_t UBX_NMEA_GRS = 0x06; //GxGRS (GNSS range residuals) +const uint8_t UBX_NMEA_GSA = 0x02; //GxGSA (GNSS DOP and Active satellites) +const uint8_t UBX_NMEA_GST = 0x07; //GxGST (GNSS Pseudo Range Error Statistics) +const uint8_t UBX_NMEA_GSV = 0x03; //GxGSV (GNSS satellites in view) +const uint8_t UBX_NMEA_RMC = 0x04; //GxRMC (Recommended minimum data) +const uint8_t UBX_NMEA_TXT = 0x41; //GxTXT (text transmission) +const uint8_t UBX_NMEA_VLW = 0x0F; //GxVLW (dual ground/water distance) +const uint8_t UBX_NMEA_VTG = 0x05; //GxVTG (course over ground and Ground speed) +const uint8_t UBX_NMEA_ZDA = 0x08; //GxZDA (Time and Date) + +//The following are used to configure the NMEA protocol main talker ID and GSV talker ID +const uint8_t UBX_NMEA_MAINTALKERID_NOTOVERRIDDEN = 0x00; //main talker ID is system dependent +const uint8_t UBX_NMEA_MAINTALKERID_GP = 0x01; //main talker ID is GPS +const uint8_t UBX_NMEA_MAINTALKERID_GL = 0x02; //main talker ID is GLONASS +const uint8_t UBX_NMEA_MAINTALKERID_GN = 0x03; //main talker ID is combined receiver +const uint8_t UBX_NMEA_MAINTALKERID_GA = 0x04; //main talker ID is Galileo +const uint8_t UBX_NMEA_MAINTALKERID_GB = 0x05; //main talker ID is BeiDou +const uint8_t UBX_NMEA_GSVTALKERID_GNSS = 0x00; //GNSS specific Talker ID (as defined by NMEA) +const uint8_t UBX_NMEA_GSVTALKERID_MAIN = 0x01; //use the main Talker ID + +//The following are used to configure INF UBX messages (information messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 34) +const uint8_t UBX_INF_CLASS = 0x04; //All INF messages have 0x04 as the class +const uint8_t UBX_INF_DEBUG = 0x04; //ASCII output with debug contents +const uint8_t UBX_INF_ERROR = 0x00; //ASCII output with error contents +const uint8_t UBX_INF_NOTICE = 0x02; //ASCII output with informational contents +const uint8_t UBX_INF_TEST = 0x03; //ASCII output with test contents +const uint8_t UBX_INF_WARNING = 0x01; //ASCII output with warning contents + +//The following are used to configure LOG UBX messages (loggings messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 34) +const uint8_t UBX_LOG_CREATE = 0x07; //Create Log File +const uint8_t UBX_LOG_ERASE = 0x03; //Erase Logged Data +const uint8_t UBX_LOG_FINDTIME = 0x0E; //Find index of a log entry based on a given time, or response to FINDTIME requested +const uint8_t UBX_LOG_INFO = 0x08; //Poll for log information, or Log information +const uint8_t UBX_LOG_RETRIEVEPOSEXTRA = 0x0F; //Odometer log entry +const uint8_t UBX_LOG_RETRIEVEPOS = 0x0B; //Position fix log entry +const uint8_t UBX_LOG_RETRIEVESTRING = 0x0D; //Byte string log entry +const uint8_t UBX_LOG_RETRIEVE = 0x09; //Request log data +const uint8_t UBX_LOG_STRING = 0x04; //Store arbitrary string on on-board flash + +//The following are used to configure MGA UBX messages (Multiple GNSS Assistance Messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 34) +const uint8_t UBX_MGA_ACK_DATA0 = 0x60; //Multiple GNSS Acknowledge message +const uint8_t UBX_MGA_BDS_EPH = 0x03; //BDS Ephemeris Assistance +const uint8_t UBX_MGA_BDS_ALM = 0x03; //BDS Almanac Assistance +const uint8_t UBX_MGA_BDS_HEALTH = 0x03; //BDS Health Assistance +const uint8_t UBX_MGA_BDS_UTC = 0x03; //BDS UTC Assistance +const uint8_t UBX_MGA_BDS_IONO = 0x03; //BDS Ionospheric Assistance +const uint8_t UBX_MGA_DBD = 0x80; //Either: Poll the Navigation Database, or Navigation Database Dump Entry +const uint8_t UBX_MGA_GAL_EPH = 0x02; //Galileo Ephemeris Assistance +const uint8_t UBX_MGA_GAL_ALM = 0x02; //Galileo Almanac Assitance +const uint8_t UBX_MGA_GAL_TIMOFFSET = 0x02; //Galileo GPS time offset assistance +const uint8_t UBX_MGA_GAL_UTC = 0x02; //Galileo UTC Assistance +const uint8_t UBX_MGA_GLO_EPH = 0x06; //GLONASS Ephemeris Assistance +const uint8_t UBX_MGA_GLO_ALM = 0x06; //GLONASS Almanac Assistance +const uint8_t UBX_MGA_GLO_TIMEOFFSET = 0x06; //GLONASS Auxiliary Time Offset Assistance +const uint8_t UBX_MGA_GPS_EPH = 0x00; //GPS Ephemeris Assistance +const uint8_t UBX_MGA_GPS_ALM = 0x00; //GPS Almanac Assistance +const uint8_t UBX_MGA_GPS_HEALTH = 0x00; //GPS Health Assistance +const uint8_t UBX_MGA_GPS_UTC = 0x00; //GPS UTC Assistance +const uint8_t UBX_MGA_GPS_IONO = 0x00; //GPS Ionosphere Assistance +const uint8_t UBX_MGA_INI_POS_XYZ = 0x40; //Initial Position Assistance +const uint8_t UBX_MGA_INI_POS_LLH = 0x40; //Initial Position Assitance +const uint8_t UBX_MGA_INI_TIME_UTC = 0x40; //Initial Time Assistance +const uint8_t UBX_MGA_INI_TIME_GNSS = 0x40; //Initial Time Assistance +const uint8_t UBX_MGA_INI_CLKD = 0x40; //Initial Clock Drift Assitance +const uint8_t UBX_MGA_INI_FREQ = 0x40; //Initial Frequency Assistance +const uint8_t UBX_MGA_INI_EOP = 0x40; //Earth Orientation Parameters Assistance +const uint8_t UBX_MGA_QZSS_EPH = 0x05; //QZSS Ephemeris Assistance +const uint8_t UBX_MGA_QZSS_ALM = 0x05; //QZSS Almanac Assistance +const uint8_t UBX_MGA_QZAA_HEALTH = 0x05; //QZSS Health Assistance + +//The following are used to configure the MON UBX messages (monitoring messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 35) +const uint8_t UBX_MON_COMMS = 0x36; //Comm port information +const uint8_t UBX_MON_GNSS = 0x28; //Information message major GNSS selection +const uint8_t UBX_MON_HW2 = 0x0B; //Extended Hardware Status +const uint8_t UBX_MON_HW3 = 0x37; //HW I/O pin information +const uint8_t UBX_MON_HW = 0x09; //Hardware Status +const uint8_t UBX_MON_IO = 0x02; //I/O Subsystem Status +const uint8_t UBX_MON_MSGPP = 0x06; //Message Parse and Process Status +const uint8_t UBX_MON_PATCH = 0x27; //Output information about installed patches +const uint8_t UBX_MON_RF = 0x38; //RF information +const uint8_t UBX_MON_RXBUF = 0x07; //Receiver Buffer Status +const uint8_t UBX_MON_RXR = 0x21; //Receiver Status Information +const uint8_t UBX_MON_TXBUF = 0x08; //Transmitter Buffer Status. Used for query tx buffer size/state. +const uint8_t UBX_MON_VER = 0x04; //Receiver/Software Version. Used for obtaining Protocol Version. + +//The following are used to configure the NAV UBX messages (navigation results messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 35-36) +const uint8_t UBX_NAV_ATT = 0x05; //Vehicle "Attitude" Solution +const uint8_t UBX_NAV_CLOCK = 0x22; //Clock Solution +const uint8_t UBX_NAV_DOP = 0x04; //Dilution of precision +const uint8_t UBX_NAV_EOE = 0x61; //End of Epoch +const uint8_t UBX_NAV_GEOFENCE = 0x39; //Geofencing status. Used to poll the geofence status +const uint8_t UBX_NAV_HPPOSECEF = 0x13; //High Precision Position Solution in ECEF. Used to find our positional accuracy (high precision). +const uint8_t UBX_NAV_HPPOSLLH = 0x14; //High Precision Geodetic Position Solution. Used for obtaining lat/long/alt in high precision +const uint8_t UBX_NAV_ODO = 0x09; //Odometer Solution +const uint8_t UBX_NAV_ORB = 0x34; //GNSS Orbit Database Info +const uint8_t UBX_NAV_POSECEF = 0x01; //Position Solution in ECEF +const uint8_t UBX_NAV_POSLLH = 0x02; //Geodetic Position Solution +const uint8_t UBX_NAV_PVT = 0x07; //All the things! Position, velocity, time, PDOP, height, h/v accuracies, number of satellites. Navigation Position Velocity Time Solution. +const uint8_t UBX_NAV_RELPOSNED = 0x3C; //Relative Positioning Information in NED frame +const uint8_t UBX_NAV_RESETODO = 0x10; //Reset odometer +const uint8_t UBX_NAV_SAT = 0x35; //Satellite Information +const uint8_t UBX_NAV_SIG = 0x43; //Signal Information +const uint8_t UBX_NAV_STATUS = 0x03; //Receiver Navigation Status +const uint8_t UBX_NAV_SVIN = 0x3B; //Survey-in data. Used for checking Survey In status +const uint8_t UBX_NAV_TIMEBDS = 0x24; //BDS Time Solution +const uint8_t UBX_NAV_TIMEGAL = 0x25; //Galileo Time Solution +const uint8_t UBX_NAV_TIMEGLO = 0x23; //GLO Time Solution +const uint8_t UBX_NAV_TIMEGPS = 0x20; //GPS Time Solution +const uint8_t UBX_NAV_TIMELS = 0x26; //Leap second event information +const uint8_t UBX_NAV_TIMEUTC = 0x21; //UTC Time Solution +const uint8_t UBX_NAV_VELECEF = 0x11; //Velocity Solution in ECEF +const uint8_t UBX_NAV_VELNED = 0x12; //Velocity Solution in NED + +//The following are used to configure the RXM UBX messages (receiver manager messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 36) +const uint8_t UBX_RXM_MEASX = 0x14; //Satellite Measurements for RRLP +const uint8_t UBX_RXM_PMREQ = 0x41; //Requests a Power Management task (two differenent packet sizes) +const uint8_t UBX_RXM_RAWX = 0x15; //Multi-GNSS Raw Measurement Data +const uint8_t UBX_RXM_RLM = 0x59; //Galileo SAR Short-RLM report (two different packet sizes) +const uint8_t UBX_RXM_RTCM = 0x32; //RTCM input status +const uint8_t UBX_RXM_SFRBX = 0x13; //Boradcast Navigation Data Subframe + +//The following are used to configure the SEC UBX messages (security feature messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 36) +const uint8_t UBX_SEC_UNIQID = 0x03; //Unique chip ID + +//The following are used to configure the TIM UBX messages (timing messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 36) +const uint8_t UBX_TIM_TM2 = 0x03; //Time mark data +const uint8_t UBX_TIM_TP = 0x01; //Time Pulse Timedata +const uint8_t UBX_TIM_VRFY = 0x06; //Sourced Time Verification + +//The following are used to configure the UPD UBX messages (firmware update messages). Descriptions from UBX messages overview (ZED-F9P Interface Description Document page 36) +const uint8_t UBX_UPD_SOS = 0x14; //Poll Backup Fil Restore Status, Create Backup File in Flash, Clear Backup File in Flash, Backup File Creation Acknowledge, System Restored from Backup + +//The following are used to enable RTCM messages +const uint8_t UBX_RTCM_MSB = 0xF5; //All RTCM enable commands have 0xF5 as MSB +const uint8_t UBX_RTCM_1005 = 0x05; //Stationary RTK reference ARP +const uint8_t UBX_RTCM_1074 = 0x4A; //GPS MSM4 +const uint8_t UBX_RTCM_1077 = 0x4D; //GPS MSM7 +const uint8_t UBX_RTCM_1084 = 0x54; //GLONASS MSM4 +const uint8_t UBX_RTCM_1087 = 0x57; //GLONASS MSM7 +const uint8_t UBX_RTCM_1094 = 0x5E; //Galileo MSM4 +const uint8_t UBX_RTCM_1097 = 0x61; //Galileo MSM7 +const uint8_t UBX_RTCM_1124 = 0x7C; //BeiDou MSM4 +const uint8_t UBX_RTCM_1127 = 0x7F; //BeiDou MSM7 +const uint8_t UBX_RTCM_1230 = 0xE6; //GLONASS code-phase biases, set to once every 10 seconds +const uint8_t UBX_RTCM_4072_0 = 0xFE; //Reference station PVT (ublox proprietary RTCM message) +const uint8_t UBX_RTCM_4072_1 = 0xFD; //Additional reference station information (ublox proprietary RTCM message) + +const uint8_t UBX_ACK_NACK = 0x00; +const uint8_t UBX_ACK_ACK = 0x01; +const uint8_t UBX_ACK_NONE = 0x02; //Not a real value + +// The following constants are used to get External Sensor Measurements and Status +// Information. +const uint8_t UBX_ESF_MEAS = 0x02; +const uint8_t UBX_ESF_RAW = 0x03; +const uint8_t UBX_ESF_STATUS = 0x10; +const uint8_t UBX_ESF_INS = 0x15; //36 bytes + +const uint8_t SVIN_MODE_DISABLE = 0x00; +const uint8_t SVIN_MODE_ENABLE = 0x01; + +//The following consts are used to configure the various ports and streams for those ports. See -CFG-PRT. +const uint8_t COM_PORT_I2C = 0; +const uint8_t COM_PORT_UART1 = 1; +const uint8_t COM_PORT_UART2 = 2; +const uint8_t COM_PORT_USB = 3; +const uint8_t COM_PORT_SPI = 4; + +const uint8_t COM_TYPE_UBX = (1 << 0); +const uint8_t COM_TYPE_NMEA = (1 << 1); +const uint8_t COM_TYPE_RTCM3 = (1 << 5); + +//The following consts are used to generate KEY values for the advanced protocol functions of VELGET/SET/DEL +const uint8_t VAL_SIZE_1 = 0x01; //One bit +const uint8_t VAL_SIZE_8 = 0x02; //One byte +const uint8_t VAL_SIZE_16 = 0x03; //Two bytes +const uint8_t VAL_SIZE_32 = 0x04; //Four bytes +const uint8_t VAL_SIZE_64 = 0x05; //Eight bytes + +//These are the Bitfield layers definitions for the UBX-CFG-VALSET message (not to be confused with Bitfield deviceMask in UBX-CFG-CFG) +const uint8_t VAL_LAYER_RAM = (1 << 0); +const uint8_t VAL_LAYER_BBR = (1 << 1); +const uint8_t VAL_LAYER_FLASH = (1 << 2); + +//Below are various Groups, IDs, and sizes for various settings +//These can be used to call getVal/setVal/delVal +const uint8_t VAL_GROUP_I2COUTPROT = 0x72; +const uint8_t VAL_GROUP_I2COUTPROT_SIZE = VAL_SIZE_1; //All fields in I2C group are currently 1 bit + +const uint8_t VAL_ID_I2COUTPROT_UBX = 0x01; +const uint8_t VAL_ID_I2COUTPROT_NMEA = 0x02; +const uint8_t VAL_ID_I2COUTPROT_RTCM3 = 0x03; + +const uint8_t VAL_GROUP_I2C = 0x51; +const uint8_t VAL_GROUP_I2C_SIZE = VAL_SIZE_8; //All fields in I2C group are currently 1 byte + +const uint8_t VAL_ID_I2C_ADDRESS = 0x01; + +// Configuration Sub-Section mask definitions for saveConfigSelective (UBX-CFG-CFG) +const uint32_t VAL_CFG_SUBSEC_IOPORT = 0x00000001; // ioPort - communications port settings (causes IO system reset!) +const uint32_t VAL_CFG_SUBSEC_MSGCONF = 0x00000002; // msgConf - message configuration +const uint32_t VAL_CFG_SUBSEC_INFMSG = 0x00000004; // infMsg - INF message configuration +const uint32_t VAL_CFG_SUBSEC_NAVCONF = 0x00000008; // navConf - navigation configuration +const uint32_t VAL_CFG_SUBSEC_RXMCONF = 0x00000010; // rxmConf - receiver manager configuration +const uint32_t VAL_CFG_SUBSEC_SENCONF = 0x00000100; // senConf - sensor interface configuration (requires protocol 19+) +const uint32_t VAL_CFG_SUBSEC_RINVCONF = 0x00000200; // rinvConf - remove inventory configuration +const uint32_t VAL_CFG_SUBSEC_ANTCONF = 0x00000400; // antConf - antenna configuration +const uint32_t VAL_CFG_SUBSEC_LOGCONF = 0x00000800; // logConf - logging configuration +const uint32_t VAL_CFG_SUBSEC_FTSCONF = 0x00001000; // ftsConf - FTS configuration (FTS products only) + +// Bitfield wakeupSources for UBX_RXM_PMREQ +const uint32_t VAL_RXM_PMREQ_WAKEUPSOURCE_UARTRX = 0x00000008; // uartrx +const uint32_t VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT0 = 0x00000020; // extint0 +const uint32_t VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT1 = 0x00000040; // extint1 +const uint32_t VAL_RXM_PMREQ_WAKEUPSOURCE_SPICS = 0x00000080; // spics + +enum dynModel // Possible values for the dynamic platform model, which provide more accuract position output for the situation. Description extracted from ZED-F9P Integration Manual +{ + DYN_MODEL_PORTABLE = 0, //Applications with low acceleration, e.g. portable devices. Suitable for most situations. + // 1 is not defined + DYN_MODEL_STATIONARY = 2, //Used in timing applications (antenna must be stationary) or other stationary applications. Velocity restricted to 0 m/s. Zero dynamics assumed. + DYN_MODEL_PEDESTRIAN, //Applications with low acceleration and speed, e.g. how a pedestrian would move. Low acceleration assumed. + DYN_MODEL_AUTOMOTIVE, //Used for applications with equivalent dynamics to those of a passenger car. Low vertical acceleration assumed + DYN_MODEL_SEA, //Recommended for applications at sea, with zero vertical velocity. Zero vertical velocity assumed. Sea level assumed. + DYN_MODEL_AIRBORNE1g, //Airborne <1g acceleration. Used for applications with a higher dynamic range and greater vertical acceleration than a passenger car. No 2D position fixes supported. + DYN_MODEL_AIRBORNE2g, //Airborne <2g acceleration. Recommended for typical airborne environments. No 2D position fixes supported. + DYN_MODEL_AIRBORNE4g, //Airborne <4g acceleration. Only recommended for extremely dynamic environments. No 2D position fixes supported. + DYN_MODEL_WRIST, // Not supported in protocol versions less than 18. Only recommended for wrist worn applications. Receiver will filter out arm motion. + DYN_MODEL_BIKE, // Supported in protocol versions 19.2 +}; + +#ifndef MAX_PAYLOAD_SIZE + +#define MAX_PAYLOAD_SIZE 256 //We need ~220 bytes for getProtocolVersion on most ublox modules +//#define MAX_PAYLOAD_SIZE 768 //Worst case: UBX_CFG_VALSET packet with 64 keyIDs each with 64 bit values + +#endif + +//-=-=-=-=- UBX binary specific variables +typedef struct +{ + uint8_t cls; + uint8_t id; + uint16_t len; //Length of the payload. Does not include cls, id, or checksum bytes + uint16_t counter; //Keeps track of number of overall bytes received. Some responses are larger than 255 bytes. + uint16_t startingSpot; //The counter value needed to go past before we begin recording into payload array + uint8_t *payload; + uint8_t checksumA; //Given to us from module. Checked against the rolling calculated A/B checksums. + uint8_t checksumB; + sfe_ublox_packet_validity_e valid; //Goes from NOT_DEFINED to VALID or NOT_VALID when checksum is checked + sfe_ublox_packet_validity_e classAndIDmatch; // Goes from NOT_DEFINED to VALID or NOT_VALID when the Class and ID match the requestedClass and requestedID +} ubxPacket; + +// Struct to hold the results returned by getGeofenceState (returned by UBX-NAV-GEOFENCE) +typedef struct +{ + uint8_t status; // Geofencing status: 0 - Geofencing not available or not reliable; 1 - Geofencing active + uint8_t numFences; // Number of geofences + uint8_t combState; // Combined (logical OR) state of all geofences: 0 - Unknown; 1 - Inside; 2 - Outside + uint8_t states[4]; // Geofence states: 0 - Unknown; 1 - Inside; 2 - Outside +} geofenceState; + +// Struct to hold the current geofence parameters +typedef struct +{ + uint8_t numFences; // Number of active geofences + int32_t lats[4]; // Latitudes of geofences (in degrees * 10^-7) + int32_t longs[4]; // Longitudes of geofences (in degrees * 10^-7) + uint32_t rads[4]; // Radii of geofences (in m * 10^-2) +} geofenceParams; + +class SFE_UBLOX_GPS +{ +public: + SFE_UBLOX_GPS(void); + +// A default of 250ms for maxWait seems fine for I2C but is not enough for SerialUSB. +// If you know you are only going to be using I2C / Qwiic communication, you can +// safely reduce defaultMaxWait to 250. +#ifndef defaultMaxWait // Let's allow the user to define their own value if they want to +#define defaultMaxWait 250 // only I2C is used, so this has been reduced from 1100 +#endif + + // Set gpio device, used by checksumFailurePin + bool init_gpio_pins(struct device &gpio_dev); + + //By default use the default I2C address + bool begin(struct device &i2c_dev, uint8_t deviceAddress = 0x42); //Returns true if module is detected + //serialPort needs to be perviously initialized to correct baud rate + //bool begin(Stream &serialPort); //Returns true if module is detected - function not ported + + //Returns true if device answers on _gpsI2Caddress address or via Serial + //maxWait is only used for Serial + bool isConnected(uint16_t maxWait = 1100); + + //Changed in V1.8.1: provides backward compatibility for the examples that call checkUblox directly + //Will default to using packetCfg to look for explicit autoPVT packets so they get processed correctly by processUBX + bool checkUblox(uint8_t requestedClass = UBX_CLASS_NAV, uint8_t requestedID = UBX_NAV_PVT); //Checks module with user selected commType + + bool checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Method for I2C polling of data, passing any new bytes to process() + bool checkUbloxSerial(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Method for serial polling of data, passing any new bytes to process() + + void process(uint8_t incoming, ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Processes NMEA and UBX binary sentences one byte at a time + void processUBX(uint8_t incoming, ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Given a character, file it away into the uxb packet structure + void processRTCMframe(uint8_t incoming); //Monitor the incoming bytes for start and length bytes + void processRTCM(uint8_t incoming) __attribute__((weak)); //Given rtcm byte, do something with it. User can overwrite if desired to pipe bytes to radio, internet, etc. + + void processUBXpacket(ubxPacket *msg); //Once a packet has been received and validated, identify this packet's class/id and update internal flags + void processNMEA(char incoming) __attribute__((weak)); //Given a NMEA character, do something with it. User can overwrite if desired to use something like tinyGPS or MicroNMEA libraries + + void calcChecksum(ubxPacket *msg); //Sets the checksumA and checksumB of a given messages + sfe_ublox_status_e sendCommand(ubxPacket *outgoingUBX, uint16_t maxWait = defaultMaxWait); //Given a packet and payload, send everything including CRC bytes, return true if we got a response + sfe_ublox_status_e sendI2cCommand(ubxPacket *outgoingUBX, uint16_t maxWait = 250); + void sendSerialCommand(ubxPacket *outgoingUBX); + + void printPacket(ubxPacket *packet); //Useful for debugging + + void factoryReset(); //Send factory reset sequence (i.e. load "default" configuration and perform hardReset) + void hardReset(); //Perform a reset leading to a cold start (zero info start-up) + + int transferWriteI2C(u8_t *buf, u32_t num_bytes, bool stop = true); // Port to Zephyr, i2c function to actualy WRITE data + int transferReadI2C(u8_t *buf, u32_t num_bytes); // Port to Zephyr, i2c function to actualy READ data + + bool setI2CAddress(uint8_t deviceAddress, uint16_t maxTime = 250); //Changes the I2C address of the Ublox module + void setSerialRate(uint32_t baudrate, uint8_t uartPort = COM_PORT_UART1, uint16_t maxTime = defaultMaxWait); //Changes the serial baud rate of the Ublox module, uartPort should be COM_PORT_UART1/2 + void setNMEAOutputPort(); //Sets the internal variable for the port to direct NMEA characters to + + bool setNavigationFrequency(uint8_t navFreq, uint16_t maxWait = defaultMaxWait); //Set the number of nav solutions sent per second + uint8_t getNavigationFrequency(uint16_t maxWait = defaultMaxWait); //Get the number of nav solutions sent per second currently being output by module + bool saveConfiguration(uint16_t maxWait = defaultMaxWait); //Save current configuration to flash and BBR (battery backed RAM) + bool factoryDefault(uint16_t maxWait = defaultMaxWait); //Reset module to factory defaults + bool saveConfigSelective(uint32_t configMask, uint16_t maxWait = defaultMaxWait); //Save the selected configuration sub-sections to flash and BBR (battery backed RAM) + + sfe_ublox_status_e waitForACKResponse(ubxPacket *outgoingUBX, uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime = defaultMaxWait); //Poll the module until a config packet and an ACK is received + sfe_ublox_status_e waitForNoACKResponse(ubxPacket *outgoingUBX, uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime = defaultMaxWait); //Poll the module until a config packet is received + +// getPVT will only return data once in each navigation cycle. By default, that is once per second. +// Therefore we should set getPVTmaxWait to slightly longer than that. +// If you change the navigation frequency to (e.g.) 4Hz using setNavigationFrequency(4) +// then you should use a shorter maxWait for getPVT. 300msec would be about right: getPVT(300) +// The same is true for getHPPOSLLH. +#define getPVTmaxWait 1100 // Default maxWait for getPVT and all functions which call it +#define getHPPOSLLHmaxWait 1100 // Default maxWait for getHPPOSLLH and all functions which call it + + bool assumeAutoPVT(bool enabled, bool implicitUpdate = true); //In case no config access to the GPS is possible and PVT is send cyclically already + bool setAutoPVT(bool enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic PVT reports at the navigation frequency + bool getPVT(uint16_t maxWait = getPVTmaxWait); //Query module for latest group of datums and load global vars: lat, long, alt, speed, SIV, accuracies, etc. If autoPVT is disabled, performs an explicit poll and waits, if enabled does not block. Retruns true if new PVT is available. + bool setAutoPVT(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic PVT reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + bool getHPPOSLLH(uint16_t maxWait = getHPPOSLLHmaxWait); //Query module for latest group of datums and load global vars: lat, long, alt, speed, SIV, accuracies, etc. If autoPVT is disabled, performs an explicit poll and waits, if enabled does not block. Retruns true if new PVT is available. + void flushPVT(); //Mark all the PVT data as read/stale. This is handy to get data alignment after CRC failure + + int32_t getLatitude(uint16_t maxWait = getPVTmaxWait); //Returns the current latitude in degrees * 10^-7. Auto selects between HighPrecision and Regular depending on ability of module. + int32_t getLongitude(uint16_t maxWait = getPVTmaxWait); //Returns the current longitude in degrees * 10-7. Auto selects between HighPrecision and Regular depending on ability of module. + int32_t getAltitude(uint16_t maxWait = getPVTmaxWait); //Returns the current altitude in mm above ellipsoid + int32_t getAltitudeMSL(uint16_t maxWait = getPVTmaxWait); //Returns number of sats used in fix + uint8_t getSIV(uint16_t maxWait = getPVTmaxWait); //Returns number of sats used in fix + uint8_t getFixType(uint16_t maxWait = getPVTmaxWait); //Returns the type of fix: 0=no, 3=3D, 4=GNSS+Deadreckoning + uint8_t getCarrierSolutionType(uint16_t maxWait = getPVTmaxWait); //Returns RTK solution: 0=no, 1=float solution, 2=fixed solution + int32_t getGroundSpeed(uint16_t maxWait = getPVTmaxWait); //Returns speed in mm/s + int32_t getHeading(uint16_t maxWait = getPVTmaxWait); //Returns heading in degrees * 10^-7 + uint16_t getPDOP(uint16_t maxWait = getPVTmaxWait); //Returns positional dillution of precision * 10^-2 + uint16_t getYear(uint16_t maxWait = getPVTmaxWait); + uint8_t getMonth(uint16_t maxWait = getPVTmaxWait); + uint8_t getDay(uint16_t maxWait = getPVTmaxWait); + uint8_t getHour(uint16_t maxWait = getPVTmaxWait); + uint8_t getMinute(uint16_t maxWait = getPVTmaxWait); + uint8_t getSecond(uint16_t maxWait = getPVTmaxWait); + uint16_t getMillisecond(uint16_t maxWait = getPVTmaxWait); + int32_t getNanosecond(uint16_t maxWait = getPVTmaxWait); + uint32_t getTimeOfWeek(uint16_t maxWait = getPVTmaxWait); + bool getDateValid(uint16_t maxWait = getPVTmaxWait); + bool getTimeValid(uint16_t maxWait = getPVTmaxWait); + + int32_t getHighResLatitude(uint16_t maxWait = getHPPOSLLHmaxWait); + int8_t getHighResLatitudeHp(uint16_t maxWait = getHPPOSLLHmaxWait); + int32_t getHighResLongitude(uint16_t maxWait = getHPPOSLLHmaxWait); + int8_t getHighResLongitudeHp(uint16_t maxWait = getHPPOSLLHmaxWait); + int32_t getElipsoid(uint16_t maxWait = getHPPOSLLHmaxWait); + int8_t getElipsoidHp(uint16_t maxWait = getHPPOSLLHmaxWait); + int32_t getMeanSeaLevel(uint16_t maxWait = getHPPOSLLHmaxWait); + int8_t getMeanSeaLevelHp(uint16_t maxWait = getHPPOSLLHmaxWait); + int32_t getGeoidSeparation(uint16_t maxWait = getHPPOSLLHmaxWait); + uint32_t getHorizontalAccuracy(uint16_t maxWait = getHPPOSLLHmaxWait); + uint32_t getVerticalAccuracy(uint16_t maxWait = getHPPOSLLHmaxWait); + + //Port configurations + bool setPortOutput(uint8_t portID, uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure a given port to output UBX, NMEA, RTCM3 or a combination thereof + bool setPortInput(uint8_t portID, uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure a given port to input UBX, NMEA, RTCM3 or a combination thereof + bool getPortSettings(uint8_t portID, uint16_t maxWait = defaultMaxWait); //Returns the current protocol bits in the UBX-CFG-PRT command for a given port + + bool setI2COutput(uint8_t comSettings, uint16_t maxWait = 250); //Configure I2C port to output UBX, NMEA, RTCM3 or a combination thereof + bool setUART1Output(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure UART1 port to output UBX, NMEA, RTCM3 or a combination thereof + bool setUART2Output(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure UART2 port to output UBX, NMEA, RTCM3 or a combination thereof + bool setUSBOutput(uint8_t comSettings, uint16_t maxWait = 250); //Configure USB port to output UBX, NMEA, RTCM3 or a combination thereof + bool setSPIOutput(uint8_t comSettings, uint16_t maxWait = 250); //Configure SPI port to output UBX, NMEA, RTCM3 or a combination thereof + + //Functions to turn on/off message types for a given port ID (see COM_PORT_I2C, etc above) + bool configureMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t sendRate, uint16_t maxWait = defaultMaxWait); + bool enableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t sendRate = 1, uint16_t maxWait = defaultMaxWait); + bool disableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint16_t maxWait = defaultMaxWait); + bool enableNMEAMessage(uint8_t msgID, uint8_t portID, uint8_t sendRate = 1, uint16_t maxWait = defaultMaxWait); + bool disableNMEAMessage(uint8_t msgID, uint8_t portID, uint16_t maxWait = defaultMaxWait); + bool enableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint8_t sendRate, uint16_t maxWait = defaultMaxWait); //Given a message number turns on a message ID for output over given PortID + bool disableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint16_t maxWait = defaultMaxWait); //Turn off given RTCM message from a given port + + //General configuration (used only on protocol v27 and higher - ie, ZED-F9P) + //It is probably safe to assume that users ofovaj the ZED-F9P will be using I2C / Qwiic. + //If they are using Serial then the higher baud rate will also help. So let's leave maxWait set to 250ms. + uint8_t getVal8(uint16_t group, uint16_t id, uint8_t size, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Returns the value at a given group/id/size location + uint8_t getVal8(uint32_t keyID, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Returns the value at a given group/id/size location + uint8_t setVal(uint32_t keyID, uint16_t value, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Sets the 16-bit value at a given group/id/size location + uint8_t setVal8(uint32_t keyID, uint8_t value, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Sets the 8-bit value at a given group/id/size location + uint8_t setVal16(uint32_t keyID, uint16_t value, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Sets the 16-bit value at a given group/id/size location + uint8_t setVal32(uint32_t keyID, uint32_t value, uint8_t layer = VAL_LAYER_BBR, uint16_t maxWait = 250); //Sets the 32-bit value at a given group/id/size location + uint8_t newCfgValset8(uint32_t keyID, uint8_t value, uint8_t layer = VAL_LAYER_BBR); //Define a new UBX-CFG-VALSET with the given KeyID and 8-bit value + uint8_t newCfgValset16(uint32_t keyID, uint16_t value, uint8_t layer = VAL_LAYER_BBR); //Define a new UBX-CFG-VALSET with the given KeyID and 16-bit value + uint8_t newCfgValset32(uint32_t keyID, uint32_t value, uint8_t layer = VAL_LAYER_BBR); //Define a new UBX-CFG-VALSET with the given KeyID and 32-bit value + uint8_t addCfgValset8(uint32_t keyID, uint8_t value); //Add a new KeyID and 8-bit value to an existing UBX-CFG-VALSET ubxPacket + uint8_t addCfgValset16(uint32_t keyID, uint16_t value); //Add a new KeyID and 16-bit value to an existing UBX-CFG-VALSET ubxPacket + uint8_t addCfgValset32(uint32_t keyID, uint32_t value); //Add a new KeyID and 32-bit value to an existing UBX-CFG-VALSET ubxPacket + uint8_t sendCfgValset8(uint32_t keyID, uint8_t value, uint16_t maxWait = 250); //Add the final KeyID and 8-bit value to an existing UBX-CFG-VALSET ubxPacket and send it + uint8_t sendCfgValset16(uint32_t keyID, uint16_t value, uint16_t maxWait = 250); //Add the final KeyID and 16-bit value to an existing UBX-CFG-VALSET ubxPacket and send it + uint8_t sendCfgValset32(uint32_t keyID, uint32_t value, uint16_t maxWait = 250); //Add the final KeyID and 32-bit value to an existing UBX-CFG-VALSET ubxPacket and send it + + //Functions used for RTK and base station setup + //It is probably safe to assume that users of the RTK will be using I2C / Qwiic. So let's leave maxWait set to 250ms. + bool getSurveyMode(uint16_t maxWait = 250); //Get the current TimeMode3 settings + bool setSurveyMode(uint8_t mode, uint16_t ovajobservationTime, float requiredAccuracy, uint16_t maxWait = 250); //Control survey in mode + bool enableSurveyMode(uint16_t observationTime, float requiredAccuracy, uint16_t maxWait = 250); //Begin Survey-In for NEO-M8P + bool disableSurveyMode(uint16_t maxWait = 250); //Stop Survey-In mode + + bool getSurveyStatus(uint16_t maxWait); //Reads survey in status and sets the global variables + + uint32_t getPositionAccuracy(uint16_t maxWait = 1100); //Returns the 3D accuracy of the current high-precision fix, in mm. Supported on NEO-M8P, ZED-F9P, + + uint8_t getProtocolVersionHigh(uint16_t maxWait = 500); //Returns the PROTVER XX.00 from UBX-MON-VER register + uint8_t getProtocolVersionLow(uint16_t maxWait = 500); //Returns the PROTVER 00.XX from UBX-MON-VER register + bool getProtocolVersion(uint16_t maxWait = 500); //Queries module, loads low/high bytes + + bool getRELPOSNED(uint16_t maxWait = 1100); //Get Relative Positioning Information of the NED frame + + void enableDebugging(bool printLimitedDebug = false); //Given a port to print to, enable debug messages. Default to all, not limited. + void disableDebugging(void); //Turn off debug statements + void debugPrint(char *message); //Safely print debug statements + void debugPrintln(char *message); //Safely print debug statements + const char *statusString(sfe_ublox_status_e stat); //Pretty print the return value + + //Support for geofences + bool addGeofence(int32_t latitude, int32_t longitude, uint32_t radius, uint8_t confidence = 0, uint8_t pinPolarity = 0, uint8_t pin = 0, uint16_t maxWait = 1100); // Add a new geofence + bool clearGeofences(uint16_t maxWait = 1100); //Clears all geofences + bool getGeofenceState(geofenceState ¤tGeofenceState, uint16_t maxWait = 1100); //Returns the combined geofence state + bool clearAntPIO(uint16_t maxWait = 1100); //Clears the antenna control pin settings to release the PIOs + geofenceParams currentGeofenceParams; // Global to store the geofence parameters + + bool powerSaveMode(bool power_save = true, uint16_t maxWait = 1100); + uint8_t getPowerSaveMode(uint16_t maxWait = 1100); // Returns 255 if the sendCommand fails + bool powerOff(uint32_t durationInMs, uint16_t maxWait = 1100); + bool powerOffWithInterrupt(uint32_t durationInMs, uint32_t wakeupSources = VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT0, bool forceWhileUsb = true, uint16_t maxWait = 1100); + + //Change the dynamic platform model using UBX-CFG-NAV5 + bool setDynamicModel(dynModel newDynamicModel = DYN_MODEL_PORTABLE, uint16_t maxWait = 1100); + uint8_t getDynamicModel(uint16_t maxWait = 1100); // Get the dynamic model - returns 255 if the sendCommand fails + + bool getEsfInfo(uint16_t maxWait = 1100); + bool getEsfIns(uint16_t maxWait = 1100); + bool getEsfDataInfo(uint16_t maxWait = 1100); + bool getEsfRawDataInfo(uint16_t maxWait = 1100); + sfe_ublox_status_e getSensState(uint8_t sensor, uint16_t maxWait = 1100); + bool getVehAtt(uint16_t maxWait = 1100); + + //Survey-in specific controls + struct svinStructure + { + bool active; + bool valid; + uint16_t observationTime; + float meanAccuracy; + } svin; + + //Relative Positioning Info in NED frame specific controls + struct frelPosInfoStructure + { + uint16_t refStationID; + + float relPosN; + float relPosE; + float relPosD; + + long relPosLength; + long relPosHeading; + + int8_t relPosHPN; + int8_t relPosHPE; + int8_t relPosHPD; + int8_t relPosHPLength; + + float accN; + float accE; + float accD; + + bool gnssFixOk; + bool diffSoln; + bool relPosValid; + uint8_t carrSoln; + bool isMoving; + bool refPosMiss; + bool refObsMiss; + } relPosInfo; + + //The major datums we want to globally store + uint16_t gpsYear; + uint8_t gpsMonth; + uint8_t gpsDay; + uint8_t gpsHour; + uint8_t gpsMinute; + uint8_t gpsSecond; + uint16_t gpsMillisecond; + int32_t gpsNanosecond; + bool gpsDateValid; + bool gpsTimeValid; + + int32_t latitude; //Degrees * 10^-7 (more accurate than floats) + int32_t longitude; //Degrees * 10^-7 (more accurate than floats) + int32_t altitude; //Number of mm above ellipsoid + int32_t altitudeMSL; //Number of mm above Mean Sea Level + uint8_t SIV; //Number of satellites used in position solution + uint8_t fixType; //Tells us when we have a solution aka lock + uint8_t carrierSolution; //Tells us when we have an RTK float/fixed solution + int32_t groundSpeed; //mm/s + int32_t headingOfMotion; //degrees * 10^-5 + uint16_t pDOP; //Positional dilution of precision + uint8_t versionLow; //Loaded from getProtocolVersion(). + uint8_t versionHigh; + + uint32_t timeOfWeek; // ms + int32_t highResLatitude; // Degrees * 10^-7 + int32_t highResLongitude; // Degrees * 10^-7 + int32_t elipsoid; // Height above ellipsoid in mm (Typo! Should be eLLipsoid! **Uncorrected for backward-compatibility.**) + int32_t meanSeaLevel; // Height above mean sea level in mm + int32_t geoidSeparation; // This seems to only be provided in NMEA GGA and GNS messages + uint32_t horizontalAccuracy; // mm * 10^-1 (i.e. 0.1mm) + uint32_t verticalAccuracy; // mm * 10^-1 (i.e. 0.1mm) + int8_t elipsoidHp; // High precision component of the height above ellipsoid in mm * 10^-1 (Deliberate typo! Should be eLLipsoidHp!) + int8_t meanSeaLevelHp; // High precision component of Height above mean sea level in mm * 10^-1 + int8_t highResLatitudeHp; // High precision component of latitude: Degrees * 10^-9 + int8_t highResLongitudeHp; // High precision component of longitude: Degrees * 10^-9 + + uint16_t rtcmFrameCounter = 0; //Tracks the type of incoming byte inside RTCM frame + +#define DEF_NUM_SENS 7 + struct deadReckData + { + uint8_t version; + uint8_t fusionMode; + + uint8_t xAngRateVald; + uint8_t yAngRateVald; + uint8_t zAngRateVald; + uint8_t xAccelVald; + uint8_t yAccelVald; + uint8_t zAccelVald; + + int32_t xAngRate; + int32_t yAngRate; + int32_t zAngRate; + + int32_t xAccel; + int32_t yAccel; + int32_t zAccel; + + // The array size is based on testing directly on M8U and F9R + uint32_t rawData; + uint32_t rawDataType; + uint32_t rawTStamp; + + uint32_t data[DEF_NUM_SENS]; + uint32_t dataType[DEF_NUM_SENS]; + uint32_t dataTStamp[DEF_NUM_SENS]; + } imuMeas; + + struct indivImuData + { + + uint8_t numSens; + + uint8_t senType; + bool isUsed; + bool isReady; + uint8_t calibStatus; + uint8_t timeStatus; + + uint8_t freq; // Hz + + bool badMeas; + bool badTag; + bool missMeas; + bool noisyMeas; + } ubloxSen; + + struct vehicleAttitude + { + // All values in degrees + int32_t roll; + int32_t pitch; + int32_t heading; + uint32_t accRoll; + uint32_t accPitch; + uint32_t accHeading; + } vehAtt; + +private: + //Depending on the sentence type the processor will load characters into different arrays + enum SentenceTypes + { + NONE = 0, + NMEA, + UBX, + RTCM + } currentSentence = NONE; + + //Depending on the ubx binary response class, store binary responses into different places + enum classTypes + { + CLASS_NONE = 0, + CLASS_ACK, + CLASS_NOT_AN_ACK + } ubxFrameClass = CLASS_NONE; + + enum commTypes + { + COMM_TYPE_I2C = 0, + COMM_TYPE_SERIAL, + COMM_TYPE_SPI + } commType = COMM_TYPE_I2C; //Controls which port we look to for incoming bytes + + //Functions + bool checkUbloxInternal(ubxPacket *incomingUBX, uint8_t requestedClass = 255, uint8_t requestedID = 255); //Checks module with user selected commType + uint32_t extractLong(uint8_t spotToStart); //Combine four bytes from payload into long + uint16_t extractInt(uint8_t spotToStart); //Combine two bytes from payload into int + uint8_t extractByte(uint8_t spotToStart); //Get byte from payload + int8_t extractSignedChar(uint8_t spotToStart); //Get signed 8-bit value from payload + void addToChecksum(uint8_t incoming); //Given an incoming byte, adjust rollingChecksumA/B + + //Variables + struct device *_gpio_dev; // GPIO device + struct device *_i2cPort; //The generic connection to user's chosen I2C hardware + //Stream *_serialPort; //The generic connection to user's chosen Serial hardware + bool _nmeaOutputPort = false; //The user can assign an output port to print NMEA sentences if they wish - ported to print to console, converted to flag + //Stream *_debugSerial; //The stream to send debug messages to if enabled + + uint8_t _gpsI2Caddress = 0x42; //Default 7-bit unshifted address of the ublox 6/7/8/M8/F9 series + //This can be changed using the ublox configuration software + + bool _printDebug = false; //Flag to print the serial commands we are sending to the Serial port for debug + bool _printLimitedDebug = false; //Flag to print limited debug messages. Useful for I2C debugging or high navigation rates + + //The packet buffers + //These are pointed at from within the ubxPacket + uint8_t payloadAck[2]; // Holds the requested ACK/NACK + uint8_t payloadCfg[MAX_PAYLOAD_SIZE]; // Holds the requested data packet + uint8_t payloadBuf[2]; // Temporary buffer used to screen incoming packets or dump unrequested packets + + //Init the packet structures and init them with pointers to the payloadAck, payloadCfg and payloadBuf arrays + ubxPacket packetAck = {0, 0, 0, 0, 0, payloadAck, 0, 0, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED}; + ubxPacket packetCfg = {0, 0, 0, 0, 0, payloadCfg, 0, 0, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED}; + ubxPacket packetBuf = {0, 0, 0, 0, 0, payloadBuf, 0, 0, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED}; + + //Flag if this packet is unrequested (and so should be ignored and not copied into packetCfg or packetAck) + bool ignoreThisPayload = false; + + //Identify which buffer is in use + //Data is stored in packetBuf until the requested class and ID can be validated + //If a match is seen, data is diverted into packetAck or packetCfg + sfe_ublox_packet_buffer_e activePacketBuffer = SFE_UBLOX_PACKET_PACKETBUF; + + //Limit checking of new data to every X ms + //If we are expecting an update every X Hz then we should check every half that amount of time + //Otherwise we may block ourselves from seeing new data + uint8_t i2cPollingWait = 100; //Default to 100ms. Adjusted when user calls setNavigationFrequency() + + unsigned long lastCheck = 0; + bool autoPVT = false; //Whether autoPVT is enabled or not + bool autoPVTImplicitUpdate = true; // Whether autoPVT is triggered by accessing stale data (=true) or by a call to checkUblox (=false) + uint16_t ubxFrameCounter; //It counts all UBX frame. [Fixed header(2bytes), CLS(1byte), ID(1byte), length(2bytes), payload(x bytes), checksums(2bytes)] + + uint8_t rollingChecksumA; //Rolls forward as we receive incoming bytes. Checked against the last two A/B checksum bytes + uint8_t rollingChecksumB; //Rolls forward as we receive incoming bytes. Checked against the last two A/B checksum bytes + + //Create bit field for staleness of each datum in PVT we want to monitor + //moduleQueried.latitude goes true each time we call getPVT() + //This reduces the number of times we have to call getPVT as this can take up to ~1s per read + //depending on update rate + struct + { + uint32_t gpsiTOW : 1; + uint32_t gpsYear : 1; + uint32_t gpsMonth : 1; + uint32_t gpsDay : 1; + uint32_t gpsHour : 1; + uint32_t gpsMinute : 1; + uint32_t gpsSecond : 1; + uint32_t gpsDateValid : 1; + uint32_t gpsTimeValid : 1; + uint32_t gpsNanosecond : 1; + + uint32_t all : 1; + uint32_t longitude : 1; + uint32_t latitude : 1; + uint32_t altitude : 1; + uint32_t altitudeMSL : 1; + uint32_t SIV : 1; + uint32_t fixType : 1; + uint32_t carrierSolution : 1; + uint32_t groundSpeed : 1; + uint32_t headingOfMotion : 1; + uint32_t pDOP : 1; + uint32_t versionNumber : 1; + } moduleQueried; + + struct + { + uint16_t all : 1; + uint16_t timeOfWeek : 1; + uint16_t highResLatitude : 1; + uint16_t highResLongitude : 1; + uint16_t elipsoid : 1; + uint16_t meanSeaLevel : 1; + uint16_t geoidSeparation : 1; // Redundant but kept for backward-compatibility + uint16_t horizontalAccuracy : 1; + uint16_t verticalAccuracy : 1; + uint16_t elipsoidHp : 1; + uint16_t meanSeaLevelHp : 1; + uint16_t highResLatitudeHp : 1; + uint16_t highResLongitudeHp : 1; + } highResModuleQueried; + + uint16_t rtcmLen = 0; +}; + +#endif //SPARKFUN_UBLOX_ZEPHYR_LIBRARY_H diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/src/main.c b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/src/main.c new file mode 100644 index 0000000..32d2717 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/examples/Zephyr/Example1_GetPositionAndTime_Zephyr/src/main.c @@ -0,0 +1,102 @@ +/* + Reading lat, long and UTC time via UBX binary commands + By: Nathan Seidle + SparkFun Electronics + Date: August 22nd, 2018 + License: MIT. See license file for more information but you can + basically do whatever you want with this code. + + This example reads the NMEA setences from the Ublox module over I2c and outputs + them to the serial port + + Open the serial monitor at 115200 baud to see the output + I2C clock speed: 100 kHz + + Ported to Zephyr by Vid Rajtmajer , www.irnas.eu + + Development environment specifics: NCS v1.0.3 release + + To build: west build -b -p Can also read NMEA sentences over I2C with check_ublox function + To flash: west flash --erase +*/ +#include +#include +#include +#include +#include + +#include "SparkFun_Ublox_Zephyr_Interface.h" + + +#define I2C_DEV "I2C_0" + +struct device *gpio_dev; +struct device *i2c_dev; +/* I2C pins used are defaults for I2C_0 on nrf52840 + SDA: 26 + SCL: 27 +*/ + +uint8_t init_gpio(void) { + const char* gpioName = "GPIO_0"; + gpio_dev = device_get_binding(gpioName); + if (gpio_dev == NULL) { + printk("Error: Could not get %s device\n", gpioName); + return -EIO; + } + int err = set_gpio_dev(gpio_dev, true); // set GPIO_0 device and enable debugging + if (err) { + return -EIO; + } + return 0; +} + +uint8_t init_i2c(void) { + i2c_dev = device_get_binding(I2C_DEV); + if (!i2c_dev) + { + printk("I2C_0 error\n"); + return -1; + } + else + { + printk("I2C_0 Init OK\n"); + return 0; + } +} + +uint8_t init_gps(void) { + if (gps_begin(i2c_dev) != 0) + { + printk("Ublox GPS init error!\n"); + return -1; + } + return 0; +} + + +void main(void) { + printk("Zephyr Ublox example\n"); + + int err; + err = init_gpio(); + if (err) { + return; + } + err = init_i2c(); + if (err) { + return; + } + + err = init_gps(); + if (err) { + return; + } + + while(1) { + //check_ublox(); // See if new data is available. Process bytes as they come in. + get_position(); + get_datetime(); + k_msleep(250); // Don't pound too hard on the I2C bus + } +} \ No newline at end of file diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/img/Contributing.JPG b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/img/Contributing.JPG new file mode 100644 index 0000000..39ebf68 Binary files /dev/null and b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/img/Contributing.JPG differ diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/keywords.txt b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/keywords.txt new file mode 100644 index 0000000..99345c1 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/keywords.txt @@ -0,0 +1,272 @@ +####################################### +# Syntax Coloring Map +####################################### + +####################################### +# Datatypes (KEYWORD1) +####################################### + +SFE_UBLOX_GPS KEYWORD1 + +####################################### +# Methods and Functions (KEYWORD2) +####################################### + +begin KEYWORD2 +isConnected KEYWORD2 +checkUblox KEYWORD2 +checkUbloxI2C KEYWORD2 +checkUbloxSerial KEYWORD2 + +process KEYWORD2 +processUBX KEYWORD2 +processRTCMframe KEYWORD2 +processRTCM KEYWORD2 +processUBXpacket KEYWORD2 +processNMEA KEYWORD2 + +calcChecksum KEYWORD2 +sendCommand KEYWORD2 +printPacket KEYWORD2 +setI2CAddress KEYWORD2 +setSerialRate KEYWORD2 +setNMEAOutputPort KEYWORD2 + +setNavigationFrequency KEYWORD2 +getNavigationFrequency KEYWORD2 + +saveConfiguration KEYWORD2 +factoryDefault KEYWORD2 +saveConfigSelective KEYWORD2 + +waitForResponse KEYWORD2 + +getPVT KEYWORD2 +getLatitude KEYWORD2 +getLongitude KEYWORD2 +getAltitude KEYWORD2 +getAltitudeMSL KEYWORD2 +getSIV KEYWORD2 +getFixType KEYWORD2 +getCarrierSolutionType KEYWORD2 +getGroundSpeed KEYWORD2 +getHeading KEYWORD2 +getPDOP KEYWORD2 +getTimeOfWeek KEYWORD2 +getHorizontalAccEst KEYWORD2 +getVerticalAccEst KEYWORD2 +getNedNorthVel KEYWORD2 +getNedEastVel KEYWORD2 +getNedDownVel KEYWORD2 +getSpeedAccEst KEYWORD2 +getHeadingAccEst KEYWORD2 +getInvalidLlh KEYWORD2 +getHeadVeh KEYWORD2 +getMagDec KEYWORD2 +getMagAcc KEYWORD2 +getHeadVehValid KEYWORD2 + +setPortOutput KEYWORD2 +setPortInput KEYWORD2 +getPortSettings KEYWORD2 + +setI2COutput KEYWORD2 +setUART1Output KEYWORD2 +setUART2Output KEYWORD2 +setUSBOutput KEYWORD2 +setSPIOutput KEYWORD2 + +getVal KEYWORD2 +getVal8 KEYWORD2 +getVal16 KEYWORD2 +getVal32 KEYWORD2 +setVal KEYWORD2 +setVal8 KEYWORD2 +setVal16 KEYWORD2 +setVal32 KEYWORD2 +newCfgValset8 KEYWORD2 +newCfgValset16 KEYWORD2 +newCfgValset32 KEYWORD2 +addCfgValset8 KEYWORD2 +addCfgValset16 KEYWORD2 +addCfgValset32 KEYWORD2 +sendCfgValset8 KEYWORD2 +sendCfgValset16 KEYWORD2 +sendCfgValset32 KEYWORD2 + +getSurveyMode KEYWORD2 +setSurveyMode KEYWORD2 +enableSurveyMode KEYWORD2 +disableSurveyMode KEYWORD2 +getSurveyStatus KEYWORD2 + +enableRTCMmessage KEYWORD2 +disableRTCMmessage KEYWORD2 + +getPositionAccuracy KEYWORD2 + +getProtocolVersionHigh KEYWORD2 +getProtocolVersionLow KEYWORD2 +getProtocolVersion KEYWORD2 + +getRELPOSNED KEYWORD2 + +enableDebugging KEYWORD2 +disableDebugging KEYWORD2 +debugPrint KEYWORD2 +debugPrintln KEYWORD2 + +factoryReset KEYWORD2 +setAutoPVT KEYWORD2 +assumeAutoPVT KEYWORD2 +flushPVT KEYWORD2 + +getYear KEYWORD2 +getMonth KEYWORD2 +getDay KEYWORD2 +getHour KEYWORD2 +getMinute KEYWORD2 +getSecond KEYWORD2 +getMillisecond KEYWORD2 +getNanosecond KEYWORD2 +getDateValid KEYWORD2 +getTimeValid KEYWORD2 + +getHPPOSLLH KEYWORD2 +assumeAutoHPPOSLLH KEYWORD2 +setAutoHPPOSLLH KEYWORD2 +flushHPPOSLLH KEYWORD2 + +getTimeOfWeek KEYWORD2 +getHighResLatitude KEYWORD2 +getHighResLatitudeHp KEYWORD2 +getHighResLongitude KEYWORD2 +getHighResLongitudeHp KEYWORD2 +getElipsoid KEYWORD2 +getElipsoidHp KEYWORD2 +getMeanSeaLevel KEYWORD2 +getMeanSeaLevelHp KEYWORD2 +getGeoidSeparation KEYWORD2 +getHorizontalAccuracy KEYWORD2 +getVerticalAccuracy KEYWORD2 + +addGeofence KEYWORD2 +clearGeofences KEYWORD2 +getGeofenceState KEYWORD2 + +setDynamicModel KEYWORD2 +getDynamicModel KEYWORD2 +powerSaveMode KEYWORD2 +getPowerSaveMode KEYWORD2 +powerOff KEYWORD2 +powerOffWithInterrupt KEYWORD2 + +configureMessage KEYWORD2 +enableMessage KEYWORD2 +disableMessage KEYWORD2 +enableNMEAMessage KEYWORD2 +disableNMEAMessage KEYWORD2 + +getEsfInfo KEYWORD2 +getEsfIns KEYWORD2 +getEsfDataInfo KEYWORD2 +getEsfRawDataInfo KEYWORD2 + +getSensState KEYWORD2 +getVehAtt KEYWORD2 + +setI2CTransactionSize KEYWORD2 +getI2CTransactionSize KEYWORD2 + +setStaticPosition KEYWORD2 + +pushRawData KEYWORD2 + +setHNRNavigationRate KEYWORD2 +getHNRNavigationRate KEYWORD2 +assumeAutoHNRAtt KEYWORD2 +setAutoHNRAtt KEYWORD2 +getHNRAtt KEYWORD2 +assumeAutoHNRDyn KEYWORD2 +setAutoHNRDyn KEYWORD2 +getHNRDyn KEYWORD2 +assumeAutoHNRPVT KEYWORD2 +setAutoHNRPVT KEYWORD2 +getHNRPVT KEYWORD2 + +####################################### +# Constants (LITERAL1) +####################################### + +COM_TYPE_UBX LITERAL1 +COM_TYPE_NMEA LITERAL1 +COM_TYPE_RTCM3 LITERAL1 + +COM_PORT_I2C LITERAL1 +COM_PORT_UART1 LITERAL1 +COM_PORT_UART2 LITERAL1 +COM_PORT_USB LITERAL1 +COM_PORT_SPI LITERAL1 + +UBX_CLASS_NAV LITERAL1 +UBX_CLASS_RXM LITERAL1 +UBX_CLASS_INF LITERAL1 +UBX_CLASS_ACK LITERAL1 +UBX_CLASS_CFG LITERAL1 +UBX_CLASS_UPD LITERAL1 +UBX_CLASS_MON LITERAL1 +UBX_CLASS_AID LITERAL1 +UBX_CLASS_TIM LITERAL1 +UBX_CLASS_ESF LITERAL1 +UBX_CLASS_MGA LITERAL1 +UBX_CLASS_LOG LITERAL1 +UBX_CLASS_SEC LITERAL1 +UBX_CLASS_HNR LITERAL1 +UBX_CLASS_NMEA LITERAL1 + +UBX_NMEA_GGA LITERAL1 +UBX_NMEA_GLL LITERAL1 +UBX_NMEA_GNS LITERAL1 +UBX_NMEA_GRS LITERAL1 +UBX_NMEA_GSA LITERAL1 +UBX_NMEA_GST LITERAL1 +UBX_NMEA_GSV LITERAL1 +UBX_NMEA_RMC LITERAL1 +UBX_NMEA_VTG LITERAL1 +UBX_NMEA_ZDA LITERAL1 + +UBX_NAV_PVT LITERAL1 +UBX_NAV_HPPOSECEF LITERAL1 +UBX_NAV_HPPOSLLH LITERAL1 +UBX_NAV_SVIN LITERAL1 +UBX_NAV_RELPOSNED LITERAL1 + +UBX_RTCM_MSB LITERAL1 +UBX_RTCM_1005 LITERAL1 +UBX_RTCM_1074 LITERAL1 +UBX_RTCM_1077 LITERAL1 +UBX_RTCM_1084 LITERAL1 +UBX_RTCM_1087 LITERAL1 +UBX_RTCM_1094 LITERAL1 +UBX_RTCM_1097 LITERAL1 +UBX_RTCM_1124 LITERAL1 +UBX_RTCM_1127 LITERAL1 +UBX_RTCM_1230 LITERAL1 +UBX_RTCM_4072_0 LITERAL1 +UBX_RTCM_4072_1 LITERAL1 + +DYN_MODEL_PORTABLE LITERAL1 +DYN_MODEL_STATIONARY LITERAL1 +DYN_MODEL_PEDESTRIAN LITERAL1 +DYN_MODEL_AUTOMOTIVE LITERAL1 +DYN_MODEL_SEA LITERAL1 +DYN_MODEL_AIRBORNE1g LITERAL1 +DYN_MODEL_AIRBORNE2g LITERAL1 +DYN_MODEL_AIRBORNE4g LITERAL1 +DYN_MODEL_WRIST LITERAL1 +DYN_MODEL_BIKE LITERAL1 + +UBX_ESF_STATUS LITERAL1 +UBX_ESF_RAW LITERAL1 +UBX_ESF_MEAS LITERAL1 +UBX_ESF_INS LITERAL1 diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/library.properties b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/library.properties new file mode 100644 index 0000000..3eb99e9 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/library.properties @@ -0,0 +1,9 @@ +name=SparkFun u-blox Arduino Library +version=1.8.11 +author=SparkFun Electronics +maintainer=SparkFun Electronics +sentence=DEPRECATED Library for I2C and Serial Communication with u-blox modules

+paragraph=Please note: this library is deprecated. Please migrate to v2.0. You can find the migration instructions here.

An Arduino Library to enable both I2C and Serial communication for both NMEA reception and binary UBX sending to u-blox modules. Useful for interfacing to the SparkFun GPS-RTK2 ZED-F9P, SparkFun GPS-RTK NEO-M8P-2, the SparkFun SAM-M8Q, and the SparkFun ZOE-M8Q. Library also works with other u-blox based boards.

The ZED-F9P and NEO-M8P-2 modules are top-of-the-line modules for high accuracy GNSS and GPS location solutions including RTK. The ZED-F9P is unique in that it is capable of both rover and base station operations allowing the module to become a base station and produce RTCM 3.x correction data.
+category=Sensors +url=https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library +architectures=* diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/src/SparkFun_Ublox_Arduino_Library.cpp b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/src/SparkFun_Ublox_Arduino_Library.cpp new file mode 100644 index 0000000..7fc43de --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/src/SparkFun_Ublox_Arduino_Library.cpp @@ -0,0 +1,4875 @@ +/* + This is a library written for the u-blox ZED-F9P and NEO-M8P-2 + SparkFun sells these at its website: www.sparkfun.com + Do you like this library? Help support SparkFun. Buy a board! + https://www.sparkfun.com/products/16481 + https://www.sparkfun.com/products/15136 + https://www.sparkfun.com/products/15005 + https://www.sparkfun.com/products/15733 + https://www.sparkfun.com/products/15193 + https://www.sparkfun.com/products/15210 + + Written by Nathan Seidle @ SparkFun Electronics, September 6th, 2018 + + This library handles configuring and handling the responses + from a u-blox GPS module. Works with most modules from u-blox including + the Zed-F9P, NEO-M8P-2, NEO-M9N, ZOE-M8Q, SAM-M8Q, and many others. + + https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library + + Development environment specifics: + Arduino IDE 1.8.5 + + SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT). + The MIT License (MIT) + Copyright (c) 2016 SparkFun Electronics + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the Software is furnished to + do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial + portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT + NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include "SparkFun_Ublox_Arduino_Library.h" + +SFE_UBLOX_GPS::SFE_UBLOX_GPS(void) +{ + // Constructor + currentGeofenceParams.numFences = 0; // Zero the number of geofences currently in use + moduleQueried.versionNumber = false; + + if (checksumFailurePin >= 0) + { + pinMode((uint8_t)checksumFailurePin, OUTPUT); + digitalWrite((uint8_t)checksumFailurePin, HIGH); + } + + //Define the size of the I2C buffer based on the platform the user has + //In general we found that most platforms use 32 bytes as the I2C buffer size. We could + //implement platform gaurds here but as you can see, none currently benefit from >32 + //so we'll leave it up to the user to set it using setI2CTransactionSize if they will benefit from it + // //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + // #if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__) + + // i2cTransactionSize = 32; + + // #elif defined(__SAMD21G18A__) + + // i2cTransactionSize = 32; + + //#elif __MK20DX256__ + //Teensy + + // #elif defined(ARDUINO_ARCH_ESP32) + + // i2cTransactionSize = 32; //The ESP32 has an I2C buffer length of 128. We reduce it to 32 bytes to increase stability with the module + + // #endif +} + +//Initialize the Serial port +boolean SFE_UBLOX_GPS::begin(TwoWire &wirePort, uint8_t deviceAddress) +{ + commType = COMM_TYPE_I2C; + _i2cPort = &wirePort; //Grab which port the user wants us to use + + //We expect caller to begin their I2C port, with the speed of their choice external to the library + //But if they forget, we start the hardware here. + + //We're moving away from the practice of starting Wire hardware in a library. This is to avoid cross platform issues. + //ie, there are some platforms that don't handle multiple starts to the wire hardware. Also, every time you start the wire + //hardware the clock speed reverts back to 100kHz regardless of previous Wire.setClocks(). + //_i2cPort->begin(); + + _gpsI2Caddress = deviceAddress; //Store the I2C address from user + + // Attempt isConnected up to 3 times if required + boolean success = isConnected(); + + if (!success) + success = isConnected(); + + if (!success) + success = isConnected(); + + return (success); +} + +//Initialize the Serial port +boolean SFE_UBLOX_GPS::begin(Stream &serialPort) +{ + commType = COMM_TYPE_SERIAL; + _serialPort = &serialPort; //Grab which port the user wants us to use + + // Attempt isConnected up to 3 times if required + boolean success = isConnected(); + + if (!success) + success = isConnected(); + + if (!success) + success = isConnected(); + + return (success); +} + +//Sets the global size for I2C transactions +//Most platforms use 32 bytes (the default) but this allows users to increase the transaction +//size if the platform supports it +//Note: If the transaction size is set larger than the platforms buffer size, bad things will happen. +void SFE_UBLOX_GPS::setI2CTransactionSize(uint8_t transactionSize) +{ + i2cTransactionSize = transactionSize; +} +uint8_t SFE_UBLOX_GPS::getI2CTransactionSize(void) +{ + return (i2cTransactionSize); +} + +//Enable or disable the printing of sent/response HEX values. +//Use this in conjunction with 'Transport Logging' from the Universal Reader Assistant to see what they're doing that we're not +void SFE_UBLOX_GPS::enableDebugging(Stream &debugPort, boolean printLimitedDebug) +{ + _debugSerial = &debugPort; //Grab which port the user wants us to use for debugging + if (printLimitedDebug == false) + { + _printDebug = true; //Should we print the commands we send? Good for debugging + } + else + { + _printLimitedDebug = true; //Should we print limited debug messages? Good for debugging high navigation rates + } +} +void SFE_UBLOX_GPS::disableDebugging(void) +{ + _printDebug = false; //Turn off extra print statements + _printLimitedDebug = false; +} + +//Safely print messages +void SFE_UBLOX_GPS::debugPrint(char *message) +{ + if (_printDebug == true) + { + _debugSerial->print(message); + } +} +//Safely print messages +void SFE_UBLOX_GPS::debugPrintln(char *message) +{ + if (_printDebug == true) + { + _debugSerial->println(message); + } +} + +const char *SFE_UBLOX_GPS::statusString(sfe_ublox_status_e stat) +{ + switch (stat) + { + case SFE_UBLOX_STATUS_SUCCESS: + return "Success"; + break; + case SFE_UBLOX_STATUS_FAIL: + return "General Failure"; + break; + case SFE_UBLOX_STATUS_CRC_FAIL: + return "CRC Fail"; + break; + case SFE_UBLOX_STATUS_TIMEOUT: + return "Timeout"; + break; + case SFE_UBLOX_STATUS_COMMAND_NACK: + return "Command not acknowledged (NACK)"; + break; + case SFE_UBLOX_STATUS_OUT_OF_RANGE: + return "Out of range"; + break; + case SFE_UBLOX_STATUS_INVALID_ARG: + return "Invalid Arg"; + break; + case SFE_UBLOX_STATUS_INVALID_OPERATION: + return "Invalid operation"; + break; + case SFE_UBLOX_STATUS_MEM_ERR: + return "Memory Error"; + break; + case SFE_UBLOX_STATUS_HW_ERR: + return "Hardware Error"; + break; + case SFE_UBLOX_STATUS_DATA_SENT: + return "Data Sent"; + break; + case SFE_UBLOX_STATUS_DATA_RECEIVED: + return "Data Received"; + break; + case SFE_UBLOX_STATUS_I2C_COMM_FAILURE: + return "I2C Comm Failure"; + break; + case SFE_UBLOX_STATUS_DATA_OVERWRITTEN: + return "Data Packet Overwritten"; + break; + default: + return "Unknown Status"; + break; + } + return "None"; +} + +void SFE_UBLOX_GPS::factoryReset() +{ + // Copy default settings to permanent + // Note: this does not load the permanent configuration into the current configuration. Calling factoryDefault() will do that. + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_CFG; + packetCfg.len = 13; + packetCfg.startingSpot = 0; + for (uint8_t i = 0; i < 4; i++) + { + payloadCfg[0 + i] = 0xff; // clear mask: copy default config to permanent config + payloadCfg[4 + i] = 0x00; // save mask: don't save current to permanent + payloadCfg[8 + i] = 0x00; // load mask: don't copy permanent config to current + } + payloadCfg[12] = 0xff; // all forms of permanent memory + sendCommand(&packetCfg, 0); // don't expect ACK + hardReset(); // cause factory default config to actually be loaded and used cleanly +} + +void SFE_UBLOX_GPS::hardReset() +{ + // Issue hard reset + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RST; + packetCfg.len = 4; + packetCfg.startingSpot = 0; + payloadCfg[0] = 0xff; // cold start + payloadCfg[1] = 0xff; // cold start + payloadCfg[2] = 0; // 0=HW reset + payloadCfg[3] = 0; // reserved + sendCommand(&packetCfg, 0); // don't expect ACK +} + +//Changes the serial baud rate of the u-blox module, can't return success/fail 'cause ACK from modem +//is lost due to baud rate change +void SFE_UBLOX_GPS::setSerialRate(uint32_t baudrate, uint8_t uartPort, uint16_t maxWait) +{ + //Get the current config values for the UART port + getPortSettings(uartPort, maxWait); //This will load the payloadCfg array with current port settings + + if (_printDebug == true) + { + _debugSerial->print(F("Current baud rate: ")); + _debugSerial->println(((uint32_t)payloadCfg[10] << 16) | ((uint32_t)payloadCfg[9] << 8) | payloadCfg[8]); + } + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_PRT; + packetCfg.len = 20; + packetCfg.startingSpot = 0; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[8] = baudrate; + payloadCfg[9] = baudrate >> 8; + payloadCfg[10] = baudrate >> 16; + payloadCfg[11] = baudrate >> 24; + + if (_printDebug == true) + { + _debugSerial->print(F("New baud rate:")); + _debugSerial->println(((uint32_t)payloadCfg[10] << 16) | ((uint32_t)payloadCfg[9] << 8) | payloadCfg[8]); + } + + sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait); + if (_printDebug == true) + { + _debugSerial->print(F("setSerialRate: sendCommand returned: ")); + _debugSerial->println(statusString(retVal)); + } +} + +//Changes the I2C address that the u-blox module responds to +//0x42 is the default but can be changed with this command +boolean SFE_UBLOX_GPS::setI2CAddress(uint8_t deviceAddress, uint16_t maxWait) +{ + //Get the current config values for the I2C port + getPortSettings(COM_PORT_I2C, maxWait); //This will load the payloadCfg array with current port settings + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_PRT; + packetCfg.len = 20; + packetCfg.startingSpot = 0; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[4] = deviceAddress << 1; //DDC mode LSB + + if (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT) // We are only expecting an ACK + { + //Success! Now change our internal global. + _gpsI2Caddress = deviceAddress; //Store the I2C address from user + return (true); + } + return (false); +} + +//Want to see the NMEA messages on the Serial port? Here's how +void SFE_UBLOX_GPS::setNMEAOutputPort(Stream &nmeaOutputPort) +{ + _nmeaOutputPort = &nmeaOutputPort; //Store the port from user +} + +//Called regularly to check for available bytes on the user' specified port +boolean SFE_UBLOX_GPS::checkUblox(uint8_t requestedClass, uint8_t requestedID) +{ + return checkUbloxInternal(&packetCfg, requestedClass, requestedID); +} + +//Called regularly to check for available bytes on the user' specified port +boolean SFE_UBLOX_GPS::checkUbloxInternal(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +{ + if (commType == COMM_TYPE_I2C) + return (checkUbloxI2C(incomingUBX, requestedClass, requestedID)); + else if (commType == COMM_TYPE_SERIAL) + return (checkUbloxSerial(incomingUBX, requestedClass, requestedID)); + return false; +} + +//Polls I2C for data, passing any new bytes to process() +//Returns true if new bytes are available +boolean SFE_UBLOX_GPS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +{ + if (millis() - lastCheck >= i2cPollingWait) + { + //Get the number of bytes available from the module + uint16_t bytesAvailable = 0; + _i2cPort->beginTransmission(_gpsI2Caddress); + _i2cPort->write(0xFD); //0xFD (MSB) and 0xFE (LSB) are the registers that contain number of bytes available + if (_i2cPort->endTransmission(false) != 0) //Send a restart command. Do not release bus. + return (false); //Sensor did not ACK + + _i2cPort->requestFrom((uint8_t)_gpsI2Caddress, (uint8_t)2); + if (_i2cPort->available()) + { + uint8_t msb = _i2cPort->read(); + uint8_t lsb = _i2cPort->read(); + if (lsb == 0xFF) + { + //I believe this is a u-blox bug. Device should never present an 0xFF. + if ((_printDebug == true) || (_printLimitedDebug == true)) // Print this if doing limited debugging + { + _debugSerial->println(F("checkUbloxI2C: u-blox bug, length lsb is 0xFF")); + } + if (checksumFailurePin >= 0) + { + digitalWrite((uint8_t)checksumFailurePin, LOW); + delay(10); + digitalWrite((uint8_t)checksumFailurePin, HIGH); + } + lastCheck = millis(); //Put off checking to avoid I2C bus traffic + return (false); + } + bytesAvailable = (uint16_t)msb << 8 | lsb; + } + + if (bytesAvailable == 0) + { + if (_printDebug == true) + { + _debugSerial->println(F("checkUbloxI2C: OK, zero bytes available")); + } + lastCheck = millis(); //Put off checking to avoid I2C bus traffic + return (false); + } + + //Check for undocumented bit error. We found this doing logic scans. + //This error is rare but if we incorrectly interpret the first bit of the two 'data available' bytes as 1 + //then we have far too many bytes to check. May be related to I2C setup time violations: https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library/issues/40 + if (bytesAvailable & ((uint16_t)1 << 15)) + { + //Clear the MSbit + bytesAvailable &= ~((uint16_t)1 << 15); + + if ((_printDebug == true) || (_printLimitedDebug == true)) // Print this if doing limited debugging + { + _debugSerial->print(F("checkUbloxI2C: Bytes available error:")); + _debugSerial->println(bytesAvailable); + if (checksumFailurePin >= 0) + { + digitalWrite((uint8_t)checksumFailurePin, LOW); + delay(10); + digitalWrite((uint8_t)checksumFailurePin, HIGH); + } + } + } + + if (bytesAvailable > 100) + { + if (_printDebug == true) + { + _debugSerial->print(F("checkUbloxI2C: Large packet of ")); + _debugSerial->print(bytesAvailable); + _debugSerial->println(F(" bytes received")); + } + } + else + { + if (_printDebug == true) + { + _debugSerial->print(F("checkUbloxI2C: Reading ")); + _debugSerial->print(bytesAvailable); + _debugSerial->println(F(" bytes")); + } + } + + while (bytesAvailable) + { + _i2cPort->beginTransmission(_gpsI2Caddress); + _i2cPort->write(0xFF); //0xFF is the register to read data from + if (_i2cPort->endTransmission(false) != 0) //Send a restart command. Do not release bus. + return (false); //Sensor did not ACK + + //Limit to 32 bytes or whatever the buffer limit is for given platform + uint16_t bytesToRead = bytesAvailable; + if (bytesToRead > i2cTransactionSize) + bytesToRead = i2cTransactionSize; + + TRY_AGAIN: + + _i2cPort->requestFrom((uint8_t)_gpsI2Caddress, (uint8_t)bytesToRead); + if (_i2cPort->available()) + { + for (uint16_t x = 0; x < bytesToRead; x++) + { + uint8_t incoming = _i2cPort->read(); //Grab the actual character + + //Check to see if the first read is 0x7F. If it is, the module is not ready + //to respond. Stop, wait, and try again + if (x == 0) + { + if (incoming == 0x7F) + { + if ((_printDebug == true) || (_printLimitedDebug == true)) // Print this if doing limited debugging + { + _debugSerial->println(F("checkUbloxU2C: u-blox error, module not ready with data")); + } + delay(5); //In logic analyzation, the module starting responding after 1.48ms + if (checksumFailurePin >= 0) + { + digitalWrite((uint8_t)checksumFailurePin, LOW); + delay(10); + digitalWrite((uint8_t)checksumFailurePin, HIGH); + } + goto TRY_AGAIN; + } + } + + process(incoming, incomingUBX, requestedClass, requestedID); //Process this valid character + } + } + else + return (false); //Sensor did not respond + + bytesAvailable -= bytesToRead; + } + } + + return (true); + +} //end checkUbloxI2C() + +//Checks Serial for data, passing any new bytes to process() +boolean SFE_UBLOX_GPS::checkUbloxSerial(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +{ + while (_serialPort->available()) + { + process(_serialPort->read(), incomingUBX, requestedClass, requestedID); + } + return (true); + +} //end checkUbloxSerial() + +//Processes NMEA and UBX binary sentences one byte at a time +//Take a given byte and file it into the proper array +void SFE_UBLOX_GPS::process(uint8_t incoming, ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +{ + if ((currentSentence == NONE) || (currentSentence == NMEA)) + { + if (incoming == 0xB5) //UBX binary frames start with 0xB5, aka μ + { + //This is the start of a binary sentence. Reset flags. + //We still don't know the response class + ubxFrameCounter = 0; + currentSentence = UBX; + //Reset the packetBuf.counter even though we will need to reset it again when ubxFrameCounter == 2 + packetBuf.counter = 0; + ignoreThisPayload = false; //We should not ignore this payload - yet + //Store data in packetBuf until we know if we have a requested class and ID match + activePacketBuffer = SFE_UBLOX_PACKET_PACKETBUF; + } + else if (incoming == '$') + { + currentSentence = NMEA; + } + else if (incoming == 0xD3) //RTCM frames start with 0xD3 + { + rtcmFrameCounter = 0; + currentSentence = RTCM; + } + else + { + //This character is unknown or we missed the previous start of a sentence + } + } + + //Depending on the sentence, pass the character to the individual processor + if (currentSentence == UBX) + { + //Decide what type of response this is + if ((ubxFrameCounter == 0) && (incoming != 0xB5)) //ISO 'μ' + currentSentence = NONE; //Something went wrong. Reset. + else if ((ubxFrameCounter == 1) && (incoming != 0x62)) //ASCII 'b' + currentSentence = NONE; //Something went wrong. Reset. + // Note to future self: + // There may be some duplication / redundancy in the next few lines as processUBX will also + // load information into packetBuf, but we'll do it here too for clarity + else if (ubxFrameCounter == 2) //Class + { + // Record the class in packetBuf until we know what to do with it + packetBuf.cls = incoming; // (Duplication) + rollingChecksumA = 0; //Reset our rolling checksums here (not when we receive the 0xB5) + rollingChecksumB = 0; + packetBuf.counter = 0; //Reset the packetBuf.counter (again) + packetBuf.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; // Reset the packet validity (redundant?) + packetBuf.startingSpot = incomingUBX->startingSpot; //Copy the startingSpot + } + else if (ubxFrameCounter == 3) //ID + { + // Record the ID in packetBuf until we know what to do with it + packetBuf.id = incoming; // (Duplication) + //We can now identify the type of response + //If the packet we are receiving is not an ACK then check for a class and ID match + if (packetBuf.cls != UBX_CLASS_ACK) + { + //This is not an ACK so check for a class and ID match + if ((packetBuf.cls == requestedClass) && (packetBuf.id == requestedID)) + { + //This is not an ACK and we have a class and ID match + //So start diverting data into incomingUBX (usually packetCfg) + activePacketBuffer = SFE_UBLOX_PACKET_PACKETCFG; + incomingUBX->cls = packetBuf.cls; //Copy the class and ID into incomingUBX (usually packetCfg) + incomingUBX->id = packetBuf.id; + incomingUBX->counter = packetBuf.counter; //Copy over the .counter too + } + //This is not an ACK and we do not have a complete class and ID match + //So let's check for an HPPOSLLH message arriving when we were expecting PVT and vice versa + else if ((packetBuf.cls == requestedClass) && + (((packetBuf.id == UBX_NAV_PVT) && (requestedID == UBX_NAV_HPPOSLLH || requestedID == UBX_NAV_DOP)) || + ((packetBuf.id == UBX_NAV_HPPOSLLH) && (requestedID == UBX_NAV_PVT || requestedID == UBX_NAV_DOP)) || + ((packetBuf.id == UBX_NAV_DOP) && (requestedID == UBX_NAV_PVT || requestedID == UBX_NAV_HPPOSLLH)))) + { + //This is not the message we were expecting but we start diverting data into incomingUBX (usually packetCfg) and process it anyway + activePacketBuffer = SFE_UBLOX_PACKET_PACKETCFG; + incomingUBX->cls = packetBuf.cls; //Copy the class and ID into incomingUBX (usually packetCfg) + incomingUBX->id = packetBuf.id; + incomingUBX->counter = packetBuf.counter; //Copy over the .counter too + if (_printDebug == true) + { + _debugSerial->print(F("process: auto NAV PVT/HPPOSLLH/DOP collision: Requested ID: 0x")); + _debugSerial->print(requestedID, HEX); + _debugSerial->print(F(" Message ID: 0x")); + _debugSerial->println(packetBuf.id, HEX); + } + } + else if ((packetBuf.cls == requestedClass) && + (((packetBuf.id == UBX_HNR_ATT) && (requestedID == UBX_HNR_INS || requestedID == UBX_HNR_PVT)) || + ((packetBuf.id == UBX_HNR_INS) && (requestedID == UBX_HNR_ATT || requestedID == UBX_HNR_PVT)) || + ((packetBuf.id == UBX_HNR_PVT) && (requestedID == UBX_HNR_ATT || requestedID == UBX_HNR_INS)))) + { + //This is not the message we were expecting but we start diverting data into incomingUBX (usually packetCfg) and process it anyway + activePacketBuffer = SFE_UBLOX_PACKET_PACKETCFG; + incomingUBX->cls = packetBuf.cls; //Copy the class and ID into incomingUBX (usually packetCfg) + incomingUBX->id = packetBuf.id; + incomingUBX->counter = packetBuf.counter; //Copy over the .counter too + if (_printDebug == true) + { + _debugSerial->print(F("process: auto HNR ATT/INS/PVT collision: Requested ID: 0x")); + _debugSerial->print(requestedID, HEX); + _debugSerial->print(F(" Message ID: 0x")); + _debugSerial->println(packetBuf.id, HEX); + } + } + else + { + //This is not an ACK and we do not have a class and ID match + //so we should keep diverting data into packetBuf and ignore the payload + ignoreThisPayload = true; + } + } + else + { + // This is an ACK so it is to early to do anything with it + // We need to wait until we have received the length and data bytes + // So we should keep diverting data into packetBuf + } + } + else if (ubxFrameCounter == 4) //Length LSB + { + //We should save the length in packetBuf even if activePacketBuffer == SFE_UBLOX_PACKET_PACKETCFG + packetBuf.len = incoming; // (Duplication) + } + else if (ubxFrameCounter == 5) //Length MSB + { + //We should save the length in packetBuf even if activePacketBuffer == SFE_UBLOX_PACKET_PACKETCFG + packetBuf.len |= incoming << 8; // (Duplication) + } + else if (ubxFrameCounter == 6) //This should be the first byte of the payload unless .len is zero + { + if (packetBuf.len == 0) // Check if length is zero (hopefully this is impossible!) + { + if (_printDebug == true) + { + _debugSerial->print(F("process: ZERO LENGTH packet received: Class: 0x")); + _debugSerial->print(packetBuf.cls, HEX); + _debugSerial->print(F(" ID: 0x")); + _debugSerial->println(packetBuf.id, HEX); + } + //If length is zero (!) this will be the first byte of the checksum so record it + packetBuf.checksumA = incoming; + } + else + { + //The length is not zero so record this byte in the payload + packetBuf.payload[0] = incoming; + } + } + else if (ubxFrameCounter == 7) //This should be the second byte of the payload unless .len is zero or one + { + if (packetBuf.len == 0) // Check if length is zero (hopefully this is impossible!) + { + //If length is zero (!) this will be the second byte of the checksum so record it + packetBuf.checksumB = incoming; + } + else if (packetBuf.len == 1) // Check if length is one + { + //The length is one so this is the first byte of the checksum + packetBuf.checksumA = incoming; + } + else // Length is >= 2 so this must be a payload byte + { + packetBuf.payload[1] = incoming; + } + // Now that we have received two payload bytes, we can check for a matching ACK/NACK + if ((activePacketBuffer == SFE_UBLOX_PACKET_PACKETBUF) // If we are not already processing a data packet + && (packetBuf.cls == UBX_CLASS_ACK) // and if this is an ACK/NACK + && (packetBuf.payload[0] == requestedClass) // and if the class matches + && (packetBuf.payload[1] == requestedID)) // and if the ID matches + { + if (packetBuf.len == 2) // Check if .len is 2 + { + // Then this is a matching ACK so copy it into packetAck + activePacketBuffer = SFE_UBLOX_PACKET_PACKETACK; + packetAck.cls = packetBuf.cls; + packetAck.id = packetBuf.id; + packetAck.len = packetBuf.len; + packetAck.counter = packetBuf.counter; + packetAck.payload[0] = packetBuf.payload[0]; + packetAck.payload[1] = packetBuf.payload[1]; + } + else // Length is not 2 (hopefully this is impossible!) + { + if (_printDebug == true) + { + _debugSerial->print(F("process: ACK received with .len != 2: Class: 0x")); + _debugSerial->print(packetBuf.payload[0], HEX); + _debugSerial->print(F(" ID: 0x")); + _debugSerial->print(packetBuf.payload[1], HEX); + _debugSerial->print(F(" len: ")); + _debugSerial->println(packetBuf.len); + } + } + } + } + + //Divert incoming into the correct buffer + if (activePacketBuffer == SFE_UBLOX_PACKET_PACKETACK) + processUBX(incoming, &packetAck, requestedClass, requestedID); + else if (activePacketBuffer == SFE_UBLOX_PACKET_PACKETCFG) + processUBX(incoming, incomingUBX, requestedClass, requestedID); + else // if (activePacketBuffer == SFE_UBLOX_PACKET_PACKETBUF) + processUBX(incoming, &packetBuf, requestedClass, requestedID); + + //Finally, increment the frame counter + ubxFrameCounter++; + } + else if (currentSentence == NMEA) + { + processNMEA(incoming); //Process each NMEA character + } + else if (currentSentence == RTCM) + { + processRTCMframe(incoming); //Deal with RTCM bytes + } +} + +//This is the default or generic NMEA processor. We're only going to pipe the data to serial port so we can see it. +//User could overwrite this function to pipe characters to nmea.process(c) of tinyGPS or MicroNMEA +//Or user could pipe each character to a buffer, radio, etc. +void SFE_UBLOX_GPS::processNMEA(char incoming) +{ + //If user has assigned an output port then pipe the characters there + if (_nmeaOutputPort != NULL) + _nmeaOutputPort->write(incoming); //Echo this byte to the serial port +} + +//We need to be able to identify an RTCM packet and then the length +//so that we know when the RTCM message is completely received and we then start +//listening for other sentences (like NMEA or UBX) +//RTCM packet structure is very odd. I never found RTCM STANDARD 10403.2 but +//http://d1.amobbs.com/bbs_upload782111/files_39/ourdev_635123CK0HJT.pdf is good +//https://dspace.cvut.cz/bitstream/handle/10467/65205/F3-BP-2016-Shkalikava-Anastasiya-Prenos%20polohove%20informace%20prostrednictvim%20datove%20site.pdf?sequence=-1 +//Lead me to: https://forum.u-blox.com/index.php/4348/how-to-read-rtcm-messages-from-neo-m8p +//RTCM 3.2 bytes look like this: +//Byte 0: Always 0xD3 +//Byte 1: 6-bits of zero +//Byte 2: 10-bits of length of this packet including the first two-ish header bytes, + 6. +//byte 3 + 4 bits: Msg type 12 bits +//Example: D3 00 7C 43 F0 ... / 0x7C = 124+6 = 130 bytes in this packet, 0x43F = Msg type 1087 +void SFE_UBLOX_GPS::processRTCMframe(uint8_t incoming) +{ + if (rtcmFrameCounter == 1) + { + rtcmLen = (incoming & 0x03) << 8; //Get the last two bits of this byte. Bits 8&9 of 10-bit length + } + else if (rtcmFrameCounter == 2) + { + rtcmLen |= incoming; //Bits 0-7 of packet length + rtcmLen += 6; //There are 6 additional bytes of what we presume is header, msgType, CRC, and stuff + } + /*else if (rtcmFrameCounter == 3) + { + rtcmMsgType = incoming << 4; //Message Type, MS 4 bits + } + else if (rtcmFrameCounter == 4) + { + rtcmMsgType |= (incoming >> 4); //Message Type, bits 0-7 + }*/ + + rtcmFrameCounter++; + + processRTCM(incoming); //Here is where we expose this byte to the user + + if (rtcmFrameCounter == rtcmLen) + { + //We're done! + currentSentence = NONE; //Reset and start looking for next sentence type + } +} + +//This function is called for each byte of an RTCM frame +//Ths user can overwrite this function and process the RTCM frame as they please +//Bytes can be piped to Serial or other interface. The consumer could be a radio or the internet (Ntrip broadcaster) +void SFE_UBLOX_GPS::processRTCM(uint8_t incoming) +{ + //Radio.sendReliable((String)incoming); //An example of passing this byte to a radio + + //_debugSerial->write(incoming); //An example of passing this byte out the serial port + + //Debug printing + // _debugSerial->print(F(" ")); + // if(incoming < 0x10) _debugSerial->print(F("0")); + // if(incoming < 0x10) _debugSerial->print(F("0")); + // _debugSerial->print(incoming, HEX); + // if(rtcmFrameCounter % 16 == 0) _debugSerial->println(); +} + +//Given a character, file it away into the uxb packet structure +//Set valid to VALID or NOT_VALID once sentence is completely received and passes or fails CRC +//The payload portion of the packet can be 100s of bytes but the max array +//size is MAX_PAYLOAD_SIZE bytes. startingSpot can be set so we only record +//a subset of bytes within a larger packet. +void SFE_UBLOX_GPS::processUBX(uint8_t incoming, ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID) +{ + size_t max_payload_size = (activePacketBuffer == SFE_UBLOX_PACKET_PACKETCFG) ? MAX_PAYLOAD_SIZE : 2; + bool overrun = false; + + //Add all incoming bytes to the rolling checksum + //Stop at len+4 as this is the checksum bytes to that should not be added to the rolling checksum + if (incomingUBX->counter < incomingUBX->len + 4) + addToChecksum(incoming); + + if (incomingUBX->counter == 0) + { + incomingUBX->cls = incoming; + } + else if (incomingUBX->counter == 1) + { + incomingUBX->id = incoming; + } + else if (incomingUBX->counter == 2) //Len LSB + { + incomingUBX->len = incoming; + } + else if (incomingUBX->counter == 3) //Len MSB + { + incomingUBX->len |= incoming << 8; + } + else if (incomingUBX->counter == incomingUBX->len + 4) //ChecksumA + { + incomingUBX->checksumA = incoming; + } + else if (incomingUBX->counter == incomingUBX->len + 5) //ChecksumB + { + incomingUBX->checksumB = incoming; + + currentSentence = NONE; //We're done! Reset the sentence to being looking for a new start char + + //Validate this sentence + if ((incomingUBX->checksumA == rollingChecksumA) && (incomingUBX->checksumB == rollingChecksumB)) + { + incomingUBX->valid = SFE_UBLOX_PACKET_VALIDITY_VALID; // Flag the packet as valid + + // Let's check if the class and ID match the requestedClass and requestedID + // Remember - this could be a data packet or an ACK packet + if ((incomingUBX->cls == requestedClass) && (incomingUBX->id == requestedID)) + { + incomingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_VALID; // If we have a match, set the classAndIDmatch flag to valid + } + + // If this is an ACK then let's check if the class and ID match the requestedClass and requestedID + else if ((incomingUBX->cls == UBX_CLASS_ACK) && (incomingUBX->id == UBX_ACK_ACK) && (incomingUBX->payload[0] == requestedClass) && (incomingUBX->payload[1] == requestedID)) + { + incomingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_VALID; // If we have a match, set the classAndIDmatch flag to valid + } + + // If this is a NACK then let's check if the class and ID match the requestedClass and requestedID + else if ((incomingUBX->cls == UBX_CLASS_ACK) && (incomingUBX->id == UBX_ACK_NACK) && (incomingUBX->payload[0] == requestedClass) && (incomingUBX->payload[1] == requestedID)) + { + incomingUBX->classAndIDmatch = SFE_UBLOX_PACKET_NOTACKNOWLEDGED; // If we have a match, set the classAndIDmatch flag to NOTACKNOWLEDGED + if (_printDebug == true) + { + _debugSerial->print(F("processUBX: NACK received: Requested Class: 0x")); + _debugSerial->print(incomingUBX->payload[0], HEX); + _debugSerial->print(F(" Requested ID: 0x")); + _debugSerial->println(incomingUBX->payload[1], HEX); + } + } + + //This is not an ACK and we do not have a complete class and ID match + //So let's check for an HPPOSLLH message arriving when we were expecting PVT and vice versa + else if ((incomingUBX->cls == requestedClass) && + (((incomingUBX->id == UBX_NAV_PVT) && (requestedID == UBX_NAV_HPPOSLLH || requestedID == UBX_NAV_DOP)) || + ((incomingUBX->id == UBX_NAV_HPPOSLLH) && (requestedID == UBX_NAV_PVT || requestedID == UBX_NAV_DOP)) || + ((incomingUBX->id == UBX_NAV_DOP) && (requestedID == UBX_NAV_PVT || requestedID == UBX_NAV_HPPOSLLH)))) + { + // This isn't the message we are looking for... + // Let's say so and leave incomingUBX->classAndIDmatch _unchanged_ + if (_printDebug == true) + { + _debugSerial->print(F("processUBX: auto NAV PVT/HPPOSLLH/DOP collision: Requested ID: 0x")); + _debugSerial->print(requestedID, HEX); + _debugSerial->print(F(" Message ID: 0x")); + _debugSerial->println(incomingUBX->id, HEX); + } + } + // Let's do the same for the HNR messages + else if ((incomingUBX->cls == requestedClass) && + (((incomingUBX->id == UBX_HNR_ATT) && (requestedID == UBX_HNR_INS || requestedID == UBX_HNR_PVT)) || + ((incomingUBX->id == UBX_HNR_INS) && (requestedID == UBX_HNR_ATT || requestedID == UBX_HNR_PVT)) || + ((incomingUBX->id == UBX_HNR_PVT) && (requestedID == UBX_HNR_ATT || requestedID == UBX_HNR_INS)))) + { + // This isn't the message we are looking for... + // Let's say so and leave incomingUBX->classAndIDmatch _unchanged_ + if (_printDebug == true) + { + _debugSerial->print(F("processUBX: auto HNR ATT/INS/PVT collision: Requested ID: 0x")); + _debugSerial->print(requestedID, HEX); + _debugSerial->print(F(" Message ID: 0x")); + _debugSerial->println(incomingUBX->id, HEX); + } + } + + if (_printDebug == true) + { + _debugSerial->print(F("Incoming: Size: ")); + _debugSerial->print(incomingUBX->len); + _debugSerial->print(F(" Received: ")); + printPacket(incomingUBX); + + if (incomingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID) + { + _debugSerial->println(F("packetCfg now valid")); + } + if (packetAck.valid == SFE_UBLOX_PACKET_VALIDITY_VALID) + { + _debugSerial->println(F("packetAck now valid")); + } + if (incomingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) + { + _debugSerial->println(F("packetCfg classAndIDmatch")); + } + if (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) + { + _debugSerial->println(F("packetAck classAndIDmatch")); + } + } + + //We've got a valid packet, now do something with it but only if ignoreThisPayload is false + if (ignoreThisPayload == false) + { + processUBXpacket(incomingUBX); + } + } + else // Checksum failure + { + incomingUBX->valid = SFE_UBLOX_PACKET_VALIDITY_NOT_VALID; + + // Let's check if the class and ID match the requestedClass and requestedID. + // This is potentially risky as we are saying that we saw the requested Class and ID + // but that the packet checksum failed. Potentially it could be the class or ID bytes + // that caused the checksum error! + if ((incomingUBX->cls == requestedClass) && (incomingUBX->id == requestedID)) + { + incomingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_VALID; // If we have a match, set the classAndIDmatch flag to not valid + } + // If this is an ACK then let's check if the class and ID match the requestedClass and requestedID + else if ((incomingUBX->cls == UBX_CLASS_ACK) && (incomingUBX->payload[0] == requestedClass) && (incomingUBX->payload[1] == requestedID)) + { + incomingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_VALID; // If we have a match, set the classAndIDmatch flag to not valid + } + + if ((_printDebug == true) || (_printLimitedDebug == true)) // Print this if doing limited debugging + { + //Drive an external pin to allow for easier logic analyzation + if (checksumFailurePin >= 0) + { + digitalWrite((uint8_t)checksumFailurePin, LOW); + delay(10); + digitalWrite((uint8_t)checksumFailurePin, HIGH); + } + + _debugSerial->print(F("Checksum failed:")); + _debugSerial->print(F(" checksumA: ")); + _debugSerial->print(incomingUBX->checksumA); + _debugSerial->print(F(" checksumB: ")); + _debugSerial->print(incomingUBX->checksumB); + + _debugSerial->print(F(" rollingChecksumA: ")); + _debugSerial->print(rollingChecksumA); + _debugSerial->print(F(" rollingChecksumB: ")); + _debugSerial->print(rollingChecksumB); + _debugSerial->println(); + + _debugSerial->print(F("Failed : ")); + _debugSerial->print(F("Size: ")); + _debugSerial->print(incomingUBX->len); + _debugSerial->print(F(" Received: ")); + printPacket(incomingUBX); + } + } + } + else //Load this byte into the payload array + { + //If a UBX_NAV_PVT packet comes in asynchronously, we need to fudge the startingSpot + uint16_t startingSpot = incomingUBX->startingSpot; + if (incomingUBX->cls == UBX_CLASS_NAV && incomingUBX->id == UBX_NAV_PVT) + startingSpot = 0; + // Check if this is payload data which should be ignored + if (ignoreThisPayload == false) + { + //Begin recording if counter goes past startingSpot + if ((incomingUBX->counter - 4) >= startingSpot) + { + //Check to see if we have room for this byte + if (((incomingUBX->counter - 4) - startingSpot) < max_payload_size) //If counter = 208, starting spot = 200, we're good to record. + { + incomingUBX->payload[incomingUBX->counter - 4 - startingSpot] = incoming; //Store this byte into payload array + } + else + { + overrun = true; + } + } + } + } + + //Increment the counter + incomingUBX->counter++; + + if (overrun || (incomingUBX->counter == MAX_PAYLOAD_SIZE)) + { + //Something has gone very wrong + currentSentence = NONE; //Reset the sentence to being looking for a new start char + if ((_printDebug == true) || (_printLimitedDebug == true)) // Print this if doing limited debugging + { + if (overrun) + _debugSerial->println(F("processUBX: buffer overrun detected")); + else + _debugSerial->println(F("processUBX: counter hit MAX_PAYLOAD_SIZE")); + } + } +} + +//Once a packet has been received and validated, identify this packet's class/id and update internal flags +//Note: if the user requests a PVT or a HPPOSLLH message using a custom packet, the data extraction will +// not work as expected beacuse extractLong etc are hardwired to packetCfg payloadCfg. Ideally +// extractLong etc should be updated so they receive a pointer to the packet buffer. +void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg) +{ + switch (msg->cls) + { + case UBX_CLASS_NAV: + if (msg->id == UBX_NAV_PVT && msg->len == 92) + { + //Parse various byte fields into global vars + constexpr int startingSpot = 0; //fixed value used in processUBX + + timeOfWeek = extractLong(0); + gpsMillisecond = extractLong(0) % 1000; //Get last three digits of iTOW + gpsYear = extractInt(4); + gpsMonth = extractByte(6); + gpsDay = extractByte(7); + gpsHour = extractByte(8); + gpsMinute = extractByte(9); + gpsSecond = extractByte(10); + gpsDateValid = extractByte(11) & 0x01; + gpsTimeValid = (extractByte(11) & 0x02) >> 1; + gpsNanosecond = extractSignedLong(16); //Includes milliseconds + + fixType = extractByte(20 - startingSpot); + gnssFixOk = extractByte(21 - startingSpot) & 0x1; //Get the 1st bit + diffSoln = (extractByte(21 - startingSpot) >> 1) & 0x1; //Get the 2nd bit + carrierSolution = extractByte(21 - startingSpot) >> 6; //Get 6th&7th bits of this byte + headVehValid = (extractByte(21 - startingSpot) >> 5) & 0x1; // Get the 5th bit + SIV = extractByte(23 - startingSpot); + longitude = extractSignedLong(24 - startingSpot); + latitude = extractSignedLong(28 - startingSpot); + altitude = extractSignedLong(32 - startingSpot); + altitudeMSL = extractSignedLong(36 - startingSpot); + horizontalAccEst = extractLong(40 - startingSpot); + verticalAccEst = extractLong(44 - startingSpot); + nedNorthVel = extractSignedLong(48 - startingSpot); + nedEastVel = extractSignedLong(52 - startingSpot); + nedDownVel = extractSignedLong(56 - startingSpot); + groundSpeed = extractSignedLong(60 - startingSpot); + headingOfMotion = extractSignedLong(64 - startingSpot); + speedAccEst = extractLong(68 - startingSpot); + headingAccEst = extractLong(72 - startingSpot); + pDOP = extractInt(76 - startingSpot); + invalidLlh = extractByte(78 - startingSpot) & 0x1; + headVeh = extractSignedLong(84 - startingSpot); + magDec = extractSignedInt(88 - startingSpot); + magAcc = extractInt(90 - startingSpot); + + //Mark all datums as fresh (not read before) + moduleQueried.gpsiTOW = true; + moduleQueried.gpsYear = true; + moduleQueried.gpsMonth = true; + moduleQueried.gpsDay = true; + moduleQueried.gpsHour = true; + moduleQueried.gpsMinute = true; + moduleQueried.gpsSecond = true; + moduleQueried.gpsDateValid = true; + moduleQueried.gpsTimeValid = true; + moduleQueried.gpsNanosecond = true; + + moduleQueried.all = true; + moduleQueried.gnssFixOk = true; + moduleQueried.diffSoln = true; + moduleQueried.headVehValid = true; + moduleQueried.longitude = true; + moduleQueried.latitude = true; + moduleQueried.altitude = true; + moduleQueried.altitudeMSL = true; + moduleQueried.horizontalAccEst = true; + moduleQueried.verticalAccEst = true; + moduleQueried.nedNorthVel = true; + moduleQueried.nedEastVel = true; + moduleQueried.nedDownVel = true; + moduleQueried.SIV = true; + moduleQueried.fixType = true; + moduleQueried.carrierSolution = true; + moduleQueried.groundSpeed = true; + moduleQueried.headingOfMotion = true; + moduleQueried.speedAccEst = true; + moduleQueried.headingAccEst = true; + moduleQueried.pDOP = true; + moduleQueried.invalidLlh = true; + moduleQueried.headVeh = true; + moduleQueried.magDec = true; + moduleQueried.magAcc = true; + } + else if (msg->id == UBX_NAV_HPPOSLLH && msg->len == 36) + { + timeOfWeek = extractLong(4); + highResLongitude = extractSignedLong(8); + highResLatitude = extractSignedLong(12); + elipsoid = extractSignedLong(16); + meanSeaLevel = extractSignedLong(20); + highResLongitudeHp = extractSignedChar(24); + highResLatitudeHp = extractSignedChar(25); + elipsoidHp = extractSignedChar(26); + meanSeaLevelHp = extractSignedChar(27); + horizontalAccuracy = extractLong(28); + verticalAccuracy = extractLong(32); + + highResModuleQueried.all = true; + highResModuleQueried.highResLatitude = true; + highResModuleQueried.highResLatitudeHp = true; + highResModuleQueried.highResLongitude = true; + highResModuleQueried.highResLongitudeHp = true; + highResModuleQueried.elipsoid = true; + highResModuleQueried.elipsoidHp = true; + highResModuleQueried.meanSeaLevel = true; + highResModuleQueried.meanSeaLevelHp = true; + highResModuleQueried.geoidSeparation = true; + highResModuleQueried.horizontalAccuracy = true; + highResModuleQueried.verticalAccuracy = true; + moduleQueried.gpsiTOW = true; // this can arrive via HPPOS too. + +/* + if (_printDebug == true) + { + _debugSerial->print(F("Sec: ")); + _debugSerial->print(((float)extractLong(4)) / 1000.0f); + _debugSerial->print(F(" ")); + _debugSerial->print(F("LON: ")); + _debugSerial->print(((float)(int32_t)extractLong(8)) / 10000000.0f); + _debugSerial->print(F(" ")); + _debugSerial->print(F("LAT: ")); + _debugSerial->print(((float)(int32_t)extractLong(12)) / 10000000.0f); + _debugSerial->print(F(" ")); + _debugSerial->print(F("ELI M: ")); + _debugSerial->print(((float)(int32_t)extractLong(16)) / 1000.0f); + _debugSerial->print(F(" ")); + _debugSerial->print(F("MSL M: ")); + _debugSerial->print(((float)(int32_t)extractLong(20)) / 1000.0f); + _debugSerial->print(F(" ")); + _debugSerial->print(F("LON HP: ")); + _debugSerial->print(extractSignedChar(24)); + _debugSerial->print(F(" ")); + _debugSerial->print(F("LAT HP: ")); + _debugSerial->print(extractSignedChar(25)); + _debugSerial->print(F(" ")); + _debugSerial->print(F("ELI HP: ")); + _debugSerial->print(extractSignedChar(26)); + _debugSerial->print(F(" ")); + _debugSerial->print(F("MSL HP: ")); + _debugSerial->print(extractSignedChar(27)); + _debugSerial->print(F(" ")); + _debugSerial->print(F("HA 2D M: ")); + _debugSerial->print(((float)(int32_t)extractLong(28)) / 10000.0f); + _debugSerial->print(F(" ")); + _debugSerial->print(F("VERT M: ")); + _debugSerial->println(((float)(int32_t)extractLong(32)) / 10000.0f); + } +*/ + } + else if (msg->id == UBX_NAV_DOP && msg->len == 18) + { + geometricDOP = extractInt(4); + positionDOP = extractInt(6); + timeDOP = extractInt(8); + verticalDOP = extractInt(10); + horizontalDOP = extractInt(12); + northingDOP = extractInt(14); + eastingDOP = extractInt(16); + dopModuleQueried.all = true; + dopModuleQueried.geometricDOP = true; + dopModuleQueried.positionDOP = true; + dopModuleQueried.timeDOP = true; + dopModuleQueried.verticalDOP = true; + dopModuleQueried.horizontalDOP = true; + dopModuleQueried.northingDOP = true; + dopModuleQueried.eastingDOP = true; + } + break; + case UBX_CLASS_HNR: + if (msg->id == UBX_HNR_ATT && msg->len == 32) + { + //Parse various byte fields into global vars + hnrAtt.iTOW = extractLong(0); + hnrAtt.roll = extractSignedLong(8); + hnrAtt.pitch = extractSignedLong(12); + hnrAtt.heading = extractSignedLong(16); + hnrAtt.accRoll = extractLong(20); + hnrAtt.accPitch = extractLong(24); + hnrAtt.accHeading = extractLong(28); + + hnrAttQueried = true; + } + else if (msg->id == UBX_HNR_INS && msg->len == 36) + { + //Parse various byte fields into global vars + hnrVehDyn.iTOW = extractLong(8); + hnrVehDyn.xAngRate = extractSignedLong(12); + hnrVehDyn.yAngRate = extractSignedLong(16); + hnrVehDyn.zAngRate = extractSignedLong(20); + hnrVehDyn.xAccel = extractSignedLong(24); + hnrVehDyn.yAccel = extractSignedLong(28); + hnrVehDyn.zAccel = extractSignedLong(32); + + uint32_t bitfield0 = extractLong(0); + hnrVehDyn.xAngRateValid = (bitfield0 & 0x00000100) > 0; + hnrVehDyn.yAngRateValid = (bitfield0 & 0x00000200) > 0; + hnrVehDyn.zAngRateValid = (bitfield0 & 0x00000400) > 0; + hnrVehDyn.xAccelValid = (bitfield0 & 0x00000800) > 0; + hnrVehDyn.yAccelValid = (bitfield0 & 0x00001000) > 0; + hnrVehDyn.zAccelValid = (bitfield0 & 0x00002000) > 0; + + hnrDynQueried = true; + } + else if (msg->id == UBX_HNR_PVT && msg->len == 72) + { + //Parse various byte fields into global vars + hnrPVT.iTOW = extractLong(0); + hnrPVT.year = extractInt(4); + hnrPVT.month = extractByte(6); + hnrPVT.day = extractByte(7); + hnrPVT.hour = extractByte(8); + hnrPVT.min = extractByte(9); + hnrPVT.sec = extractByte(10); + hnrPVT.nano = extractSignedLong(12); + hnrPVT.gpsFix = extractByte(16); + hnrPVT.lon = extractSignedLong(20); + hnrPVT.lat = extractSignedLong(24); + hnrPVT.height = extractSignedLong(28); + hnrPVT.hMSL = extractSignedLong(32); + hnrPVT.gSpeed = extractSignedLong(36); + hnrPVT.speed = extractSignedLong(40); + hnrPVT.headMot = extractSignedLong(44); + hnrPVT.headVeh = extractSignedLong(48); + hnrPVT.hAcc = extractLong(52); + hnrPVT.vAcc = extractLong(56); + hnrPVT.sAcc = extractLong(60); + hnrPVT.headAcc = extractLong(64); + + uint8_t valid = extractByte(11); + hnrPVT.validDate = (valid & 0x01) > 0; + hnrPVT.validTime = (valid & 0x02) > 0; + hnrPVT.fullyResolved = (valid & 0x04) > 0; + + uint8_t flags = extractByte(17); + hnrPVT.gpsFixOK = (flags & 0x01) > 0; + hnrPVT.diffSoln = (flags & 0x02) > 0; + hnrPVT.WKNSET = (flags & 0x04) > 0; + hnrPVT.TOWSET = (flags & 0x08) > 0; + hnrPVT.headVehValid = (flags & 0x10) > 0; + + hnrPVTQueried = true; + } + } +} + +//Given a packet and payload, send everything including CRC bytes via I2C port +sfe_ublox_status_e SFE_UBLOX_GPS::sendCommand(ubxPacket *outgoingUBX, uint16_t maxWait) +{ + sfe_ublox_status_e retVal = SFE_UBLOX_STATUS_SUCCESS; + + calcChecksum(outgoingUBX); //Sets checksum A and B bytes of the packet + + if (_printDebug == true) + { + _debugSerial->print(F("\nSending: ")); + printPacket(outgoingUBX); + } + + if (commType == COMM_TYPE_I2C) + { + retVal = sendI2cCommand(outgoingUBX, maxWait); + if (retVal != SFE_UBLOX_STATUS_SUCCESS) + { + if (_printDebug == true) + { + _debugSerial->println(F("Send I2C Command failed")); + } + return retVal; + } + } + else if (commType == COMM_TYPE_SERIAL) + { + sendSerialCommand(outgoingUBX); + } + + if (maxWait > 0) + { + //Depending on what we just sent, either we need to look for an ACK or not + if (outgoingUBX->cls == UBX_CLASS_CFG) + { + if (_printDebug == true) + { + _debugSerial->println(F("sendCommand: Waiting for ACK response")); + } + retVal = waitForACKResponse(outgoingUBX, outgoingUBX->cls, outgoingUBX->id, maxWait); //Wait for Ack response + } + else + { + if (_printDebug == true) + { + _debugSerial->println(F("sendCommand: Waiting for No ACK response")); + } + retVal = waitForNoACKResponse(outgoingUBX, outgoingUBX->cls, outgoingUBX->id, maxWait); //Wait for Ack response + } + } + return retVal; +} + +//Returns false if sensor fails to respond to I2C traffic +sfe_ublox_status_e SFE_UBLOX_GPS::sendI2cCommand(ubxPacket *outgoingUBX, uint16_t maxWait) +{ + //Point at 0xFF data register + _i2cPort->beginTransmission((uint8_t)_gpsI2Caddress); //There is no register to write to, we just begin writing data bytes + _i2cPort->write(0xFF); + if (_i2cPort->endTransmission(false) != 0) //Don't release bus + return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK + + //Write header bytes + _i2cPort->beginTransmission((uint8_t)_gpsI2Caddress); //There is no register to write to, we just begin writing data bytes + _i2cPort->write(UBX_SYNCH_1); //μ - oh ublox, you're funny. I will call you micro-blox from now on. + _i2cPort->write(UBX_SYNCH_2); //b + _i2cPort->write(outgoingUBX->cls); + _i2cPort->write(outgoingUBX->id); + _i2cPort->write(outgoingUBX->len & 0xFF); //LSB + _i2cPort->write(outgoingUBX->len >> 8); //MSB + if (_i2cPort->endTransmission(false) != 0) //Do not release bus + return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK + + //Write payload. Limit the sends into 32 byte chunks + //This code based on ublox: https://forum.u-blox.com/index.php/20528/how-to-use-i2c-to-get-the-nmea-frames + uint16_t bytesToSend = outgoingUBX->len; + + //"The number of data bytes must be at least 2 to properly distinguish + //from the write access to set the address counter in random read accesses." + uint16_t startSpot = 0; + while (bytesToSend > 1) + { + uint8_t len = bytesToSend; + if (len > i2cTransactionSize) + len = i2cTransactionSize; + + _i2cPort->beginTransmission((uint8_t)_gpsI2Caddress); + //_i2cPort->write(outgoingUBX->payload, len); //Write a portion of the payload to the bus + + for (uint16_t x = 0; x < len; x++) + _i2cPort->write(outgoingUBX->payload[startSpot + x]); //Write a portion of the payload to the bus + + if (_i2cPort->endTransmission(false) != 0) //Don't release bus + return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK + + //*outgoingUBX->payload += len; //Move the pointer forward + startSpot += len; //Move the pointer forward + bytesToSend -= len; + } + + //Write checksum + _i2cPort->beginTransmission((uint8_t)_gpsI2Caddress); + if (bytesToSend == 1) + _i2cPort->write(outgoingUBX->payload, 1); + _i2cPort->write(outgoingUBX->checksumA); + _i2cPort->write(outgoingUBX->checksumB); + + //All done transmitting bytes. Release bus. + if (_i2cPort->endTransmission() != 0) + return (SFE_UBLOX_STATUS_I2C_COMM_FAILURE); //Sensor did not ACK + return (SFE_UBLOX_STATUS_SUCCESS); +} + +//Given a packet and payload, send everything including CRC bytesA via Serial port +void SFE_UBLOX_GPS::sendSerialCommand(ubxPacket *outgoingUBX) +{ + //Write header bytes + _serialPort->write(UBX_SYNCH_1); //μ - oh ublox, you're funny. I will call you micro-blox from now on. + _serialPort->write(UBX_SYNCH_2); //b + _serialPort->write(outgoingUBX->cls); + _serialPort->write(outgoingUBX->id); + _serialPort->write(outgoingUBX->len & 0xFF); //LSB + _serialPort->write(outgoingUBX->len >> 8); //MSB + + //Write payload. + for (int i = 0; i < outgoingUBX->len; i++) + { + _serialPort->write(outgoingUBX->payload[i]); + } + + //Write checksum + _serialPort->write(outgoingUBX->checksumA); + _serialPort->write(outgoingUBX->checksumB); +} + +//Returns true if I2C device ack's +boolean SFE_UBLOX_GPS::isConnected(uint16_t maxWait) +{ + if (commType == COMM_TYPE_I2C) + { + _i2cPort->beginTransmission((uint8_t)_gpsI2Caddress); + if (_i2cPort->endTransmission() != 0) + return false; //Sensor did not ack + } + + // Query navigation rate to see whether we get a meaningful response + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RATE; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + sfe_ublox_status_e result = sendCommand(&packetCfg, maxWait); // Poll the navigation rate + + // In this case, we don't acutally care what the navigation rate is, we're just polling it to indicate a connection. + // So we return true if result is DATA_RECEIVED or DATA_OVERWRITTEN (just in case the RATE was overwritten by an auto packet). + if ((result == SFE_UBLOX_STATUS_DATA_RECEIVED) || (result == SFE_UBLOX_STATUS_DATA_OVERWRITTEN)) + return (true); + else + return (false); +} + +//Given a message, calc and store the two byte "8-Bit Fletcher" checksum over the entirety of the message +//This is called before we send a command message +void SFE_UBLOX_GPS::calcChecksum(ubxPacket *msg) +{ + msg->checksumA = 0; + msg->checksumB = 0; + + msg->checksumA += msg->cls; + msg->checksumB += msg->checksumA; + + msg->checksumA += msg->id; + msg->checksumB += msg->checksumA; + + msg->checksumA += (msg->len & 0xFF); + msg->checksumB += msg->checksumA; + + msg->checksumA += (msg->len >> 8); + msg->checksumB += msg->checksumA; + + for (uint16_t i = 0; i < msg->len; i++) + { + msg->checksumA += msg->payload[i]; + msg->checksumB += msg->checksumA; + } +} + +//Given a message and a byte, add to rolling "8-Bit Fletcher" checksum +//This is used when receiving messages from module +void SFE_UBLOX_GPS::addToChecksum(uint8_t incoming) +{ + rollingChecksumA += incoming; + rollingChecksumB += rollingChecksumA; +} + +//Pretty prints the current ubxPacket +void SFE_UBLOX_GPS::printPacket(ubxPacket *packet) +{ + if (_printDebug == true) + { + _debugSerial->print(F("CLS:")); + if (packet->cls == UBX_CLASS_NAV) //1 + _debugSerial->print(F("NAV")); + else if (packet->cls == UBX_CLASS_ACK) //5 + _debugSerial->print(F("ACK")); + else if (packet->cls == UBX_CLASS_CFG) //6 + _debugSerial->print(F("CFG")); + else if (packet->cls == UBX_CLASS_MON) //0x0A + _debugSerial->print(F("MON")); + else + { + _debugSerial->print(F("0x")); + _debugSerial->print(packet->cls, HEX); + } + + _debugSerial->print(F(" ID:")); + if (packet->cls == UBX_CLASS_NAV && packet->id == UBX_NAV_PVT) + _debugSerial->print(F("PVT")); + else if (packet->cls == UBX_CLASS_CFG && packet->id == UBX_CFG_RATE) + _debugSerial->print(F("RATE")); + else if (packet->cls == UBX_CLASS_CFG && packet->id == UBX_CFG_CFG) + _debugSerial->print(F("SAVE")); + else + { + _debugSerial->print(F("0x")); + _debugSerial->print(packet->id, HEX); + } + + _debugSerial->print(F(" Len: 0x")); + _debugSerial->print(packet->len, HEX); + + // Only print the payload is ignoreThisPayload is false otherwise + // we could be printing gibberish from beyond the end of packetBuf + if (ignoreThisPayload == false) + { + _debugSerial->print(F(" Payload:")); + + for (int x = 0; x < packet->len; x++) + { + _debugSerial->print(F(" ")); + _debugSerial->print(packet->payload[x], HEX); + } + } + else + { + _debugSerial->print(F(" Payload: IGNORED")); + } + _debugSerial->println(); + } +} + +//=-=-=-=-=-=-=-= Specific commands =-=-=-=-=-=-=-==-=-=-=-=-=-=-= +//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +//When messages from the class CFG are sent to the receiver, the receiver will send an "acknowledge"(UBX - ACK - ACK) or a +//"not acknowledge"(UBX-ACK-NAK) message back to the sender, depending on whether or not the message was processed correctly. +//Some messages from other classes also use the same acknowledgement mechanism. + +//When we poll or get a setting, we will receive _both_ a config packet and an ACK +//If the poll or get request is not valid, we will receive _only_ a NACK + +//If we are trying to get or poll a setting, then packetCfg.len will be 0 or 1 when the packetCfg is _sent_. +//If we poll the setting for a particular port using UBX-CFG-PRT then .len will be 1 initially +//For all other gets or polls, .len will be 0 initially +//(It would be possible for .len to be 2 _if_ we were using UBX-CFG-MSG to poll the settings for a particular message - but we don't use that (currently)) + +//If the get or poll _fails_, i.e. is NACK'd, then packetCfg.len could still be 0 or 1 after the NACK is received +//But if the get or poll is ACK'd, then packetCfg.len will have been updated by the incoming data and will always be at least 2 + +//If we are going to set the value for a setting, then packetCfg.len will be at least 3 when the packetCfg is _sent_. +//(UBX-CFG-MSG appears to have the shortest set length of 3 bytes) + +//We need to think carefully about how interleaved PVT packets affect things. +//It is entirely possible that our packetCfg and packetAck were received successfully +//but while we are still in the "if (checkUblox() == true)" loop a PVT packet is processed +//or _starts_ to arrive (remember that Serial data can arrive very slowly). + +//Returns SFE_UBLOX_STATUS_DATA_RECEIVED if we got an ACK and a valid packetCfg (module is responding with register content) +//Returns SFE_UBLOX_STATUS_DATA_SENT if we got an ACK and no packetCfg (no valid packetCfg needed, module absorbs new register data) +//Returns SFE_UBLOX_STATUS_FAIL if something very bad happens (e.g. a double checksum failure) +//Returns SFE_UBLOX_STATUS_COMMAND_NACK if the packet was not-acknowledged (NACK) +//Returns SFE_UBLOX_STATUS_CRC_FAIL if we had a checksum failure +//Returns SFE_UBLOX_STATUS_TIMEOUT if we timed out +//Returns SFE_UBLOX_STATUS_DATA_OVERWRITTEN if we got an ACK and a valid packetCfg but that the packetCfg has been +// or is currently being overwritten (remember that Serial data can arrive very slowly) +sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(ubxPacket *outgoingUBX, uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime) +{ + outgoingUBX->valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; //This will go VALID (or NOT_VALID) when we receive a response to the packet we sent + packetAck.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + packetBuf.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + outgoingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; // This will go VALID (or NOT_VALID) when we receive a packet that matches the requested class and ID + packetAck.classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + packetBuf.classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + + unsigned long startTime = millis(); + while (millis() - startTime < maxTime) + { + if (checkUbloxInternal(outgoingUBX, requestedClass, requestedID) == true) //See if new data is available. Process bytes as they come in. + { + // If both the outgoingUBX->classAndIDmatch and packetAck.classAndIDmatch are VALID + // and outgoingUBX->valid is _still_ VALID and the class and ID _still_ match + // then we can be confident that the data in outgoingUBX is valid + if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->cls == requestedClass) && (outgoingUBX->id == requestedID)) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: valid data and valid ACK received after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_DATA_RECEIVED); //We received valid data and a correct ACK! + } + + // We can be confident that the data packet (if we are going to get one) will always arrive + // before the matching ACK. So if we sent a config packet which only produces an ACK + // then outgoingUBX->classAndIDmatch will be NOT_DEFINED and the packetAck.classAndIDmatch will VALID. + // We should not check outgoingUBX->valid, outgoingUBX->cls or outgoingUBX->id + // as these may have been changed by a PVT packet. + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID)) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: no data and valid ACK after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_DATA_SENT); //We got an ACK but no data... + } + + // If both the outgoingUBX->classAndIDmatch and packetAck.classAndIDmatch are VALID + // but the outgoingUBX->cls or ID no longer match then we can be confident that we had + // valid data but it has been or is currently being overwritten by another packet (e.g. PVT). + // If (e.g.) a PVT packet is _being_ received: outgoingUBX->valid will be NOT_DEFINED + // If (e.g.) a PVT packet _has been_ received: outgoingUBX->valid will be VALID (or just possibly NOT_VALID) + // So we cannot use outgoingUBX->valid as part of this check. + // Note: the addition of packetBuf should make this check redundant! + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && ((outgoingUBX->cls != requestedClass) || (outgoingUBX->id != requestedID))) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: data being OVERWRITTEN after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_DATA_OVERWRITTEN); // Data was valid but has been or is being overwritten + } + + // If packetAck.classAndIDmatch is VALID but both outgoingUBX->valid and outgoingUBX->classAndIDmatch + // are NOT_VALID then we can be confident we have had a checksum failure on the data packet + else if ((packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID)) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: CRC failed after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_CRC_FAIL); //Checksum fail + } + + // If our packet was not-acknowledged (NACK) we do not receive a data packet - we only get the NACK. + // So you would expect outgoingUBX->valid and outgoingUBX->classAndIDmatch to still be NOT_DEFINED + // But if a full PVT packet arrives afterwards outgoingUBX->valid could be VALID (or just possibly NOT_VALID) + // but outgoingUBX->cls and outgoingUBX->id would not match... + // So I think this is telling us we need a special state for packetAck.classAndIDmatch to tell us + // the packet was definitely NACK'd otherwise we are possibly just guessing... + // Note: the addition of packetBuf changes the logic of this, but we'll leave the code as is for now. + else if (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_NOTACKNOWLEDGED) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: data was NOTACKNOWLEDGED (NACK) after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_COMMAND_NACK); //We received a NACK! + } + + // If the outgoingUBX->classAndIDmatch is VALID but the packetAck.classAndIDmatch is NOT_VALID + // then the ack probably had a checksum error. We will take a gamble and return DATA_RECEIVED. + // If we were playing safe, we should return FAIL instead + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->cls == requestedClass) && (outgoingUBX->id == requestedID)) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: VALID data and INVALID ACK received after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_DATA_RECEIVED); //We received valid data and an invalid ACK! + } + + // If the outgoingUBX->classAndIDmatch is NOT_VALID and the packetAck.classAndIDmatch is NOT_VALID + // then we return a FAIL. This must be a double checksum failure? + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID)) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: INVALID data and INVALID ACK received after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_FAIL); //We received invalid data and an invalid ACK! + } + + // If the outgoingUBX->classAndIDmatch is VALID and the packetAck.classAndIDmatch is NOT_DEFINED + // then the ACK has not yet been received and we should keep waiting for it + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED)) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: valid data after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec. Waiting for ACK.")); + } + } + + } //checkUbloxInternal == true + + delayMicroseconds(500); + } //while (millis() - startTime < maxTime) + + // We have timed out... + // If the outgoingUBX->classAndIDmatch is VALID then we can take a gamble and return DATA_RECEIVED + // even though we did not get an ACK + if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (packetAck.classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->cls == requestedClass) && (outgoingUBX->id == requestedID)) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: TIMEOUT with valid data after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec. ")); + } + return (SFE_UBLOX_STATUS_DATA_RECEIVED); //We received valid data... But no ACK! + } + + if (_printDebug == true) + { + _debugSerial->print(F("waitForACKResponse: TIMEOUT after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec.")); + } + + return (SFE_UBLOX_STATUS_TIMEOUT); +} + +//For non-CFG queries no ACK is sent so we use this function +//Returns SFE_UBLOX_STATUS_DATA_RECEIVED if we got a config packet full of response data that has CLS/ID match to our query packet +//Returns SFE_UBLOX_STATUS_CRC_FAIL if we got a corrupt config packet that has CLS/ID match to our query packet +//Returns SFE_UBLOX_STATUS_TIMEOUT if we timed out +//Returns SFE_UBLOX_STATUS_DATA_OVERWRITTEN if we got an a valid packetCfg but that the packetCfg has been +// or is currently being overwritten (remember that Serial data can arrive very slowly) +sfe_ublox_status_e SFE_UBLOX_GPS::waitForNoACKResponse(ubxPacket *outgoingUBX, uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime) +{ + outgoingUBX->valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; //This will go VALID (or NOT_VALID) when we receive a response to the packet we sent + packetAck.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + packetBuf.valid = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + outgoingUBX->classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; // This will go VALID (or NOT_VALID) when we receive a packet that matches the requested class and ID + packetAck.classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + packetBuf.classAndIDmatch = SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED; + + unsigned long startTime = millis(); + while (millis() - startTime < maxTime) + { + if (checkUbloxInternal(outgoingUBX, requestedClass, requestedID) == true) //See if new data is available. Process bytes as they come in. + { + + // If outgoingUBX->classAndIDmatch is VALID + // and outgoingUBX->valid is _still_ VALID and the class and ID _still_ match + // then we can be confident that the data in outgoingUBX is valid + if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID) && (outgoingUBX->cls == requestedClass) && (outgoingUBX->id == requestedID)) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForNoACKResponse: valid data with CLS/ID match after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_DATA_RECEIVED); //We received valid data! + } + + // If the outgoingUBX->classAndIDmatch is VALID + // but the outgoingUBX->cls or ID no longer match then we can be confident that we had + // valid data but it has been or is currently being overwritten by another packet (e.g. PVT). + // If (e.g.) a PVT packet is _being_ received: outgoingUBX->valid will be NOT_DEFINED + // If (e.g.) a PVT packet _has been_ received: outgoingUBX->valid will be VALID (or just possibly NOT_VALID) + // So we cannot use outgoingUBX->valid as part of this check. + // Note: the addition of packetBuf should make this check redundant! + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_VALID) && ((outgoingUBX->cls != requestedClass) || (outgoingUBX->id != requestedID))) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForNoACKResponse: data being OVERWRITTEN after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_DATA_OVERWRITTEN); // Data was valid but has been or is being overwritten + } + + // If outgoingUBX->classAndIDmatch is NOT_DEFINED + // and outgoingUBX->valid is VALID then this must be (e.g.) a PVT packet + else if ((outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED) && (outgoingUBX->valid == SFE_UBLOX_PACKET_VALIDITY_VALID)) + { + // if (_printDebug == true) + // { + // _debugSerial->print(F("waitForNoACKResponse: valid but UNWANTED data after ")); + // _debugSerial->print(millis() - startTime); + // _debugSerial->print(F(" msec. Class: ")); + // _debugSerial->print(outgoingUBX->cls); + // _debugSerial->print(F(" ID: ")); + // _debugSerial->print(outgoingUBX->id); + // } + } + + // If the outgoingUBX->classAndIDmatch is NOT_VALID then we return CRC failure + else if (outgoingUBX->classAndIDmatch == SFE_UBLOX_PACKET_VALIDITY_NOT_VALID) + { + if (_printDebug == true) + { + _debugSerial->print(F("waitForNoACKResponse: CLS/ID match but failed CRC after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec")); + } + return (SFE_UBLOX_STATUS_CRC_FAIL); //We received invalid data + } + } + + delayMicroseconds(500); + } + + if (_printDebug == true) + { + _debugSerial->print(F("waitForNoACKResponse: TIMEOUT after ")); + _debugSerial->print(millis() - startTime); + _debugSerial->println(F(" msec. No packet received.")); + } + + return (SFE_UBLOX_STATUS_TIMEOUT); +} + +//Save current configuration to flash and BBR (battery backed RAM) +//This still works but it is the old way of configuring ublox modules. See getVal and setVal for the new methods +boolean SFE_UBLOX_GPS::saveConfiguration(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_CFG; + packetCfg.len = 12; + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint8_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + packetCfg.payload[4] = 0xFF; //Set any bit in the saveMask field to save current config to Flash and BBR + packetCfg.payload[5] = 0xFF; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Save the selected configuration sub-sections to flash and BBR (battery backed RAM) +//This still works but it is the old way of configuring ublox modules. See getVal and setVal for the new methods +boolean SFE_UBLOX_GPS::saveConfigSelective(uint32_t configMask, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_CFG; + packetCfg.len = 12; + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint8_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + packetCfg.payload[4] = configMask & 0xFF; //Set the appropriate bits in the saveMask field to save current config to Flash and BBR + packetCfg.payload[5] = (configMask >> 8) & 0xFF; + packetCfg.payload[6] = (configMask >> 16) & 0xFF; + packetCfg.payload[7] = (configMask >> 24) & 0xFF; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Reset module to factory defaults +//This still works but it is the old way of configuring ublox modules. See getVal and setVal for the new methods +boolean SFE_UBLOX_GPS::factoryDefault(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_CFG; + packetCfg.len = 12; + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint8_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + packetCfg.payload[0] = 0xFF; //Set any bit in the clearMask field to clear saved config + packetCfg.payload[1] = 0xFF; + packetCfg.payload[8] = 0xFF; //Set any bit in the loadMask field to discard current config and rebuild from lower non-volatile memory layers + packetCfg.payload[9] = 0xFF; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Given a key, load the payload with data that can then be extracted to 8, 16, or 32 bits +//This function takes a full 32-bit key +//Default layer is RAM +//Configuration of modern u-blox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +sfe_ublox_status_e SFE_UBLOX_GPS::getVal(uint32_t key, uint8_t layer, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALGET; + packetCfg.len = 4 + 4 * 1; //While multiple keys are allowed, we will send only one key at a time + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint8_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + //VALGET uses different memory layer definitions to VALSET + //because it can only return the value for one layer. + //So we need to fiddle the layer here. + //And just to complicate things further, the ZED-F9P only responds + //correctly to layer 0 (RAM) and layer 7 (Default)! + uint8_t getLayer = 7; // 7 is the "Default Layer" + if ((layer & VAL_LAYER_RAM) == VAL_LAYER_RAM) // Did the user request the RAM layer? + { + getLayer = 0; // Layer 0 is RAM + } + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = getLayer; //Layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + if (_printDebug == true) + { + _debugSerial->print(F("key: 0x")); + _debugSerial->print(key, HEX); + _debugSerial->println(); + } + + //Send VALGET command with this key + + sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait); + if (_printDebug == true) + { + _debugSerial->print(F("getVal: sendCommand returned: ")); + _debugSerial->println(statusString(retVal)); + } + + //Verify the response is the correct length as compared to what the user called (did the module respond with 8-bits but the user called getVal32?) + //Response is 8 bytes plus cfg data + //if(packet->len > 8+1) + + //The response is now sitting in payload, ready for extraction + return (retVal); +} + +//Given a key, return its value +//This function takes a full 32-bit key +//Default layer is RAM +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::getVal8(uint32_t key, uint8_t layer, uint16_t maxWait) +{ + if (getVal(key, layer, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (0); + + return (extractByte(8)); +} +uint16_t SFE_UBLOX_GPS::getVal16(uint32_t key, uint8_t layer, uint16_t maxWait) +{ + if (getVal(key, layer, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (0); + + return (extractInt(8)); +} +uint32_t SFE_UBLOX_GPS::getVal32(uint32_t key, uint8_t layer, uint16_t maxWait) +{ + if (getVal(key, layer, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (0); + + return (extractLong(8)); +} + +//Form 32-bit key from group/id/size +uint32_t SFE_UBLOX_GPS::createKey(uint16_t group, uint16_t id, uint8_t size) +{ + uint32_t key = 0; + key |= (uint32_t)id; + key |= (uint32_t)group << 16; + key |= (uint32_t)size << 28; + return (key); +} + +//Given a group, ID and size, return the value of this config spot +//The 32-bit key is put together from group/ID/size. See other getVal to send key directly. +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::getVal8(uint16_t group, uint16_t id, uint8_t size, uint8_t layer, uint16_t maxWait) +{ + uint32_t key = createKey(group, id, size); + return getVal8(key, layer, maxWait); +} +uint16_t SFE_UBLOX_GPS::getVal16(uint16_t group, uint16_t id, uint8_t size, uint8_t layer, uint16_t maxWait) +{ + uint32_t key = createKey(group, id, size); + return getVal16(key, layer, maxWait); +} +uint32_t SFE_UBLOX_GPS::getVal32(uint16_t group, uint16_t id, uint8_t size, uint8_t layer, uint16_t maxWait) +{ + uint32_t key = createKey(group, id, size); + return getVal32(key, layer, maxWait); +} + +//Given a key, set a 16-bit value +//This function takes a full 32-bit key +//Default layer is all: RAM+BBR+Flash +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::setVal(uint32_t key, uint16_t value, uint8_t layer, uint16_t maxWait) +{ + return setVal16(key, value, layer, maxWait); +} + +//Given a key, set a 16-bit value +//This function takes a full 32-bit key +//Default layer is all: RAM+BBR+Flash +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::setVal16(uint32_t key, uint16_t value, uint8_t layer, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 2; //4 byte header, 4 byte key ID, 2 bytes of value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value >> 8 * 0; //Value LSB + payloadCfg[9] = value >> 8 * 1; + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Given a key, set an 8-bit value +//This function takes a full 32-bit key +//Default layer is all: RAM+BBR+Flash +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::setVal8(uint32_t key, uint8_t value, uint8_t layer, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 1; //4 byte header, 4 byte key ID, 1 byte value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value; //Value + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Given a key, set a 32-bit value +//This function takes a full 32-bit key +//Default layer is all: RAM+BBR+Flash +//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::setVal32(uint32_t key, uint32_t value, uint8_t layer, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 4; //4 byte header, 4 byte key ID, 4 bytes of value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value >> 8 * 0; //Value LSB + payloadCfg[9] = value >> 8 * 1; + payloadCfg[10] = value >> 8 * 2; + payloadCfg[11] = value >> 8 * 3; + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Start defining a new UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 32-bit value +//Default layer is BBR +//Configuration of modern u-blox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::newCfgValset32(uint32_t key, uint32_t value, uint8_t layer) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 4; //4 byte header, 4 byte key ID, 4 bytes of value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < MAX_PAYLOAD_SIZE; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value >> 8 * 0; //Value LSB + payloadCfg[9] = value >> 8 * 1; + payloadCfg[10] = value >> 8 * 2; + payloadCfg[11] = value >> 8 * 3; + + //All done + return (true); +} + +//Start defining a new UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 16-bit value +//Default layer is BBR +//Configuration of modern u-blox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::newCfgValset16(uint32_t key, uint16_t value, uint8_t layer) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 2; //4 byte header, 4 byte key ID, 2 bytes of value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < MAX_PAYLOAD_SIZE; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value >> 8 * 0; //Value LSB + payloadCfg[9] = value >> 8 * 1; + + //All done + return (true); +} + +//Start defining a new UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 8-bit value +//Default layer is BBR +//Configuration of modern u-blox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P +uint8_t SFE_UBLOX_GPS::newCfgValset8(uint32_t key, uint8_t value, uint8_t layer) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_VALSET; + packetCfg.len = 4 + 4 + 1; //4 byte header, 4 byte key ID, 1 byte value + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint16_t x = 0; x < MAX_PAYLOAD_SIZE; x++) + packetCfg.payload[x] = 0; + + payloadCfg[0] = 0; //Message Version - set to 0 + payloadCfg[1] = layer; //By default we ask for the BBR layer + + //Load key into outgoing payload + payloadCfg[4] = key >> 8 * 0; //Key LSB + payloadCfg[5] = key >> 8 * 1; + payloadCfg[6] = key >> 8 * 2; + payloadCfg[7] = key >> 8 * 3; + + //Load user's value + payloadCfg[8] = value; //Value + + //All done + return (true); +} + +//Add another keyID and value to an existing UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 32-bit value +uint8_t SFE_UBLOX_GPS::addCfgValset32(uint32_t key, uint32_t value) +{ + //Load key into outgoing payload + payloadCfg[packetCfg.len + 0] = key >> 8 * 0; //Key LSB + payloadCfg[packetCfg.len + 1] = key >> 8 * 1; + payloadCfg[packetCfg.len + 2] = key >> 8 * 2; + payloadCfg[packetCfg.len + 3] = key >> 8 * 3; + + //Load user's value + payloadCfg[packetCfg.len + 4] = value >> 8 * 0; //Value LSB + payloadCfg[packetCfg.len + 5] = value >> 8 * 1; + payloadCfg[packetCfg.len + 6] = value >> 8 * 2; + payloadCfg[packetCfg.len + 7] = value >> 8 * 3; + + //Update packet length: 4 byte key ID, 4 bytes of value + packetCfg.len = packetCfg.len + 4 + 4; + + //All done + return (true); +} + +//Add another keyID and value to an existing UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 16-bit value +uint8_t SFE_UBLOX_GPS::addCfgValset16(uint32_t key, uint16_t value) +{ + //Load key into outgoing payload + payloadCfg[packetCfg.len + 0] = key >> 8 * 0; //Key LSB + payloadCfg[packetCfg.len + 1] = key >> 8 * 1; + payloadCfg[packetCfg.len + 2] = key >> 8 * 2; + payloadCfg[packetCfg.len + 3] = key >> 8 * 3; + + //Load user's value + payloadCfg[packetCfg.len + 4] = value >> 8 * 0; //Value LSB + payloadCfg[packetCfg.len + 5] = value >> 8 * 1; + + //Update packet length: 4 byte key ID, 2 bytes of value + packetCfg.len = packetCfg.len + 4 + 2; + + //All done + return (true); +} + +//Add another keyID and value to an existing UBX-CFG-VALSET ubxPacket +//This function takes a full 32-bit key and 8-bit value +uint8_t SFE_UBLOX_GPS::addCfgValset8(uint32_t key, uint8_t value) +{ + //Load key into outgoing payload + payloadCfg[packetCfg.len + 0] = key >> 8 * 0; //Key LSB + payloadCfg[packetCfg.len + 1] = key >> 8 * 1; + payloadCfg[packetCfg.len + 2] = key >> 8 * 2; + payloadCfg[packetCfg.len + 3] = key >> 8 * 3; + + //Load user's value + payloadCfg[packetCfg.len + 4] = value; //Value + + //Update packet length: 4 byte key ID, 1 byte value + packetCfg.len = packetCfg.len + 4 + 1; + + //All done + return (true); +} + +//Add a final keyID and value to an existing UBX-CFG-VALSET ubxPacket and send it +//This function takes a full 32-bit key and 32-bit value +uint8_t SFE_UBLOX_GPS::sendCfgValset32(uint32_t key, uint32_t value, uint16_t maxWait) +{ + //Load keyID and value into outgoing payload + addCfgValset32(key, value); + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Add a final keyID and value to an existing UBX-CFG-VALSET ubxPacket and send it +//This function takes a full 32-bit key and 16-bit value +uint8_t SFE_UBLOX_GPS::sendCfgValset16(uint32_t key, uint16_t value, uint16_t maxWait) +{ + //Load keyID and value into outgoing payload + addCfgValset16(key, value); + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Add a final keyID and value to an existing UBX-CFG-VALSET ubxPacket and send it +//This function takes a full 32-bit key and 8-bit value +uint8_t SFE_UBLOX_GPS::sendCfgValset8(uint32_t key, uint8_t value, uint16_t maxWait) +{ + //Load keyID and value into outgoing payload + addCfgValset8(key, value); + + //Send VALSET command with this key and value + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Get the current TimeMode3 settings - these contain survey in statuses +boolean SFE_UBLOX_GPS::getSurveyMode(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_TMODE3; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_RECEIVED); // We are expecting data and an ACK +} + +//Control Survey-In for NEO-M8P +boolean SFE_UBLOX_GPS::setSurveyMode(uint8_t mode, uint16_t observationTime, float requiredAccuracy, uint16_t maxWait) +{ + if (getSurveyMode(maxWait) == false) //Ask module for the current TimeMode3 settings. Loads into payloadCfg. + return (false); + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_TMODE3; + packetCfg.len = 40; + packetCfg.startingSpot = 0; + + //Clear packet payload + for (uint8_t x = 0; x < packetCfg.len; x++) + packetCfg.payload[x] = 0; + + //payloadCfg should be loaded with poll response. Now modify only the bits we care about + payloadCfg[2] = mode; //Set mode. Survey-In and Disabled are most common. Use ECEF (not LAT/LON/ALT). + + //svinMinDur is U4 (uint32_t) but we'll only use a uint16_t (waiting more than 65535 seconds seems excessive!) + payloadCfg[24] = observationTime & 0xFF; //svinMinDur in seconds + payloadCfg[25] = observationTime >> 8; //svinMinDur in seconds + payloadCfg[26] = 0; //Truncate to 16 bits + payloadCfg[27] = 0; //Truncate to 16 bits + + //svinAccLimit is U4 (uint32_t) in 0.1mm. + uint32_t svinAccLimit = (uint32_t)(requiredAccuracy * 10000.0); //Convert m to 0.1mm + payloadCfg[28] = svinAccLimit & 0xFF; //svinAccLimit in 0.1mm increments + payloadCfg[29] = svinAccLimit >> 8; + payloadCfg[30] = svinAccLimit >> 16; + payloadCfg[31] = svinAccLimit >> 24; + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Begin Survey-In for NEO-M8P +boolean SFE_UBLOX_GPS::enableSurveyMode(uint16_t observationTime, float requiredAccuracy, uint16_t maxWait) +{ + return (setSurveyMode(SVIN_MODE_ENABLE, observationTime, requiredAccuracy, maxWait)); +} + +//Stop Survey-In for NEO-M8P +boolean SFE_UBLOX_GPS::disableSurveyMode(uint16_t maxWait) +{ + return (setSurveyMode(SVIN_MODE_DISABLE, 0, 0, maxWait)); +} + +//Reads survey in status and sets the global variables +//for status, position valid, observation time, and mean 3D StdDev +//Returns true if commands was successful +boolean SFE_UBLOX_GPS::getSurveyStatus(uint16_t maxWait) +{ + //Reset variables + svin.active = false; + svin.valid = false; + svin.observationTime = 0; + svin.meanAccuracy = 0; + + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_SVIN; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if ((sendCommand(&packetCfg, maxWait)) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); //If command send fails then bail + + //We got a response, now parse the bits into the svin structure + + //dur (Passed survey-in observation time) is U4 (uint32_t) seconds. We truncate to 16 bits + //(waiting more than 65535 seconds (18.2 hours) seems excessive!) + uint32_t tmpObsTime = extractLong(8); + if (tmpObsTime <= 0xFFFF) + { + svin.observationTime = (uint16_t)tmpObsTime; + } + else + { + svin.observationTime = 0xFFFF; + } + + // meanAcc is U4 (uint32_t) in 0.1mm. We convert this to float. + uint32_t tempFloat = extractLong(28); + svin.meanAccuracy = ((float)tempFloat) / 10000.0; //Convert 0.1mm to m + + svin.valid = payloadCfg[36]; //1 if survey-in position is valid, 0 otherwise + svin.active = payloadCfg[37]; //1 if survey-in in progress, 0 otherwise + + return (true); +} + +//Loads the payloadCfg array with the current protocol bits located the UBX-CFG-PRT register for a given port +boolean SFE_UBLOX_GPS::getPortSettings(uint8_t portID, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_PRT; + packetCfg.len = 1; + packetCfg.startingSpot = 0; + + payloadCfg[0] = portID; + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_RECEIVED); // We are expecting data and an ACK +} + +//Configure a given port to output UBX, NMEA, RTCM3 or a combination thereof +//Port 0=I2c, 1=UART1, 2=UART2, 3=USB, 4=SPI +//Bit:0 = UBX, :1=NMEA, :5=RTCM3 +boolean SFE_UBLOX_GPS::setPortOutput(uint8_t portID, uint8_t outStreamSettings, uint16_t maxWait) +{ + //Get the current config values for this port ID + if (getPortSettings(portID, maxWait) == false) + return (false); //Something went wrong. Bail. + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_PRT; + packetCfg.len = 20; + packetCfg.startingSpot = 0; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[14] = outStreamSettings; //OutProtocolMask LSB - Set outStream bits + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Configure a given port to input UBX, NMEA, RTCM3 or a combination thereof +//Port 0=I2c, 1=UART1, 2=UART2, 3=USB, 4=SPI +//Bit:0 = UBX, :1=NMEA, :5=RTCM3 +boolean SFE_UBLOX_GPS::setPortInput(uint8_t portID, uint8_t inStreamSettings, uint16_t maxWait) +{ + //Get the current config values for this port ID + //This will load the payloadCfg array with current port settings + if (getPortSettings(portID, maxWait) == false) + return (false); //Something went wrong. Bail. + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_PRT; + packetCfg.len = 20; + packetCfg.startingSpot = 0; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[12] = inStreamSettings; //InProtocolMask LSB - Set inStream bits + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Configure a port to output UBX, NMEA, RTCM3 or a combination thereof +boolean SFE_UBLOX_GPS::setI2COutput(uint8_t comSettings, uint16_t maxWait) +{ + return (setPortOutput(COM_PORT_I2C, comSettings, maxWait)); +} +boolean SFE_UBLOX_GPS::setUART1Output(uint8_t comSettings, uint16_t maxWait) +{ + return (setPortOutput(COM_PORT_UART1, comSettings, maxWait)); +} +boolean SFE_UBLOX_GPS::setUART2Output(uint8_t comSettings, uint16_t maxWait) +{ + return (setPortOutput(COM_PORT_UART2, comSettings, maxWait)); +} +boolean SFE_UBLOX_GPS::setUSBOutput(uint8_t comSettings, uint16_t maxWait) +{ + return (setPortOutput(COM_PORT_USB, comSettings, maxWait)); +} +boolean SFE_UBLOX_GPS::setSPIOutput(uint8_t comSettings, uint16_t maxWait) +{ + return (setPortOutput(COM_PORT_SPI, comSettings, maxWait)); +} + +//Set the rate at which the module will give us an updated navigation solution +//Expects a number that is the updates per second. For example 1 = 1Hz, 2 = 2Hz, etc. +//Max is 40Hz(?!) +boolean SFE_UBLOX_GPS::setNavigationFrequency(uint8_t navFreq, uint16_t maxWait) +{ + //if(updateRate > 40) updateRate = 40; //Not needed: module will correct out of bounds values + + //Adjust the I2C polling timeout based on update rate + i2cPollingWait = 1000 / (((int)navFreq) * 4); //This is the number of ms to wait between checks for new I2C data + + //Query the module for the latest lat/long + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RATE; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //This will load the payloadCfg array with current settings of the given register + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); //If command send fails then bail + + uint16_t measurementRate = 1000 / navFreq; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[0] = measurementRate & 0xFF; //measRate LSB + payloadCfg[1] = measurementRate >> 8; //measRate MSB + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Get the rate at which the module is outputting nav solutions +uint8_t SFE_UBLOX_GPS::getNavigationFrequency(uint16_t maxWait) +{ + //Query the module for the latest lat/long + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RATE; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //This will load the payloadCfg array with current settings of the given register + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); //If command send fails then bail + + //payloadCfg is now loaded with current bytes. Get what we need + uint16_t measurementRate = extractInt(0); //Pull from payloadCfg at measRate LSB + + measurementRate = 1000 / measurementRate; //This may return an int when it's a float, but I'd rather not return 4 bytes + return (measurementRate); +} + +//In case no config access to the GPS is possible and PVT is send cyclically already +//set config to suitable parameters +boolean SFE_UBLOX_GPS::assumeAutoPVT(boolean enabled, boolean implicitUpdate) +{ + boolean changes = autoPVT != enabled || autoPVTImplicitUpdate != implicitUpdate; + if (changes) + { + autoPVT = enabled; + autoPVTImplicitUpdate = implicitUpdate; + } + return changes; +} + +//Enable or disable automatic navigation message generation by the GPS. This changes the way getPVT +//works. +boolean SFE_UBLOX_GPS::setAutoPVT(boolean enable, uint16_t maxWait) +{ + return setAutoPVT(enable, true, maxWait); +} + +//Enable or disable automatic navigation message generation by the GPS. This changes the way getPVT +//works. +boolean SFE_UBLOX_GPS::setAutoPVT(boolean enable, boolean implicitUpdate, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_MSG; + packetCfg.len = 3; + packetCfg.startingSpot = 0; + payloadCfg[0] = UBX_CLASS_NAV; + payloadCfg[1] = UBX_NAV_PVT; + payloadCfg[2] = enable ? 1 : 0; // rate relative to navigation freq. + + boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + if (ok) + { + autoPVT = enable; + autoPVTImplicitUpdate = implicitUpdate; + } + moduleQueried.all = false; + return ok; +} + +//In case no config access to the GPS is possible and HPPOSLLH is send cyclically already +//set config to suitable parameters +boolean SFE_UBLOX_GPS::assumeAutoHPPOSLLH(boolean enabled, boolean implicitUpdate) +{ + boolean changes = autoHPPOSLLH != enabled || autoHPPOSLLHImplicitUpdate != implicitUpdate; + if (changes) + { + autoHPPOSLLH = enabled; + autoHPPOSLLHImplicitUpdate = implicitUpdate; + } + return changes; +} + +//Enable or disable automatic navigation message generation by the GPS. This changes the way getHPPOSLLH +//works. +boolean SFE_UBLOX_GPS::setAutoHPPOSLLH(boolean enable, uint16_t maxWait) +{ + return setAutoHPPOSLLH(enable, true, maxWait); +} + +//Enable or disable automatic navigation message generation by the GPS. This changes the way getHPPOSLLH +//works. +boolean SFE_UBLOX_GPS::setAutoHPPOSLLH(boolean enable, boolean implicitUpdate, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_MSG; + packetCfg.len = 3; + packetCfg.startingSpot = 0; + payloadCfg[0] = UBX_CLASS_NAV; + payloadCfg[1] = UBX_NAV_HPPOSLLH; + payloadCfg[2] = enable ? 1 : 0; // rate relative to navigation freq. + + boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + if (ok) + { + autoHPPOSLLH = enable; + autoHPPOSLLHImplicitUpdate = implicitUpdate; + } + highResModuleQueried.all = false; + return ok; +} + + +//In case no config access to the GPS is possible and DOP is send cyclically already +//set config to suitable parameters +boolean SFE_UBLOX_GPS::assumeAutoDOP(boolean enabled, boolean implicitUpdate) +{ + boolean changes = autoDOP != enabled || autoDOPImplicitUpdate != implicitUpdate; + if (changes) + { + autoDOP = enabled; + autoDOPImplicitUpdate = implicitUpdate; + } + return changes; +} + +//Enable or disable automatic navigation message generation by the GPS. This changes the way getDOP +//works. +boolean SFE_UBLOX_GPS::setAutoDOP(boolean enable, uint16_t maxWait) +{ + return setAutoDOP(enable, true, maxWait); +} + +//Enable or disable automatic navigation message generation by the GPS. This changes the way getDOP +//works. +boolean SFE_UBLOX_GPS::setAutoDOP(boolean enable, boolean implicitUpdate, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_MSG; + packetCfg.len = 3; + packetCfg.startingSpot = 0; + payloadCfg[0] = UBX_CLASS_NAV; + payloadCfg[1] = UBX_NAV_DOP; + payloadCfg[2] = enable ? 1 : 0; // rate relative to navigation freq. + + boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + if (ok) + { + autoDOP = enable; + autoDOPImplicitUpdate = implicitUpdate; + } + dopModuleQueried.all = false; + return ok; +} + +//Configure a given message type for a given port (UART1, I2C, SPI, etc) +boolean SFE_UBLOX_GPS::configureMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t sendRate, uint16_t maxWait) +{ + //Poll for the current settings for a given message + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_MSG; + packetCfg.len = 2; + packetCfg.startingSpot = 0; + + payloadCfg[0] = msgClass; + payloadCfg[1] = msgID; + + //This will load the payloadCfg array with current settings of the given register + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); //If command send fails then bail + + //Now send it back with new mods + packetCfg.len = 8; + + //payloadCfg is now loaded with current bytes. Change only the ones we need to + payloadCfg[2 + portID] = sendRate; //Send rate is relative to the event a message is registered on. For example, if the rate of a navigation message is set to 2, the message is sent every 2nd navigation solution. + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Enable a given message type, default of 1 per update rate (usually 1 per second) +boolean SFE_UBLOX_GPS::enableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t rate, uint16_t maxWait) +{ + return (configureMessage(msgClass, msgID, portID, rate, maxWait)); +} +//Disable a given message type on a given port +boolean SFE_UBLOX_GPS::disableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint16_t maxWait) +{ + return (configureMessage(msgClass, msgID, portID, 0, maxWait)); +} + +boolean SFE_UBLOX_GPS::enableNMEAMessage(uint8_t msgID, uint8_t portID, uint8_t rate, uint16_t maxWait) +{ + return (configureMessage(UBX_CLASS_NMEA, msgID, portID, rate, maxWait)); +} +boolean SFE_UBLOX_GPS::disableNMEAMessage(uint8_t msgID, uint8_t portID, uint16_t maxWait) +{ + return (enableNMEAMessage(msgID, portID, 0, maxWait)); +} + +//Given a message number turns on a message ID for output over a given portID (UART, I2C, SPI, USB, etc) +//To disable a message, set secondsBetween messages to 0 +//Note: This function will return false if the message is already enabled +//For base station RTK output we need to enable various sentences + +//NEO-M8P has four: +//1005 = 0xF5 0x05 - Stationary RTK reference ARP +//1077 = 0xF5 0x4D - GPS MSM7 +//1087 = 0xF5 0x57 - GLONASS MSM7 +//1230 = 0xF5 0xE6 - GLONASS code-phase biases, set to once every 10 seconds + +//ZED-F9P has six: +//1005, 1074, 1084, 1094, 1124, 1230 + +//Much of this configuration is not documented and instead discerned from u-center binary console +boolean SFE_UBLOX_GPS::enableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint8_t sendRate, uint16_t maxWait) +{ + return (configureMessage(UBX_RTCM_MSB, messageNumber, portID, sendRate, maxWait)); +} + +//Disable a given message on a given port by setting secondsBetweenMessages to zero +boolean SFE_UBLOX_GPS::disableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint16_t maxWait) +{ + return (enableRTCMmessage(messageNumber, portID, 0, maxWait)); +} + +//Add a new geofence using UBX-CFG-GEOFENCE +boolean SFE_UBLOX_GPS::addGeofence(int32_t latitude, int32_t longitude, uint32_t radius, byte confidence, byte pinPolarity, byte pin, uint16_t maxWait) +{ + if (currentGeofenceParams.numFences >= 4) + return (false); // Quit if we already have four geofences defined + + // Store the new geofence parameters + currentGeofenceParams.lats[currentGeofenceParams.numFences] = latitude; + currentGeofenceParams.longs[currentGeofenceParams.numFences] = longitude; + currentGeofenceParams.rads[currentGeofenceParams.numFences] = radius; + currentGeofenceParams.numFences = currentGeofenceParams.numFences + 1; // Increment the number of fences + + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_GEOFENCE; + packetCfg.len = (currentGeofenceParams.numFences * 12) + 8; + packetCfg.startingSpot = 0; + + payloadCfg[0] = 0; // Message version = 0x00 + payloadCfg[1] = currentGeofenceParams.numFences; // numFences + payloadCfg[2] = confidence; // confLvl = Confidence level 0-4 (none, 68%, 95%, 99.7%, 99.99%) + payloadCfg[3] = 0; // reserved1 + if (pin > 0) + { + payloadCfg[4] = 1; // enable PIO combined fence state + } + else + { + payloadCfg[4] = 0; // disable PIO combined fence state + } + payloadCfg[5] = pinPolarity; // PIO pin polarity (0 = low means inside, 1 = low means outside (or unknown)) + payloadCfg[6] = pin; // PIO pin + payloadCfg[7] = 0; //reserved2 + payloadCfg[8] = currentGeofenceParams.lats[0] & 0xFF; + payloadCfg[9] = currentGeofenceParams.lats[0] >> 8; + payloadCfg[10] = currentGeofenceParams.lats[0] >> 16; + payloadCfg[11] = currentGeofenceParams.lats[0] >> 24; + payloadCfg[12] = currentGeofenceParams.longs[0] & 0xFF; + payloadCfg[13] = currentGeofenceParams.longs[0] >> 8; + payloadCfg[14] = currentGeofenceParams.longs[0] >> 16; + payloadCfg[15] = currentGeofenceParams.longs[0] >> 24; + payloadCfg[16] = currentGeofenceParams.rads[0] & 0xFF; + payloadCfg[17] = currentGeofenceParams.rads[0] >> 8; + payloadCfg[18] = currentGeofenceParams.rads[0] >> 16; + payloadCfg[19] = currentGeofenceParams.rads[0] >> 24; + if (currentGeofenceParams.numFences >= 2) + { + payloadCfg[20] = currentGeofenceParams.lats[1] & 0xFF; + payloadCfg[21] = currentGeofenceParams.lats[1] >> 8; + payloadCfg[22] = currentGeofenceParams.lats[1] >> 16; + payloadCfg[23] = currentGeofenceParams.lats[1] >> 24; + payloadCfg[24] = currentGeofenceParams.longs[1] & 0xFF; + payloadCfg[25] = currentGeofenceParams.longs[1] >> 8; + payloadCfg[26] = currentGeofenceParams.longs[1] >> 16; + payloadCfg[27] = currentGeofenceParams.longs[1] >> 24; + payloadCfg[28] = currentGeofenceParams.rads[1] & 0xFF; + payloadCfg[29] = currentGeofenceParams.rads[1] >> 8; + payloadCfg[30] = currentGeofenceParams.rads[1] >> 16; + payloadCfg[31] = currentGeofenceParams.rads[1] >> 24; + } + if (currentGeofenceParams.numFences >= 3) + { + payloadCfg[32] = currentGeofenceParams.lats[2] & 0xFF; + payloadCfg[33] = currentGeofenceParams.lats[2] >> 8; + payloadCfg[34] = currentGeofenceParams.lats[2] >> 16; + payloadCfg[35] = currentGeofenceParams.lats[2] >> 24; + payloadCfg[36] = currentGeofenceParams.longs[2] & 0xFF; + payloadCfg[37] = currentGeofenceParams.longs[2] >> 8; + payloadCfg[38] = currentGeofenceParams.longs[2] >> 16; + payloadCfg[39] = currentGeofenceParams.longs[2] >> 24; + payloadCfg[40] = currentGeofenceParams.rads[2] & 0xFF; + payloadCfg[41] = currentGeofenceParams.rads[2] >> 8; + payloadCfg[42] = currentGeofenceParams.rads[2] >> 16; + payloadCfg[43] = currentGeofenceParams.rads[2] >> 24; + } + if (currentGeofenceParams.numFences >= 4) + { + payloadCfg[44] = currentGeofenceParams.lats[3] & 0xFF; + payloadCfg[45] = currentGeofenceParams.lats[3] >> 8; + payloadCfg[46] = currentGeofenceParams.lats[3] >> 16; + payloadCfg[47] = currentGeofenceParams.lats[3] >> 24; + payloadCfg[48] = currentGeofenceParams.longs[3] & 0xFF; + payloadCfg[49] = currentGeofenceParams.longs[3] >> 8; + payloadCfg[50] = currentGeofenceParams.longs[3] >> 16; + payloadCfg[51] = currentGeofenceParams.longs[3] >> 24; + payloadCfg[52] = currentGeofenceParams.rads[3] & 0xFF; + payloadCfg[53] = currentGeofenceParams.rads[3] >> 8; + payloadCfg[54] = currentGeofenceParams.rads[3] >> 16; + payloadCfg[55] = currentGeofenceParams.rads[3] >> 24; + } + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Clear all geofences using UBX-CFG-GEOFENCE +boolean SFE_UBLOX_GPS::clearGeofences(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_GEOFENCE; + packetCfg.len = 8; + packetCfg.startingSpot = 0; + + payloadCfg[0] = 0; // Message version = 0x00 + payloadCfg[1] = 0; // numFences + payloadCfg[2] = 0; // confLvl + payloadCfg[3] = 0; // reserved1 + payloadCfg[4] = 0; // disable PIO combined fence state + payloadCfg[5] = 0; // PIO pin polarity (0 = low means inside, 1 = low means outside (or unknown)) + payloadCfg[6] = 0; // PIO pin + payloadCfg[7] = 0; //reserved2 + + currentGeofenceParams.numFences = 0; // Zero the number of geofences currently in use + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Clear the antenna control settings using UBX-CFG-ANT +//This function is hopefully redundant but may be needed to release +//any PIO pins pre-allocated for antenna functions +boolean SFE_UBLOX_GPS::clearAntPIO(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_ANT; + packetCfg.len = 4; + packetCfg.startingSpot = 0; + + payloadCfg[0] = 0x10; // Antenna flag mask: set the recovery bit + payloadCfg[1] = 0; + payloadCfg[2] = 0xFF; // Antenna pin configuration: set pinSwitch and pinSCD to 31 + payloadCfg[3] = 0xFF; // Antenna pin configuration: set pinOCD to 31, set reconfig bit + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Returns the combined geofence state using UBX-NAV-GEOFENCE +boolean SFE_UBLOX_GPS::getGeofenceState(geofenceState ¤tGeofenceState, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_GEOFENCE; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the geofence status. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); + + currentGeofenceState.status = payloadCfg[5]; // Extract the status + currentGeofenceState.numFences = payloadCfg[6]; // Extract the number of geofences + currentGeofenceState.combState = payloadCfg[7]; // Extract the combined state of all geofences + if (currentGeofenceState.numFences > 0) + currentGeofenceState.states[0] = payloadCfg[8]; // Extract geofence 1 state + if (currentGeofenceState.numFences > 1) + currentGeofenceState.states[1] = payloadCfg[10]; // Extract geofence 2 state + if (currentGeofenceState.numFences > 2) + currentGeofenceState.states[2] = payloadCfg[12]; // Extract geofence 3 state + if (currentGeofenceState.numFences > 3) + currentGeofenceState.states[3] = payloadCfg[14]; // Extract geofence 4 state + + return (true); +} + +//Power Save Mode +//Enables/Disables Low Power Mode using UBX-CFG-RXM +boolean SFE_UBLOX_GPS::powerSaveMode(bool power_save, uint16_t maxWait) +{ + // Let's begin by checking the Protocol Version as UBX_CFG_RXM is not supported on the ZED (protocol >= 27) + uint8_t protVer = getProtocolVersionHigh(maxWait); + /* + if (_printDebug == true) + { + _debugSerial->print(F("Protocol version is ")); + _debugSerial->println(protVer); + } + */ + if (protVer >= 27) + { + if (_printDebug == true) + { + _debugSerial->println(F("powerSaveMode (UBX-CFG-RXM) is not supported by this protocol version")); + } + return (false); + } + + // Now let's change the power setting using UBX-CFG-RXM + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RXM; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the current power management settings. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); + + if (power_save) + { + payloadCfg[1] = 1; // Power Save Mode + } + else + { + payloadCfg[1] = 0; // Continuous Mode + } + + packetCfg.len = 2; + packetCfg.startingSpot = 0; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +// Get Power Save Mode +// Returns the current Low Power Mode using UBX-CFG-RXM +// Returns 255 if the sendCommand fails +uint8_t SFE_UBLOX_GPS::getPowerSaveMode(uint16_t maxWait) +{ + // Let's begin by checking the Protocol Version as UBX_CFG_RXM is not supported on the ZED (protocol >= 27) + uint8_t protVer = getProtocolVersionHigh(maxWait); + /* + if (_printDebug == true) + { + _debugSerial->print(F("Protocol version is ")); + _debugSerial->println(protVer); + } + */ + if (protVer >= 27) + { + if (_printDebug == true) + { + _debugSerial->println(F("powerSaveMode (UBX-CFG-RXM) is not supported by this protocol version")); + } + return (255); + } + + // Now let's read the power setting using UBX-CFG-RXM + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_RXM; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the current power management settings. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (255); + + return (payloadCfg[1]); // Return the low power mode +} + +// Powers off the GPS device for a given duration to reduce power consumption. +// NOTE: Querying the device before the duration is complete, for example by "getLatitude()" will wake it up! +// Returns true if command has not been not acknowledged. +// Returns false if command has not been acknowledged or maxWait = 0. +boolean SFE_UBLOX_GPS::powerOff(uint32_t durationInMs, uint16_t maxWait) +{ + // use durationInMs = 0 for infinite duration + if (_printDebug == true) + { + _debugSerial->print(F("Powering off for ")); + _debugSerial->print(durationInMs); + _debugSerial->println(" ms"); + } + + // Power off device using UBX-RXM-PMREQ + packetCfg.cls = UBX_CLASS_RXM; // 0x02 + packetCfg.id = UBX_RXM_PMREQ; // 0x41 + packetCfg.len = 8; + packetCfg.startingSpot = 0; + + // duration + // big endian to little endian, switch byte order + payloadCfg[0] = (durationInMs >> (8 * 0)) & 0xff; + payloadCfg[1] = (durationInMs >> (8 * 1)) & 0xff; + payloadCfg[2] = (durationInMs >> (8 * 2)) & 0xff; + payloadCfg[3] = (durationInMs >> (8 * 3)) & 0xff; + + payloadCfg[4] = 0x02; //Flags : set the backup bit + payloadCfg[5] = 0x00; //Flags + payloadCfg[6] = 0x00; //Flags + payloadCfg[7] = 0x00; //Flags + + if (maxWait != 0) + { + // check for "not acknowledged" command + return (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_COMMAND_NACK); + } + else + { + sendCommand(&packetCfg, maxWait); + return false; // can't tell if command not acknowledged if maxWait = 0 + } +} + +// Powers off the GPS device for a given duration to reduce power consumption. +// While powered off it can be woken up by creating a falling or rising voltage edge on the specified pin. +// NOTE: The GPS seems to be sensitve to signals on the pins while powered off. Works best when Microcontroller is in deepsleep. +// NOTE: Querying the device before the duration is complete, for example by "getLatitude()" will wake it up! +// Returns true if command has not been not acknowledged. +// Returns false if command has not been acknowledged or maxWait = 0. +boolean SFE_UBLOX_GPS::powerOffWithInterrupt(uint32_t durationInMs, uint32_t wakeupSources, boolean forceWhileUsb, uint16_t maxWait) +{ + // use durationInMs = 0 for infinite duration + if (_printDebug == true) + { + _debugSerial->print(F("Powering off for ")); + _debugSerial->print(durationInMs); + _debugSerial->println(" ms"); + } + + // Power off device using UBX-RXM-PMREQ + packetCfg.cls = UBX_CLASS_RXM; // 0x02 + packetCfg.id = UBX_RXM_PMREQ; // 0x41 + packetCfg.len = 16; + packetCfg.startingSpot = 0; + + payloadCfg[0] = 0x00; // message version + + // bytes 1-3 are reserved - and must be set to zero + payloadCfg[1] = 0x00; + payloadCfg[2] = 0x00; + payloadCfg[3] = 0x00; + + // duration + // big endian to little endian, switch byte order + payloadCfg[4] = (durationInMs >> (8 * 0)) & 0xff; + payloadCfg[5] = (durationInMs >> (8 * 1)) & 0xff; + payloadCfg[6] = (durationInMs >> (8 * 2)) & 0xff; + payloadCfg[7] = (durationInMs >> (8 * 3)) & 0xff; + + // flags + + // disables USB interface when powering off, defaults to true + if (forceWhileUsb) + { + payloadCfg[8] = 0x06; // force | backup + } + else + { + payloadCfg[8] = 0x02; // backup only (leave the force bit clear - module will stay on if USB is connected) + } + + payloadCfg[9] = 0x00; + payloadCfg[10] = 0x00; + payloadCfg[11] = 0x00; + + // wakeUpSources + + // wakeupPin mapping, defaults to VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT0 + + // Possible values are: + // VAL_RXM_PMREQ_WAKEUPSOURCE_UARTRX + // VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT0 + // VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT1 + // VAL_RXM_PMREQ_WAKEUPSOURCE_SPICS + + payloadCfg[12] = (wakeupSources >> (8 * 0)) & 0xff; + payloadCfg[13] = (wakeupSources >> (8 * 1)) & 0xff; + payloadCfg[14] = (wakeupSources >> (8 * 2)) & 0xff; + payloadCfg[15] = (wakeupSources >> (8 * 3)) & 0xff; + + if (maxWait != 0) + { + // check for "not acknowledged" command + return (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_COMMAND_NACK); + } + else + { + sendCommand(&packetCfg, maxWait); + return false; // can't tell if command not acknowledged if maxWait = 0 + } +} + +//Change the dynamic platform model using UBX-CFG-NAV5 +//Possible values are: +//PORTABLE,STATIONARY,PEDESTRIAN,AUTOMOTIVE,SEA, +//AIRBORNE1g,AIRBORNE2g,AIRBORNE4g,WRIST,BIKE +//WRIST is not supported in protocol versions less than 18 +//BIKE is supported in protocol versions 19.2 +boolean SFE_UBLOX_GPS::setDynamicModel(dynModel newDynamicModel, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_NAV5; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the current navigation model settings. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (false); + + payloadCfg[0] = 0x01; // mask: set only the dyn bit (0) + payloadCfg[1] = 0x00; // mask + payloadCfg[2] = newDynamicModel; // dynModel + + packetCfg.len = 36; + packetCfg.startingSpot = 0; + + return (sendCommand(&packetCfg, maxWait) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +//Get the dynamic platform model using UBX-CFG-NAV5 +//Returns 255 if the sendCommand fails +uint8_t SFE_UBLOX_GPS::getDynamicModel(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_NAV5; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the current navigation model settings. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK + return (255); + + return (payloadCfg[2]); // Return the dynamic model +} + +//Given a spot in the payload array, extract four bytes and build a long +uint32_t SFE_UBLOX_GPS::extractLong(uint8_t spotToStart) +{ + uint32_t val = 0; + val |= (uint32_t)payloadCfg[spotToStart + 0] << 8 * 0; + val |= (uint32_t)payloadCfg[spotToStart + 1] << 8 * 1; + val |= (uint32_t)payloadCfg[spotToStart + 2] << 8 * 2; + val |= (uint32_t)payloadCfg[spotToStart + 3] << 8 * 3; + return (val); +} + +//Just so there is no ambiguity about whether a uint32_t will cast to a int32_t correctly... +int32_t SFE_UBLOX_GPS::extractSignedLong(uint8_t spotToStart) +{ + union // Use a union to convert from uint32_t to int32_t + { + uint32_t unsignedLong; + int32_t signedLong; + } unsignedSigned; + + unsignedSigned.unsignedLong = extractLong(spotToStart); + return (unsignedSigned.signedLong); +} + +//Given a spot in the payload array, extract two bytes and build an int +uint16_t SFE_UBLOX_GPS::extractInt(uint8_t spotToStart) +{ + uint16_t val = 0; + val |= (uint16_t)payloadCfg[spotToStart + 0] << 8 * 0; + val |= (uint16_t)payloadCfg[spotToStart + 1] << 8 * 1; + return (val); +} + +//Just so there is no ambiguity about whether a uint16_t will cast to a int16_t correctly... +int16_t SFE_UBLOX_GPS::extractSignedInt(int8_t spotToStart) +{ + union // Use a union to convert from uint16_t to int16_t + { + uint16_t unsignedInt; + int16_t signedInt; + } stSignedInt; + + stSignedInt.unsignedInt = extractInt(spotToStart); + return (stSignedInt.signedInt); +} + +//Given a spot, extract a byte from the payload +uint8_t SFE_UBLOX_GPS::extractByte(uint8_t spotToStart) +{ + return (payloadCfg[spotToStart]); +} + +//Given a spot, extract a signed 8-bit value from the payload +int8_t SFE_UBLOX_GPS::extractSignedChar(uint8_t spotToStart) +{ + return ((int8_t)payloadCfg[spotToStart]); +} + +//Get the current year +uint16_t SFE_UBLOX_GPS::getYear(uint16_t maxWait) +{ + if (moduleQueried.gpsYear == false) + getPVT(maxWait); + moduleQueried.gpsYear = false; //Since we are about to give this to user, mark this data as stale + return (gpsYear); +} + +//Get the current month +uint8_t SFE_UBLOX_GPS::getMonth(uint16_t maxWait) +{ + if (moduleQueried.gpsMonth == false) + getPVT(maxWait); + moduleQueried.gpsMonth = false; //Since we are about to give this to user, mark this data as stale + return (gpsMonth); +} + +//Get the current day +uint8_t SFE_UBLOX_GPS::getDay(uint16_t maxWait) +{ + if (moduleQueried.gpsDay == false) + getPVT(maxWait); + moduleQueried.gpsDay = false; //Since we are about to give this to user, mark this data as stale + return (gpsDay); +} + +//Get the current hour +uint8_t SFE_UBLOX_GPS::getHour(uint16_t maxWait) +{ + if (moduleQueried.gpsHour == false) + getPVT(maxWait); + moduleQueried.gpsHour = false; //Since we are about to give this to user, mark this data as stale + return (gpsHour); +} + +//Get the current minute +uint8_t SFE_UBLOX_GPS::getMinute(uint16_t maxWait) +{ + if (moduleQueried.gpsMinute == false) + getPVT(maxWait); + moduleQueried.gpsMinute = false; //Since we are about to give this to user, mark this data as stale + return (gpsMinute); +} + +//Get the current second +uint8_t SFE_UBLOX_GPS::getSecond(uint16_t maxWait) +{ + if (moduleQueried.gpsSecond == false) + getPVT(maxWait); + moduleQueried.gpsSecond = false; //Since we are about to give this to user, mark this data as stale + return (gpsSecond); +} + +//Get the current date validity +bool SFE_UBLOX_GPS::getDateValid(uint16_t maxWait) +{ + if (moduleQueried.gpsDateValid == false) + getPVT(maxWait); + moduleQueried.gpsDateValid = false; //Since we are about to give this to user, mark this data as stale + return (gpsDateValid); +} + +//Get the current time validity +bool SFE_UBLOX_GPS::getTimeValid(uint16_t maxWait) +{ + if (moduleQueried.gpsTimeValid == false) + getPVT(maxWait); + moduleQueried.gpsTimeValid = false; //Since we are about to give this to user, mark this data as stale + return (gpsTimeValid); +} + +uint32_t SFE_UBLOX_GPS::getSpeedAccEst(uint16_t maxWait) +{ + if (moduleQueried.speedAccEst == false) + getPVT(maxWait); + moduleQueried.speedAccEst = false; //Since we are about to give this to user, mark this data as stale + return (speedAccEst); +} + +uint32_t SFE_UBLOX_GPS::getHeadingAccEst(uint16_t maxWait) +{ + if (moduleQueried.headingAccEst == false) + getPVT(maxWait); + moduleQueried.headingAccEst = false; //Since we are about to give this to user, mark this data as stale + return (headingAccEst); +} + +bool SFE_UBLOX_GPS::getInvalidLlh(uint16_t maxWait) +{ + if (moduleQueried.invalidLlh == false) + getPVT(maxWait); + moduleQueried.invalidLlh = false; //Since we are about to give this to user, mark this data as stale + return (invalidLlh); +} + +int32_t SFE_UBLOX_GPS::getHeadVeh(uint16_t maxWait) +{ + if (moduleQueried.headVeh == false) + getPVT(maxWait); + moduleQueried.headVeh = false; //Since we are about to give this to user, mark this data as stale + return (headVeh); +} + +int16_t SFE_UBLOX_GPS::getMagDec(uint16_t maxWait) +{ + if (moduleQueried.magDec == false) + getPVT(maxWait); + moduleQueried.magDec = false; //Since we are about to give this to user, mark this data as stale + return (magDec); +} + +uint16_t SFE_UBLOX_GPS::getMagAcc(uint16_t maxWait) +{ + if (moduleQueried.magAcc == false) + getPVT(maxWait); + moduleQueried.magAcc = false; //Since we are about to give this to user, mark this data as stale + return (magAcc); +} + +//Get the current millisecond +uint16_t SFE_UBLOX_GPS::getMillisecond(uint16_t maxWait) +{ + if (moduleQueried.gpsiTOW == false) + getPVT(maxWait); + moduleQueried.gpsiTOW = false; //Since we are about to give this to user, mark this data as stale + return (gpsMillisecond); +} + +//Get the current nanoseconds - includes milliseconds +int32_t SFE_UBLOX_GPS::getNanosecond(uint16_t maxWait) +{ + if (moduleQueried.gpsNanosecond == false) + getPVT(maxWait); + moduleQueried.gpsNanosecond = false; //Since we are about to give this to user, mark this data as stale + return (gpsNanosecond); +} + +//Get the latest Position/Velocity/Time solution and fill all global variables +boolean SFE_UBLOX_GPS::getPVT(uint16_t maxWait) +{ + if (autoPVT && autoPVTImplicitUpdate) + { + //The GPS is automatically reporting, we just check whether we got unread data + if (_printDebug == true) + { + _debugSerial->println(F("getPVT: Autoreporting")); + } + checkUbloxInternal(&packetCfg, UBX_CLASS_NAV, UBX_NAV_PVT); + return moduleQueried.all; + } + else if (autoPVT && !autoPVTImplicitUpdate) + { + //Someone else has to call checkUblox for us... + if (_printDebug == true) + { + _debugSerial->println(F("getPVT: Exit immediately")); + } + return (false); + } + else + { + if (_printDebug == true) + { + _debugSerial->println(F("getPVT: Polling")); + } + + //The GPS is not automatically reporting navigation position so we have to poll explicitly + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_PVT; + packetCfg.len = 0; + //packetCfg.startingSpot = 20; //Begin listening at spot 20 so we can record up to 20+MAX_PAYLOAD_SIZE = 84 bytes Note:now hard-coded in processUBX + + //The data is parsed as part of processing the response + sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait); + + if (retVal == SFE_UBLOX_STATUS_DATA_RECEIVED) + return (true); + + if ((retVal == SFE_UBLOX_STATUS_DATA_OVERWRITTEN) && (packetCfg.cls == UBX_CLASS_NAV)) + { + if (_printDebug == true) + { + _debugSerial->println(F("getPVT: data was OVERWRITTEN by another NAV message (but that's OK)")); + } + return (true); + } + + if ((retVal == SFE_UBLOX_STATUS_DATA_OVERWRITTEN) && (packetCfg.cls == UBX_CLASS_HNR)) + { + if (_printDebug == true) + { + _debugSerial->println(F("getPVT: data was OVERWRITTEN by a HNR message (and that's not OK)")); + } + return (false); + } + + if (_printDebug == true) + { + _debugSerial->print(F("getPVT retVal: ")); + _debugSerial->println(statusString(retVal)); + } + return (false); + } +} + +uint32_t SFE_UBLOX_GPS::getTimeOfWeek(uint16_t maxWait /* = 250*/) +{ + if (moduleQueried.gpsiTOW == false) + getPVT(maxWait); + moduleQueried.gpsiTOW = false; //Since we are about to give this to user, mark this data as stale + return (timeOfWeek); +} + +int32_t SFE_UBLOX_GPS::getHighResLatitude(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.highResLatitude == false) + getHPPOSLLH(maxWait); + highResModuleQueried.highResLatitude = false; //Since we are about to give this to user, mark this data as stale + highResModuleQueried.all = false; + + return (highResLatitude); +} + +int8_t SFE_UBLOX_GPS::getHighResLatitudeHp(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.highResLatitudeHp == false) + getHPPOSLLH(maxWait); + highResModuleQueried.highResLatitudeHp = false; //Since we are about to give this to user, mark this data as stale + highResModuleQueried.all = false; + + return (highResLatitudeHp); +} + +int32_t SFE_UBLOX_GPS::getHighResLongitude(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.highResLongitude == false) + getHPPOSLLH(maxWait); + highResModuleQueried.highResLongitude = false; //Since we are about to give this to user, mark this data as stale + highResModuleQueried.all = false; + + return (highResLongitude); +} + +int8_t SFE_UBLOX_GPS::getHighResLongitudeHp(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.highResLongitudeHp == false) + getHPPOSLLH(maxWait); + highResModuleQueried.highResLongitudeHp = false; //Since we are about to give this to user, mark this data as stale + highResModuleQueried.all = false; + + return (highResLongitudeHp); +} + +int32_t SFE_UBLOX_GPS::getElipsoid(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.elipsoid == false) + getHPPOSLLH(maxWait); + highResModuleQueried.elipsoid = false; //Since we are about to give this to user, mark this data as stale + highResModuleQueried.all = false; + + return (elipsoid); +} + +int8_t SFE_UBLOX_GPS::getElipsoidHp(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.elipsoidHp == false) + getHPPOSLLH(maxWait); + highResModuleQueried.elipsoidHp = false; //Since we are about to give this to user, mark this data as stale + highResModuleQueried.all = false; + + return (elipsoidHp); +} + +int32_t SFE_UBLOX_GPS::getMeanSeaLevel(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.meanSeaLevel == false) + getHPPOSLLH(maxWait); + highResModuleQueried.meanSeaLevel = false; //Since we are about to give this to user, mark this data as stale + highResModuleQueried.all = false; + + return (meanSeaLevel); +} + +int8_t SFE_UBLOX_GPS::getMeanSeaLevelHp(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.meanSeaLevelHp == false) + getHPPOSLLH(maxWait); + highResModuleQueried.meanSeaLevelHp = false; //Since we are about to give this to user, mark this data as stale + highResModuleQueried.all = false; + + return (meanSeaLevelHp); +} + +// getGeoidSeparation is currently redundant. The geoid separation seems to only be provided in NMEA GGA and GNS messages. +int32_t SFE_UBLOX_GPS::getGeoidSeparation(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.geoidSeparation == false) + getHPPOSLLH(maxWait); + highResModuleQueried.geoidSeparation = false; //Since we are about to give this to user, mark this data as stale + highResModuleQueried.all = false; + + return (geoidSeparation); +} + +uint32_t SFE_UBLOX_GPS::getHorizontalAccuracy(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.horizontalAccuracy == false) + getHPPOSLLH(maxWait); + highResModuleQueried.horizontalAccuracy = false; //Since we are about to give this to user, mark this data as stale + highResModuleQueried.all = false; + + return (horizontalAccuracy); +} + +uint32_t SFE_UBLOX_GPS::getVerticalAccuracy(uint16_t maxWait /* = 250*/) +{ + if (highResModuleQueried.verticalAccuracy == false) + getHPPOSLLH(maxWait); + highResModuleQueried.verticalAccuracy = false; //Since we are about to give this to user, mark this data as stale + highResModuleQueried.all = false; + + return (verticalAccuracy); +} + +boolean SFE_UBLOX_GPS::getHPPOSLLH(uint16_t maxWait) +{ + if (autoHPPOSLLH && autoHPPOSLLHImplicitUpdate) + { + //The GPS is automatically reporting, we just check whether we got unread data + if (_printDebug == true) + { + _debugSerial->println(F("getHPPOSLLH: Autoreporting")); + } + checkUbloxInternal(&packetCfg, UBX_CLASS_NAV, UBX_NAV_HPPOSLLH); + return highResModuleQueried.all; + } + else if (autoHPPOSLLH && !autoHPPOSLLHImplicitUpdate) + { + //Someone else has to call checkUblox for us... + if (_printDebug == true) + { + _debugSerial->println(F("getHPPOSLLH: Exit immediately")); + } + return (false); + } + else + { + if (_printDebug == true) + { + _debugSerial->println(F("getHPPOSLLH: Polling")); + } + + //The GPS is not automatically reporting navigation position so we have to poll explicitly + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_HPPOSLLH; + packetCfg.len = 0; + + //The data is parsed as part of processing the response + sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait); + + if (retVal == SFE_UBLOX_STATUS_DATA_RECEIVED) + return (true); + + if ((retVal == SFE_UBLOX_STATUS_DATA_OVERWRITTEN) && (packetCfg.cls == UBX_CLASS_NAV)) + { + if (_printDebug == true) + { + _debugSerial->println(F("getHPPOSLLH: data was OVERWRITTEN by another NAV message (but that's OK)")); + } + return (true); + } + if ((retVal == SFE_UBLOX_STATUS_DATA_OVERWRITTEN) && (packetCfg.cls == UBX_CLASS_HNR)) + { + if (_printDebug == true) + { + _debugSerial->println(F("getHPPOSLLH: data was OVERWRITTEN by a HNR message (and that's not OK)")); + } + return (false); + } + + if (_printDebug == true) + { + _debugSerial->print(F("getHPPOSLLH retVal: ")); + _debugSerial->println(statusString(retVal)); + } + return (false); + } +} + +uint16_t SFE_UBLOX_GPS::getGeometricDOP(uint16_t maxWait /* = 250*/) +{ + if (dopModuleQueried.geometricDOP == false) + getDOP(maxWait); + dopModuleQueried.geometricDOP = false; //Since we are about to give this to user, mark this data as stale + dopModuleQueried.all = false; + + return (geometricDOP); +} + +uint16_t SFE_UBLOX_GPS::getPositionDOP(uint16_t maxWait /* = 250*/) +{ + if (dopModuleQueried.positionDOP == false) + getDOP(maxWait); + dopModuleQueried.positionDOP = false; //Since we are about to give this to user, mark this data as stale + dopModuleQueried.all = false; + + return (positionDOP); +} + +uint16_t SFE_UBLOX_GPS::getTimeDOP(uint16_t maxWait /* = 250*/) +{ + if (dopModuleQueried.timeDOP == false) + getDOP(maxWait); + dopModuleQueried.timeDOP = false; //Since we are about to give this to user, mark this data as stale + dopModuleQueried.all = false; + + return (timeDOP); +} + +uint16_t SFE_UBLOX_GPS::getVerticalDOP(uint16_t maxWait /* = 250*/) +{ + if (dopModuleQueried.verticalDOP == false) + getDOP(maxWait); + dopModuleQueried.verticalDOP = false; //Since we are about to give this to user, mark this data as stale + dopModuleQueried.all = false; + + return (verticalDOP); +} + +uint16_t SFE_UBLOX_GPS::getHorizontalDOP(uint16_t maxWait /* = 250*/) +{ + if (dopModuleQueried.horizontalDOP == false) + getDOP(maxWait); + dopModuleQueried.horizontalDOP = false; //Since we are about to give this to user, mark this data as stale + dopModuleQueried.all = false; + + return (horizontalDOP); +} + +uint16_t SFE_UBLOX_GPS::getNorthingDOP(uint16_t maxWait /* = 250*/) +{ + if (dopModuleQueried.northingDOP == false) + getDOP(maxWait); + dopModuleQueried.northingDOP = false; //Since we are about to give this to user, mark this data as stale + dopModuleQueried.all = false; + + return (northingDOP); +} + +uint16_t SFE_UBLOX_GPS::getEastingDOP(uint16_t maxWait /* = 250*/) +{ + if (dopModuleQueried.eastingDOP == false) + getDOP(maxWait); + dopModuleQueried.eastingDOP = false; //Since we are about to give this to user, mark this data as stale + dopModuleQueried.all = false; + + return (eastingDOP); +} + +boolean SFE_UBLOX_GPS::getDOP(uint16_t maxWait) +{ + if (autoDOP && autoDOPImplicitUpdate) + { + //The GPS is automatically reporting, we just check whether we got unread data + if (_printDebug == true) + { + _debugSerial->println(F("getDOP: Autoreporting")); + } + checkUbloxInternal(&packetCfg, UBX_CLASS_NAV, UBX_NAV_DOP); + return dopModuleQueried.all; + } + else if (autoDOP && !autoDOPImplicitUpdate) + { + //Someone else has to call checkUblox for us... + if (_printDebug == true) + { + _debugSerial->println(F("getDOP: Exit immediately")); + } + return (false); + } + else + { + if (_printDebug == true) + { + _debugSerial->println(F("getDOP: Polling")); + } + + //The GPS is not automatically reporting navigation position so we have to poll explicitly + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_DOP; + packetCfg.len = 0; + + //The data is parsed as part of processing the response + sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait); + + if (retVal == SFE_UBLOX_STATUS_DATA_RECEIVED) + return (true); + + if ((retVal == SFE_UBLOX_STATUS_DATA_OVERWRITTEN) && (packetCfg.cls == UBX_CLASS_NAV)) + { + if (_printDebug == true) + { + _debugSerial->println(F("getDOP: data was OVERWRITTEN by another NAV message (but that's OK)")); + } + return (true); + } + + if ((retVal == SFE_UBLOX_STATUS_DATA_OVERWRITTEN) && (packetCfg.cls == UBX_CLASS_HNR)) + { + if (_printDebug == true) + { + _debugSerial->println(F("getDOP: data was OVERWRITTEN by a HNR message (and that's not OK)")); + } + return (false); + } + + if (_printDebug == true) + { + _debugSerial->print(F("getDOP retVal: ")); + _debugSerial->println(statusString(retVal)); + } + return (false); + } +} + +//Get the current 3D high precision positional accuracy - a fun thing to watch +//Returns a long representing the 3D accuracy in millimeters +uint32_t SFE_UBLOX_GPS::getPositionAccuracy(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_HPPOSECEF; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are only expecting data (no ACK) + return (0); //If command send fails then bail + + uint32_t tempAccuracy = extractLong(24); //We got a response, now extract a long beginning at a given position + + if ((tempAccuracy % 10) >= 5) + tempAccuracy += 5; //Round fraction of mm up to next mm if .5 or above + tempAccuracy /= 10; //Convert 0.1mm units to mm + + return (tempAccuracy); +} + +//Get the current latitude in degrees +//Returns a long representing the number of degrees *10^-7 +int32_t SFE_UBLOX_GPS::getLatitude(uint16_t maxWait) +{ + if (moduleQueried.latitude == false) + getPVT(maxWait); + moduleQueried.latitude = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (latitude); +} + +//Get the current longitude in degrees +//Returns a long representing the number of degrees *10^-7 +int32_t SFE_UBLOX_GPS::getLongitude(uint16_t maxWait) +{ + if (moduleQueried.longitude == false) + getPVT(maxWait); + moduleQueried.longitude = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (longitude); +} + +//Get the current altitude in mm according to ellipsoid model +int32_t SFE_UBLOX_GPS::getAltitude(uint16_t maxWait) +{ + if (moduleQueried.altitude == false) + getPVT(maxWait); + moduleQueried.altitude = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (altitude); +} + +//Get the current altitude in mm according to mean sea level +//Ellipsoid model: https://www.esri.com/news/arcuser/0703/geoid1of3.html +//Difference between Ellipsoid Model and Mean Sea Level: https://eos-gnss.com/elevation-for-beginners/ +int32_t SFE_UBLOX_GPS::getAltitudeMSL(uint16_t maxWait) +{ + if (moduleQueried.altitudeMSL == false) + getPVT(maxWait); + moduleQueried.altitudeMSL = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (altitudeMSL); +} + +int32_t SFE_UBLOX_GPS::getHorizontalAccEst(uint16_t maxWait) +{ + if (moduleQueried.horizontalAccEst == false) + getPVT(maxWait); + moduleQueried.horizontalAccEst = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (horizontalAccEst); +} + +int32_t SFE_UBLOX_GPS::getVerticalAccEst(uint16_t maxWait) +{ + if (moduleQueried.verticalAccEst == false) + getPVT(maxWait); + moduleQueried.verticalAccEst = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (verticalAccEst); +} + +int32_t SFE_UBLOX_GPS::getNedNorthVel(uint16_t maxWait) +{ + if (moduleQueried.nedNorthVel == false) + getPVT(maxWait); + moduleQueried.nedNorthVel = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (nedNorthVel); +} + +int32_t SFE_UBLOX_GPS::getNedEastVel(uint16_t maxWait) +{ + if (moduleQueried.nedEastVel == false) + getPVT(maxWait); + moduleQueried.nedEastVel = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (nedEastVel); +} + +int32_t SFE_UBLOX_GPS::getNedDownVel(uint16_t maxWait) +{ + if (moduleQueried.nedDownVel == false) + getPVT(maxWait); + moduleQueried.nedDownVel = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (nedDownVel); +} + +//Get the number of satellites used in fix +uint8_t SFE_UBLOX_GPS::getSIV(uint16_t maxWait) +{ + if (moduleQueried.SIV == false) + getPVT(maxWait); + moduleQueried.SIV = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (SIV); +} + +//Get the current fix type +//0=no fix, 1=dead reckoning, 2=2D, 3=3D, 4=GNSS, 5=Time fix +uint8_t SFE_UBLOX_GPS::getFixType(uint16_t maxWait) +{ + if (moduleQueried.fixType == false) + { + getPVT(maxWait); + } + moduleQueried.fixType = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (fixType); +} + +//Get whether we have a valid fix (i.e within DOP & accuracy masks) +bool SFE_UBLOX_GPS::getGnssFixOk(uint16_t maxWait) +{ + if (moduleQueried.gnssFixOk == false) + getPVT(maxWait); + moduleQueried.gnssFixOk = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (gnssFixOk); +} + +//Get whether differential corrections were applied +bool SFE_UBLOX_GPS::getDiffSoln(uint16_t maxWait) +{ + if (moduleQueried.diffSoln == false) + getPVT(maxWait); + moduleQueried.diffSoln = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (diffSoln); +} + +//Get the carrier phase range solution status +//Useful when querying module to see if it has high-precision RTK fix +//0=No solution, 1=Float solution, 2=Fixed solution +uint8_t SFE_UBLOX_GPS::getCarrierSolutionType(uint16_t maxWait) +{ + if (moduleQueried.carrierSolution == false) + getPVT(maxWait); + moduleQueried.carrierSolution = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (carrierSolution); +} + +//Get whether head vehicle valid or not +bool SFE_UBLOX_GPS::getHeadVehValid(uint16_t maxWait) +{ + if (moduleQueried.headVehValid == false) + getPVT(maxWait); + moduleQueried.headVehValid = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (headVehValid); +} + + +//Get the ground speed in mm/s +int32_t SFE_UBLOX_GPS::getGroundSpeed(uint16_t maxWait) +{ + if (moduleQueried.groundSpeed == false) + getPVT(maxWait); + moduleQueried.groundSpeed = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (groundSpeed); +} + +//Get the heading of motion (as opposed to heading of car) in degrees * 10^-5 +int32_t SFE_UBLOX_GPS::getHeading(uint16_t maxWait) +{ + if (moduleQueried.headingOfMotion == false) + getPVT(maxWait); + moduleQueried.headingOfMotion = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (headingOfMotion); +} + +//Get the positional dillution of precision * 10^-2 (dimensionless) +uint16_t SFE_UBLOX_GPS::getPDOP(uint16_t maxWait) +{ + if (moduleQueried.pDOP == false) + getPVT(maxWait); + moduleQueried.pDOP = false; //Since we are about to give this to user, mark this data as stale + moduleQueried.all = false; + + return (pDOP); +} + +//Get the current protocol version of the u-blox module we're communicating with +//This is helpful when deciding if we should call the high-precision Lat/Long (HPPOSLLH) or the regular (POSLLH) +uint8_t SFE_UBLOX_GPS::getProtocolVersionHigh(uint16_t maxWait) +{ + if (moduleQueried.versionNumber == false) + getProtocolVersion(maxWait); + return (versionHigh); +} + +//Get the current protocol version of the u-blox module we're communicating with +//This is helpful when deciding if we should call the high-precision Lat/Long (HPPOSLLH) or the regular (POSLLH) +uint8_t SFE_UBLOX_GPS::getProtocolVersionLow(uint16_t maxWait) +{ + if (moduleQueried.versionNumber == false) + getProtocolVersion(maxWait); + return (versionLow); +} + +//Get the current protocol version of the u-blox module we're communicating with +//This is helpful when deciding if we should call the high-precision Lat/Long (HPPOSLLH) or the regular (POSLLH) +boolean SFE_UBLOX_GPS::getProtocolVersion(uint16_t maxWait) +{ + //Send packet with only CLS and ID, length of zero. This will cause the module to respond with the contents of that CLS/ID. + packetCfg.cls = UBX_CLASS_MON; + packetCfg.id = UBX_MON_VER; + + packetCfg.len = 0; + packetCfg.startingSpot = 40; //Start at first "extended software information" string + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are only expecting data (no ACK) + return (false); //If command send fails then bail + + //Payload should now contain ~220 characters (depends on module type) + + // if (_printDebug == true) + // { + // _debugSerial->print(F("MON VER Payload:")); + // for (int location = 0; location < packetCfg.len; location++) + // { + // if (location % 30 == 0) + // _debugSerial->println(); + // _debugSerial->write(payloadCfg[location]); + // } + // _debugSerial->println(); + // } + + //We will step through the payload looking at each extension field of 30 bytes + for (uint8_t extensionNumber = 0; extensionNumber < 10; extensionNumber++) + { + //Now we need to find "PROTVER=18.00" in the incoming byte stream + if ((payloadCfg[(30 * extensionNumber) + 0] == 'P') && (payloadCfg[(30 * extensionNumber) + 6] == 'R')) + { + versionHigh = (payloadCfg[(30 * extensionNumber) + 8] - '0') * 10 + (payloadCfg[(30 * extensionNumber) + 9] - '0'); //Convert '18' to 18 + versionLow = (payloadCfg[(30 * extensionNumber) + 11] - '0') * 10 + (payloadCfg[(30 * extensionNumber) + 12] - '0'); //Convert '00' to 00 + moduleQueried.versionNumber = true; //Mark this data as new + + if (_printDebug == true) + { + _debugSerial->print(F("Protocol version: ")); + _debugSerial->print(versionHigh); + _debugSerial->print(F(".")); + _debugSerial->println(versionLow); + } + return (true); //Success! + } + } + + return (false); //We failed +} + +//Mark all the PVT data as read/stale. This is handy to get data alignment after CRC failure +void SFE_UBLOX_GPS::flushPVT() +{ + //Mark all datums as stale (read before) + moduleQueried.gpsiTOW = false; + moduleQueried.gpsYear = false; + moduleQueried.gpsMonth = false; + moduleQueried.gpsDay = false; + moduleQueried.gpsHour = false; + moduleQueried.gpsMinute = false; + moduleQueried.gpsSecond = false; + moduleQueried.gpsDateValid = false; + moduleQueried.gpsTimeValid = false; + moduleQueried.gpsNanosecond = false; + + moduleQueried.all = false; + moduleQueried.gnssFixOk = false; + moduleQueried.diffSoln = false; + moduleQueried.headVehValid = false; + moduleQueried.longitude = false; + moduleQueried.latitude = false; + moduleQueried.altitude = false; + moduleQueried.altitudeMSL = false; + moduleQueried.SIV = false; + moduleQueried.fixType = false; + moduleQueried.carrierSolution = false; + moduleQueried.groundSpeed = false; + moduleQueried.headingOfMotion = false; + moduleQueried.speedAccEst = false; + moduleQueried.headingAccEst = false; + moduleQueried.pDOP = false; + moduleQueried.invalidLlh = false; + moduleQueried.headVeh = false; + moduleQueried.magDec = false; + moduleQueried.magAcc = false; +} + +//Mark all the HPPOSLLH data as read/stale. This is handy to get data alignment after CRC failure +void SFE_UBLOX_GPS::flushHPPOSLLH() +{ + //Mark all datums as stale (read before) + highResModuleQueried.all = false; + highResModuleQueried.highResLatitude = false; + highResModuleQueried.highResLatitudeHp = false; + highResModuleQueried.highResLongitude = false; + highResModuleQueried.highResLongitudeHp = false; + highResModuleQueried.elipsoid = false; + highResModuleQueried.elipsoidHp = false; + highResModuleQueried.meanSeaLevel = false; + highResModuleQueried.meanSeaLevelHp = false; + highResModuleQueried.geoidSeparation = false; + highResModuleQueried.horizontalAccuracy = false; + highResModuleQueried.verticalAccuracy = false; + //moduleQueried.gpsiTOW = false; // this can arrive via HPPOS too. +} + +//Mark all the DOP data as read/stale. This is handy to get data alignment after CRC failure +void SFE_UBLOX_GPS::flushDOP() +{ + //Mark all DOPs as stale (read before) + dopModuleQueried.all = false; + dopModuleQueried.geometricDOP = false; + dopModuleQueried.positionDOP = false; + dopModuleQueried.timeDOP = false; + dopModuleQueried.verticalDOP = false; + dopModuleQueried.horizontalDOP = false; + dopModuleQueried.northingDOP = false; + dopModuleQueried.eastingDOP = false; +} + +//Relative Positioning Information in NED frame +//Returns true if commands was successful +//Note: +// RELPOSNED on the M8 is only 40 bytes long +// RELPOSNED on the F9 is 64 bytes long and contains much more information +boolean SFE_UBLOX_GPS::getRELPOSNED(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_RELPOSNED; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are only expecting data (no ACK) + return (false); //If command send fails then bail + + //We got a response, now parse the bits + + uint16_t refStationID = extractInt(2); + //_debugSerial->print(F("refStationID: ")); + //_debugSerial->println(refStationID)); + + int32_t tempRelPos; + + tempRelPos = extractSignedLong(8); + relPosInfo.relPosN = ((float)tempRelPos) / 100.0; //Convert cm to m + + tempRelPos = extractSignedLong(12); + relPosInfo.relPosE = ((float)tempRelPos) / 100.0; //Convert cm to m + + tempRelPos = extractSignedLong(16); + relPosInfo.relPosD = ((float)tempRelPos) / 100.0; //Convert cm to m + + if (packetCfg.len == 40) + { + // The M8 version does not contain relPosLength or relPosHeading + relPosInfo.relPosLength = 0; + relPosInfo.relPosHeading = 0; + } + else + { + relPosInfo.relPosLength = extractSignedLong(20); + relPosInfo.relPosHeading = extractSignedLong(24); + } + + if (packetCfg.len == 40) + { + relPosInfo.relPosHPN = payloadCfg[20]; + relPosInfo.relPosHPE = payloadCfg[21]; + relPosInfo.relPosHPD = payloadCfg[22]; + relPosInfo.relPosHPLength = 0; // The M8 version does not contain relPosHPLength + } + else + { + relPosInfo.relPosHPN = payloadCfg[32]; + relPosInfo.relPosHPE = payloadCfg[33]; + relPosInfo.relPosHPD = payloadCfg[34]; + relPosInfo.relPosHPLength = payloadCfg[35]; + } + + uint32_t tempAcc; + + if (packetCfg.len == 40) + { + tempAcc = extractLong(24); + relPosInfo.accN = ((float)tempAcc) / 10000.0; //Convert 0.1 mm to m + tempAcc = extractLong(28); + relPosInfo.accE = ((float)tempAcc) / 10000.0; //Convert 0.1 mm to m + tempAcc = extractLong(32); + relPosInfo.accD = ((float)tempAcc) / 10000.0; //Convert 0.1 mm to m + } + else + { + tempAcc = extractLong(36); + relPosInfo.accN = ((float)tempAcc) / 10000.0; //Convert 0.1 mm to m + tempAcc = extractLong(40); + relPosInfo.accE = ((float)tempAcc) / 10000.0; //Convert 0.1 mm to m + tempAcc = extractLong(44); + relPosInfo.accD = ((float)tempAcc) / 10000.0; //Convert 0.1 mm to m + } + + uint8_t flags; + + if (packetCfg.len == 40) + { + flags = payloadCfg[36]; + } + else + { + flags = payloadCfg[60]; + } + + relPosInfo.gnssFixOk = flags & (1 << 0); + relPosInfo.diffSoln = flags & (1 << 1); + relPosInfo.relPosValid = flags & (1 << 2); + relPosInfo.carrSoln = (flags & (0b11 << 3)) >> 3; + relPosInfo.isMoving = flags & (1 << 5); + relPosInfo.refPosMiss = flags & (1 << 6); + relPosInfo.refObsMiss = flags & (1 << 7); + + return (true); +} + +boolean SFE_UBLOX_GPS::getEsfInfo(uint16_t maxWait) +{ + // Requesting Data from the receiver + packetCfg.cls = UBX_CLASS_ESF; + packetCfg.id = UBX_ESF_STATUS; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (false); //If command send fails then bail + + //checkUblox(); + + // payload should be loaded. + imuMeas.version = extractByte(4); + imuMeas.fusionMode = extractByte(12); + ubloxSen.numSens = extractByte(15); + + // Individual Status Sensor in different function + return (true); +} + +// +boolean SFE_UBLOX_GPS::getEsfIns(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_ESF; + packetCfg.id = UBX_ESF_INS; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (false); //If command send fails then bail + + //checkUblox(); + + // Validity of each sensor value below + uint32_t validity = extractLong(0); + + imuMeas.xAngRateVald = (validity & 0x0100) >> 8; + imuMeas.yAngRateVald = (validity & 0x0200) >> 9; + imuMeas.zAngRateVald = (validity & 0x0400) >> 10; + imuMeas.xAccelVald = (validity & 0x0800) >> 11; + imuMeas.yAccelVald = (validity & 0x1000) >> 12; + imuMeas.zAccelVald = (validity & 0x2000) >> 13; + + imuMeas.xAngRate = extractSignedLong(12); // 0.001 deg/s + imuMeas.yAngRate = extractSignedLong(16); // 0.001 deg/s + imuMeas.zAngRate = extractSignedLong(20); // 0.001 deg/s + + imuMeas.xAccel = extractSignedLong(24); // 0.01 m/s^2 + imuMeas.yAccel = extractSignedLong(28); // 0.01 m/s^2 + imuMeas.zAccel = extractSignedLong(32); // 0.01 m/s^2 + + return (true); +} + +// +boolean SFE_UBLOX_GPS::getEsfDataInfo(uint16_t maxWait) +{ + + packetCfg.cls = UBX_CLASS_ESF; + packetCfg.id = UBX_ESF_MEAS; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (false); //If command send fails then bail + + //checkUblox(); + + uint32_t timeStamp = extractLong(0); + uint32_t flags = extractInt(4); + + uint8_t timeSent = flags & 0x03; // timeSent is 2-bit: 0 = none, 1 = on Ext0, 2 = on Ext1 + uint8_t timeEdge = (flags & 0x04) >> 2; + uint8_t tagValid = (flags & 0x08) >> 3; + uint8_t numMeas = (flags & 0xF800) >> 11; + + if (numMeas > DEF_NUM_SENS) // Truncate numMeas if required + numMeas = DEF_NUM_SENS; + + uint8_t byteOffset = 4; + + for (uint8_t i = 0; i < numMeas; i++) + { + uint32_t bitField = extractLong(8 + (byteOffset * i)); + imuMeas.dataType[i] = (bitField & 0x3F000000) >> 24; + imuMeas.data[i] = (bitField & 0xFFFFFF); + } + + numMeas = (flags & 0xF800) >> 11; // Restore numMeas + + if (packetCfg.len > (8 + (4 * numMeas))) // The calibTtag is optional - only extract it if it is present + { + uint8_t startOfTtag = 8 + (4 * numMeas); // Calculate where the Ttag data starts + if (numMeas > DEF_NUM_SENS) // Truncate numMeas again if required + numMeas = DEF_NUM_SENS; + for (uint8_t i = 0; i < numMeas; i++) + { + imuMeas.dataTStamp[i] = extractLong(startOfTtag); // calibTtag is only appended once + } + } + + return (true); +} + +boolean SFE_UBLOX_GPS::getEsfRawDataInfo(uint16_t maxWait) +{ + + // Need to know the number of sensor to get the correct data + // Rate selected in UBX-CFG-MSG is not respected + packetCfg.cls = UBX_CLASS_ESF; + packetCfg.id = UBX_ESF_RAW; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (false); //If command send fails then bail + + //checkUblox(); + + uint32_t bitField = extractLong(4); + imuMeas.rawDataType = (bitField & 0xFF000000) >> 24; + imuMeas.rawData = (bitField & 0xFFFFFF); + + imuMeas.rawTStamp = extractLong(8); + + return (true); +} + +// Note: senor numbering starts at 1 (not 0) +sfe_ublox_status_e SFE_UBLOX_GPS::getSensState(uint8_t sensor, uint16_t maxWait) +{ + + packetCfg.cls = UBX_CLASS_ESF; + packetCfg.id = UBX_ESF_STATUS; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (SFE_UBLOX_STATUS_FAIL); //If command send fails then bail + + ubloxSen.numSens = extractByte(15); + + if (sensor > ubloxSen.numSens) + return (SFE_UBLOX_STATUS_OUT_OF_RANGE); + + //checkUblox(); + + uint8_t offset = 4; + + // Only the last sensor value checked will remain. + for (uint8_t i = 0; i < sensor; i++) + { + + uint8_t sensorFieldOne = extractByte(16 + (offset * i)); + uint8_t sensorFieldTwo = extractByte(17 + (offset * i)); + ubloxSen.freq = extractByte(18 + (offset * i)); + uint8_t sensorFieldThr = extractByte(19 + offset * i); + + ubloxSen.senType = (sensorFieldOne & 0x3F); + ubloxSen.isUsed = (sensorFieldOne & 0x40) >> 6; + ubloxSen.isReady = (sensorFieldOne & 0x80) >> 7; + + ubloxSen.calibStatus = sensorFieldTwo & 0x03; + ubloxSen.timeStatus = (sensorFieldTwo & 0xC) >> 2; + + ubloxSen.badMeas = (sensorFieldThr & 0x01); + ubloxSen.badTag = (sensorFieldThr & 0x02) >> 1; + ubloxSen.missMeas = (sensorFieldThr & 0x04) >> 2; + ubloxSen.noisyMeas = (sensorFieldThr & 0x08) >> 3; + } + + return (SFE_UBLOX_STATUS_SUCCESS); +} + +boolean SFE_UBLOX_GPS::getVehAtt(uint16_t maxWait) +{ + + packetCfg.cls = UBX_CLASS_NAV; + packetCfg.id = UBX_NAV_ATT; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (SFE_UBLOX_STATUS_FAIL); //If command send fails then bail + + //checkUblox(); + + vehAtt.roll = extractSignedLong(8); // 0.00001 deg + vehAtt.pitch = extractSignedLong(12); // 0.00001 deg + vehAtt.heading = extractSignedLong(16); // 0.00001 deg + + vehAtt.accRoll = extractLong(20); // 0.00001 deg + vehAtt.accPitch = extractLong(24); // 0.00001 deg + vehAtt.accHeading = extractLong(28); // 0.00001 deg + + return (true); +} + +//Set the ECEF or Lat/Long coordinates of a receiver +//This imediately puts the receiver in TIME mode (fixed) and will begin outputting RTCM sentences if enabled +//This is helpful once an antenna's position has been established. See this tutorial: https://learn.sparkfun.com/tutorials/how-to-build-a-diy-gnss-reference-station#gather-raw-gnss-data +// For ECEF the units are: cm, 0.1mm, cm, 0.1mm, cm, 0.1mm +// For Lat/Lon/Alt the units are: degrees^-7, degrees^-9, degrees^-7, degrees^-9, cm, 0.1mm +bool SFE_UBLOX_GPS::setStaticPosition(int32_t ecefXOrLat, int8_t ecefXOrLatHP, int32_t ecefYOrLon, int8_t ecefYOrLonHP, int32_t ecefZOrAlt, int8_t ecefZOrAltHP, bool latLong, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_TMODE3; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the current TimeMode3 settings. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (false); + + packetCfg.len = 40; + + //Clear packet payload + for (uint8_t x = 0; x < packetCfg.len; x++) + payloadCfg[x] = 0; + + //customCfg should be loaded with poll response. Now modify only the bits we care about + payloadCfg[2] = 2; //Set mode to fixed. Use ECEF (not LAT/LON/ALT). + + if (latLong == true) + payloadCfg[3] = (uint8_t)(1 << 0); //Set mode to fixed. Use LAT/LON/ALT. + + //Set ECEF X or Lat + payloadCfg[4] = (ecefXOrLat >> 8 * 0) & 0xFF; //LSB + payloadCfg[5] = (ecefXOrLat >> 8 * 1) & 0xFF; + payloadCfg[6] = (ecefXOrLat >> 8 * 2) & 0xFF; + payloadCfg[7] = (ecefXOrLat >> 8 * 3) & 0xFF; //MSB + + //Set ECEF Y or Long + payloadCfg[8] = (ecefYOrLon >> 8 * 0) & 0xFF; //LSB + payloadCfg[9] = (ecefYOrLon >> 8 * 1) & 0xFF; + payloadCfg[10] = (ecefYOrLon >> 8 * 2) & 0xFF; + payloadCfg[11] = (ecefYOrLon >> 8 * 3) & 0xFF; //MSB + + //Set ECEF Z or Altitude + payloadCfg[12] = (ecefZOrAlt >> 8 * 0) & 0xFF; //LSB + payloadCfg[13] = (ecefZOrAlt >> 8 * 1) & 0xFF; + payloadCfg[14] = (ecefZOrAlt >> 8 * 2) & 0xFF; + payloadCfg[15] = (ecefZOrAlt >> 8 * 3) & 0xFF; //MSB + + //Set high precision parts + payloadCfg[16] = ecefXOrLatHP; + payloadCfg[17] = ecefYOrLonHP; + payloadCfg[18] = ecefZOrAltHP; + + return ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK +} + +bool SFE_UBLOX_GPS::setStaticPosition(int32_t ecefXOrLat, int32_t ecefYOrLon, int32_t ecefZOrAlt, bool latlong, uint16_t maxWait) +{ + return (setStaticPosition(ecefXOrLat, 0, ecefYOrLon, 0, ecefZOrAlt, 0, latlong, maxWait)); +} + +// Push (e.g.) RTCM data directly to the module +// Returns true if all numDataBytes were pushed successfully +// Warning: this function does not check that the data is valid. It is the user's responsibility to ensure the data is valid before pushing. +boolean SFE_UBLOX_GPS::pushRawData(uint8_t *dataBytes, size_t numDataBytes) +{ + if (commType == COMM_TYPE_SERIAL) + { + // Serial: write all the bytes in one go + size_t bytesWritten = _serialPort->write(dataBytes, numDataBytes); + return (bytesWritten == numDataBytes); + } + else + { + // I2C: split the data up into packets of i2cTransactionSize + size_t bytesLeftToWrite = numDataBytes; + size_t bytesWrittenTotal = 0; + + while (bytesLeftToWrite > 0) + { + size_t bytesToWrite; // Limit bytesToWrite to i2cTransactionSize + if (bytesLeftToWrite > i2cTransactionSize) + bytesToWrite = i2cTransactionSize; + else + bytesToWrite = bytesLeftToWrite; + + _i2cPort->beginTransmission(_gpsI2Caddress); + size_t bytesWritten = _i2cPort->write(dataBytes, bytesToWrite); // Write the bytes + + bytesWrittenTotal += bytesWritten; // Update the totals + bytesLeftToWrite -= bytesToWrite; + dataBytes += bytesToWrite; // Point to fresh data + + if (bytesLeftToWrite > 0) + { + if (_i2cPort->endTransmission(false) != 0) //Send a restart command. Do not release bus. + return (false); //Sensor did not ACK + } + else + { + if (_i2cPort->endTransmission() != 0) //We're done. Release bus. + return (false); //Sensor did not ACK + } + } + + return (bytesWrittenTotal == numDataBytes); + } +} + +// Set the High Navigation Rate +// Returns true if the setHNRNavigationRate is successful +boolean SFE_UBLOX_GPS::setHNRNavigationRate(uint8_t rate, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_HNR; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the current HNR settings. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (false); + + //Load the new navigation rate into payloadCfg + payloadCfg[0] = rate; + + //Update the navigation rate + sfe_ublox_status_e result = sendCommand(&packetCfg, maxWait); // We are only expecting an ACK + + //Adjust the I2C polling timeout based on update rate + if (result == SFE_UBLOX_STATUS_DATA_SENT) + i2cPollingWait = 1000 / (((int)rate) * 4); //This is the number of ms to wait between checks for new I2C data + + return (result == SFE_UBLOX_STATUS_DATA_SENT); +} + +// Get the High Navigation Rate +// Returns 0 if the getHNRNavigationRate fails +uint8_t SFE_UBLOX_GPS::getHNRNavigationRate(uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_HNR; + packetCfg.len = 0; + packetCfg.startingSpot = 0; + + //Ask module for the current HNR settings. Loads into payloadCfg. + if (sendCommand(&packetCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) + return (0); + + //Return the navigation rate + return (payloadCfg[0]); +} + +//In case no config access to the GPS is possible and HNR attitude is send cyclically already +//set config to suitable parameters +boolean SFE_UBLOX_GPS::assumeAutoHNRAtt(boolean enabled, boolean implicitUpdate) +{ + boolean changes = autoHNRAtt != enabled || autoHNRAttImplicitUpdate != implicitUpdate; + if (changes) + { + autoHNRAtt = enabled; + autoHNRAttImplicitUpdate = implicitUpdate; + } + return changes; +} + +//Enable or disable automatic HNR attitude message generation by the GPS. This changes the way getHNRAtt +//works. +boolean SFE_UBLOX_GPS::setAutoHNRAtt(boolean enable, uint16_t maxWait) +{ + return setAutoHNRAtt(enable, true, maxWait); +} + +//Enable or disable automatic HNR attitude message generation by the GPS. This changes the way getHNRAtt +//works. +boolean SFE_UBLOX_GPS::setAutoHNRAtt(boolean enable, boolean implicitUpdate, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_MSG; + packetCfg.len = 3; + packetCfg.startingSpot = 0; + payloadCfg[0] = UBX_CLASS_HNR; + payloadCfg[1] = UBX_HNR_ATT; + payloadCfg[2] = enable ? 1 : 0; // rate relative to navigation freq. + + boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + if (ok) + { + autoHNRAtt = enable; + autoHNRAttImplicitUpdate = implicitUpdate; + } + hnrAttQueried = false; // Mark data as stale + return ok; +} + +//Get the HNR Attitude data +// Returns true if the get HNR attitude is successful. Data is returned in hnrAtt +// Note: if hnrAttQueried is true, it gets set to false by this function since we assume +// that the user will read hnrAtt immediately after this. I.e. this function will +// only return true _once_ after each auto HNR Att is processed +boolean SFE_UBLOX_GPS::getHNRAtt(uint16_t maxWait) +{ + if (autoHNRAtt && autoHNRAttImplicitUpdate) + { + //The GPS is automatically reporting, we just check whether we got unread data + if (_printDebug == true) + { + _debugSerial->println(F("getHNRAtt: Autoreporting")); + } + checkUbloxInternal(&packetCfg, UBX_CLASS_HNR, UBX_HNR_ATT); + if (hnrAttQueried) + { + hnrAttQueried = false; // Mark data as stale as we assume the user will read it after this + return true; + } + return false; + } + else if (autoHNRAtt && !autoHNRAttImplicitUpdate) + { + //Someone else has to call checkUblox for us... + if (_printDebug == true) + { + _debugSerial->println(F("getHNRAtt: Exit immediately")); + } + return (false); + } + else + { + if (_printDebug == true) + { + _debugSerial->println(F("getHNRAtt: Polling")); + } + + //The GPS is not automatically reporting HNR attitude so we have to poll explicitly + packetCfg.cls = UBX_CLASS_HNR; + packetCfg.id = UBX_HNR_ATT; + packetCfg.len = 0; + + //The data is parsed as part of processing the response + sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait); + + if (retVal == SFE_UBLOX_STATUS_DATA_RECEIVED) + return (true); + + if ((retVal == SFE_UBLOX_STATUS_DATA_OVERWRITTEN) && (packetCfg.cls == UBX_CLASS_NAV)) + { + if (_printDebug == true) + { + _debugSerial->println(F("getHNRAtt: data was OVERWRITTEN by a NAV message (and that's not OK)")); + } + return (false); + } + + if ((retVal == SFE_UBLOX_STATUS_DATA_OVERWRITTEN) && (packetCfg.cls == UBX_CLASS_HNR)) + { + if (_printDebug == true) + { + _debugSerial->println(F("getHNRAtt: data was OVERWRITTEN by another HNR message (but that's OK)")); + } + return (true); + } + + if (_printDebug == true) + { + _debugSerial->print(F("getHNRAtt retVal: ")); + _debugSerial->println(statusString(retVal)); + } + return (false); + } + + return (false); // Trap. We should never get here... +} + +//In case no config access to the GPS is possible and HNR vehicle dynamics is send cyclically already +//set config to suitable parameters +boolean SFE_UBLOX_GPS::assumeAutoHNRDyn(boolean enabled, boolean implicitUpdate) +{ + boolean changes = autoHNRDyn != enabled || autoHNRDynImplicitUpdate != implicitUpdate; + if (changes) + { + autoHNRDyn = enabled; + autoHNRDynImplicitUpdate = implicitUpdate; + } + return changes; +} + +//Enable or disable automatic HNR vehicle dynamics message generation by the GPS. This changes the way getHNRDyn +//works. +boolean SFE_UBLOX_GPS::setAutoHNRDyn(boolean enable, uint16_t maxWait) +{ + return setAutoHNRDyn(enable, true, maxWait); +} + +//Enable or disable automatic HNR vehicle dynamics message generation by the GPS. This changes the way getHNRDyn +//works. +boolean SFE_UBLOX_GPS::setAutoHNRDyn(boolean enable, boolean implicitUpdate, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_MSG; + packetCfg.len = 3; + packetCfg.startingSpot = 0; + payloadCfg[0] = UBX_CLASS_HNR; + payloadCfg[1] = UBX_HNR_INS; + payloadCfg[2] = enable ? 1 : 0; // rate relative to navigation freq. + + boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + if (ok) + { + autoHNRDyn = enable; + autoHNRDynImplicitUpdate = implicitUpdate; + } + hnrDynQueried = false; // Mark data as stale + return ok; +} + +//Get the HNR vehicle dynamics data +// Returns true if the get HNR vehicle dynamics is successful. Data is returned in hnrVehDyn +// Note: if hnrDynQueried is true, it gets set to false by this function since we assume +// that the user will read hnrVehDyn immediately after this. I.e. this function will +// only return true _once_ after each auto HNR Dyn is processed +boolean SFE_UBLOX_GPS::getHNRDyn(uint16_t maxWait) +{ + if (autoHNRDyn && autoHNRDynImplicitUpdate) + { + //The GPS is automatically reporting, we just check whether we got unread data + if (_printDebug == true) + { + _debugSerial->println(F("getHNRDyn: Autoreporting")); + } + checkUbloxInternal(&packetCfg, UBX_CLASS_HNR, UBX_HNR_INS); + if (hnrDynQueried) + { + hnrDynQueried = false; // Mark data as stale as we assume the user will read it after this + return true; + } + return false; + } + else if (autoHNRDyn && !autoHNRDynImplicitUpdate) + { + //Someone else has to call checkUblox for us... + if (_printDebug == true) + { + _debugSerial->println(F("getHNRDyn: Exit immediately")); + } + return (false); + } + else + { + if (_printDebug == true) + { + _debugSerial->println(F("getHNRDyn: Polling")); + } + + //The GPS is not automatically reporting HNR vehicle dynamics so we have to poll explicitly + packetCfg.cls = UBX_CLASS_HNR; + packetCfg.id = UBX_HNR_INS; + packetCfg.len = 0; + + //The data is parsed as part of processing the response + sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait); + + if (retVal == SFE_UBLOX_STATUS_DATA_RECEIVED) + return (true); + + if ((retVal == SFE_UBLOX_STATUS_DATA_OVERWRITTEN) && (packetCfg.cls == UBX_CLASS_NAV)) + { + if (_printDebug == true) + { + _debugSerial->println(F("getHNRDyn: data was OVERWRITTEN by a NAV message (and that's not OK)")); + } + return (false); + } + + if ((retVal == SFE_UBLOX_STATUS_DATA_OVERWRITTEN) && (packetCfg.cls == UBX_CLASS_HNR)) + { + if (_printDebug == true) + { + _debugSerial->println(F("getHNRDyn: data was OVERWRITTEN by another HNR message (but that's OK)")); + } + return (true); + } + + if (_printDebug == true) + { + _debugSerial->print(F("getHNRDyn retVal: ")); + _debugSerial->println(statusString(retVal)); + } + return (false); + } + + return (false); // Trap. We should never get here... +} + +//In case no config access to the GPS is possible and HNR PVT is send cyclically already +//set config to suitable parameters +boolean SFE_UBLOX_GPS::assumeAutoHNRPVT(boolean enabled, boolean implicitUpdate) +{ + boolean changes = autoHNRPVT != enabled || autoHNRPVTImplicitUpdate != implicitUpdate; + if (changes) + { + autoHNRPVT = enabled; + autoHNRPVTImplicitUpdate = implicitUpdate; + } + return changes; +} + +//Enable or disable automatic HNR PVT message generation by the GPS. This changes the way getHNRPVT +//works. +boolean SFE_UBLOX_GPS::setAutoHNRPVT(boolean enable, uint16_t maxWait) +{ + return setAutoHNRPVT(enable, true, maxWait); +} + +//Enable or disable automatic HNR PVT message generation by the GPS. This changes the way getHNRPVT +//works. +boolean SFE_UBLOX_GPS::setAutoHNRPVT(boolean enable, boolean implicitUpdate, uint16_t maxWait) +{ + packetCfg.cls = UBX_CLASS_CFG; + packetCfg.id = UBX_CFG_MSG; + packetCfg.len = 3; + packetCfg.startingSpot = 0; + payloadCfg[0] = UBX_CLASS_HNR; + payloadCfg[1] = UBX_HNR_PVT; + payloadCfg[2] = enable ? 1 : 0; // rate relative to navigation freq. + + boolean ok = ((sendCommand(&packetCfg, maxWait)) == SFE_UBLOX_STATUS_DATA_SENT); // We are only expecting an ACK + if (ok) + { + autoHNRPVT = enable; + autoHNRPVTImplicitUpdate = implicitUpdate; + } + hnrPVTQueried = false; // Mark data as stale + return ok; +} + +//Get the HNR PVT data +// Returns true if the get HNR PVT is successful. Data is returned in hnrPVT +// Note: if hnrPVTQueried is true, it gets set to false by this function since we assume +// that the user will read hnrPVT immediately after this. I.e. this function will +// only return true _once_ after each auto HNR PVT is processed +boolean SFE_UBLOX_GPS::getHNRPVT(uint16_t maxWait) +{ + if (autoHNRPVT && autoHNRPVTImplicitUpdate) + { + //The GPS is automatically reporting, we just check whether we got unread data + if (_printDebug == true) + { + _debugSerial->println(F("getHNRPVT: Autoreporting")); + } + checkUbloxInternal(&packetCfg, UBX_CLASS_HNR, UBX_HNR_PVT); + if (hnrPVTQueried) + { + hnrPVTQueried = false; // Mark data as stale as we assume the user will read it after this + return true; + } + return false; + } + else if (autoHNRPVT && !autoHNRPVTImplicitUpdate) + { + //Someone else has to call checkUblox for us... + if (_printDebug == true) + { + _debugSerial->println(F("getHNRPVT: Exit immediately")); + } + return (false); + } + else + { + if (_printDebug == true) + { + _debugSerial->println(F("getHNRPVT: Polling")); + } + + //The GPS is not automatically reporting HNR PVT so we have to poll explicitly + packetCfg.cls = UBX_CLASS_HNR; + packetCfg.id = UBX_HNR_PVT; + packetCfg.len = 0; + + //The data is parsed as part of processing the response + sfe_ublox_status_e retVal = sendCommand(&packetCfg, maxWait); + + if (retVal == SFE_UBLOX_STATUS_DATA_RECEIVED) + return (true); + + if ((retVal == SFE_UBLOX_STATUS_DATA_OVERWRITTEN) && (packetCfg.cls == UBX_CLASS_NAV)) + { + if (_printDebug == true) + { + _debugSerial->println(F("getHNRPVT: data was OVERWRITTEN by a NAV message (and that's not OK)")); + } + return (false); + } + + if ((retVal == SFE_UBLOX_STATUS_DATA_OVERWRITTEN) && (packetCfg.cls == UBX_CLASS_HNR)) + { + if (_printDebug == true) + { + _debugSerial->println(F("getHNRPVT: data was OVERWRITTEN by another HNR message (but that's OK)")); + } + return (true); + } + + if (_printDebug == true) + { + _debugSerial->print(F("getHNRPVT retVal: ")); + _debugSerial->println(statusString(retVal)); + } + return (false); + } + + return (false); // Trap. We should never get here... +} diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/src/SparkFun_Ublox_Arduino_Library.h b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/src/SparkFun_Ublox_Arduino_Library.h new file mode 100644 index 0000000..9a3e250 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/src/SparkFun_Ublox_Arduino_Library.h @@ -0,0 +1,1098 @@ +/* + This is a library written for the u-blox ZED-F9P and NEO-M8P-2 + SparkFun sells these at its website: www.sparkfun.com + Do you like this library? Help support SparkFun. Buy a board! + https://www.sparkfun.com/products/16481 + https://www.sparkfun.com/products/15136 + https://www.sparkfun.com/products/15005 + https://www.sparkfun.com/products/15733 + https://www.sparkfun.com/products/15193 + https://www.sparkfun.com/products/15210 + + Written by Nathan Seidle @ SparkFun Electronics, September 6th, 2018 + + This library handles configuring and handling the responses + from a u-blox GPS module. Works with most modules from u-blox including + the Zed-F9P, NEO-M8P-2, NEO-M9N, ZOE-M8Q, SAM-M8Q, and many others. + + https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library + + Development environment specifics: + Arduino IDE 1.8.5 + + SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT). + The MIT License (MIT) + Copyright (c) 2016 SparkFun Electronics + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the Software is furnished to + do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial + portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT + NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef SPARKFUN_UBLOX_ARDUINO_LIBRARY_H +#define SPARKFUN_UBLOX_ARDUINO_LIBRARY_H + +#if (ARDUINO >= 100) +#include "Arduino.h" +#else +#include "WProgram.h" +#endif + +#include + +#include "u-blox_config_keys.h" + +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +//Define a digital pin to aid checksum failure capture and analysis +//Leave set to -1 if not needed +const int checksumFailurePin = -1; + +// Global Status Returns +typedef enum +{ + SFE_UBLOX_STATUS_SUCCESS, + SFE_UBLOX_STATUS_FAIL, + SFE_UBLOX_STATUS_CRC_FAIL, + SFE_UBLOX_STATUS_TIMEOUT, + SFE_UBLOX_STATUS_COMMAND_NACK, // Indicates that the command was unrecognised, invalid or that the module is too busy to respond + SFE_UBLOX_STATUS_OUT_OF_RANGE, + SFE_UBLOX_STATUS_INVALID_ARG, + SFE_UBLOX_STATUS_INVALID_OPERATION, + SFE_UBLOX_STATUS_MEM_ERR, + SFE_UBLOX_STATUS_HW_ERR, + SFE_UBLOX_STATUS_DATA_SENT, // This indicates that a 'set' was successful + SFE_UBLOX_STATUS_DATA_RECEIVED, // This indicates that a 'get' (poll) was successful + SFE_UBLOX_STATUS_I2C_COMM_FAILURE, + SFE_UBLOX_STATUS_DATA_OVERWRITTEN // This is an error - the data was valid but has been or _is being_ overwritten by another packet +} sfe_ublox_status_e; + +// ubxPacket validity +typedef enum +{ + SFE_UBLOX_PACKET_VALIDITY_NOT_VALID, + SFE_UBLOX_PACKET_VALIDITY_VALID, + SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, + SFE_UBLOX_PACKET_NOTACKNOWLEDGED // This indicates that we received a NACK +} sfe_ublox_packet_validity_e; + +// Identify which packet buffer is in use: +// packetCfg (or a custom packet), packetAck or packetBuf +typedef enum +{ + SFE_UBLOX_PACKET_PACKETCFG, + SFE_UBLOX_PACKET_PACKETACK, + SFE_UBLOX_PACKET_PACKETBUF +} sfe_ublox_packet_buffer_e; + +//Registers +const uint8_t UBX_SYNCH_1 = 0xB5; +const uint8_t UBX_SYNCH_2 = 0x62; + +//The following are UBX Class IDs. Descriptions taken from ZED-F9P Interface Description Document page 32, NEO-M8P Interface Description page 145 +const uint8_t UBX_CLASS_NAV = 0x01; //Navigation Results Messages: Position, Speed, Time, Acceleration, Heading, DOP, SVs used +const uint8_t UBX_CLASS_RXM = 0x02; //Receiver Manager Messages: Satellite Status, RTC Status +const uint8_t UBX_CLASS_INF = 0x04; //Information Messages: Printf-Style Messages, with IDs such as Error, Warning, Notice +const uint8_t UBX_CLASS_ACK = 0x05; //Ack/Nak Messages: Acknowledge or Reject messages to UBX-CFG input messages +const uint8_t UBX_CLASS_CFG = 0x06; //Configuration Input Messages: Configure the receiver. +const uint8_t UBX_CLASS_UPD = 0x09; //Firmware Update Messages: Memory/Flash erase/write, Reboot, Flash identification, etc. +const uint8_t UBX_CLASS_MON = 0x0A; //Monitoring Messages: Communication Status, CPU Load, Stack Usage, Task Status +const uint8_t UBX_CLASS_AID = 0x0B; //(NEO-M8P ONLY!!!) AssistNow Aiding Messages: Ephemeris, Almanac, other A-GPS data input +const uint8_t UBX_CLASS_TIM = 0x0D; //Timing Messages: Time Pulse Output, Time Mark Results +const uint8_t UBX_CLASS_ESF = 0x10; //(NEO-M8P ONLY!!!) External Sensor Fusion Messages: External Sensor Measurements and Status Information +const uint8_t UBX_CLASS_MGA = 0x13; //Multiple GNSS Assistance Messages: Assistance data for various GNSS +const uint8_t UBX_CLASS_LOG = 0x21; //Logging Messages: Log creation, deletion, info and retrieval +const uint8_t UBX_CLASS_SEC = 0x27; //Security Feature Messages +const uint8_t UBX_CLASS_HNR = 0x28; //(NEO-M8P ONLY!!!) High Rate Navigation Results Messages: High rate time, position speed, heading +const uint8_t UBX_CLASS_NMEA = 0xF0; //NMEA Strings: standard NMEA strings + +//The following are used for configuration. Descriptions are from the ZED-F9P Interface Description pg 33-34 and NEO-M9N Interface Description pg 47-48 +const uint8_t UBX_CFG_ANT = 0x13; //Antenna Control Settings. Used to configure the antenna control settings +const uint8_t UBX_CFG_BATCH = 0x93; //Get/set data batching configuration. +const uint8_t UBX_CFG_CFG = 0x09; //Clear, Save, and Load Configurations. Used to save current configuration +const uint8_t UBX_CFG_DAT = 0x06; //Set User-defined Datum or The currently defined Datum +const uint8_t UBX_CFG_DGNSS = 0x70; //DGNSS configuration +const uint8_t UBX_CFG_ESFALG = 0x56; //ESF alignment +const uint8_t UBX_CFG_ESFA = 0x4C; //ESF accelerometer +const uint8_t UBX_CFG_ESFG = 0x4D; //ESF gyro +const uint8_t UBX_CFG_GEOFENCE = 0x69; //Geofencing configuration. Used to configure a geofence +const uint8_t UBX_CFG_GNSS = 0x3E; //GNSS system configuration +const uint8_t UBX_CFG_HNR = 0x5C; //High Navigation Rate +const uint8_t UBX_CFG_INF = 0x02; //Depending on packet length, either: poll configuration for one protocol, or information message configuration +const uint8_t UBX_CFG_ITFM = 0x39; //Jamming/Interference Monitor configuration +const uint8_t UBX_CFG_LOGFILTER = 0x47; //Data Logger Configuration +const uint8_t UBX_CFG_MSG = 0x01; //Poll a message configuration, or Set Message Rate(s), or Set Message Rate +const uint8_t UBX_CFG_NAV5 = 0x24; //Navigation Engine Settings. Used to configure the navigation engine including the dynamic model. +const uint8_t UBX_CFG_NAVX5 = 0x23; //Navigation Engine Expert Settings +const uint8_t UBX_CFG_NMEA = 0x17; //Extended NMEA protocol configuration V1 +const uint8_t UBX_CFG_ODO = 0x1E; //Odometer, Low-speed COG Engine Settings +const uint8_t UBX_CFG_PM2 = 0x3B; //Extended power management configuration +const uint8_t UBX_CFG_PMS = 0x86; //Power mode setup +const uint8_t UBX_CFG_PRT = 0x00; //Used to configure port specifics. Polls the configuration for one I/O Port, or Port configuration for UART ports, or Port configuration for USB port, or Port configuration for SPI port, or Port configuration for DDC port +const uint8_t UBX_CFG_PWR = 0x57; //Put receiver in a defined power state +const uint8_t UBX_CFG_RATE = 0x08; //Navigation/Measurement Rate Settings. Used to set port baud rates. +const uint8_t UBX_CFG_RINV = 0x34; //Contents of Remote Inventory +const uint8_t UBX_CFG_RST = 0x04; //Reset Receiver / Clear Backup Data Structures. Used to reset device. +const uint8_t UBX_CFG_RXM = 0x11; //RXM configuration +const uint8_t UBX_CFG_SBAS = 0x16; //SBAS configuration +const uint8_t UBX_CFG_TMODE3 = 0x71; //Time Mode Settings 3. Used to enable Survey In Mode +const uint8_t UBX_CFG_TP5 = 0x31; //Time Pulse Parameters +const uint8_t UBX_CFG_USB = 0x1B; //USB Configuration +const uint8_t UBX_CFG_VALDEL = 0x8C; //Used for config of higher version u-blox modules (ie protocol v27 and above). Deletes values corresponding to provided keys/ provided keys with a transaction +const uint8_t UBX_CFG_VALGET = 0x8B; //Used for config of higher version u-blox modules (ie protocol v27 and above). Configuration Items +const uint8_t UBX_CFG_VALSET = 0x8A; //Used for config of higher version u-blox modules (ie protocol v27 and above). Sets values corresponding to provided key-value pairs/ provided key-value pairs within a transaction. + +//The following are used to enable NMEA messages. Descriptions come from the NMEA messages overview in the ZED-F9P Interface Description +const uint8_t UBX_NMEA_MSB = 0xF0; //All NMEA enable commands have 0xF0 as MSB +const uint8_t UBX_NMEA_DTM = 0x0A; //GxDTM (datum reference) +const uint8_t UBX_NMEA_GAQ = 0x45; //GxGAQ (poll a standard message (if the current talker ID is GA)) +const uint8_t UBX_NMEA_GBQ = 0x44; //GxGBQ (poll a standard message (if the current Talker ID is GB)) +const uint8_t UBX_NMEA_GBS = 0x09; //GxGBS (GNSS satellite fault detection) +const uint8_t UBX_NMEA_GGA = 0x00; //GxGGA (Global positioning system fix data) +const uint8_t UBX_NMEA_GLL = 0x01; //GxGLL (latitude and long, whith time of position fix and status) +const uint8_t UBX_NMEA_GLQ = 0x43; //GxGLQ (poll a standard message (if the current Talker ID is GL)) +const uint8_t UBX_NMEA_GNQ = 0x42; //GxGNQ (poll a standard message (if the current Talker ID is GN)) +const uint8_t UBX_NMEA_GNS = 0x0D; //GxGNS (GNSS fix data) +const uint8_t UBX_NMEA_GPQ = 0x040; //GxGPQ (poll a standard message (if the current Talker ID is GP)) +const uint8_t UBX_NMEA_GRS = 0x06; //GxGRS (GNSS range residuals) +const uint8_t UBX_NMEA_GSA = 0x02; //GxGSA (GNSS DOP and Active satellites) +const uint8_t UBX_NMEA_GST = 0x07; //GxGST (GNSS Pseudo Range Error Statistics) +const uint8_t UBX_NMEA_GSV = 0x03; //GxGSV (GNSS satellites in view) +const uint8_t UBX_NMEA_RMC = 0x04; //GxRMC (Recommended minimum data) +const uint8_t UBX_NMEA_TXT = 0x41; //GxTXT (text transmission) +const uint8_t UBX_NMEA_VLW = 0x0F; //GxVLW (dual ground/water distance) +const uint8_t UBX_NMEA_VTG = 0x05; //GxVTG (course over ground and Ground speed) +const uint8_t UBX_NMEA_ZDA = 0x08; //GxZDA (Time and Date) + +//The following are used to configure the NMEA protocol main talker ID and GSV talker ID +const uint8_t UBX_NMEA_MAINTALKERID_NOTOVERRIDDEN = 0x00; //main talker ID is system dependent +const uint8_t UBX_NMEA_MAINTALKERID_GP = 0x01; //main talker ID is GPS +const uint8_t UBX_NMEA_MAINTALKERID_GL = 0x02; //main talker ID is GLONASS +const uint8_t UBX_NMEA_MAINTALKERID_GN = 0x03; //main talker ID is combined receiver +const uint8_t UBX_NMEA_MAINTALKERID_GA = 0x04; //main talker ID is Galileo +const uint8_t UBX_NMEA_MAINTALKERID_GB = 0x05; //main talker ID is BeiDou +const uint8_t UBX_NMEA_GSVTALKERID_GNSS = 0x00; //GNSS specific Talker ID (as defined by NMEA) +const uint8_t UBX_NMEA_GSVTALKERID_MAIN = 0x01; //use the main Talker ID + +//The following are used to configure the HNR message rates +const uint8_t UBX_HNR_ATT = 0x01; //HNR Attitude +const uint8_t UBX_HNR_INS = 0x02; //HNR Vehicle Dynamics +const uint8_t UBX_HNR_PVT = 0x00; //HNR PVT + +//The following are used to configure INF UBX messages (information messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 34) +const uint8_t UBX_INF_CLASS = 0x04; //All INF messages have 0x04 as the class +const uint8_t UBX_INF_DEBUG = 0x04; //ASCII output with debug contents +const uint8_t UBX_INF_ERROR = 0x00; //ASCII output with error contents +const uint8_t UBX_INF_NOTICE = 0x02; //ASCII output with informational contents +const uint8_t UBX_INF_TEST = 0x03; //ASCII output with test contents +const uint8_t UBX_INF_WARNING = 0x01; //ASCII output with warning contents + +//The following are used to configure LOG UBX messages (loggings messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 34) +const uint8_t UBX_LOG_CREATE = 0x07; //Create Log File +const uint8_t UBX_LOG_ERASE = 0x03; //Erase Logged Data +const uint8_t UBX_LOG_FINDTIME = 0x0E; //Find index of a log entry based on a given time, or response to FINDTIME requested +const uint8_t UBX_LOG_INFO = 0x08; //Poll for log information, or Log information +const uint8_t UBX_LOG_RETRIEVEPOSEXTRA = 0x0F; //Odometer log entry +const uint8_t UBX_LOG_RETRIEVEPOS = 0x0B; //Position fix log entry +const uint8_t UBX_LOG_RETRIEVESTRING = 0x0D; //Byte string log entry +const uint8_t UBX_LOG_RETRIEVE = 0x09; //Request log data +const uint8_t UBX_LOG_STRING = 0x04; //Store arbitrary string on on-board flash + +//The following are used to configure MGA UBX messages (Multiple GNSS Assistance Messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 34) +const uint8_t UBX_MGA_ACK_DATA0 = 0x60; //Multiple GNSS Acknowledge message +const uint8_t UBX_MGA_BDS_EPH = 0x03; //BDS Ephemeris Assistance +const uint8_t UBX_MGA_BDS_ALM = 0x03; //BDS Almanac Assistance +const uint8_t UBX_MGA_BDS_HEALTH = 0x03; //BDS Health Assistance +const uint8_t UBX_MGA_BDS_UTC = 0x03; //BDS UTC Assistance +const uint8_t UBX_MGA_BDS_IONO = 0x03; //BDS Ionospheric Assistance +const uint8_t UBX_MGA_DBD = 0x80; //Either: Poll the Navigation Database, or Navigation Database Dump Entry +const uint8_t UBX_MGA_GAL_EPH = 0x02; //Galileo Ephemeris Assistance +const uint8_t UBX_MGA_GAL_ALM = 0x02; //Galileo Almanac Assitance +const uint8_t UBX_MGA_GAL_TIMOFFSET = 0x02; //Galileo GPS time offset assistance +const uint8_t UBX_MGA_GAL_UTC = 0x02; //Galileo UTC Assistance +const uint8_t UBX_MGA_GLO_EPH = 0x06; //GLONASS Ephemeris Assistance +const uint8_t UBX_MGA_GLO_ALM = 0x06; //GLONASS Almanac Assistance +const uint8_t UBX_MGA_GLO_TIMEOFFSET = 0x06; //GLONASS Auxiliary Time Offset Assistance +const uint8_t UBX_MGA_GPS_EPH = 0x00; //GPS Ephemeris Assistance +const uint8_t UBX_MGA_GPS_ALM = 0x00; //GPS Almanac Assistance +const uint8_t UBX_MGA_GPS_HEALTH = 0x00; //GPS Health Assistance +const uint8_t UBX_MGA_GPS_UTC = 0x00; //GPS UTC Assistance +const uint8_t UBX_MGA_GPS_IONO = 0x00; //GPS Ionosphere Assistance +const uint8_t UBX_MGA_INI_POS_XYZ = 0x40; //Initial Position Assistance +const uint8_t UBX_MGA_INI_POS_LLH = 0x40; //Initial Position Assitance +const uint8_t UBX_MGA_INI_TIME_UTC = 0x40; //Initial Time Assistance +const uint8_t UBX_MGA_INI_TIME_GNSS = 0x40; //Initial Time Assistance +const uint8_t UBX_MGA_INI_CLKD = 0x40; //Initial Clock Drift Assitance +const uint8_t UBX_MGA_INI_FREQ = 0x40; //Initial Frequency Assistance +const uint8_t UBX_MGA_INI_EOP = 0x40; //Earth Orientation Parameters Assistance +const uint8_t UBX_MGA_QZSS_EPH = 0x05; //QZSS Ephemeris Assistance +const uint8_t UBX_MGA_QZSS_ALM = 0x05; //QZSS Almanac Assistance +const uint8_t UBX_MGA_QZAA_HEALTH = 0x05; //QZSS Health Assistance + +//The following are used to configure the MON UBX messages (monitoring messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 35) +const uint8_t UBX_MON_COMMS = 0x36; //Comm port information +const uint8_t UBX_MON_GNSS = 0x28; //Information message major GNSS selection +const uint8_t UBX_MON_HW2 = 0x0B; //Extended Hardware Status +const uint8_t UBX_MON_HW3 = 0x37; //HW I/O pin information +const uint8_t UBX_MON_HW = 0x09; //Hardware Status +const uint8_t UBX_MON_IO = 0x02; //I/O Subsystem Status +const uint8_t UBX_MON_MSGPP = 0x06; //Message Parse and Process Status +const uint8_t UBX_MON_PATCH = 0x27; //Output information about installed patches +const uint8_t UBX_MON_RF = 0x38; //RF information +const uint8_t UBX_MON_RXBUF = 0x07; //Receiver Buffer Status +const uint8_t UBX_MON_RXR = 0x21; //Receiver Status Information +const uint8_t UBX_MON_TXBUF = 0x08; //Transmitter Buffer Status. Used for query tx buffer size/state. +const uint8_t UBX_MON_VER = 0x04; //Receiver/Software Version. Used for obtaining Protocol Version. + +//The following are used to configure the NAV UBX messages (navigation results messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 35-36) +const uint8_t UBX_NAV_ATT = 0x05; //Vehicle "Attitude" Solution +const uint8_t UBX_NAV_CLOCK = 0x22; //Clock Solution +const uint8_t UBX_NAV_DOP = 0x04; //Dilution of precision +const uint8_t UBX_NAV_EOE = 0x61; //End of Epoch +const uint8_t UBX_NAV_GEOFENCE = 0x39; //Geofencing status. Used to poll the geofence status +const uint8_t UBX_NAV_HPPOSECEF = 0x13; //High Precision Position Solution in ECEF. Used to find our positional accuracy (high precision). +const uint8_t UBX_NAV_HPPOSLLH = 0x14; //High Precision Geodetic Position Solution. Used for obtaining lat/long/alt in high precision +const uint8_t UBX_NAV_ODO = 0x09; //Odometer Solution +const uint8_t UBX_NAV_ORB = 0x34; //GNSS Orbit Database Info +const uint8_t UBX_NAV_POSECEF = 0x01; //Position Solution in ECEF +const uint8_t UBX_NAV_POSLLH = 0x02; //Geodetic Position Solution +const uint8_t UBX_NAV_PVT = 0x07; //All the things! Position, velocity, time, PDOP, height, h/v accuracies, number of satellites. Navigation Position Velocity Time Solution. +const uint8_t UBX_NAV_RELPOSNED = 0x3C; //Relative Positioning Information in NED frame +const uint8_t UBX_NAV_RESETODO = 0x10; //Reset odometer +const uint8_t UBX_NAV_SAT = 0x35; //Satellite Information +const uint8_t UBX_NAV_SIG = 0x43; //Signal Information +const uint8_t UBX_NAV_STATUS = 0x03; //Receiver Navigation Status +const uint8_t UBX_NAV_SVIN = 0x3B; //Survey-in data. Used for checking Survey In status +const uint8_t UBX_NAV_TIMEBDS = 0x24; //BDS Time Solution +const uint8_t UBX_NAV_TIMEGAL = 0x25; //Galileo Time Solution +const uint8_t UBX_NAV_TIMEGLO = 0x23; //GLO Time Solution +const uint8_t UBX_NAV_TIMEGPS = 0x20; //GPS Time Solution +const uint8_t UBX_NAV_TIMELS = 0x26; //Leap second event information +const uint8_t UBX_NAV_TIMEUTC = 0x21; //UTC Time Solution +const uint8_t UBX_NAV_VELECEF = 0x11; //Velocity Solution in ECEF +const uint8_t UBX_NAV_VELNED = 0x12; //Velocity Solution in NED + +//The following are used to configure the RXM UBX messages (receiver manager messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 36) +const uint8_t UBX_RXM_MEASX = 0x14; //Satellite Measurements for RRLP +const uint8_t UBX_RXM_PMREQ = 0x41; //Requests a Power Management task (two differenent packet sizes) +const uint8_t UBX_RXM_RAWX = 0x15; //Multi-GNSS Raw Measurement Data +const uint8_t UBX_RXM_RLM = 0x59; //Galileo SAR Short-RLM report (two different packet sizes) +const uint8_t UBX_RXM_RTCM = 0x32; //RTCM input status +const uint8_t UBX_RXM_SFRBX = 0x13; //Boradcast Navigation Data Subframe + +//The following are used to configure the SEC UBX messages (security feature messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 36) +const uint8_t UBX_SEC_UNIQID = 0x03; //Unique chip ID + +//The following are used to configure the TIM UBX messages (timing messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 36) +const uint8_t UBX_TIM_TM2 = 0x03; //Time mark data +const uint8_t UBX_TIM_TP = 0x01; //Time Pulse Timedata +const uint8_t UBX_TIM_VRFY = 0x06; //Sourced Time Verification + +//The following are used to configure the UPD UBX messages (firmware update messages). Descriptions from UBX messages overview (ZED-F9P Interface Description Document page 36) +const uint8_t UBX_UPD_SOS = 0x14; //Poll Backup Fil Restore Status, Create Backup File in Flash, Clear Backup File in Flash, Backup File Creation Acknowledge, System Restored from Backup + +//The following are used to enable RTCM messages +const uint8_t UBX_RTCM_MSB = 0xF5; //All RTCM enable commands have 0xF5 as MSB +const uint8_t UBX_RTCM_1005 = 0x05; //Stationary RTK reference ARP +const uint8_t UBX_RTCM_1074 = 0x4A; //GPS MSM4 +const uint8_t UBX_RTCM_1077 = 0x4D; //GPS MSM7 +const uint8_t UBX_RTCM_1084 = 0x54; //GLONASS MSM4 +const uint8_t UBX_RTCM_1087 = 0x57; //GLONASS MSM7 +const uint8_t UBX_RTCM_1094 = 0x5E; //Galileo MSM4 +const uint8_t UBX_RTCM_1097 = 0x61; //Galileo MSM7 +const uint8_t UBX_RTCM_1124 = 0x7C; //BeiDou MSM4 +const uint8_t UBX_RTCM_1127 = 0x7F; //BeiDou MSM7 +const uint8_t UBX_RTCM_1230 = 0xE6; //GLONASS code-phase biases, set to once every 10 seconds +const uint8_t UBX_RTCM_4072_0 = 0xFE; //Reference station PVT (ublox proprietary RTCM message) +const uint8_t UBX_RTCM_4072_1 = 0xFD; //Additional reference station information (ublox proprietary RTCM message) + +const uint8_t UBX_ACK_NACK = 0x00; +const uint8_t UBX_ACK_ACK = 0x01; +const uint8_t UBX_ACK_NONE = 0x02; //Not a real value + +// The following constants are used to get External Sensor Measurements and Status +// Information. +const uint8_t UBX_ESF_MEAS = 0x02; +const uint8_t UBX_ESF_RAW = 0x03; +const uint8_t UBX_ESF_STATUS = 0x10; +const uint8_t UBX_ESF_INS = 0x15; //36 bytes + +const uint8_t SVIN_MODE_DISABLE = 0x00; +const uint8_t SVIN_MODE_ENABLE = 0x01; + +//The following consts are used to configure the various ports and streams for those ports. See -CFG-PRT. +const uint8_t COM_PORT_I2C = 0; +const uint8_t COM_PORT_UART1 = 1; +const uint8_t COM_PORT_UART2 = 2; +const uint8_t COM_PORT_USB = 3; +const uint8_t COM_PORT_SPI = 4; + +const uint8_t COM_TYPE_UBX = (1 << 0); +const uint8_t COM_TYPE_NMEA = (1 << 1); +const uint8_t COM_TYPE_RTCM3 = (1 << 5); + +// Configuration Sub-Section mask definitions for saveConfigSelective (UBX-CFG-CFG) +const uint32_t VAL_CFG_SUBSEC_IOPORT = 0x00000001; // ioPort - communications port settings (causes IO system reset!) +const uint32_t VAL_CFG_SUBSEC_MSGCONF = 0x00000002; // msgConf - message configuration +const uint32_t VAL_CFG_SUBSEC_INFMSG = 0x00000004; // infMsg - INF message configuration +const uint32_t VAL_CFG_SUBSEC_NAVCONF = 0x00000008; // navConf - navigation configuration +const uint32_t VAL_CFG_SUBSEC_RXMCONF = 0x00000010; // rxmConf - receiver manager configuration +const uint32_t VAL_CFG_SUBSEC_SENCONF = 0x00000100; // senConf - sensor interface configuration (requires protocol 19+) +const uint32_t VAL_CFG_SUBSEC_RINVCONF = 0x00000200; // rinvConf - remove inventory configuration +const uint32_t VAL_CFG_SUBSEC_ANTCONF = 0x00000400; // antConf - antenna configuration +const uint32_t VAL_CFG_SUBSEC_LOGCONF = 0x00000800; // logConf - logging configuration +const uint32_t VAL_CFG_SUBSEC_FTSCONF = 0x00001000; // ftsConf - FTS configuration (FTS products only) + +// Bitfield wakeupSources for UBX_RXM_PMREQ +const uint32_t VAL_RXM_PMREQ_WAKEUPSOURCE_UARTRX = 0x00000008; // uartrx +const uint32_t VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT0 = 0x00000020; // extint0 +const uint32_t VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT1 = 0x00000040; // extint1 +const uint32_t VAL_RXM_PMREQ_WAKEUPSOURCE_SPICS = 0x00000080; // spics + +enum dynModel // Possible values for the dynamic platform model, which provide more accuract position output for the situation. Description extracted from ZED-F9P Integration Manual +{ + DYN_MODEL_PORTABLE = 0, //Applications with low acceleration, e.g. portable devices. Suitable for most situations. + // 1 is not defined + DYN_MODEL_STATIONARY = 2, //Used in timing applications (antenna must be stationary) or other stationary applications. Velocity restricted to 0 m/s. Zero dynamics assumed. + DYN_MODEL_PEDESTRIAN, //Applications with low acceleration and speed, e.g. how a pedestrian would move. Low acceleration assumed. + DYN_MODEL_AUTOMOTIVE, //Used for applications with equivalent dynamics to those of a passenger car. Low vertical acceleration assumed + DYN_MODEL_SEA, //Recommended for applications at sea, with zero vertical velocity. Zero vertical velocity assumed. Sea level assumed. + DYN_MODEL_AIRBORNE1g, //Airborne <1g acceleration. Used for applications with a higher dynamic range and greater vertical acceleration than a passenger car. No 2D position fixes supported. + DYN_MODEL_AIRBORNE2g, //Airborne <2g acceleration. Recommended for typical airborne environments. No 2D position fixes supported. + DYN_MODEL_AIRBORNE4g, //Airborne <4g acceleration. Only recommended for extremely dynamic environments. No 2D position fixes supported. + DYN_MODEL_WRIST, // Not supported in protocol versions less than 18. Only recommended for wrist worn applications. Receiver will filter out arm motion. + DYN_MODEL_BIKE, // Supported in protocol versions 19.2 +}; + +#ifndef MAX_PAYLOAD_SIZE + +#define MAX_PAYLOAD_SIZE 256 //We need ~220 bytes for getProtocolVersion on most ublox modules +//#define MAX_PAYLOAD_SIZE 768 //Worst case: UBX_CFG_VALSET packet with 64 keyIDs each with 64 bit values + +#endif + +//-=-=-=-=- UBX binary specific variables +typedef struct +{ + uint8_t cls; + uint8_t id; + uint16_t len; //Length of the payload. Does not include cls, id, or checksum bytes + uint16_t counter; //Keeps track of number of overall bytes received. Some responses are larger than 255 bytes. + uint16_t startingSpot; //The counter value needed to go past before we begin recording into payload array + uint8_t *payload; + uint8_t checksumA; //Given to us from module. Checked against the rolling calculated A/B checksums. + uint8_t checksumB; + sfe_ublox_packet_validity_e valid; //Goes from NOT_DEFINED to VALID or NOT_VALID when checksum is checked + sfe_ublox_packet_validity_e classAndIDmatch; // Goes from NOT_DEFINED to VALID or NOT_VALID when the Class and ID match the requestedClass and requestedID +} ubxPacket; + +// Struct to hold the results returned by getGeofenceState (returned by UBX-NAV-GEOFENCE) +typedef struct +{ + uint8_t status; // Geofencing status: 0 - Geofencing not available or not reliable; 1 - Geofencing active + uint8_t numFences; // Number of geofences + uint8_t combState; // Combined (logical OR) state of all geofences: 0 - Unknown; 1 - Inside; 2 - Outside + uint8_t states[4]; // Geofence states: 0 - Unknown; 1 - Inside; 2 - Outside +} geofenceState; + +// Struct to hold the current geofence parameters +typedef struct +{ + uint8_t numFences; // Number of active geofences + int32_t lats[4]; // Latitudes of geofences (in degrees * 10^-7) + int32_t longs[4]; // Longitudes of geofences (in degrees * 10^-7) + uint32_t rads[4]; // Radii of geofences (in m * 10^-2) +} geofenceParams; + +class SFE_UBLOX_GPS +{ +public: + SFE_UBLOX_GPS(void); + +// A default of 250ms for maxWait seems fine for I2C but is not enough for SerialUSB. +// If you know you are only going to be using I2C / Qwiic communication, you can +// safely reduce defaultMaxWait to 250. +#ifndef defaultMaxWait // Let's allow the user to define their own value if they want to +#define defaultMaxWait 1100 +#endif + + //By default use the default I2C address, and use Wire port + boolean begin(TwoWire &wirePort = Wire, uint8_t deviceAddress = 0x42); //Returns true if module is detected + //serialPort needs to be perviously initialized to correct baud rate + boolean begin(Stream &serialPort); //Returns true if module is detected + + //Control the size of the internal I2C transaction amount + void setI2CTransactionSize(uint8_t bufferSize); + uint8_t getI2CTransactionSize(void); + + //Set the max number of bytes set in a given I2C transaction + uint8_t i2cTransactionSize = 32; //Default to ATmega328 limit + + //Returns true if device answers on _gpsI2Caddress address or via Serial + //maxWait is only used for Serial + boolean isConnected(uint16_t maxWait = 1100); + + //Changed in V1.8.1: provides backward compatibility for the examples that call checkUblox directly + //Will default to using packetCfg to look for explicit autoPVT packets so they get processed correctly by processUBX + boolean checkUblox(uint8_t requestedClass = UBX_CLASS_NAV, uint8_t requestedID = UBX_NAV_PVT); //Checks module with user selected commType + + boolean checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Method for I2C polling of data, passing any new bytes to process() + boolean checkUbloxSerial(ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Method for serial polling of data, passing any new bytes to process() + + void process(uint8_t incoming, ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Processes NMEA and UBX binary sentences one byte at a time + void processUBX(uint8_t incoming, ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID); //Given a character, file it away into the uxb packet structure + void processRTCMframe(uint8_t incoming); //Monitor the incoming bytes for start and length bytes + void processRTCM(uint8_t incoming) __attribute__((weak)); //Given rtcm byte, do something with it. User can overwrite if desired to pipe bytes to radio, internet, etc. + + void processUBXpacket(ubxPacket *msg); //Once a packet has been received and validated, identify this packet's class/id and update internal flags + void processNMEA(char incoming) __attribute__((weak)); //Given a NMEA character, do something with it. User can overwrite if desired to use something like tinyGPS or MicroNMEA libraries + + void calcChecksum(ubxPacket *msg); //Sets the checksumA and checksumB of a given messages + sfe_ublox_status_e sendCommand(ubxPacket *outgoingUBX, uint16_t maxWait = defaultMaxWait); //Given a packet and payload, send everything including CRC bytes, return true if we got a response + sfe_ublox_status_e sendI2cCommand(ubxPacket *outgoingUBX, uint16_t maxWait = 250); + void sendSerialCommand(ubxPacket *outgoingUBX); + + void printPacket(ubxPacket *packet); //Useful for debugging + + void factoryReset(); //Send factory reset sequence (i.e. load "default" configuration and perform hardReset) + void hardReset(); //Perform a reset leading to a cold start (zero info start-up) + + boolean setI2CAddress(uint8_t deviceAddress, uint16_t maxTime = 250); //Changes the I2C address of the u-blox module + void setSerialRate(uint32_t baudrate, uint8_t uartPort = COM_PORT_UART1, uint16_t maxTime = defaultMaxWait); //Changes the serial baud rate of the u-blox module, uartPort should be COM_PORT_UART1/2 + void setNMEAOutputPort(Stream &nmeaOutputPort); //Sets the internal variable for the port to direct NMEA characters to + + boolean setNavigationFrequency(uint8_t navFreq, uint16_t maxWait = defaultMaxWait); //Set the number of nav solutions sent per second + uint8_t getNavigationFrequency(uint16_t maxWait = defaultMaxWait); //Get the number of nav solutions sent per second currently being output by module + boolean saveConfiguration(uint16_t maxWait = defaultMaxWait); //Save current configuration to flash and BBR (battery backed RAM) + boolean factoryDefault(uint16_t maxWait = defaultMaxWait); //Reset module to factory defaults + boolean saveConfigSelective(uint32_t configMask, uint16_t maxWait = defaultMaxWait); //Save the selected configuration sub-sections to flash and BBR (battery backed RAM) + + sfe_ublox_status_e waitForACKResponse(ubxPacket *outgoingUBX, uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime = defaultMaxWait); //Poll the module until a config packet and an ACK is received + sfe_ublox_status_e waitForNoACKResponse(ubxPacket *outgoingUBX, uint8_t requestedClass, uint8_t requestedID, uint16_t maxTime = defaultMaxWait); //Poll the module until a config packet is received + +// getPVT will only return data once in each navigation cycle. By default, that is once per second. +// Therefore we should set getPVTmaxWait to slightly longer than that. +// If you change the navigation frequency to (e.g.) 4Hz using setNavigationFrequency(4) +// then you should use a shorter maxWait for getPVT. 300msec would be about right: getPVT(300) +// The same is true for getHPPOSLLH. +#define getPVTmaxWait 1100 // Default maxWait for getPVT and all functions which call it +#define getHPPOSLLHmaxWait 1100 // Default maxWait for getHPPOSLLH and all functions which call it +#define getDOPmaxWait 1100 // Default maxWait for getDOP and all functions which all it + + boolean assumeAutoPVT(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and PVT is send cyclically already + boolean setAutoPVT(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic PVT reports at the navigation frequency + boolean setAutoPVT(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic PVT reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + boolean getPVT(uint16_t maxWait = getPVTmaxWait); //Query module for latest group of datums and load global vars: lat, long, alt, speed, SIV, accuracies, etc. If autoPVT is disabled, performs an explicit poll and waits, if enabled does not block. Returns true if new PVT is available. + boolean assumeAutoHPPOSLLH(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and HPPOSLLH is send cyclically already + boolean setAutoHPPOSLLH(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HPPOSLLH reports at the navigation frequency + boolean setAutoHPPOSLLH(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HPPOSLLH reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + boolean getHPPOSLLH(uint16_t maxWait = getHPPOSLLHmaxWait); //Query module for latest group of datums and load global vars: lat, long, alt, speed, SIV, accuracies, etc. If autoPVT is disabled, performs an explicit poll and waits, if enabled does not block. Returns true if new HPPOSLLH is available. + boolean assumeAutoDOP(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and DOP is send cyclically already + boolean setAutoDOP(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic DOP reports at the navigation frequency + boolean setAutoDOP(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic DOP reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + boolean getDOP(uint16_t maxWait = getDOPmaxWait); //Query module for latest dilution of precision values and load global vars:. If autoDOP is disabled, performs an explicit poll and waits, if enabled does not block. Returns true if new DOP is available. + void flushPVT(); //Mark all the PVT data as read/stale. This is handy to get data alignment after CRC failure + void flushHPPOSLLH(); //Mark all the PVT data as read/stale. This is handy to get data alignment after CRC failure + void flushDOP(); //Mark all the DOP data as read/stale. This is handy to get data alignment after CRC failure + + bool getGnssFixOk(uint16_t maxWait = getPVTmaxWait); //Get whether we have a valid fix (i.e within DOP & accuracy masks) + bool getDiffSoln(uint16_t maxWait = getPVTmaxWait); //Get whether differential corrections were applied + bool getHeadVehValid(uint16_t maxWait = getPVTmaxWait); + int32_t getLatitude(uint16_t maxWait = getPVTmaxWait); //Returns the current latitude in degrees * 10^-7. Auto selects between HighPrecision and Regular depending on ability of module. + int32_t getLongitude(uint16_t maxWait = getPVTmaxWait); //Returns the current longitude in degrees * 10-7. Auto selects between HighPrecision and Regular depending on ability of module. + int32_t getAltitude(uint16_t maxWait = getPVTmaxWait); //Returns the current altitude in mm above ellipsoid + int32_t getAltitudeMSL(uint16_t maxWait = getPVTmaxWait); //Returns the current altitude in mm above mean sea level + int32_t getHorizontalAccEst(uint16_t maxWait = getPVTmaxWait); + int32_t getVerticalAccEst(uint16_t maxWait = getPVTmaxWait); + int32_t getNedNorthVel(uint16_t maxWait = getPVTmaxWait); + int32_t getNedEastVel(uint16_t maxWait = getPVTmaxWait); + int32_t getNedDownVel(uint16_t maxWait = getPVTmaxWait); + uint8_t getSIV(uint16_t maxWait = getPVTmaxWait); //Returns number of sats used in fix + uint8_t getFixType(uint16_t maxWait = getPVTmaxWait); //Returns the type of fix: 0=no, 3=3D, 4=GNSS+Deadreckoning + uint8_t getCarrierSolutionType(uint16_t maxWait = getPVTmaxWait); //Returns RTK solution: 0=no, 1=float solution, 2=fixed solution + int32_t getGroundSpeed(uint16_t maxWait = getPVTmaxWait); //Returns speed in mm/s + int32_t getHeading(uint16_t maxWait = getPVTmaxWait); //Returns heading in degrees * 10^-5 + uint16_t getPDOP(uint16_t maxWait = getPVTmaxWait); //Returns positional dillution of precision * 10^-2 (dimensionless) + uint16_t getYear(uint16_t maxWait = getPVTmaxWait); + uint8_t getMonth(uint16_t maxWait = getPVTmaxWait); + uint8_t getDay(uint16_t maxWait = getPVTmaxWait); + uint8_t getHour(uint16_t maxWait = getPVTmaxWait); + uint8_t getMinute(uint16_t maxWait = getPVTmaxWait); + uint8_t getSecond(uint16_t maxWait = getPVTmaxWait); + uint16_t getMillisecond(uint16_t maxWait = getPVTmaxWait); + int32_t getNanosecond(uint16_t maxWait = getPVTmaxWait); + uint32_t getTimeOfWeek(uint16_t maxWait = getPVTmaxWait); + bool getDateValid(uint16_t maxWait = getPVTmaxWait); + bool getTimeValid(uint16_t maxWait = getPVTmaxWait); + uint32_t getSpeedAccEst(uint16_t maxWait = getPVTmaxWait); + uint32_t getHeadingAccEst(uint16_t maxWait = getPVTmaxWait); + bool getInvalidLlh(uint16_t maxWait = getPVTmaxWait); + int32_t getHeadVeh(uint16_t maxWait = getPVTmaxWait); + int16_t getMagDec(uint16_t maxWait = getPVTmaxWait); + uint16_t getMagAcc(uint16_t maxWait = getPVTmaxWait); + + int32_t getHighResLatitude(uint16_t maxWait = getHPPOSLLHmaxWait); + int8_t getHighResLatitudeHp(uint16_t maxWait = getHPPOSLLHmaxWait); + int32_t getHighResLongitude(uint16_t maxWait = getHPPOSLLHmaxWait); + int8_t getHighResLongitudeHp(uint16_t maxWait = getHPPOSLLHmaxWait); + int32_t getElipsoid(uint16_t maxWait = getHPPOSLLHmaxWait); + int8_t getElipsoidHp(uint16_t maxWait = getHPPOSLLHmaxWait); + int32_t getMeanSeaLevel(uint16_t maxWait = getHPPOSLLHmaxWait); + int8_t getMeanSeaLevelHp(uint16_t maxWait = getHPPOSLLHmaxWait); + int32_t getGeoidSeparation(uint16_t maxWait = getHPPOSLLHmaxWait); + uint32_t getHorizontalAccuracy(uint16_t maxWait = getHPPOSLLHmaxWait); + uint32_t getVerticalAccuracy(uint16_t maxWait = getHPPOSLLHmaxWait); + + uint16_t getGeometricDOP(uint16_t maxWait = getDOPmaxWait); + uint16_t getPositionDOP(uint16_t maxWait = getDOPmaxWait); + uint16_t getTimeDOP(uint16_t maxWait = getDOPmaxWait); + uint16_t getVerticalDOP(uint16_t maxWait = getDOPmaxWait); + uint16_t getHorizontalDOP(uint16_t maxWait = getDOPmaxWait); + uint16_t getNorthingDOP(uint16_t maxWait = getDOPmaxWait); + uint16_t getEastingDOP(uint16_t maxWait = getDOPmaxWait); + + //Port configurations + boolean setPortOutput(uint8_t portID, uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure a given port to output UBX, NMEA, RTCM3 or a combination thereof + boolean setPortInput(uint8_t portID, uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure a given port to input UBX, NMEA, RTCM3 or a combination thereof + boolean getPortSettings(uint8_t portID, uint16_t maxWait = defaultMaxWait); //Returns the current protocol bits in the UBX-CFG-PRT command for a given port + + boolean setI2COutput(uint8_t comSettings, uint16_t maxWait = 250); //Configure I2C port to output UBX, NMEA, RTCM3 or a combination thereof + boolean setUART1Output(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure UART1 port to output UBX, NMEA, RTCM3 or a combination thereof + boolean setUART2Output(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); //Configure UART2 port to output UBX, NMEA, RTCM3 or a combination thereof + boolean setUSBOutput(uint8_t comSettings, uint16_t maxWait = 250); //Configure USB port to output UBX, NMEA, RTCM3 or a combination thereof + boolean setSPIOutput(uint8_t comSettings, uint16_t maxWait = 250); //Configure SPI port to output UBX, NMEA, RTCM3 or a combination thereof + + //Functions to turn on/off message types for a given port ID (see COM_PORT_I2C, etc above) + boolean configureMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t sendRate, uint16_t maxWait = defaultMaxWait); + boolean enableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint8_t sendRate = 1, uint16_t maxWait = defaultMaxWait); + boolean disableMessage(uint8_t msgClass, uint8_t msgID, uint8_t portID, uint16_t maxWait = defaultMaxWait); + boolean enableNMEAMessage(uint8_t msgID, uint8_t portID, uint8_t sendRate = 1, uint16_t maxWait = defaultMaxWait); + boolean disableNMEAMessage(uint8_t msgID, uint8_t portID, uint16_t maxWait = defaultMaxWait); + boolean enableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint8_t sendRate, uint16_t maxWait = defaultMaxWait); //Given a message number turns on a message ID for output over given PortID + boolean disableRTCMmessage(uint8_t messageNumber, uint8_t portID, uint16_t maxWait = defaultMaxWait); //Turn off given RTCM message from a given port + + //General configuration (used only on protocol v27 and higher - ie, ZED-F9P) + //It is probably safe to assume that users of the ZED-F9P will be using I2C / Qwiic. + //If they are using Serial then the higher baud rate will also help. So let's leave maxWait set to 250ms. + uint32_t createKey(uint16_t group, uint16_t id, uint8_t size); //Form 32-bit key from group/id/size + + sfe_ublox_status_e getVal(uint32_t keyID, uint8_t layer = VAL_LAYER_RAM, uint16_t maxWait = 250); //Load payload with response + uint8_t getVal8(uint32_t keyID, uint8_t layer = VAL_LAYER_RAM, uint16_t maxWait = 250); //Returns the value at a given key location + uint16_t getVal16(uint32_t keyID, uint8_t layer = VAL_LAYER_RAM, uint16_t maxWait = 250); //Returns the value at a given key location + uint32_t getVal32(uint32_t keyID, uint8_t layer = VAL_LAYER_RAM, uint16_t maxWait = 250); //Returns the value at a given key location + uint8_t getVal8(uint16_t group, uint16_t id, uint8_t size, uint8_t layer = VAL_LAYER_RAM, uint16_t maxWait = 250); //Returns the value at a given group/id/size location + uint16_t getVal16(uint16_t group, uint16_t id, uint8_t size, uint8_t layer = VAL_LAYER_RAM, uint16_t maxWait = 250); //Returns the value at a given group/id/size location + uint32_t getVal32(uint16_t group, uint16_t id, uint8_t size, uint8_t layer = VAL_LAYER_RAM, uint16_t maxWait = 250); //Returns the value at a given group/id/size location + uint8_t setVal(uint32_t keyID, uint16_t value, uint8_t layer = VAL_LAYER_ALL, uint16_t maxWait = 250); //Sets the 16-bit value at a given group/id/size location + uint8_t setVal8(uint32_t keyID, uint8_t value, uint8_t layer = VAL_LAYER_ALL, uint16_t maxWait = 250); //Sets the 8-bit value at a given group/id/size location + uint8_t setVal16(uint32_t keyID, uint16_t value, uint8_t layer = VAL_LAYER_ALL, uint16_t maxWait = 250); //Sets the 16-bit value at a given group/id/size location + uint8_t setVal32(uint32_t keyID, uint32_t value, uint8_t layer = VAL_LAYER_ALL, uint16_t maxWait = 250); //Sets the 32-bit value at a given group/id/size location + uint8_t newCfgValset8(uint32_t keyID, uint8_t value, uint8_t layer = VAL_LAYER_ALL); //Define a new UBX-CFG-VALSET with the given KeyID and 8-bit value + uint8_t newCfgValset16(uint32_t keyID, uint16_t value, uint8_t layer = VAL_LAYER_ALL); //Define a new UBX-CFG-VALSET with the given KeyID and 16-bit value + uint8_t newCfgValset32(uint32_t keyID, uint32_t value, uint8_t layer = VAL_LAYER_ALL); //Define a new UBX-CFG-VALSET with the given KeyID and 32-bit value + uint8_t addCfgValset8(uint32_t keyID, uint8_t value); //Add a new KeyID and 8-bit value to an existing UBX-CFG-VALSET ubxPacket + uint8_t addCfgValset16(uint32_t keyID, uint16_t value); //Add a new KeyID and 16-bit value to an existing UBX-CFG-VALSET ubxPacket + uint8_t addCfgValset32(uint32_t keyID, uint32_t value); //Add a new KeyID and 32-bit value to an existing UBX-CFG-VALSET ubxPacket + uint8_t sendCfgValset8(uint32_t keyID, uint8_t value, uint16_t maxWait = 250); //Add the final KeyID and 8-bit value to an existing UBX-CFG-VALSET ubxPacket and send it + uint8_t sendCfgValset16(uint32_t keyID, uint16_t value, uint16_t maxWait = 250); //Add the final KeyID and 16-bit value to an existing UBX-CFG-VALSET ubxPacket and send it + uint8_t sendCfgValset32(uint32_t keyID, uint32_t value, uint16_t maxWait = 250); //Add the final KeyID and 32-bit value to an existing UBX-CFG-VALSET ubxPacket and send it + + //Functions used for RTK and base station setup + //It is probably safe to assume that users of the RTK will be using I2C / Qwiic. So let's leave maxWait set to 250ms. + boolean getSurveyMode(uint16_t maxWait = 250); //Get the current TimeMode3 settings + boolean setSurveyMode(uint8_t mode, uint16_t observationTime, float requiredAccuracy, uint16_t maxWait = 250); //Control survey in mode + boolean enableSurveyMode(uint16_t observationTime, float requiredAccuracy, uint16_t maxWait = 250); //Begin Survey-In for NEO-M8P + boolean disableSurveyMode(uint16_t maxWait = 250); //Stop Survey-In mode + + boolean getSurveyStatus(uint16_t maxWait); //Reads survey in status and sets the global variables + + uint32_t getPositionAccuracy(uint16_t maxWait = 1100); //Returns the 3D accuracy of the current high-precision fix, in mm. Supported on NEO-M8P, ZED-F9P, + + uint8_t getProtocolVersionHigh(uint16_t maxWait = 500); //Returns the PROTVER XX.00 from UBX-MON-VER register + uint8_t getProtocolVersionLow(uint16_t maxWait = 500); //Returns the PROTVER 00.XX from UBX-MON-VER register + boolean getProtocolVersion(uint16_t maxWait = 500); //Queries module, loads low/high bytes + + boolean getRELPOSNED(uint16_t maxWait = 1100); //Get Relative Positioning Information of the NED frame + + // Enable debug messages using the chosen Serial port (Stream) + // Boards like the RedBoard Turbo use SerialUSB (not Serial). + // But other boards like the SAMD51 Thing Plus use Serial (not SerialUSB). + // These lines let the code compile cleanly on as many SAMD boards as possible. + #if defined(ARDUINO_ARCH_SAMD) // Is this a SAMD board? + #if defined(USB_VID) // Is the USB Vendor ID defined? + #if (USB_VID == 0x1B4F) // Is this a SparkFun board? + #if !defined(ARDUINO_SAMD51_THING_PLUS) & !defined(ARDUINO_SAMD51_MICROMOD) // If it is not a SAMD51 Thing Plus or SAMD51 MicroMod + void enableDebugging(Stream &debugPort = SerialUSB, boolean printLimitedDebug = false); //Given a port to print to, enable debug messages. Default to all, not limited. + #else + void enableDebugging(Stream &debugPort = Serial, boolean printLimitedDebug = false); //Given a port to print to, enable debug messages. Default to all, not limited. + #endif + #else + void enableDebugging(Stream &debugPort = Serial, boolean printLimitedDebug = false); //Given a port to print to, enable debug messages. Default to all, not limited. + #endif + #else + void enableDebugging(Stream &debugPort = Serial, boolean printLimitedDebug = false); //Given a port to print to, enable debug messages. Default to all, not limited. + #endif + #else + void enableDebugging(Stream &debugPort = Serial, boolean printLimitedDebug = false); //Given a port to print to, enable debug messages. Default to all, not limited. + #endif + + void disableDebugging(void); //Turn off debug statements + void debugPrint(char *message); //Safely print debug statements + void debugPrintln(char *message); //Safely print debug statements + const char *statusString(sfe_ublox_status_e stat); //Pretty print the return value + + //Support for geofences + boolean addGeofence(int32_t latitude, int32_t longitude, uint32_t radius, byte confidence = 0, byte pinPolarity = 0, byte pin = 0, uint16_t maxWait = 1100); // Add a new geofence + boolean clearGeofences(uint16_t maxWait = 1100); //Clears all geofences + boolean getGeofenceState(geofenceState ¤tGeofenceState, uint16_t maxWait = 1100); //Returns the combined geofence state + boolean clearAntPIO(uint16_t maxWait = 1100); //Clears the antenna control pin settings to release the PIOs + geofenceParams currentGeofenceParams; // Global to store the geofence parameters + + boolean powerSaveMode(bool power_save = true, uint16_t maxWait = 1100); + uint8_t getPowerSaveMode(uint16_t maxWait = 1100); // Returns 255 if the sendCommand fails + boolean powerOff(uint32_t durationInMs, uint16_t maxWait = 1100); + boolean powerOffWithInterrupt(uint32_t durationInMs, uint32_t wakeupSources = VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT0, boolean forceWhileUsb = true, uint16_t maxWait = 1100); + + //Change the dynamic platform model using UBX-CFG-NAV5 + boolean setDynamicModel(dynModel newDynamicModel = DYN_MODEL_PORTABLE, uint16_t maxWait = 1100); + uint8_t getDynamicModel(uint16_t maxWait = 1100); // Get the dynamic model - returns 255 if the sendCommand fails + + boolean getEsfInfo(uint16_t maxWait = 1100); + boolean getEsfIns(uint16_t maxWait = 1100); + boolean getEsfDataInfo(uint16_t maxWait = 1100); + boolean getEsfRawDataInfo(uint16_t maxWait = 1100); + sfe_ublox_status_e getSensState(uint8_t sensor, uint16_t maxWait = 1100); + boolean getVehAtt(uint16_t maxWait = 1100); + + // Given coordinates, put receiver into static position. Set latlong to true to pass in lat/long values instead of ecef. + // For ECEF the units are: cm, 0.1mm, cm, 0.1mm, cm, 0.1mm + // For Lat/Lon/Alt the units are: degrees^-7, degrees^-9, degrees^-7, degrees^-9, cm, 0.1mm + bool setStaticPosition(int32_t ecefXOrLat, int8_t ecefXOrLatHP, int32_t ecefYOrLon, int8_t ecefYOrLonHP, int32_t ecefZOrAlt, int8_t ecefZOrAltHP, bool latLong = false, uint16_t maxWait = 250); + bool setStaticPosition(int32_t ecefXOrLat, int32_t ecefYOrLon, int32_t ecefZOrAlt, bool latLong = false, uint16_t maxWait = 250); + + // Push (e.g.) RTCM data directly to the module + // Warning: this function does not check that the data is valid. It is the user's responsibility to ensure the data is valid before pushing. + boolean pushRawData(uint8_t *dataBytes, size_t numDataBytes); + + //Survey-in specific controls + struct svinStructure + { + boolean active; + boolean valid; + uint16_t observationTime; + float meanAccuracy; + } svin; + + //Relative Positioning Info in NED frame specific controls + struct frelPosInfoStructure + { + uint16_t refStationID; + + float relPosN; + float relPosE; + float relPosD; + + long relPosLength; + long relPosHeading; + + int8_t relPosHPN; + int8_t relPosHPE; + int8_t relPosHPD; + int8_t relPosHPLength; + + float accN; + float accE; + float accD; + + bool gnssFixOk; + bool diffSoln; + bool relPosValid; + uint8_t carrSoln; + bool isMoving; + bool refPosMiss; + bool refObsMiss; + } relPosInfo; + + //The major datums we want to globally store + uint16_t gpsYear; + uint8_t gpsMonth; + uint8_t gpsDay; + uint8_t gpsHour; + uint8_t gpsMinute; + uint8_t gpsSecond; + uint16_t gpsMillisecond; + int32_t gpsNanosecond; + bool gpsDateValid; + bool gpsTimeValid; + + bool gnssFixOk; //valid fix (i.e within DOP & accuracy masks) + bool diffSoln; //Differential corrections were applied + bool headVehValid; + int32_t latitude; //Degrees * 10^-7 (more accurate than floats) + int32_t longitude; //Degrees * 10^-7 (more accurate than floats) + int32_t altitude; //Number of mm above ellipsoid + int32_t altitudeMSL; //Number of mm above Mean Sea Level + uint32_t horizontalAccEst; + uint32_t verticalAccEst; + int32_t nedNorthVel; + int32_t nedEastVel; + int32_t nedDownVel; + uint8_t SIV; //Number of satellites used in position solution + uint8_t fixType; //Tells us when we have a solution aka lock + uint8_t carrierSolution; //Tells us when we have an RTK float/fixed solution + int32_t groundSpeed; //mm/s + int32_t headingOfMotion; //degrees * 10^-5 + uint32_t speedAccEst; + uint32_t headingAccEst; + uint16_t pDOP; //Positional dilution of precision * 10^-2 (dimensionless) + bool invalidLlh; + int32_t headVeh; + int16_t magDec; + uint16_t magAcc; + uint8_t versionLow; //Loaded from getProtocolVersion(). + uint8_t versionHigh; + + uint32_t timeOfWeek; // ms + int32_t highResLatitude; // Degrees * 10^-7 + int32_t highResLongitude; // Degrees * 10^-7 + int32_t elipsoid; // Height above ellipsoid in mm (Typo! Should be eLLipsoid! **Uncorrected for backward-compatibility.**) + int32_t meanSeaLevel; // Height above mean sea level in mm + int32_t geoidSeparation; // This seems to only be provided in NMEA GGA and GNS messages + uint32_t horizontalAccuracy; // mm * 10^-1 (i.e. 0.1mm) + uint32_t verticalAccuracy; // mm * 10^-1 (i.e. 0.1mm) + int8_t elipsoidHp; // High precision component of the height above ellipsoid in mm * 10^-1 (Deliberate typo! Should be eLLipsoidHp!) + int8_t meanSeaLevelHp; // High precision component of Height above mean sea level in mm * 10^-1 + int8_t highResLatitudeHp; // High precision component of latitude: Degrees * 10^-9 + int8_t highResLongitudeHp; // High precision component of longitude: Degrees * 10^-9 + + uint16_t rtcmFrameCounter = 0; //Tracks the type of incoming byte inside RTCM frame + + uint16_t geometricDOP; // Geometric dilution of precision * 10^-2 + uint16_t positionDOP; // Posoition dilution of precision * 10^-2 + uint16_t timeDOP; // Time dilution of precision * 10^-2 + uint16_t verticalDOP; // Vertical dilution of precision * 10^-2 + uint16_t horizontalDOP; // Horizontal dilution of precision * 10^-2 + uint16_t northingDOP; // Northing dilution of precision * 10^-2 + uint16_t eastingDOP; // Easting dilution of precision * 10^-2 + +#define DEF_NUM_SENS 7 + struct deadReckData + { + uint8_t version; + uint8_t fusionMode; + + uint8_t xAngRateVald; + uint8_t yAngRateVald; + uint8_t zAngRateVald; + uint8_t xAccelVald; + uint8_t yAccelVald; + uint8_t zAccelVald; + + int32_t xAngRate; + int32_t yAngRate; + int32_t zAngRate; + + int32_t xAccel; + int32_t yAccel; + int32_t zAccel; + + // The array size is based on testing directly on M8U and F9R + uint32_t rawData; + uint32_t rawDataType; + uint32_t rawTStamp; + + uint32_t data[DEF_NUM_SENS]; + uint32_t dataType[DEF_NUM_SENS]; + uint32_t dataTStamp[DEF_NUM_SENS]; + } imuMeas; + + struct indivImuData + { + + uint8_t numSens; + + uint8_t senType; + boolean isUsed; + boolean isReady; + uint8_t calibStatus; + uint8_t timeStatus; + + uint8_t freq; // Hz + + boolean badMeas; + boolean badTag; + boolean missMeas; + boolean noisyMeas; + } ubloxSen; + + struct vehicleAttitude + { + // All values in degrees + int32_t roll; + int32_t pitch; + int32_t heading; + uint32_t accRoll; + uint32_t accPitch; + uint32_t accHeading; + } vehAtt; + + //HNR-specific structs + struct hnrAttitudeSolution + { + uint32_t iTOW; + int32_t roll; // Degrees * 1e-5 + int32_t pitch; // Degrees * 1e-5 + int32_t heading; // Degrees * 1e-5 + uint32_t accRoll; // Degrees * 1e-5 + uint32_t accPitch; // Degrees * 1e-5 + uint32_t accHeading; // Degrees * 1e-5 + } hnrAtt; + + struct hnrVehicleDynamics + { + boolean xAngRateValid; + boolean yAngRateValid; + boolean zAngRateValid; + boolean xAccelValid; + boolean yAccelValid; + boolean zAccelValid; + uint32_t iTOW; + int32_t xAngRate; // Degrees/s * 1e-3 + int32_t yAngRate; // Degrees/s * 1e-3 + int32_t zAngRate; // Degrees/s * 1e-3 + int32_t xAccel; // m/s^2 * 1e-2 + int32_t yAccel; // m/s^2 * 1e-2 + int32_t zAccel; // m/s^2 * 1e-2 + } hnrVehDyn; + + struct hnrPosVelTime + { + uint32_t iTOW; + uint16_t year; + uint8_t month; + uint8_t day; + uint8_t hour; + uint8_t min; + uint8_t sec; + boolean validDate; + boolean validTime; + boolean fullyResolved; + int32_t nano; + uint8_t gpsFix; + boolean gpsFixOK; + boolean diffSoln; + boolean WKNSET; + boolean TOWSET; + boolean headVehValid; + int32_t lon; // Degrees * 1e-7 + int32_t lat; // Degrees * 1e-7 + int32_t height; // mm above ellipsoid + int32_t hMSL; // mm above MSL + int32_t gSpeed; // mm/s 2D + int32_t speed; // mm/s 3D + int32_t headMot; // Degrees * 1e-5 + int32_t headVeh; // Degrees * 1e-5 + uint32_t hAcc; // mm + uint32_t vAcc; // mm + uint32_t sAcc; // mm + uint32_t headAcc; // Degrees * 1e-5 + } hnrPVT; + + //HNR functions + boolean setHNRNavigationRate(uint8_t rate, uint16_t maxWait = 1100); // Returns true if the setHNRNavigationRate is successful + uint8_t getHNRNavigationRate(uint16_t maxWait = 1100); // Returns 0 if the getHNRNavigationRate fails + boolean assumeAutoHNRAtt(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and HNR Attitude is send cyclically already + boolean setAutoHNRAtt(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR Attitude reports at the HNR rate + boolean setAutoHNRAtt(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR Attitude reports at the HNR rate, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + boolean getHNRAtt(uint16_t maxWait = 1100); // Returns true if the get HNR attitude is successful. Data is returned in hnrAtt + boolean assumeAutoHNRDyn(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and HNR dynamics is send cyclically already + boolean setAutoHNRDyn(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR dynamics reports at the HNR rate + boolean setAutoHNRDyn(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR dynamics reports at the HNR rate, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + boolean getHNRDyn(uint16_t maxWait = 1100); // Returns true if the get HNR dynamics is successful. Data is returned in hnrVehDyn + boolean assumeAutoHNRPVT(boolean enabled, boolean implicitUpdate = true); //In case no config access to the GPS is possible and HNR PVT is send cyclically already + boolean setAutoHNRPVT(boolean enabled, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR PVT reports at the HNR rate + boolean setAutoHNRPVT(boolean enabled, boolean implicitUpdate, uint16_t maxWait = defaultMaxWait); //Enable/disable automatic HNR PVT reports at the HNR rate, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update + boolean getHNRPVT(uint16_t maxWait = 1100); // Returns true if the get HNR PVT is successful. Data is returned in hnrPVT + +private: + //Depending on the sentence type the processor will load characters into different arrays + enum SentenceTypes + { + NONE = 0, + NMEA, + UBX, + RTCM + } currentSentence = NONE; + + //Depending on the ubx binary response class, store binary responses into different places + enum classTypes + { + CLASS_NONE = 0, + CLASS_ACK, + CLASS_NOT_AN_ACK + } ubxFrameClass = CLASS_NONE; + + enum commTypes + { + COMM_TYPE_I2C = 0, + COMM_TYPE_SERIAL, + COMM_TYPE_SPI + } commType = COMM_TYPE_I2C; //Controls which port we look to for incoming bytes + + //Functions + boolean checkUbloxInternal(ubxPacket *incomingUBX, uint8_t requestedClass = 255, uint8_t requestedID = 255); //Checks module with user selected commType + uint32_t extractLong(uint8_t spotToStart); //Combine four bytes from payload into long + int32_t extractSignedLong(uint8_t spotToStart); //Combine four bytes from payload into signed long (avoiding any ambiguity caused by casting) + uint16_t extractInt(uint8_t spotToStart); //Combine two bytes from payload into int + int16_t extractSignedInt(int8_t spotToStart); + uint8_t extractByte(uint8_t spotToStart); //Get byte from payload + int8_t extractSignedChar(uint8_t spotToStart); //Get signed 8-bit value from payload + void addToChecksum(uint8_t incoming); //Given an incoming byte, adjust rollingChecksumA/B + + //Variables + TwoWire *_i2cPort; //The generic connection to user's chosen I2C hardware + Stream *_serialPort; //The generic connection to user's chosen Serial hardware + Stream *_nmeaOutputPort = NULL; //The user can assign an output port to print NMEA sentences if they wish + Stream *_debugSerial; //The stream to send debug messages to if enabled + + uint8_t _gpsI2Caddress = 0x42; //Default 7-bit unshifted address of the ublox 6/7/8/M8/F9 series + //This can be changed using the ublox configuration software + + boolean _printDebug = false; //Flag to print the serial commands we are sending to the Serial port for debug + boolean _printLimitedDebug = false; //Flag to print limited debug messages. Useful for I2C debugging or high navigation rates + + //The packet buffers + //These are pointed at from within the ubxPacket + uint8_t payloadAck[2]; // Holds the requested ACK/NACK + uint8_t payloadCfg[MAX_PAYLOAD_SIZE]; // Holds the requested data packet + uint8_t payloadBuf[2]; // Temporary buffer used to screen incoming packets or dump unrequested packets + + //Init the packet structures and init them with pointers to the payloadAck, payloadCfg and payloadBuf arrays + ubxPacket packetAck = {0, 0, 0, 0, 0, payloadAck, 0, 0, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED}; + ubxPacket packetCfg = {0, 0, 0, 0, 0, payloadCfg, 0, 0, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED}; + ubxPacket packetBuf = {0, 0, 0, 0, 0, payloadBuf, 0, 0, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED}; + + //Flag if this packet is unrequested (and so should be ignored and not copied into packetCfg or packetAck) + boolean ignoreThisPayload = false; + + //Identify which buffer is in use + //Data is stored in packetBuf until the requested class and ID can be validated + //If a match is seen, data is diverted into packetAck or packetCfg + sfe_ublox_packet_buffer_e activePacketBuffer = SFE_UBLOX_PACKET_PACKETBUF; + + //Limit checking of new data to every X ms + //If we are expecting an update every X Hz then we should check every half that amount of time + //Otherwise we may block ourselves from seeing new data + uint8_t i2cPollingWait = 100; //Default to 100ms. Adjusted when user calls setNavigationFrequency() + + unsigned long lastCheck = 0; + boolean autoPVT = false; //Whether autoPVT is enabled or not + boolean autoPVTImplicitUpdate = true; // Whether autoPVT is triggered by accessing stale data (=true) or by a call to checkUblox (=false) + boolean autoHPPOSLLH = false; //Whether autoHPPOSLLH is enabled or not + boolean autoHPPOSLLHImplicitUpdate = true; // Whether autoHPPOSLLH is triggered by accessing stale data (=true) or by a call to checkUblox (=false) + boolean autoDOP = false; //Whether autoDOP is enabled or not + boolean autoDOPImplicitUpdate = true; // Whether autoDOP is triggered by accessing stale data (=true) or by a call to checkUblox (=false) + boolean autoHNRAtt = false; //Whether auto HNR attitude is enabled or not + boolean autoHNRAttImplicitUpdate = true; // Whether auto HNR attitude is triggered by accessing stale data (=true) or by a call to checkUblox (=false) + boolean autoHNRDyn = false; //Whether auto HNR dynamics is enabled or not + boolean autoHNRDynImplicitUpdate = true; // Whether auto HNR dynamics is triggered by accessing stale data (=true) or by a call to checkUblox (=false) + boolean autoHNRPVT = false; //Whether auto HNR PVT is enabled or not + boolean autoHNRPVTImplicitUpdate = true; // Whether auto HNR PVT is triggered by accessing stale data (=true) or by a call to checkUblox (=false) + + uint16_t ubxFrameCounter; //It counts all UBX frame. [Fixed header(2bytes), CLS(1byte), ID(1byte), length(2bytes), payload(x bytes), checksums(2bytes)] + + uint8_t rollingChecksumA; //Rolls forward as we receive incoming bytes. Checked against the last two A/B checksum bytes + uint8_t rollingChecksumB; //Rolls forward as we receive incoming bytes. Checked against the last two A/B checksum bytes + + //Create bit field for staleness of each datum in PVT we want to monitor + //moduleQueried.latitude goes true each time we call getPVT() + //This reduces the number of times we have to call getPVT as this can take up to ~1s per read + //depending on update rate + struct + { + uint32_t gpsiTOW : 1; + uint32_t gpsYear : 1; + uint32_t gpsMonth : 1; + uint32_t gpsDay : 1; + uint32_t gpsHour : 1; + uint32_t gpsMinute : 1; + uint32_t gpsSecond : 1; + uint32_t gpsDateValid : 1; + uint32_t gpsTimeValid : 1; + uint32_t gpsNanosecond : 1; + + uint32_t all : 1; + uint32_t gnssFixOk : 1; + uint32_t diffSoln : 1; + uint32_t headVehValid : 1; + uint32_t longitude : 1; + uint32_t latitude : 1; + uint32_t altitude : 1; + uint32_t altitudeMSL : 1; + uint32_t horizontalAccEst : 1; + uint32_t verticalAccEst : 1; + uint32_t nedNorthVel : 1; + uint32_t nedEastVel : 1; + uint32_t nedDownVel : 1; + uint32_t SIV : 1; + uint32_t fixType : 1; + uint32_t carrierSolution : 1; + uint32_t groundSpeed : 1; + uint32_t headingOfMotion : 1; + uint32_t speedAccEst : 1; + uint32_t headingAccEst : 1; + uint32_t pDOP : 1; + uint32_t invalidLlh : 1; + uint32_t headVeh : 1; + uint32_t magDec : 1; + uint32_t magAcc : 1; + uint32_t versionNumber : 1; + } moduleQueried; + + struct + { + uint16_t all : 1; + uint16_t timeOfWeek : 1; + uint16_t highResLatitude : 1; + uint16_t highResLongitude : 1; + uint16_t elipsoid : 1; + uint16_t meanSeaLevel : 1; + uint16_t geoidSeparation : 1; // Redundant but kept for backward-compatibility + uint16_t horizontalAccuracy : 1; + uint16_t verticalAccuracy : 1; + uint16_t elipsoidHp : 1; + uint16_t meanSeaLevelHp : 1; + uint16_t highResLatitudeHp : 1; + uint16_t highResLongitudeHp : 1; + } highResModuleQueried; + + struct + { + uint16_t all : 1; + uint16_t geometricDOP : 1; + uint16_t positionDOP : 1; + uint16_t timeDOP : 1; + uint16_t verticalDOP : 1; + uint16_t horizontalDOP : 1; + uint16_t northingDOP : 1; + uint16_t eastingDOP : 1; + } dopModuleQueried; + + boolean hnrAttQueried; + boolean hnrDynQueried; + boolean hnrPVTQueried; + + uint16_t rtcmLen = 0; +}; + +#endif diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/src/u-blox_config_keys.h b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/src/u-blox_config_keys.h new file mode 100644 index 0000000..9e5b463 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/SparkFun u-blox Arduino Library/src/u-blox_config_keys.h @@ -0,0 +1,838 @@ +/* + This is a library written for the u-blox ZED-F9P and NEO-M8P-2 + SparkFun sells these at its website: www.sparkfun.com + Do you like this library? Help support SparkFun. Buy a board! + https://www.sparkfun.com/products/16481 + https://www.sparkfun.com/products/15136 + https://www.sparkfun.com/products/15005 + https://www.sparkfun.com/products/15733 + https://www.sparkfun.com/products/15193 + https://www.sparkfun.com/products/15210 + + Written by Nathan Seidle @ SparkFun Electronics, September 6th, 2018 + + This library handles configuring and handling the responses + from a u-blox GPS module. Works with most modules from u-blox including + the Zed-F9P, NEO-M8P-2, NEO-M9N, ZOE-M8Q, SAM-M8Q, and many others. + + https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library + + Development environment specifics: + Arduino IDE 1.8.5 + + SparkFun code, firmware, and software is released under the MIT License(http://opensource.org/licenses/MIT). + The MIT License (MIT) + Copyright (c) 2016 SparkFun Electronics + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the Software is furnished to + do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial + portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT + NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef __u_blox_config_keys_h__ +#define __u_blox_config_keys_h__ + +//The following consts are used to generate KEY values for the advanced protocol functions of VELGET/SET/DEL +const uint8_t VAL_SIZE_1 = 0x01; //One bit +const uint8_t VAL_SIZE_8 = 0x02; //One byte +const uint8_t VAL_SIZE_16 = 0x03; //Two bytes +const uint8_t VAL_SIZE_32 = 0x04; //Four bytes +const uint8_t VAL_SIZE_64 = 0x05; //Eight bytes + +//These are the Bitfield layers definitions for the UBX-CFG-VALSET message (not to be confused with Bitfield deviceMask in UBX-CFG-CFG) +const uint8_t VAL_LAYER_RAM = (1 << 0); +const uint8_t VAL_LAYER_BBR = (1 << 1); +const uint8_t VAL_LAYER_FLASH = (1 << 2); +const uint8_t VAL_LAYER_ALL = VAL_LAYER_RAM | VAL_LAYER_BBR | VAL_LAYER_FLASH; //Not valid with getVal() + +//Below are various Groups, IDs, and sizes for various settings +//These can be used to call getVal/setVal/delVal +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint8_t VAL_ID_PROT_UBX = 0x01; +const uint8_t VAL_ID_PROT_NMEA = 0x02; +const uint8_t VAL_ID_PROT_RTCM3 = 0x04; + +const uint8_t VAL_GROUP_I2C = 0x51; +const uint8_t VAL_GROUP_I2COUTPROT = 0x72; +const uint8_t VAL_GROUP_UART1INPROT = 0x73; +const uint8_t VAL_GROUP_UART1OUTPROT = 0x74; +const uint8_t VAL_GROUP_UART2INPROT = 0x75; +const uint8_t VAL_GROUP_UART2OUTPROT = 0x76; +const uint8_t VAL_GROUP_USBINPROT = 0x77; +const uint8_t VAL_GROUP_USBOUTPROT = 0x78; + +const uint8_t VAL_GROUP_UART_SIZE = VAL_SIZE_1; //All fields in UART group are currently 1 bit +const uint8_t VAL_GROUP_I2C_SIZE = VAL_SIZE_8; //All fields in I2C group are currently 1 byte + +const uint8_t VAL_ID_I2C_ADDRESS = 0x01; + +//Below are the key values for a given configuration setting + +//CFG-BDS: BeiDou system configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_BDS_USE_PRN_1_TO_5 = 0x10340014; // Use BeiDou geostationary satellites (PRN 1-5) + +//CFG-GEOFENCE: Geofencing configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_GEOFENCE_CONFLVL = 0x20240011; // Required confidence level for state evaluation +const uint32_t UBLOX_CFG_GEOFENCE_USE_PIO = 0x10240012; // Use PIO combined fence state output +const uint32_t UBLOX_CFG_GEOFENCE_PINPOL = 0x20240013; // PIO pin polarity +const uint32_t UBLOX_CFG_GEOFENCE_PIN = 0x20240014; // PIO pin number +const uint32_t UBLOX_CFG_GEOFENCE_USE_FENCE1 = 0x10240020; // Use frst geofence +const uint32_t UBLOX_CFG_GEOFENCE_FENCE1_LAT = 0x40240021; // Latitude of the first geofence circle center +const uint32_t UBLOX_CFG_GEOFENCE_FENCE1_LON = 0x40240022; // Longitude of the first geofence circle center +const uint32_t UBLOX_CFG_GEOFENCE_FENCE1_RAD = 0x40240023; // Radius of the first geofence circle +const uint32_t UBLOX_CFG_GEOFENCE_USE_FENCE2 = 0x10240030; // Use second geofence +const uint32_t UBLOX_CFG_GEOFENCE_FENCE2_LAT = 0x40240031; // Latitude of the second geofence circle center +const uint32_t UBLOX_CFG_GEOFENCE_FENCE2_LON = 0x40240032; // Longitude of the second geofence circle center +const uint32_t UBLOX_CFG_GEOFENCE_FENCE2_RAD = 0x40240033; // Radius of the second geofence circle +const uint32_t UBLOX_CFG_GEOFENCE_USE_FENCE3 = 0x10240040; // Use third geofence +const uint32_t UBLOX_CFG_GEOFENCE_FENCE3_LAT = 0x40240041; // Latitude of the third geofence circle center +const uint32_t UBLOX_CFG_GEOFENCE_FENCE3_LON = 0x40240042; // Longitude of the third geofence circle center +const uint32_t UBLOX_CFG_GEOFENCE_FENCE3_RAD = 0x40240043; // Radius of the third geofence circle +const uint32_t UBLOX_CFG_GEOFENCE_USE_FENCE4 = 0x10240050; // Use fourth geofence +const uint32_t UBLOX_CFG_GEOFENCE_FENCE4_LAT = 0x40240051; // Latitude of the fourth geofence circle center +const uint32_t UBLOX_CFG_GEOFENCE_FENCE4_LON = 0x40240052; // Longitude of the fourth geofence circle center +const uint32_t UBLOX_CFG_GEOFENCE_FENCE4_RAD = 0x40240053; // Radius of the fourth geofence circle + +//CFG-HW: Hardware configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_HW_ANT_CFG_VOLTCTRL = 0x10a3002e; // Active antenna voltage control flag +const uint32_t UBLOX_CFG_HW_ANT_CFG_SHORTDET = 0x10a3002f; // Short antenna detection flag +const uint32_t UBLOX_CFG_HW_ANT_CFG_SHORTDET_POL = 0x10a30030; // Short antenna detection polarity +const uint32_t UBLOX_CFG_HW_ANT_CFG_OPENDET = 0x10a30031; // Open antenna detection flag +const uint32_t UBLOX_CFG_HW_ANT_CFG_OPENDET_POL = 0x10a30032; // Open antenna detection polarity +const uint32_t UBLOX_CFG_HW_ANT_CFG_PWRDOWN = 0x10a30033; // Power down antenna flag +const uint32_t UBLOX_CFG_HW_ANT_CFG_PWRDOWN_POL = 0x10a30034; // Power down antenna logic polarity +const uint32_t UBLOX_CFG_HW_ANT_CFG_RECOVER = 0x10a30035; // Automatic recovery from short state flag +const uint32_t UBLOX_CFG_HW_ANT_SUP_SWITCH_PIN = 0x20a30036; // ANT1 PIO number +const uint32_t UBLOX_CFG_HW_ANT_SUP_SHORT_PIN = 0x20a30037; // ANT0 PIO number +const uint32_t UBLOX_CFG_HW_ANT_SUP_OPEN_PIN = 0x20a30038; // ANT2 PIO number +const uint32_t UBLOX_CFG_HW_ANT_SUP_ENGINE = 0x20a30054; // Antenna supervisor engine selection +const uint32_t UBLOX_CFG_HW_ANT_SUP_SHORT_THR = 0x20a30055; // Antenna supervisor MADC engine short detection threshold +const uint32_t UBLOX_CFG_HW_ANT_SUP_OPEN_THR = 0x20a30056; // Antenna supervisor MADC engine open detection threshold + +//CFG-I2C: Configuration of the I2C interface +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_I2C_ADDRESS = 0x20510001; // I2C slave address of the receiver (7 bits) +const uint32_t UBLOX_CFG_I2C_EXTENDEDTIMEOUT = 0x10510002; // Flag to disable timeouting the interface after 1.5 s +const uint32_t UBLOX_CFG_I2C_ENABLED = 0x10510003; // Flag to indicate if the I2C interface should be enabled + +//CFG-I2CINPROT: Input protocol configuration of the I2C interface +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_I2CINPROT_UBX = 0x10710001; // Flag to indicate if UBX should be an input protocol on I2C +const uint32_t UBLOX_CFG_I2CINPROT_NMEA = 0x10710002; // Flag to indicate if NMEA should be an input protocol on I2C +const uint32_t UBLOX_CFG_I2CINPROT_RTCM3X = 0x10710004; // Flag to indicate if RTCM3X should be an input protocol on I2C + +//CFG-I2COUTPROT: Output protocol configuration of the I2C interface +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_I2COUTPROT_UBX = 0x10720001; // Flag to indicate if UBX should be an output protocol on I2C +const uint32_t UBLOX_CFG_I2COUTPROT_NMEA = 0x10720002; // Flag to indicate if NMEA should be an output protocol on I2C +const uint32_t UBLOX_CFG_I2COUTPROT_RTCM3X = 0x10720004; // Flag to indicate if RTCM3X should be an output protocol on I2C + +//CFG-INFMSG: Information message configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_INFMSG_UBX_I2C = 0x20920001; // Information message enable flags for the UBX protocol on the I2C interface +const uint32_t UBLOX_CFG_INFMSG_UBX_UART1 = 0x20920002; // Information message enable flags for the UBX protocol on the UART1 interface +const uint32_t UBLOX_CFG_INFMSG_UBX_UART2 = 0x20920003; // Information message enable flags for the UBX protocol on the UART2 interface +const uint32_t UBLOX_CFG_INFMSG_UBX_USB = 0x20920004; // Information message enable flags for the UBX protocol on the USB interface +const uint32_t UBLOX_CFG_INFMSG_UBX_SPI = 0x20920005; // Information message enable flags for the UBX protocol on the SPI interface +const uint32_t UBLOX_CFG_INFMSG_NMEA_I2C = 0x20920006; // Information message enable flags for the NMEA protocol on the I2C interface +const uint32_t UBLOX_CFG_INFMSG_NMEA_UART1 = 0x20920007; // Information message enable flags for the NMEA protocol on the UART1 interface +const uint32_t UBLOX_CFG_INFMSG_NMEA_UART2 = 0x20920008; // Information message enable flags for the NMEA protocol on the UART2 interface +const uint32_t UBLOX_CFG_INFMSG_NMEA_USB = 0x20920009; // Information message enable flags for the NMEA protocol on the USB interface +const uint32_t UBLOX_CFG_INFMSG_NMEA_SPI = 0x2092000a; // Information message enable flags for the NMEA protocol on the SPI interface + +//CFG-ITFM: Jamming and interference monitor configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_ITFM_BBTHRESHOLD = 0x20410001; // Broadband jamming detection threshold +const uint32_t UBLOX_CFG_ITFM_CWTHRESHOLD = 0x20410002; // CW jamming detection threshold +const uint32_t UBLOX_CFG_ITFM_ENABLE = 0x1041000d; // Enable interference detection +const uint32_t UBLOX_CFG_ITFM_ANTSETTING = 0x20410010; // Antenna setting +const uint32_t UBLOX_CFG_ITFM_ENABLE_AUX = 0x10410013; // Scan auxiliary bands + +//CFG-LOGFILTER: Data logger configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_LOGFILTER_RECORD_ENA = 0x10de0002; // Recording enabled +const uint32_t UBLOX_CFG_LOGFILTER_ONCE_PER_WAKE_UP_ENA = 0x10de0003; // Once per wake up +const uint32_t UBLOX_CFG_LOGFILTER_APPLY_ALL_FILTERS = 0x10de0004; // Apply all filter settings +const uint32_t UBLOX_CFG_LOGFILTER_MIN_INTERVAL = 0x30de0005; // Minimum time interval between loggedpositions +const uint32_t UBLOX_CFG_LOGFILTER_TIME_THRS = 0x30de0006; // Time threshold +const uint32_t UBLOX_CFG_LOGFILTER_SPEED_THRS = 0x30de0007; // Speed threshold +const uint32_t UBLOX_CFG_LOGFILTER_POSITION_THRS = 0x40de0008; // Position threshold + +//CFG-MOT: Motion detector configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_MOT_GNSSSPEED_THRS = 0x20250038; // GNSS speed threshold below which platform is considered as stationary (a.k.a. static hold threshold) +const uint32_t UBLOX_CFG_MOT_GNSSDIST_THRS = 0x3025003b; // Distance above which GNSS-based stationary motion is exit (a.k.a. static hold distance threshold) + +// CFG-MSGOUT: Message output configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +// For each message and port a separate output rate (per second, per epoch) can be configured. +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_DTM_I2C = 0x209100a6; //Output rate of the NMEA-GX-DTM message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_DTM_SPI = 0x209100aa; //Output rate of the NMEA-GX-DTM message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_DTM_UART1 = 0x209100a7; //Output rate of the NMEA-GX-DTM message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_DTM_UART2 = 0x209100a8; //Output rate of the NMEA-GX-DTM message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_DTM_USB = 0x209100a9; //Output rate of the NMEA-GX-DTM message on port USB +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GBS_I2C = 0x209100dd; //Output rate of the NMEA-GX-GBS message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GBS_SPI = 0x209100e1; //Output rate of the NMEA-GX-GBS message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GBS_UART1 = 0x209100de; //Output rate of the NMEA-GX-GBS message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GBS_UART2 = 0x209100df; //Output rate of the NMEA-GX-GBS message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GBS_USB = 0x209100e0; //Output rate of the NMEA-GX-GBS message on port USB +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GGA_I2C = 0x209100ba; //Output rate of the NMEA-GX-GGA message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GGA_SPI = 0x209100be; //Output rate of the NMEA-GX-GGA message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GGA_UART1 = 0x209100bb; //Output rate of the NMEA-GX-GGA message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GGA_UART2 = 0x209100bc; //Output rate of the NMEA-GX-GGA message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GGA_USB = 0x209100bd; //Output rate of the NMEA-GX-GGA message on port USB +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GLL_I2C = 0x209100c9; //Output rate of the NMEA-GX-GLL message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GLL_SPI = 0x209100cd; //Output rate of the NMEA-GX-GLL message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GLL_UART1 = 0x209100ca; //Output rate of the NMEA-GX-GLL message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GLL_UART2 = 0x209100cb; //Output rate of the NMEA-GX-GLL message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GLL_USB = 0x209100cc; //Output rate of the NMEA-GX-GLL message on port USB +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GNS_I2C = 0x209100b5; //Output rate of the NMEA-GX-GNS message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GNS_SPI = 0x209100b9; //Output rate of the NMEA-GX-GNS message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GNS_UART1 = 0x209100b6; //Output rate of the NMEA-GX-GNS message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GNS_UART2 = 0x209100b7; //Output rate of the NMEA-GX-GNS message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GNS_USB = 0x209100b8; //Output rate of the NMEA-GX-GNS message on port USB +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GRS_I2C = 0x209100ce; //Output rate of the NMEA-GX-GRS message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GRS_SPI = 0x209100d2; //Output rate of the NMEA-GX-GRS message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GRS_UART1 = 0x209100cf; //Output rate of the NMEA-GX-GRS message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GRS_UART2 = 0x209100d0; //Output rate of the NMEA-GX-GRS message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GRS_USB = 0x209100d1; //Output rate of the NMEA-GX-GRS message on port USB +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GSA_I2C = 0x209100bf; //Output rate of the NMEA-GX-GSA message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GSA_SPI = 0x209100c3; //Output rate of the NMEA-GX-GSA message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GSA_UART1 = 0x209100c0; //Output rate of the NMEA-GX-GSA message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GSA_UART2 = 0x209100c1; //Output rate of the NMEA-GX-GSA message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GSA_USB = 0x209100c2; //Output rate of the NMEA-GX-GSA message on port USB +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GST_I2C = 0x209100d3; //Output rate of the NMEA-GX-GST message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GST_SPI = 0x209100d7; //Output rate of the NMEA-GX-GST message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GST_UART1 = 0x209100d4; //Output rate of the NMEA-GX-GST message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GST_UART2 = 0x209100d5; //Output rate of the NMEA-GX-GST message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GST_USB = 0x209100d6; //Output rate of the NMEA-GX-GST message on port USB +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GSV_I2C = 0x209100c4; //Output rate of the NMEA-GX-GSV message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GSV_SPI = 0x209100c8; //Output rate of the NMEA-GX-GSV message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GSV_UART1 = 0x209100c5; //Output rate of the NMEA-GX-GSV message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GSV_UART2 = 0x209100c6; //Output rate of the NMEA-GX-GSV message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_GSV_USB = 0x209100c7; //Output rate of the NMEA-GX-GSV message on port USB +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_RLM_I2C = 0x20910400; //Output rate of the NMEA-GX-RLM message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_RLM_SPI = 0x20910404; //Output rate of the NMEA-GX-RLM message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_RLM_UART1 = 0x20910401; //Output rate of the NMEA-GX-RLM message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_RLM_UART2 = 0x20910402; //Output rate of the NMEA-GX-RLM message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_RLM_USB = 0x20910403; //Output rate of the NMEA-GX-RLM message on port USB +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_RMC_I2C = 0x209100ab; //Output rate of the NMEA-GX-RMC message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_RMC_SPI = 0x209100af; //Output rate of the NMEA-GX-RMC message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_RMC_UART1 = 0x209100ac; //Output rate of the NMEA-GX-RMC message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_RMC_UART2 = 0x209100ad; //Output rate of the NMEA-GX-RMC message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_RMC_USB = 0x209100ae; //Output rate of the NMEA-GX-RMC message on port USB +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_VLW_I2C = 0x209100e7; //Output rate of the NMEA-GX-VLW message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_VLW_SPI = 0x209100eb; //Output rate of the NMEA-GX-VLW message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_VLW_UART1 = 0x209100e8; //Output rate of the NMEA-GX-VLW message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_VLW_UART2 = 0x209100e9; //Output rate of the NMEA-GX-VLW message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_VLW_USB = 0x209100ea; //Output rate of the NMEA-GX-VLW message on port USB +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_VTG_I2C = 0x209100b0; //Output rate of the NMEA-GX-VTG message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_VTG_SPI = 0x209100b4; //Output rate of the NMEA-GX-VTG message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_VTG_UART1 = 0x209100b1; //Output rate of the NMEA-GX-VTG message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_VTG_UART2 = 0x209100b2; //Output rate of the NMEA-GX-VTG message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_VTG_USB = 0x209100b3; //Output rate of the NMEA-GX-VTG message on port USB +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_ZDA_I2C = 0x209100d8; //Output rate of the NMEA-GX-ZDA message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_ZDA_SPI = 0x209100dc; //Output rate of the NMEA-GX-ZDA message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_ZDA_UART1 = 0x209100d9; //Output rate of the NMEA-GX-ZDA message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_ZDA_UART2 = 0x209100da; //Output rate of the NMEA-GX-ZDA message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_NMEA_ID_ZDA_USB = 0x209100db; //Output rate of the NMEA-GX-ZDA message on port USB +const uint32_t UBLOX_CFG_MSGOUT_PUBX_ID_POLYP_I2C = 0x209100ec; //Output rate of the NMEA-GX-PUBX00 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_PUBX_ID_POLYP_SPI = 0x209100f0; //Output rate of the NMEA-GX-PUBX00 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_PUBX_ID_POLYP_UART1 = 0x209100ed; //Output rate of the NMEA-GX-PUBX00 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_PUBX_ID_POLYP_UART2 = 0x209100ee; //Output rate of the NMEA-GX-PUBX00 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_PUBX_ID_POLYP_USB = 0x209100ef; //Output rate of the NMEA-GX-PUBX00 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_PUBX_ID_POLYS_I2C = 0x209100f1; //Output rate of the NMEA-GX-PUBX03 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_PUBX_ID_POLYS_SPI = 0x209100f5; //Output rate of the NMEA-GX-PUBX03 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_PUBX_ID_POLYS_UART1 = 0x209100f2; //Output rate of the NMEA-GX-PUBX03 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_PUBX_ID_POLYS_UART2 = 0x209100f3; //Output rate of the NMEA-GX-PUBX03 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_PUBX_ID_POLYS_USB = 0x209100f4; //Output rate of the NMEA-GX-PUBX03 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_PUBX_ID_POLYT_I2C = 0x209100f6; //Output rate of the NMEA-GX-PUBX04 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_PUBX_ID_POLYT_SPI = 0x209100fa; //Output rate of the NMEA-GX-PUBX04 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_PUBX_ID_POLYT_UART1 = 0x209100f7; //Output rate of the NMEA-GX-PUBX04 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_PUBX_ID_POLYT_UART2 = 0x209100f8; //Output rate of the NMEA-GX-PUBX04 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_PUBX_ID_POLYT_USB = 0x209100f9; //Output rate of the NMEA-GX-PUBX04 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1005_I2C = 0x209102bd; //Output rate of the RTCM-3X-TYPE1005 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1005_SPI = 0x209102c1; //Output rate of the RTCM-3X-TYPE1005 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1005_UART1 = 0x209102be;//Output rate of the RTCM-3X-TYPE1005 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1005_UART2 = 0x209102bf;//Output rate of the RTCM-3X-TYPE1005 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1005_USB = 0x209102c0; //Output rate of the RTCM-3X-TYPE1005 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1074_I2C = 0x2091035e; //Output rate of the RTCM-3X-TYPE1074 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1074_SPI = 0x20910362; //Output rate of the RTCM-3X-TYPE1074 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1074_UART1 = 0x2091035f;//Output rate of the RTCM-3X-TYPE1074 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1074_UART2 = 0x20910360;//Output rate of the RTCM-3X-TYPE1074 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1074_USB = 0x20910361; //Output rate of the RTCM-3X-TYPE1074 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1077_I2C = 0x209102cc; //Output rate of the RTCM-3X-TYPE1077 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1077_SPI = 0x209102d0; //Output rate of the RTCM-3X-TYPE1077 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1077_UART1 = 0x209102cd;//Output rate of the RTCM-3X-TYPE1077 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1077_UART2 = 0x209102ce;//Output rate of the RTCM-3X-TYPE1077 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1077_USB = 0x209102cf; //Output rate of the RTCM-3X-TYPE1077 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1084_I2C = 0x20910363; //Output rate of the RTCM-3X-TYPE1084 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1084_SPI = 0x20910367; //Output rate of the RTCM-3X-TYPE1084 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1084_UART1 = 0x20910364;//Output rate of the RTCM-3X-TYPE1084 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1084_UART2 = 0x20910365;//Output rate of the RTCM-3X-TYPE1084 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1084_USB = 0x20910366; //Output rate of the RTCM-3X-TYPE1084 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1087_I2C = 0x209102d1; //Output rate of the RTCM-3X-TYPE1087 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1087_SPI = 0x209102d5; //Output rate of the RTCM-3X-TYPE1087 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1087_UART1 = 0x209102d2;//Output rate of the RTCM-3X-TYPE1087 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1087_UART2 = 0x209102d3;//Output rate of the RTCM-3X-TYPE1087 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1087_USB = 0x209102d4; //Output rate of the RTCM-3X-TYPE1087 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1094_I2C = 0x20910368; //Output rate of the RTCM-3X-TYPE1094 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1094_SPI = 0x2091036c; //Output rate of the RTCM-3X-TYPE1094 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1094_UART1 = 0x20910369;//Output rate of the RTCM-3X-TYPE1094 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1094_UART2 = 0x2091036a;//Output rate of the RTCM-3X-TYPE1094 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1094_USB = 0x2091036b; //Output rate of the RTCM-3X-TYPE1094 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1097_I2C = 0x20910318; //Output rate of the RTCM-3X-TYPE1097 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1097_SPI = 0x2091031c; //Output rate of the RTCM-3X-TYPE1097 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1097_UART1 = 0x20910319;//Output rate of the RTCM-3X-TYPE1097 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1097_UART2 = 0x2091031a;//Output rate of the RTCM-3X-TYPE1097 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1097_USB = 0x2091031b; //Output rate of the RTCM-3X-TYPE1097 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1124_I2C = 0x2091036d; //Output rate of the RTCM-3X-TYPE1124 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1124_SPI = 0x20910371; //Output rate of the RTCM-3X-TYPE1124 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1124_UART1 = 0x2091036e;//Output rate of the RTCM-3X-TYPE1124 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1124_UART2 = 0x2091036f;//Output rate of the RTCM-3X-TYPE1124 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1124_USB = 0x20910370; //Output rate of the RTCM-3X-TYPE1124 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1127_I2C = 0x209102d6; //Output rate of the RTCM-3X-TYPE1127 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1127_SPI = 0x209102da; //Output rate of the RTCM-3X-TYPE1127 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1127_UART1 = 0x209102d7;//Output rate of the RTCM-3X-TYPE1127 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1127_UART2 = 0x209102d8;//Output rate of the RTCM-3X-TYPE1127 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1127_USB = 0x209102d9; //Output rate of the RTCM-3X-TYPE1127 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1230_I2C = 0x20910303; //Output rate of the RTCM-3X-TYPE1230 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1230_SPI = 0x20910307; //Output rate of the RTCM-3X-TYPE1230 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1230_UART1 = 0x20910304;//Output rate of the RTCM-3X-TYPE1230 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1230_UART2 = 0x20910305;//Output rate of the RTCM-3X-TYPE1230 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1230_USB = 0x20910306; //Output rate of the RTCM-3X-TYPE1230 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE4072_0_I2C = 0x209102fe;//Output rate of the RTCM-3X-TYPE4072_0 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE4072_0_SPI = 0x20910302;//Output rate of the RTCM-3X-TYPE4072_0 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE4072_0_UART1 = 0x209102ff; //Output rate of the RTCM-3X-TYPE4072_0 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE4072_0_UART2 = 0x20910300; //Output rate of the RTCM-3X-TYPE4072_0 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE4072_0_USB = 0x20910301;//Output rate of the RTCM-3X-TYPE4072_0 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE4072_1_I2C = 0x20910381;//Output rate of the RTCM-3X-TYPE4072_1 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE4072_1_SPI = 0x20910385;//Output rate of the RTCM-3X-TYPE4072_1 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE4072_1_UART1 = 0x20910382; //Output rate of the RTCM-3X-TYPE4072_1 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE4072_1_UART2 = 0x20910383; //Output rate of the RTCM-3X-TYPE4072_1 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_RTCM_3X_TYPE4072_1_USB = 0x20910384;//Output rate of the RTCM-3X-TYPE4072_1 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_LOG_INFO_I2C = 0x20910259; //Output rate of the UBX-LOG-INFO message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_LOG_INFO_SPI = 0x2091025d; //Output rate of the UBX-LOG-INFO message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_LOG_INFO_UART1 = 0x2091025a; //Output rate of the UBX-LOG-INFO message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_LOG_INFO_UART2 = 0x2091025b; //Output rate of the UBX-LOG-INFO message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_LOG_INFO_USB = 0x2091025c; //Output rate of the UBX-LOG-INFO message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_COMMS_I2C = 0x2091034f; //Output rate of the UBX-MON-COMMS message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_COMMS_SPI = 0x20910353; //Output rate of the UBX-MON-COMMS message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_COMMS_UART1 = 0x20910350; //Output rate of the UBX-MON-COMMS message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_COMMS_UART2 = 0x20910351; //Output rate of the UBX-MON-COMMS message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_COMMS_USB = 0x20910352; //Output rate of the UBX-MON-COMMS message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_HW2_I2C = 0x209101b9; //Output rate of the UBX-MON-HW2 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_HW2_SPI = 0x209101bd; //Output rate of the UBX-MON-HW2 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_HW2_UART1 = 0x209101ba; //Output rate of the UBX-MON-HW2 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_HW2_UART2 = 0x209101bb; //Output rate of the UBX-MON-HW2 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_HW2_USB = 0x209101bc; //Output rate of the UBX-MON-HW2 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_HW3_I2C = 0x20910354; //Output rate of the UBX-MON-HW3 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_HW3_SPI = 0x20910358; //Output rate of the UBX-MON-HW3 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_HW3_UART1 = 0x20910355; //Output rate of the UBX-MON-HW3 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_HW3_UART2 = 0x20910356; //Output rate of the UBX-MON-HW3 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_HW3_USB = 0x20910357; //Output rate of the UBX-MON-HW3 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_HW_I2C = 0x209101b4; //Output rate of the UBX-MON-HW message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_HW_SPI = 0x209101b8; //Output rate of the UBX-MON-HW message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_HW_UART1 = 0x209101b5; //Output rate of the UBX-MON-HW message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_HW_UART2 = 0x209101b6; //Output rate of the UBX-MON-HW message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_HW_USB = 0x209101b7; //Output rate of the UBX-MON-HW message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_IO_I2C = 0x209101a5; //Output rate of the UBX-MON-IO message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_IO_SPI = 0x209101a9; //Output rate of the UBX-MON-IO message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_IO_UART1 = 0x209101a6; //Output rate of the UBX-MON-IO message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_IO_UART2 = 0x209101a7; //Output rate of the UBX-MON-IO message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_IO_USB = 0x209101a8; //Output rate of the UBX-MON-IO message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_MSGPP_I2C = 0x20910196; //Output rate of the UBX-MON-MSGPP message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_MSGPP_SPI = 0x2091019a; //Output rate of the UBX-MON-MSGPP message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_MSGPP_UART1 = 0x20910197; //Output rate of the UBX-MON-MSGPP message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_MSGPP_UART2 = 0x20910198; //Output rate of the UBX-MON-MSGPP message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_MSGPP_USB = 0x20910199; //Output rate of the UBX-MON-MSGPP message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_RF_I2C = 0x20910359; //Output rate of the UBX-MON-RF message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_RF_SPI = 0x2091035d; //Output rate of the UBX-MON-RF message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_RF_UART1 = 0x2091035a; //Output rate of the UBX-MON-RF message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_RF_UART2 = 0x2091035b; //Output rate of the UBX-MON-RF message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_RF_USB = 0x2091035c; // Output rate of the UBX-MON-RF message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_RXBUF_I2C = 0x209101a0; // Output rate of the UBX-MON-RXBUF message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_RXBUF_SPI = 0x209101a4; // Output rate of the UBX-MON-RXBUF message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_RXBUF_UART1 = 0x209101a1; // Output rate of the UBX-MON-RXBUF message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_RXBUF_UART2 = 0x209101a2; // Output rate of the UBX-MON-RXBUF message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_RXBUF_USB = 0x209101a3; // Output rate of the UBX-MON-RXBUF message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_RXR_I2C = 0x20910187; // Output rate of the UBX-MON-RXR message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_RXR_SPI = 0x2091018b; // Output rate of the UBX-MON-RXR message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_RXR_UART1 = 0x20910188; // Output rate of the UBX-MON-RXR message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_RXR_UART2 = 0x20910189; // Output rate of the UBX-MON-RXR message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_RXR_USB = 0x2091018a; // Output rate of the UBX-MON-RXR message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_SPAN_I2C = 0x2091038b; // Output rate of the UBX-MON-SPAN message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_SPAN_SPI = 0x2091038f; // Output rate of the UBX-MON-SPAN message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_SPAN_UART1 = 0x2091038c; // Output rate of the UBX-MON-SPAN message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_SPAN_UART2 = 0x2091038d; // Output rate of the UBX-MON-SPAN message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_SPAN_USB = 0x2091038e; // Output rate of the UBX-MON-SPAN message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_TXBUF_I2C = 0x2091019b; // Output rate of the UBX-MON-TXBUF message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_TXBUF_SPI = 0x2091019f; // Output rate of the UBX-MON-TXBUF message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_TXBUF_UART1 = 0x2091019c; // Output rate of the UBX-MON-TXBUF message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_TXBUF_UART2 = 0x2091019d; // Output rate of the UBX-MON-TXBUF message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_MON_TXBUF_USB = 0x2091019e; // Output rate of the UBX-MON-TXBUF message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_ATT_I2C = 0x2091001f; // Output rate of the UBX_NAV_ATT message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_ATT_SPI = 0x20910023; // Output rate of the UBX_NAV_ATT message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_ATT_UART1 = 0x20910020; // Output rate of the UBX_NAV_ATT message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_ATT_UART2 = 0x20910021; // Output rate of the UBX_NAV_ATT message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_ATT_USB = 0x20910022; // Output rate of the UBX_NAV_ATT message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_CLOCK_I2C = 0x20910065; // Output rate of the UBX-NAV-CLOCK message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_CLOCK_SPI = 0x20910069; // Output rate of the UBX-NAV-CLOCK message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_CLOCK_UART1 = 0x20910066; // Output rate of the UBX-NAV-CLOCK message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_CLOCK_UART2 = 0x20910067; // Output rate of the UBX-NAV-CLOCK message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_CLOCK_USB = 0x20910068; // Output rate of the UBX-NAV-CLOCK message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_DOP_I2C = 0x20910038; // Output rate of the UBX-NAV-DOP message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_DOP_SPI = 0x2091003c; // Output rate of the UBX-NAV-DOP message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_DOP_UART1 = 0x20910039; // Output rate of the UBX-NAV-DOP message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_DOP_UART2 = 0x2091003a; // Output rate of the UBX-NAV-DOP message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_DOP_USB = 0x2091003b; // Output rate of the UBX-NAV-DOP message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_EOE_I2C = 0x2091015f; // Output rate of the UBX-NAV-EOE message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_EOE_SPI = 0x20910163; // Output rate of the UBX-NAV-EOE message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_EOE_UART1 = 0x20910160; // Output rate of the UBX-NAV-EOE message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_EOE_UART2 = 0x20910161; // Output rate of the UBX-NAV-EOE message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_EOE_USB = 0x20910162; // Output rate of the UBX-NAV-EOE message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_GEOFENCE_I2C = 0x209100a1; // Output rate of the UBX-NAV-GEOFENCE message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_GEOFENCE_SPI = 0x209100a5; // Output rate of the UBX-NAV-GEOFENCE message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_GEOFENCE_UART1 = 0x209100a2;// Output rate of the UBX-NAV-GEOFENCE message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_GEOFENCE_UART2 = 0x209100a3;// Output rate of the UBX-NAV-GEOFENCE message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_GEOFENCE_USB = 0x209100a4; // Output rate of the UBX-NAV-GEOFENCE message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_HPPOSECEF_I2C = 0x2091002e;// Output rate of the UBX-NAV-HPPOSECEF message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_HPPOSECEF_SPI = 0x20910032;// Output rate of the UBX-NAV-HPPOSECEF message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_HPPOSECEF_UART1 = 0x2091002f;// Output rate of the UBX-NAV-HPPOSECEF message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_HPPOSECEF_UART2 = 0x20910030;// Output rate of the UBX-NAV-HPPOSECEF message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_HPPOSECEF_USB = 0x20910031;// Output rate of the UBX-NAV-HPPOSECEF message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_HPPOSLLH_I2C = 0x20910033; // Output rate of the UBX-NAV-HPPOSLLH message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_HPPOSLLH_SPI = 0x20910037; // Output rate of the UBX-NAV-HPPOSLLH message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_HPPOSLLH_UART1 = 0x20910034;// Output rate of the UBX-NAV-HPPOSLLH message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_HPPOSLLH_UART2 = 0x20910035;// Output rate of the UBX-NAV-HPPOSLLH message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_HPPOSLLH_USB = 0x20910036; // Output rate of the UBX-NAV-HPPOSLLH message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_ODO_I2C = 0x2091007e; // Output rate of the UBX-NAV-ODO message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_ODO_SPI = 0x20910082; // Output rate of the UBX-NAV-ODO message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_ODO_UART1 = 0x2091007f; // Output rate of the UBX-NAV-ODO message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_ODO_UART2 = 0x20910080; // Output rate of the UBX-NAV-ODO message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_ODO_USB = 0x20910081; // Output rate of the UBX-NAV-ODO message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_ORB_I2C = 0x20910010; // Output rate of the UBX-NAV-ORB message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_ORB_SPI = 0x20910014; // Output rate of the UBX-NAV-ORB message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_ORB_UART1 = 0x20910011; // Output rate of the UBX-NAV-ORB message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_ORB_UART2 = 0x20910012; // Output rate of the UBX-NAV-ORB message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_ORB_USB = 0x20910013; // Output rate of the UBX-NAV-ORB message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_POSECEF_I2C = 0x20910024; // Output rate of the UBX-NAV-POSECEF message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_POSECEF_SPI = 0x20910028; // Output rate of the UBX-NAV-POSECEF message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_POSECEF_UART1 = 0x20910025;// Output rate of the UBX-NAV-POSECEF message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_POSECEF_UART2 = 0x20910026;// Output rate of the UBX-NAV-POSECEF message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_POSECEF_USB = 0x20910027; // Output rate of the UBX-NAV-POSECEF message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_POSLLH_I2C = 0x20910029; // Output rate of the UBX-NAV-POSLLH message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_POSLLH_SPI = 0x2091002d; // Output rate of the UBX-NAV-POSLLH message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_POSLLH_UART1 = 0x2091002a; // Output rate of the UBX-NAV-POSLLH message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_POSLLH_UART2 = 0x2091002b; // Output rate of the UBX-NAV-POSLLH message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_POSLLH_USB = 0x2091002c; // Output rate of the UBX-NAV-POSLLH message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_PVT_I2C = 0x20910006; // Output rate of the UBX-NAV-PVT message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_PVT_SPI = 0x2091000a; // Output rate of the UBX-NAV-PVT message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_PVT_UART1 = 0x20910007; // Output rate of the UBX-NAV-PVT message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_PVT_UART2 = 0x20910008; // Output rate of the UBX-NAV-PVT message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_PVT_USB = 0x20910009; // Output rate of the UBX-NAV-PVT message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_RELPOSNED_I2C = 0x2091008d; // Output rate of the UBX-NAV-RELPOSNED message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_RELPOSNED_SPI = 0x20910091;// Output rate of the UBX-NAV-RELPOSNED message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_RELPOSNED_UART1 = 0x2091008e;// Output rate of the UBX-NAV-RELPOSNED message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_RELPOSNED_UART2 = 0x2091008f;// Output rate of the UBX-NAV-RELPOSNED message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_RELPOSNED_USB = 0x20910090;// Output rate of the UBX-NAV-RELPOSNED message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SAT_I2C = 0x20910015; // Output rate of the UBX-NAV-SAT message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SAT_SPI = 0x20910019; // Output rate of the UBX-NAV-SAT message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SAT_UART1 = 0x20910016; // Output rate of the UBX-NAV-SAT message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SAT_UART2 = 0x20910017; // Output rate of the UBX-NAV-SAT message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SAT_USB = 0x20910018; // Output rate of the UBX-NAV-SAT message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SBAS_I2C = 0x2091006a; // Output rate of the UBX-NAV-SBAS message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SBAS_SPI = 0x2091006e; // Output rate of the UBX-NAV-SBAS message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SBAS_UART1 = 0x2091006b; // Output rate of the UBX-NAV-SBAS message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SBAS_UART2 = 0x2091006c; // Output rate of the UBX-NAV-SBAS message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SBAS_USB = 0x2091006d; // Output rate of the UBX-NAV-SBAS message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SIG_I2C = 0x20910345; // Output rate of the UBX-NAV-SIG message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SIG_SPI = 0x20910349; // Output rate of the UBX-NAV-SIG message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SIG_UART1 = 0x20910346; // Output rate of the UBX-NAV-SIG message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SIG_UART2 = 0x20910347; // Output rate of the UBX-NAV-SIG message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SIG_USB = 0x20910348; // Output rate of the UBX-NAV-SIG message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SLAS_I2C = 0x20910336; // Output rate of the UBX-NAV-SLAS message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SLAS_SPI = 0x2091033a; // Output rate of the UBX-NAV-SLAS message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SLAS_UART1 = 0x20910337; // Output rate of the UBX-NAV-SLAS message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SLAS_UART2 = 0x20910338; // Output rate of the UBX-NAV-SLAS message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SLAS_USB = 0x20910339; // Output rate of the UBX-NAV-SLAS message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_STATUS_I2C = 0x2091001a; // Output rate of the UBX-NAV-STATUS message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_STATUS_SPI = 0x2091001e; // Output rate of the UBX-NAV-STATUS message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_STATUS_UART1 = 0x2091001b; // Output rate of the UBX-NAV-STATUS message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_STATUS_UART2 = 0x2091001c; // Output rate of the UBX-NAV-STATUS message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_STATUS_USB = 0x2091001d; // Output rate of the UBX-NAV-STATUS message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SVIN_I2C = 0x20910088; // Output rate of the UBX-NAV-SVIN message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SVIN_SPI = 0x2091008c; // Output rate of the UBX-NAV-SVIN message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SVIN_UART1 = 0x20910089; // Output rate of the UBX-NAV-SVIN message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SVIN_UART2 = 0x2091008a; // Output rate of the UBX-NAV-SVIN message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_SVIN_USB = 0x2091008b; // Output rate of the UBX-NAV-SVIN message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEBDS_I2C = 0x20910051; // Output rate of the UBX-NAV-TIMEBDS message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEBDS_SPI = 0x20910055; // Output rate of the UBX-NAV-TIMEBDS message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEBDS_UART1 = 0x20910052;// Output rate of the UBX-NAV-TIMEBDS message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEBDS_UART2 = 0x20910053;// Output rate of the UBX-NAV-TIMEBDS message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEBDS_USB = 0x20910054; // Output rate of the UBX-NAV-TIMEBDS message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEGAL_I2C = 0x20910056; // Output rate of the UBX-NAV-TIMEGAL message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEGAL_SPI = 0x2091005a; // Output rate of the UBX-NAV-TIMEGAL message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEGAL_UART1 = 0x20910057;// Output rate of the UBX-NAV-TIMEGAL message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEGAL_UART2 = 0x20910058;// Output rate of the UBX-NAV-TIMEGAL message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEGAL_USB = 0x20910059; // Output rate of the UBX-NAV-TIMEGAL message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEGLO_I2C = 0x2091004c; // Output rate of the UBX-NAV-TIMEGLO message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEGLO_SPI = 0x20910050; // Output rate of the UBX-NAV-TIMEGLO message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEGLO_UART1 = 0x2091004d;// Output rate of the UBX-NAV-TIMEGLO message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEGLO_UART2 = 0x2091004e;// Output rate of the UBX-NAV-TIMEGLO message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEGLO_USB = 0x2091004f; // Output rate of the UBX-NAV-TIMEGLO message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEGPS_I2C = 0x20910047; // Output rate of the UBX-NAV-TIMEGPS message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEGPS_SPI = 0x2091004b; // Output rate of the UBX-NAV-TIMEGPS message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEGPS_UART1 = 0x20910048;// Output rate of the UBX-NAV-TIMEGPS message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEGPS_UART2 = 0x20910049;// Output rate of the UBX-NAV-TIMEGPS message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEGPS_USB = 0x2091004a; // Output rate of the UBX-NAV-TIMEGPS message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMELS_I2C = 0x20910060; // Output rate of the UBX-NAV-TIMELS message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMELS_SPI = 0x20910064; // Output rate of the UBX-NAV-TIMELS message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMELS_UART1 = 0x20910061; // Output rate of the UBX-NAV-TIMELS message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMELS_UART2 = 0x20910062; // Output rate of the UBX-NAV-TIMELS message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMELS_USB = 0x20910063; // Output rate of the UBX-NAV-TIMELS message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEQZSS_I2C = 0x20910386; // Output rate of the UBX-NAV-TIMEQZSSmessage on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEQZSS_SPI = 0x2091038a; // Output rate of the UBX-NAV-TIMEQZSSmessage on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEQZSS_UART1 = 0x20910387;// Output rate of the UBX-NAV-TIMEQZSSmessage on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEQZSS_UART2 = 0x20910388;// Output rate of the UBX-NAV-TIMEQZSSmessage on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEQZSS_USB = 0x20910389; // Output rate of the UBX-NAV-TIMEQZSSmessage on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEUTC_I2C = 0x2091005b; // Output rate of the UBX-NAV-TIMEUTC message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEUTC_SPI = 0x2091005f; // Output rate of the UBX-NAV-TIMEUTC message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEUTC_UART1 = 0x2091005c;// Output rate of the UBX-NAV-TIMEUTC message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEUTC_UART2 = 0x2091005d;// Output rate of the UBX-NAV-TIMEUTC message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_TIMEUTC_USB = 0x2091005e; // Output rate of the UBX-NAV-TIMEUTC message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_VELECEF_I2C = 0x2091003d; // Output rate of the UBX-NAV-VELECEF message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_VELECEF_SPI = 0x20910041; // Output rate of the UBX-NAV-VELECEF message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_VELECEF_UART1 = 0x2091003e;// Output rate of the UBX-NAV-VELECEF message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_VELECEF_UART2 = 0x2091003f;// Output rate of the UBX-NAV-VELECEF message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_VELECEF_USB = 0x20910040; // Output rate of the UBX-NAV-VELECEF message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_VELNED_I2C = 0x20910042; // Output rate of the UBX-NAV-VELNED message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_VELNED_SPI = 0x20910046; // Output rate of the UBX-NAV-VELNED message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_VELNED_UART1 = 0x20910043; // Output rate of the UBX-NAV-VELNED message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_VELNED_UART2 = 0x20910044; // Output rate of the UBX-NAV-VELNED message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_NAV_VELNED_USB = 0x20910045; // Output rate of the UBX-NAV-VELNED message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_MEASX_I2C = 0x20910204; // Output rate of the UBX-RXM-MEASX message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_MEASX_SPI = 0x20910208; // Output rate of the UBX-RXM-MEASX message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_MEASX_UART1 = 0x20910205; // Output rate of the UBX-RXM-MEASX message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_MEASX_UART2 = 0x20910206; // Output rate of the UBX-RXM-MEASX message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_MEASX_USB = 0x20910207; // Output rate of the UBX-RXM-MEASX message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_RAWX_I2C = 0x209102a4; // Output rate of the UBX-RXM-RAWX message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_RAWX_SPI = 0x209102a8; // Output rate of the UBX-RXM-RAWX message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_RAWX_UART1 = 0x209102a5; // Output rate of the UBX-RXM-RAWX message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_RAWX_UART2 = 0x209102a6; // Output rate of the UBX-RXM-RAWX message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_RAWX_USB = 0x209102a7; // Output rate of the UBX-RXM-RAWX message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_RLM_I2C = 0x2091025e; // Output rate of the UBX-RXM-RLM message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_RLM_SPI = 0x20910262; // Output rate of the UBX-RXM-RLM message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_RLM_UART1 = 0x2091025f; // Output rate of the UBX-RXM-RLM message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_RLM_UART2 = 0x20910260; // Output rate of the UBX-RXM-RLM message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_RLM_USB = 0x20910261; // Output rate of the UBX-RXM-RLM message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_RTCM_I2C = 0x20910268; // Output rate of the UBX-RXM-RTCM message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_RTCM_SPI = 0x2091026c; // Output rate of the UBX-RXM-RTCM message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_RTCM_UART1 = 0x20910269; // Output rate of the UBX-RXM-RTCM message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_RTCM_UART2 = 0x2091026a; // Output rate of the UBX-RXM-RTCM message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_RTCM_USB = 0x2091026b; // Output rate of the UBX-RXM-RTCM message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_SFRBX_I2C = 0x20910231; // Output rate of the UBX-RXM-SFRBX message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_SFRBX_SPI = 0x20910235; // Output rate of the UBX-RXM-SFRBX message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_SFRBX_UART1 = 0x20910232; // Output rate of the UBX-RXM-SFRBX message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_SFRBX_UART2 = 0x20910233; // Output rate of the UBX-RXM-SFRBX message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_RXM_SFRBX_USB = 0x20910234; // Output rate of the UBX-RXM-SFRBX message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_TIM_TM2_I2C = 0x20910178; // Output rate of the UBX-TIM-TM2 message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_TIM_TM2_SPI = 0x2091017c; // Output rate of the UBX-TIM-TM2 message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_TIM_TM2_UART1 = 0x20910179; // Output rate of the UBX-TIM-TM2 message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_TIM_TM2_UART2 = 0x2091017a; // Output rate of the UBX-TIM-TM2 message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_TIM_TM2_USB = 0x2091017b; // Output rate of the UBX-TIM-TM2 message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_TIM_TP_I2C = 0x2091017d; // Output rate of the UBX-TIM-TP message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_TIM_TP_SPI = 0x20910181; // Output rate of the UBX-TIM-TP message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_TIM_TP_UART1 = 0x2091017e; // Output rate of the UBX-TIM-TP message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_TIM_TP_UART2 = 0x2091017f; // Output rate of the UBX-TIM-TP message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_TIM_TP_USB = 0x20910180; // Output rate of the UBX-TIM-TP message on port USB +const uint32_t UBLOX_CFG_MSGOUT_UBX_TIM_VRFY_I2C = 0x20910092; // Output rate of the UBX-TIM-VRFY message on port I2C +const uint32_t UBLOX_CFG_MSGOUT_UBX_TIM_VRFY_SPI = 0x20910096; // Output rate of the UBX-TIM-VRFY message on port SPI +const uint32_t UBLOX_CFG_MSGOUT_UBX_TIM_VRFY_UART1 = 0x20910093; // Output rate of the UBX-TIM-VRFY message on port UART1 +const uint32_t UBLOX_CFG_MSGOUT_UBX_TIM_VRFY_UART2 = 0x20910094; // Output rate of the UBX-TIM-VRFY message on port UART2 +const uint32_t UBLOX_CFG_MSGOUT_UBX_TIM_VRFY_USB = 0x20910095; // Output rate of the UBX-TIM-VRFY message on port USB + +//CFG-NAVHPG: High precision navigation configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_NAVHPG_DGNSSMODE = 0x20140011; // Differential corrections mode + +//CFG-NAVSPG: Standard precision navigation configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_NAVSPG_FIXMODE = 0x20110011; // Position fix mode +const uint32_t UBLOX_CFG_NAVSPG_INIFIX3D = 0x10110013; // Initial fix must be a 3D fix +const uint32_t UBLOX_CFG_NAVSPG_WKNROLLOVER = 0x30110017; // GPS week rollover number +const uint32_t UBLOX_CFG_NAVSPG_UTCSTANDARD = 0x2011001c; // UTC standard to be used +const uint32_t UBLOX_CFG_NAVSPG_DYNMODEL = 0x20110021; // Dynamic platform model +const uint32_t UBLOX_CFG_NAVSPG_ACKAIDING = 0x10110025; // Acknowledge assistance input messages +const uint32_t UBLOX_CFG_NAVSPG_USE_USRDAT = 0x10110061; // Use user geodetic datum parameters +const uint32_t UBLOX_CFG_NAVSPG_USRDAT_MAJA = 0x50110062; // Geodetic datum semi-major axis +const uint32_t UBLOX_CFG_NAVSPG_USRDAT_FLAT = 0x50110063; // Geodetic datum 1.0 flattening +const uint32_t UBLOX_CFG_NAVSPG_USRDAT_DX = 0x40110064; // Geodetic datum X axis shift at the origin +const uint32_t UBLOX_CFG_NAVSPG_USRDAT_DY = 0x40110065; // Geodetic datum Y axis shift at the origin +const uint32_t UBLOX_CFG_NAVSPG_USRDAT_DZ = 0x40110066; // Geodetic datum Z axis shift at the origin +const uint32_t UBLOX_CFG_NAVSPG_USRDAT_ROTX = 0x40110067; // arcsec Geodetic datum rotation about the X axis +const uint32_t UBLOX_CFG_NAVSPG_USRDAT_ROTY = 0x40110068; // arcsec Geodetic datum rotation about the Y axis +const uint32_t UBLOX_CFG_NAVSPG_USRDAT_ROTZ = 0x40110069; // arcsec Geodetic datum rotation about the Z axis +const uint32_t UBLOX_CFG_NAVSPG_USRDAT_SCALE = 0x4011006a; // ppm Geodetic datum scale factor +const uint32_t UBLOX_CFG_NAVSPG_INFIL_MINSVS = 0x201100a1; // Minimum number of satellites for navigation +const uint32_t UBLOX_CFG_NAVSPG_INFIL_MAXSVS = 0x201100a2; // Maximum number of satellites for navigation +const uint32_t UBLOX_CFG_NAVSPG_INFIL_MINCNO = 0x201100a3; // Minimum satellite signal level for navigation +const uint32_t UBLOX_CFG_NAVSPG_INFIL_MINELEV = 0x201100a4; // Minimum elevation for a GNSS satellite to be used in navigation +const uint32_t UBLOX_CFG_NAVSPG_INFIL_NCNOTHRS = 0x201100aa; // Number of satellites required to have C/N0 above const uint32_t UBLOX_CFG_NAVSPG-INFIL_CNOTHRS for a fix to be attempted +const uint32_t UBLOX_CFG_NAVSPG_INFIL_CNOTHRS = 0x201100ab; // C/N0 threshold for deciding whether to attempt a fix +const uint32_t UBLOX_CFG_NAVSPG_OUTFIL_PDOP = 0x301100b1; // Output filter position DOP mask (threshold) +const uint32_t UBLOX_CFG_NAVSPG_OUTFIL_TDOP = 0x301100b2; // Output filter time DOP mask (threshold) +const uint32_t UBLOX_CFG_NAVSPG_OUTFIL_PACC = 0x301100b3; // Output filter position accuracy mask (threshold) +const uint32_t UBLOX_CFG_NAVSPG_OUTFIL_TACC = 0x301100b4; // Output filter time accuracy mask (threshold) +const uint32_t UBLOX_CFG_NAVSPG_OUTFIL_FACC = 0x301100b5; // Output filter frequency accuracy mask (threshold) +const uint32_t UBLOX_CFG_NAVSPG_CONSTR_ALT = 0x401100c1; // Fixed altitude (mean sea level) for 2D fix mode +const uint32_t UBLOX_CFG_NAVSPG_CONSTR_ALTVAR = 0x401100c2; // Fixed altitude variance for 2D mode +const uint32_t UBLOX_CFG_NAVSPG_CONSTR_DGNSSTO = 0x201100c4; // DGNSS timeout + +//CFG-NMEA: NMEA protocol configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_NMEA_PROTVER = 0x20930001; // NMEA protocol version +const uint32_t UBLOX_CFG_NMEA_MAXSVS = 0x20930002; // Maximum number of SVs to report per Talker ID +const uint32_t UBLOX_CFG_NMEA_COMPAT = 0x10930003; // Enable compatibility mode +const uint32_t UBLOX_CFG_NMEA_CONSIDER = 0x10930004; // Enable considering mode +const uint32_t UBLOX_CFG_NMEA_LIMIT82 = 0x10930005; // Enable strict limit to 82 characters maximum NMEA message length +const uint32_t UBLOX_CFG_NMEA_HIGHPREC = 0x10930006; // Enable high precision mode +const uint32_t UBLOX_CFG_NMEA_SVNUMBERING = 0x20930007; // Display configuration for SVs that do not have value defined in NMEA +const uint32_t UBLOX_CFG_NMEA_FILT_GPS = 0x10930011; // Disable reporting of GPS satellites +const uint32_t UBLOX_CFG_NMEA_FILT_SBAS = 0x10930012; // Disable reporting of SBAS satellites +const uint32_t UBLOX_CFG_NMEA_FILT_GAL = 0x10930013; // Disable reporting of Galileo satellites +const uint32_t UBLOX_CFG_NMEA_FILT_QZSS = 0x10930015; // Disable reporting of QZSS satellites +const uint32_t UBLOX_CFG_NMEA_FILT_GLO = 0x10930016; // Disable reporting of GLONASS satellites +const uint32_t UBLOX_CFG_NMEA_FILT_BDS = 0x10930017; // Disable reporting of BeiDou satellites +const uint32_t UBLOX_CFG_NMEA_OUT_INVFIX = 0x10930021; // Enable position output for failed or invalid fixes +const uint32_t UBLOX_CFG_NMEA_OUT_MSKFIX = 0x10930022; // Enable position output for invalid fixes +const uint32_t UBLOX_CFG_NMEA_OUT_INVTIME = 0x10930023; // Enable time output for invalid times +const uint32_t UBLOX_CFG_NMEA_OUT_INVDATE = 0x10930024; // Enable date output for invalid dates +const uint32_t UBLOX_CFG_NMEA_OUT_ONLYGPS = 0x10930025; // Restrict output to GPS satellites only +const uint32_t UBLOX_CFG_NMEA_OUT_FROZENCOG = 0x10930026; // Enable course over ground output even if it is frozen +const uint32_t UBLOX_CFG_NMEA_MAINTALKERID = 0x20930031; // Main Talker ID +const uint32_t UBLOX_CFG_NMEA_GSVTALKERID = 0x20930032; // Talker ID for GSV NMEA messages +const uint32_t UBLOX_CFG_NMEA_BDSTALKERID = 0x30930033; // BeiDou Talker ID + +//CFG-ODO: Odometer and low-speed course over ground filter +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_ODO_USE_ODO = 0x10220001; // Use odometer +const uint32_t UBLOX_CFG_ODO_USE_COG = 0x10220002; // Use low-speed course over ground filter +const uint32_t UBLOX_CFG_ODO_OUTLPVEL = 0x10220003; // Output low-pass filtered velocity +const uint32_t UBLOX_CFG_ODO_OUTLPCOG = 0x10220004; // Output low-pass filtered course over ground (heading) +const uint32_t UBLOX_CFG_ODO_PROFILE = 0x20220005; // Odometer profile configuration +const uint32_t UBLOX_CFG_ODO_COGMAXSPEED = 0x20220021; // Upper speed limit for low-speed course over ground filter +const uint32_t UBLOX_CFG_ODO_COGMAXPOSACC = 0x20220022; // Maximum acceptable position accuracy for computing low-speed filtered course over ground +const uint32_t UBLOX_CFG_ODO_VELLPGAIN = 0x20220031; // Velocity low-pass filter level +const uint32_t UBLOX_CFG_ODO_COGLPGAIN = 0x20220032; // Course over ground low-pass filter level (at speed < 8 m/s) + +//CFG-QZSS: QZSS system configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_QZSS_USE_SLAS_DGNSS = 0x10370005; // Apply QZSS SLAS DGNSS corrections +const uint32_t UBLOX_CFG_QZSS_USE_SLAS_TESTMODE = 0x10370006; // Use QZSS SLAS data when it is in test mode (SLAS msg 0) +const uint32_t UBLOX_CFG_QZSS_USE_SLAS_RAIM_UNCORR = 0x10370007; // Raim out measurements that are not corrected by QZSS SLAS, if at least 5 measurements are corrected + +//CFG-RATE: Navigation and measurement rate configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_RATE_MEAS = 0x30210001; // Nominal time between GNSS measurements +const uint32_t UBLOX_CFG_RATE_NAV = 0x30210002; // Ratio of number of measurements to number of navigation solutions +const uint32_t UBLOX_CFG_RATE_TIMEREF = 0x20210003; // Time system to which measurements are aligned + +//CFG-RINV: Remote inventory +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_RINV_DUMP = 0x10c70001; // Dump data at startup +const uint32_t UBLOX_CFG_RINV_BINARY = 0x10c70002; // Data is binary +const uint32_t UBLOX_CFG_RINV_DATA_SIZE = 0x20c70003; // Size of data +const uint32_t UBLOX_CFG_RINV_CHUNK0 = 0x50c70004; // Data bytes 1-8 (LSB) +const uint32_t UBLOX_CFG_RINV_CHUNK1 = 0x50c70005; // Data bytes 9-16 +const uint32_t UBLOX_CFG_RINV_CHUNK2 = 0x50c70006; // Data bytes 17-240x44434241. +const uint32_t UBLOX_CFG_RINV_CHUNK3 = 0x50c70007; // Data bytes 25-30 (MSB) + +//CFG-RTCM: RTCM protocol configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_RTCM_DF003_OUT = 0x30090001; // RTCM DF003 (Reference station ID) output value +const uint32_t UBLOX_CFG_RTCM_DF003_IN = 0x30090008; // RTCM DF003 (Reference station ID) input value +const uint32_t UBLOX_CFG_RTCM_DF003_IN_FILTER = 0x20090009; // RTCM input filter configuration based on RTCM DF003 (Reference station ID) value + +//CFG-SBAS: SBAS configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_SBAS_USE_TESTMODE = 0x10360002; // Use SBAS data when it is in test mode (SBAS msg 0) +const uint32_t UBLOX_CFG_SBAS_USE_RANGING = 0x10360003; // Use SBAS GEOs as a ranging source (for navigation) +const uint32_t UBLOX_CFG_SBAS_USE_DIFFCORR = 0x10360004; // Use SBAS differential corrections +const uint32_t UBLOX_CFG_SBAS_USE_INTEGRITY = 0x10360005; // Use SBAS integrity information +const uint32_t UBLOX_CFG_SBAS_PRNSCANMASK = 0x50360006; // SBAS PRN search configuration + +//CFG-SIGNAL: Satellite systems (GNSS) signal configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_SIGNAL_GPS_ENA = 0x1031001f; // GPS enable +const uint32_t UBLOX_CFG_SIGNAL_GPS_L1CA_ENA = 0x10310001; // GPS L1C/A +const uint32_t UBLOX_CFG_SIGNAL_GPS_L2C_ENA = 0x10310003; // GPS L2C (only on u-blox F9 platform products) +const uint32_t UBLOX_CFG_SIGNAL_SBAS_ENA = 0x10310020; // SBAS enable +const uint32_t UBLOX_CFG_SIGNAL_SBAS_L1CA_ENA = 0x10310005; // SBAS L1C/A +const uint32_t UBLOX_CFG_SIGNAL_GAL_ENA = 0x10310021; // Galileo enable +const uint32_t UBLOX_CFG_SIGNAL_GAL_E1_ENA = 0x10310007; // Galileo E1 +const uint32_t UBLOX_CFG_SIGNAL_GAL_E5B_ENA = 0x1031000a; // Galileo E5b (only on u-blox F9 platform products) +const uint32_t UBLOX_CFG_SIGNAL_BDS_ENA = 0x10310022; // BeiDou Enable +const uint32_t UBLOX_CFG_SIGNAL_BDS_B1_ENA = 0x1031000d; // BeiDou B1I +const uint32_t UBLOX_CFG_SIGNAL_BDS_B2_ENA = 0x1031000e; // BeiDou B2I (only on u-blox F9 platform products) +const uint32_t UBLOX_CFG_SIGNAL_QZSS_ENA = 0x10310024; // QZSS enable +const uint32_t UBLOX_CFG_SIGNAL_QZSS_L1CA_ENA = 0x10310012; // QZSS L1C/A +const uint32_t UBLOX_CFG_SIGNAL_QZSS_L1S_ENA = 0x10310014; // QZSS L1S +const uint32_t UBLOX_CFG_SIGNAL_QZSS_L2C_ENA = 0x10310015; // QZSS L2C (only on u-blox F9 platform products) +const uint32_t UBLOX_CFG_SIGNAL_GLO_ENA = 0x10310025; // GLONASS enable +const uint32_t UBLOX_CFG_SIGNAL_GLO_L1_ENA = 0x10310018; // GLONASS L1 +const uint32_t UBLOX_CFG_SIGNAL_GLO_L2_ENA = 0x1031001a; // GLONASS L2 (only on u-blox F9 platform products) + +//CFG-SPI: Configuration of the SPI interface +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_SPI_MAXFF = 0x20640001; // Number of bytes containing 0xFF to receive before switching off reception. Range: 0 (mechanism off) - 63 +const uint32_t UBLOX_CFG_SPI_CPOLARITY = 0x10640002; // Clock polarity select: 0: Active Hight Clock, SCLK idles low, 1: Active Low Clock, SCLK idles high +const uint32_t UBLOX_CFG_SPI_CPHASE = 0x10640003; // Clock phase select: 0: Data captured on first edge of SCLK, 1: Data captured on second edge of SCLK +const uint32_t UBLOX_CFG_SPI_EXTENDEDTIMEOUT = 0x10640005; // Flag to disable timeouting the interface after 1.5s +const uint32_t UBLOX_CFG_SPI_ENABLED = 0x10640006; // Flag to indicate if the SPI interface should be enabled + +//CFG-SPIINPROT: Input protocol configuration of the SPI interface +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_SPIINPROT_UBX = 0x10790001; // Flag to indicate if UBX should be an input protocol on SPI +const uint32_t UBLOX_CFG_SPIINPROT_NMEA = 0x10790002; // Flag to indicate if NMEA should be an input protocol on SPI +const uint32_t UBLOX_CFG_SPIINPROT_RTCM3X = 0x10790004; // Flag to indicate if RTCM3X should be an input protocol on SPI + +//CFG-SPIOUTPROT: Output protocol configuration of the SPI interface +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_SPIOUTPROT_UBX = 0x107a0001; // Flag to indicate if UBX should be an output protocol on SPI +const uint32_t UBLOX_CFG_SPIOUTPROT_NMEA = 0x107a0002; // Flag to indicate if NMEA should be an output protocol on SPI +const uint32_t UBLOX_CFG_SPIOUTPROT_RTCM3X = 0x107a0004; // Flag to indicate if RTCM3X should be an output protocol on SPI + +//CFG-TMODE: Time mode configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_TMODE_MODE = 0x20030001; // Receiver mode +const uint32_t UBLOX_CFG_TMODE_POS_TYPE = 0x20030002; // Determines whether the ARP position is given in ECEF or LAT/LON/HEIGHT? +const uint32_t UBLOX_CFG_TMODE_ECEF_X = 0x40030003; // ECEF X coordinate of the ARP position. +const uint32_t UBLOX_CFG_TMODE_ECEF_Y = 0x40030004; // ECEF Y coordinate of the ARP position. +const uint32_t UBLOX_CFG_TMODE_ECEF_Z = 0x40030005; // ECEF Z coordinate of the ARP position. +const uint32_t UBLOX_CFG_TMODE_ECEF_X_HP = 0x20030006; // High-precision ECEF X coordinate of the ARP position. +const uint32_t UBLOX_CFG_TMODE_ECEF_Y_HP = 0x20030007; // High-precision ECEF Y coordinate of the ARP position. +const uint32_t UBLOX_CFG_TMODE_ECEF_Z_HP = 0x20030008; // High-precision ECEF Z coordinate of the ARP position. +const uint32_t UBLOX_CFG_TMODE_LAT = 0x40030009; // Latitude of the ARP position. +const uint32_t UBLOX_CFG_TMODE_LON = 0x4003000a; // Longitude of the ARP position. +const uint32_t UBLOX_CFG_TMODE_HEIGHT = 0x4003000b; // Height of the ARP position. +const uint32_t UBLOX_CFG_TMODE_LAT_HP = 0x2003000c; // High-precision latitude of the ARP position +const uint32_t UBLOX_CFG_TMODE_LON_HP = 0x2003000d; // High-precision longitude of the ARP position. +const uint32_t UBLOX_CFG_TMODE_HEIGHT_HP = 0x2003000e; // High-precision height of the ARP position. +const uint32_t UBLOX_CFG_TMODE_FIXED_POS_ACC = 0x4003000f; // Fixed position 3D accuracy +const uint32_t UBLOX_CFG_TMODE_SVIN_MIN_DUR = 0x40030010; // Survey-in minimum duration +const uint32_t UBLOX_CFG_TMODE_SVIN_ACC_LIMIT = 0x40030011; // Survey-in position accuracy limit + +//CFG-TP: Timepulse configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_TP_PULSE_DEF = 0x20050023; // Determines whether the time pulse is interpreted as frequency or period +const uint32_t UBLOX_CFG_TP_PULSE_LENGTH_DEF = 0x20050030; // Determines whether the time pulse length is interpreted as length[us] or pulse ratio[%] +const uint32_t UBLOX_CFG_TP_FREQ_TP1 = 0x40050024; // Time pulse frequency (TP1) +const uint32_t UBLOX_CFG_TP_FREQ_LOCK_TP1 = 0x40050025; // Time pulse frequency when locked to GNSS time (TP1) +const uint32_t UBLOX_CFG_TP_LEN_TP1 = 0x40050004; // Time pulse length (TP1) +const uint32_t UBLOX_CFG_TP_LEN_LOCK_TP1 = 0x40050005; // Time pulse length when locked to GNSS time (TP1) +const uint32_t UBLOX_CFG_TP_DUTY_TP1 = 0x5005002a; // Time pulse duty cycle (TP1) +const uint32_t UBLOX_CFG_TP_DUTY_LOCK_TP1 = 0x5005002b; // Time pulse duty cycle when locked to GNSS time (TP1) +const uint32_t UBLOX_CFG_TP_USER_DELAY_TP1 = 0x40050006; // User-configurable time pulse delay (TP1) +const uint32_t UBLOX_CFG_TP_TP1_ENA = 0x10050007; // Enable the first timepulse +const uint32_t UBLOX_CFG_TP_SYNC_GNSS_TP1 = 0x10050008; // Sync time pulse to GNSS time or local clock (TP1) +const uint32_t UBLOX_CFG_TP_USE_LOCKED_TP1 = 0x10050009; // Use locked parameters when possible (TP1) +const uint32_t UBLOX_CFG_TP_ALIGN_TO_TOW_TP1 = 0x1005000a; // Align time pulse to top of second (TP1) +const uint32_t UBLOX_CFG_TP_POL_TP1 = 0x1005000b; // Set time pulse polarity (TP1) +const uint32_t UBLOX_CFG_TP_TIMEGRID_TP1 = 0x2005000c; // Time grid to use (TP1) + +//CFG-TXREADY: TX ready configuration +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_TXREADY_ENABLED = 0x10a20001; // Flag to indicate if TX ready pin mechanism should be enabled +const uint32_t UBLOX_CFG_TXREADY_POLARITY = 0x10a20002; // The polarity of the TX ready pin: false:high- active, true:low-active +const uint32_t UBLOX_CFG_TXREADY_PIN = 0x20a20003; // Pin number to use for the TX ready functionality +const uint32_t UBLOX_CFG_TXREADY_THRESHOLD = 0x30a20004; // Amount of data that should be ready on the interface before triggering the TX ready pin +const uint32_t UBLOX_CFG_TXREADY_INTERFACE = 0x20a20005; // Interface where the TX ready feature should be linked to + +//CFG-UART1: Configuration of the UART1 interface +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_UART1_BAUDRATE = 0x40520001; // The baud rate that should be configured on the UART1 +const uint32_t UBLOX_CFG_UART1_STOPBITS = 0x20520002; // Number of stopbits that should be used on UART1 +const uint32_t UBLOX_CFG_UART1_DATABITS = 0x20520003; // Number of databits that should be used on UART1 +const uint32_t UBLOX_CFG_UART1_PARITY = 0x20520004; // Parity mode that should be used on UART1 +const uint32_t UBLOX_CFG_UART1_ENABLED = 0x10520005; // Flag to indicate if the UART1 should be enabled + +//CFG-UART1INPROT: Input protocol configuration of the UART1 interface +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_UART1INPROT_UBX = 0x10730001; // Flag to indicate if UBX should be an input protocol on UART1 +const uint32_t UBLOX_CFG_UART1INPROT_NMEA = 0x10730002; // Flag to indicate if NMEA should be an input protocol on UART1 +const uint32_t UBLOX_CFG_UART1INPROT_RTCM3X = 0x10730004; // Flag to indicate if RTCM3X should be an input protocol on UART1 + +//CFG-UART1OUTPROT: Output protocol configuration of the UART1 interface +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_UART1OUTPROT_UBX = 0x10740001; // Flag to indicate if UBX should be an output protocol on UART1 +const uint32_t UBLOX_CFG_UART1OUTPROT_NMEA = 0x10740002; // Flag to indicate if NMEA should be an output protocol on UART1 +const uint32_t UBLOX_CFG_UART1OUTPROT_RTCM3X = 0x10740004; // Flag to indicate if RTCM3X should be an output protocol on UART1 + +//CFG-UART2: Configuration of the UART2 interface +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_UART2_BAUDRATE = 0x40530001; // The baud rate that should be configured on the UART2 +const uint32_t UBLOX_CFG_UART2_STOPBITS = 0x20530002; // Number of stopbits that should be used on UART2 +const uint32_t UBLOX_CFG_UART2_DATABITS = 0x20530003; // Number of databits that should be used on UART2 +const uint32_t UBLOX_CFG_UART2_PARITY = 0x20530004; // Parity mode that should be used on UART2 +const uint32_t UBLOX_CFG_UART2_ENABLED = 0x10530005; // Flag to indicate if the UART2 should be enabled +const uint32_t UBLOX_CFG_UART2_REMAP = 0x10530006; // UART2 Remapping + +//CFG-UART2INPROT: Input protocol configuration of the UART2 interface +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_UART2INPROT_UBX = 0x10750001; // Flag to indicate if UBX should be an input protocol on UART2 +const uint32_t UBLOX_CFG_UART2INPROT_NMEA = 0x10750002; // Flag to indicate if NMEA should be an input protocol on UART2 +const uint32_t UBLOX_CFG_UART2INPROT_RTCM3X = 0x10750004; // Flag to indicate if RTCM3X should be an input protocol on UART2 + +//CFG-UART2OUTPROT: Output protocol configuration of the UART2 interface +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_UART2OUTPROT_UBX = 0x10760001; // Flag to indicate if UBX should be an output protocol on UART2 +const uint32_t UBLOX_CFG_UART2OUTPROT_NMEA = 0x10760002; // Flag to indicate if NMEA should be an output protocol on UART2 +const uint32_t UBLOX_CFG_UART2OUTPROT_RTCM3X = 0x10760004; // Flag to indicate if RTCM3X should be an output protocol on UART2 + +//CFG-USB: Configuration of the USB interface +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_USB_ENABLED = 0x10650001; // Flag to indicate if the USB interface should be enabled +const uint32_t UBLOX_CFG_USB_SELFPOW = 0x10650002; // Self-powered device +const uint32_t UBLOX_CFG_USB_VENDOR_ID = 0x3065000a; // Vendor ID +const uint32_t UBLOX_CFG_USB_PRODUCT_ID = 0x3065000b; // Vendor ID +const uint32_t UBLOX_CFG_USB_POWER = 0x3065000c; // Power consumption +const uint32_t UBLOX_CFG_USB_VENDOR_STR0 = 0x5065000d; // Vendor string characters 0-7 +const uint32_t UBLOX_CFG_USB_VENDOR_STR1 = 0x5065000e; // Vendor string characters 8-15 +const uint32_t UBLOX_CFG_USB_VENDOR_STR2 = 0x5065000f; // Vendor string characters 16-23 +const uint32_t UBLOX_CFG_USB_VENDOR_STR3 = 0x50650010; // Vendor string characters 24-31 +const uint32_t UBLOX_CFG_USB_PRODUCT_STR0 = 0x50650011; // Product string characters 0-7 +const uint32_t UBLOX_CFG_USB_PRODUCT_STR1 = 0x50650012; // Product string characters 8-15 +const uint32_t UBLOX_CFG_USB_PRODUCT_STR2 = 0x50650013; // Product string characters 16-23 +const uint32_t UBLOX_CFG_USB_PRODUCT_STR3 = 0x50650014; // Product string characters 24-31 +const uint32_t UBLOX_CFG_USB_SERIAL_NO_STR0 = 0x50650015; // Serial number string characters 0-7 +const uint32_t UBLOX_CFG_USB_SERIAL_NO_STR1 = 0x50650016; // Serial number string characters 8-15 +const uint32_t UBLOX_CFG_USB_SERIAL_NO_STR2 = 0x50650017; // Serial number string characters 16-23 +const uint32_t UBLOX_CFG_USB_SERIAL_NO_STR3 = 0x50650018; // Serial number string characters 24-31 + +//CFG-USBINPROT: Input protocol configuration of the USB interface +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_USBINPROT_UBX = 0x10770001; // Flag to indicate if UBX should be an input protocol on USB +const uint32_t UBLOX_CFG_USBINPROT_NMEA = 0x10770002; // Flag to indicate if NMEA should be an input protocol on USB +const uint32_t UBLOX_CFG_USBINPROT_RTCM3X = 0x10770004; // Flag to indicate if RTCM3X should be an input protocol on USB + +//CFG-USBOUTPROT: Output protocol configuration of the USB interface +//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +const uint32_t UBLOX_CFG_USBOUTPROT_UBX = 0x10780001; // Flag to indicate if UBX should be an output protocol on USB +const uint32_t UBLOX_CFG_USBOUTPROT_NMEA = 0x10780002; // Flag to indicate if NMEA should be an output protocol on USB +const uint32_t UBLOX_CFG_USBOUTPROT_RTCM3X = 0x10780004; // Flag to indicate if RTCM3X should be an output protocol on USB + +#endif diff --git a/weatherslave/.pio/libdeps/esp_wroom_02/integrity.dat b/weatherslave/.pio/libdeps/esp_wroom_02/integrity.dat new file mode 100644 index 0000000..6824900 --- /dev/null +++ b/weatherslave/.pio/libdeps/esp_wroom_02/integrity.dat @@ -0,0 +1,2 @@ +adafruit/Adafruit MLX90614 Library@^2.1.3 +sparkfun/SparkFun u-blox Arduino Library@^1.8.11 \ No newline at end of file diff --git a/weatherslave/CMakeLists.txt b/weatherslave/CMakeLists.txt new file mode 100644 index 0000000..74c74f6 --- /dev/null +++ b/weatherslave/CMakeLists.txt @@ -0,0 +1,33 @@ +# !!! WARNING !!! AUTO-GENERATED FILE, PLEASE DO NOT MODIFY IT AND USE +# https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags +# +# If you need to override existing CMake configuration or add extra, +# please create `CMakeListsUser.txt` in the root of project. +# The `CMakeListsUser.txt` will not be overwritten by PlatformIO. + +cmake_minimum_required(VERSION 3.13) +set(CMAKE_SYSTEM_NAME Generic) +set(CMAKE_C_COMPILER_WORKS 1) +set(CMAKE_CXX_COMPILER_WORKS 1) + +project("weatherslave" C CXX) + +include(CMakeListsPrivate.txt) + +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/CMakeListsUser.txt) +include(CMakeListsUser.txt) +endif() + +add_custom_target( + Production ALL + COMMAND platformio -c clion run "$<$>:-e${CMAKE_BUILD_TYPE}>" + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) + +add_custom_target( + Debug ALL + COMMAND platformio -c clion debug "$<$>:-e${CMAKE_BUILD_TYPE}>" + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) + +add_executable(Z_DUMMY_TARGET ${SRC_LIST}) diff --git a/weatherslave/CMakeListsPrivate.txt b/weatherslave/CMakeListsPrivate.txt new file mode 100644 index 0000000..6653a47 --- /dev/null +++ b/weatherslave/CMakeListsPrivate.txt @@ -0,0 +1,106 @@ +# !!! WARNING !!! AUTO-GENERATED FILE, PLEASE DO NOT MODIFY IT AND USE +# https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags +# +# If you need to override existing CMake configuration or add extra, +# please create `CMakeListsUser.txt` in the root of project. +# The `CMakeListsUser.txt` will not be overwritten by PlatformIO. + + + +set(CMAKE_CONFIGURATION_TYPES "esp_wroom_02" CACHE STRING "Build Types reflect PlatformIO Environments" FORCE) + +# Convert "Home Directory" that may contain unescaped backslashes on Windows +file(TO_CMAKE_PATH $ENV{HOMEDRIVE}$ENV{HOMEPATH} ENV_HOME_PATH) + + +SET(CMAKE_C_COMPILER "${ENV_HOME_PATH}/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-gcc.exe") +SET(CMAKE_CXX_COMPILER "${ENV_HOME_PATH}/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-g++.exe") +SET(CMAKE_CXX_FLAGS "-fno-rtti -std=gnu++17 -fno-exceptions -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -D_GNU_SOURCE -ffunction-sections -fdata-sections -Wall -Werror=return-type -free -fipa-pta") +SET(CMAKE_C_FLAGS "-std=gnu17 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -D_GNU_SOURCE -ffunction-sections -fdata-sections -Wall -Werror=return-type -free -fipa-pta") + +SET(CMAKE_C_STANDARD 17) +set(CMAKE_CXX_STANDARD 17) + +if (CMAKE_BUILD_TYPE MATCHES "esp_wroom_02") + add_definitions(-DPLATFORMIO=50205) + add_definitions(-DESP8266) + add_definitions(-DARDUINO_ARCH_ESP8266) + add_definitions(-DARDUINO_ESP8266_ESP_WROOM_02) + add_definitions(-DF_CPU=80000000L) + add_definitions(-D__ets__) + add_definitions(-DICACHE_FLASH) + add_definitions(-DARDUINO=10805) + add_definitions(-DARDUINO_BOARD=\"PLATFORMIO_ESP_WROOM_02\") + add_definitions(-DFLASHMODE_QIO) + add_definitions(-DLWIP_OPEN_SRC) + add_definitions(-DNONOSDK22x_190703=1) + add_definitions(-DTCP_MSS=536) + add_definitions(-DLWIP_FEATURES=1) + add_definitions(-DLWIP_IPV6=0) + add_definitions(-DVTABLES_IN_FLASH) + add_definitions(-DMMU_IRAM_SIZE=0x8000) + add_definitions(-DMMU_ICACHE_SIZE=0x8000) + + include_directories("${CMAKE_CURRENT_LIST_DIR}/include") + include_directories("${CMAKE_CURRENT_LIST_DIR}/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/SoftwareSerial/src") + include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library") + include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/esp_wroom_02/Adafruit BusIO") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/SPI") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/Wire") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/tools/sdk/include") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/cores/esp8266") + include_directories("${ENV_HOME_PATH}/.platformio/packages/toolchain-xtensa/include") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip2/include") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/variants/nodemcu") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/ArduinoOTA") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/DNSServer/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/EEPROM") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266AVRISP/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266HTTPClient/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266HTTPUpdateServer/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266LLMNR") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266NetBIOS") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266SSDP") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266SdFat/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFi/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFiMesh/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266httpUpdate/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266mDNS/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/Ethernet/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/GDBStub/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/Hash/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/I2S/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/LittleFS/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/Netdump/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/SD/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/SDFS/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/SPISlave/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/Servo/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/TFT_Touch_Shield_V2") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/Ticker/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/esp8266/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/lwIP_PPP/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/lwIP_enc28j60/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/lwIP_w5100/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/framework-arduinoespressif8266/libraries/lwIP_w5500/src") + include_directories("${ENV_HOME_PATH}/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0") + include_directories("${ENV_HOME_PATH}/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/xtensa-lx106-elf") + include_directories("${ENV_HOME_PATH}/.platformio/packages/toolchain-xtensa/lib/gcc/xtensa-lx106-elf/10.3.0/include") + include_directories("${ENV_HOME_PATH}/.platformio/packages/toolchain-xtensa/lib/gcc/xtensa-lx106-elf/10.3.0/include-fixed") + include_directories("${ENV_HOME_PATH}/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include") + + FILE(GLOB_RECURSE EXTRA_LIB_SOURCES + ${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/esp_wroom_02/*.* + ) +endif() + + +FILE(GLOB_RECURSE SRC_LIST + ${CMAKE_CURRENT_LIST_DIR}/src/*.* + ${CMAKE_CURRENT_LIST_DIR}/lib/*.* + ${CMAKE_CURRENT_LIST_DIR}/test/*.* +) + +list(APPEND SRC_LIST ${EXTRA_LIB_SOURCES}) diff --git a/weatherslave/cmake-build-esp32dev/.cmake/api/v1/query/cache-v2 b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/query/cache-v2 new file mode 100644 index 0000000..e69de29 diff --git a/weatherslave/cmake-build-esp32dev/.cmake/api/v1/query/cmakeFiles-v1 b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/query/cmakeFiles-v1 new file mode 100644 index 0000000..e69de29 diff --git a/weatherslave/cmake-build-esp32dev/.cmake/api/v1/query/codemodel-v2 b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/query/codemodel-v2 new file mode 100644 index 0000000..e69de29 diff --git a/weatherslave/cmake-build-esp32dev/.cmake/api/v1/query/toolchains-v1 b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/query/toolchains-v1 new file mode 100644 index 0000000..e69de29 diff --git a/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/cache-v2-48c699f4eb61630da033.json b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/cache-v2-48c699f4eb61630da033.json new file mode 100644 index 0000000..2052dfb --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/cache-v2-48c699f4eb61630da033.json @@ -0,0 +1,1231 @@ +{ + "entries" : + [ + { + "name" : "CMAKE_ADDR2LINE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/addr2line.exe" + }, + { + "name" : "CMAKE_AR", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ar.exe" + }, + { + "name" : "CMAKE_BUILD_TYPE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ..." + } + ], + "type" : "STRING", + "value" : "esp32dev" + }, + { + "name" : "CMAKE_CACHEFILE_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "This is the directory where this CMakeCache.txt was created" + } + ], + "type" : "INTERNAL", + "value" : "d:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev" + }, + { + "name" : "CMAKE_CACHE_MAJOR_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Major version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "3" + }, + { + "name" : "CMAKE_CACHE_MINOR_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Minor version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "21" + }, + { + "name" : "CMAKE_CACHE_PATCH_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Patch version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to CMake executable." + } + ], + "type" : "INTERNAL", + "value" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/cmake.exe" + }, + { + "name" : "CMAKE_CONFIGURATION_TYPES", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Build Types reflect PlatformIO Environments" + } + ], + "type" : "STRING", + "value" : "esp_wroom_02" + }, + { + "name" : "CMAKE_CPACK_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to cpack program executable." + } + ], + "type" : "INTERNAL", + "value" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/cpack.exe" + }, + { + "name" : "CMAKE_CTEST_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to ctest program executable." + } + ], + "type" : "INTERNAL", + "value" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/ctest.exe" + }, + { + "name" : "CMAKE_CXX_COMPILER", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "CXX compiler" + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/c++.exe" + }, + { + "name" : "CMAKE_CXX_COMPILER_AR", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler" + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ar.exe" + }, + { + "name" : "CMAKE_CXX_COMPILER_RANLIB", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler" + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ranlib.exe" + }, + { + "name" : "CMAKE_CXX_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_CXX_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "-g" + }, + { + "name" : "CMAKE_CXX_FLAGS_ESP32DEV", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during ESP32DEV builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_CXX_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "-Os -DNDEBUG" + }, + { + "name" : "CMAKE_CXX_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "-O3 -DNDEBUG" + }, + { + "name" : "CMAKE_CXX_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "-O2 -g -DNDEBUG" + }, + { + "name" : "CMAKE_C_COMPILER", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "C compiler" + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc.exe" + }, + { + "name" : "CMAKE_C_COMPILER_AR", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler" + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ar.exe" + }, + { + "name" : "CMAKE_C_COMPILER_RANLIB", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler" + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ranlib.exe" + }, + { + "name" : "CMAKE_C_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_C_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "-g" + }, + { + "name" : "CMAKE_C_FLAGS_ESP32DEV", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during ESP32DEV builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_C_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "-Os -DNDEBUG" + }, + { + "name" : "CMAKE_C_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "-O3 -DNDEBUG" + }, + { + "name" : "CMAKE_C_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "-O2 -g -DNDEBUG" + }, + { + "name" : "CMAKE_DLLTOOL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/dlltool.exe" + }, + { + "name" : "CMAKE_EXECUTABLE_FORMAT", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Executable file format" + } + ], + "type" : "INTERNAL", + "value" : "Unknown" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_ESP32DEV", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during ESP32DEV builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXPORT_COMPILE_COMMANDS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Enable/Disable output of compile commands during generation." + } + ], + "type" : "BOOL", + "value" : "" + }, + { + "name" : "CMAKE_EXTRA_GENERATOR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of external makefile project generator." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_GENERATOR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator." + } + ], + "type" : "INTERNAL", + "value" : "Ninja" + }, + { + "name" : "CMAKE_GENERATOR_INSTANCE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Generator instance identifier." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_GENERATOR_PLATFORM", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator platform." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_GENERATOR_TOOLSET", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator toolset." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_HOME_DIRECTORY", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Source directory with the top level CMakeLists.txt file for this project" + } + ], + "type" : "INTERNAL", + "value" : "D:/03MyGit/arduino/esp32mainboard/weatherslave" + }, + { + "name" : "CMAKE_INSTALL_PREFIX", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Install path prefix, prepended onto install directories." + } + ], + "type" : "PATH", + "value" : "C:/Program Files (x86)/weatherslave" + }, + { + "name" : "CMAKE_LINKER", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ld.exe" + }, + { + "name" : "CMAKE_MAKE_PROGRAM", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "make program" + } + ], + "type" : "FILEPATH", + "value" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/ninja/win/ninja.exe" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_ESP32DEV", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during ESP32DEV builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_NM", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/nm.exe" + }, + { + "name" : "CMAKE_NUMBER_OF_MAKEFILES", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "number of local generators" + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_OBJCOPY", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/objcopy.exe" + }, + { + "name" : "CMAKE_OBJDUMP", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/objdump.exe" + }, + { + "name" : "CMAKE_PLATFORM_INFO_INITIALIZED", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Platform information initialized" + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_PROJECT_DESCRIPTION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "" + }, + { + "name" : "CMAKE_PROJECT_HOMEPAGE_URL", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "" + }, + { + "name" : "CMAKE_PROJECT_NAME", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "weatherslave" + }, + { + "name" : "CMAKE_RANLIB", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ranlib.exe" + }, + { + "name" : "CMAKE_READELF", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/readelf.exe" + }, + { + "name" : "CMAKE_ROOT", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to CMake installation." + } + ], + "type" : "INTERNAL", + "value" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_ESP32DEV", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during ESP32DEV builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SKIP_INSTALL_RPATH", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If set, runtime paths are not added when installing shared libraries, but are added when building." + } + ], + "type" : "BOOL", + "value" : "NO" + }, + { + "name" : "CMAKE_SKIP_RPATH", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If set, runtime paths are not added when using shared libraries." + } + ], + "type" : "BOOL", + "value" : "NO" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_ESP32DEV", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during ESP32DEV builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STRIP", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/strip.exe" + }, + { + "name" : "CMAKE_VERBOSE_MAKEFILE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo." + } + ], + "type" : "BOOL", + "value" : "FALSE" + }, + { + "name" : "weatherslave_BINARY_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev" + }, + { + "name" : "weatherslave_IS_TOP_LEVEL", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "ON" + }, + { + "name" : "weatherslave_SOURCE_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "D:/03MyGit/arduino/esp32mainboard/weatherslave" + } + ], + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } +} diff --git a/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/cmakeFiles-v1-80fcd9daf7c86928ecbf.json b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/cmakeFiles-v1-80fcd9daf7c86928ecbf.json new file mode 100644 index 0000000..8e2f0a3 --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/cmakeFiles-v1-80fcd9daf7c86928ecbf.json @@ -0,0 +1,712 @@ +{ + "inputs" : + [ + { + "path" : "CMakeLists.txt" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineSystem.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeSystem.cmake.in" + }, + { + "isGenerated" : true, + "path" : "cmake-build-esp32dev/CMakeFiles/3.21.1/CMakeSystem.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeSystemSpecificInitialize.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCompilerId.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCompilerIdDetection.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/ADSP-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/ARMCC-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/ARMClang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/AppleClang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Borland-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Bruce-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Clang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Compaq-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Cray-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Embarcadero-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Fujitsu-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GHS-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/HP-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IAR-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Intel-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/MSVC-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/NVHPC-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/NVIDIA-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/PGI-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/PathScale-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/ROCMClang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/SCO-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/SDCC-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/SunPro-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/TI-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Watcom-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/XL-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/XLClang-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/zOS-C-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeFindBinUtils.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-FindBinUtils.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCCompiler.cmake.in" + }, + { + "isGenerated" : true, + "path" : "cmake-build-esp32dev/CMakeFiles/3.21.1/CMakeCCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCXXCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCompilerId.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCompilerIdDetection.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/ADSP-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/ARMCC-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/ARMClang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/AppleClang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Borland-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Clang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Cray-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Embarcadero-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Fujitsu-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GHS-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/HP-CXX-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IAR-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Intel-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/MSVC-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/NVHPC-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/NVIDIA-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/PGI-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/PathScale-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/ROCMClang-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/SCO-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/TI-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Watcom-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/XL-CXX-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/XLClang-CXX-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeFindBinUtils.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-FindBinUtils.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCXXCompiler.cmake.in" + }, + { + "isGenerated" : true, + "path" : "cmake-build-esp32dev/CMakeFiles/3.21.1/CMakeCXXCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeSystemSpecificInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeGenericSystem.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeInitializeConfigs.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Platform/Generic.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeLanguageInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-C.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/CMakeCommonCompilerMacros.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Platform/Generic.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCommonLanguageInclude.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeTestCCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeTestCompilerCommon.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCompilerABI.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeParseImplicitIncludeInfo.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeParseImplicitLinkInfo.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeParseLibraryArchitecture.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeTestCompilerCommon.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCCompilerABI.c" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCompileFeatures.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Internal/FeatureTesting.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCCompiler.cmake.in" + }, + { + "isGenerated" : true, + "path" : "cmake-build-esp32dev/CMakeFiles/3.21.1/CMakeCCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCXXInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeLanguageInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-CXX.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Platform/Generic.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCommonLanguageInclude.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeTestCXXCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeTestCompilerCommon.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCompilerABI.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeParseImplicitIncludeInfo.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeParseImplicitLinkInfo.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeParseLibraryArchitecture.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeTestCompilerCommon.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCXXCompilerABI.cpp" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCompileFeatures.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Internal/FeatureTesting.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCXXCompiler.cmake.in" + }, + { + "isGenerated" : true, + "path" : "cmake-build-esp32dev/CMakeFiles/3.21.1/CMakeCXXCompiler.cmake" + }, + { + "path" : "CMakeListsPrivate.txt" + } + ], + "kind" : "cmakeFiles", + "paths" : + { + "build" : "D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev", + "source" : "D:/03MyGit/arduino/esp32mainboard/weatherslave" + }, + "version" : + { + "major" : 1, + "minor" : 0 + } +} diff --git a/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/codemodel-v2-ebfe8f24e7c4dbf9bfc5.json b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/codemodel-v2-ebfe8f24e7c4dbf9bfc5.json new file mode 100644 index 0000000..911cdfa --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/codemodel-v2-ebfe8f24e7c4dbf9bfc5.json @@ -0,0 +1,78 @@ +{ + "configurations" : + [ + { + "directories" : + [ + { + "build" : ".", + "jsonFile" : "directory-.-esp32dev-d0094a50bb2071803777.json", + "minimumCMakeVersion" : + { + "string" : "3.13" + }, + "projectIndex" : 0, + "source" : ".", + "targetIndexes" : + [ + 0, + 1, + 2 + ] + } + ], + "name" : "esp32dev", + "projects" : + [ + { + "directoryIndexes" : + [ + 0 + ], + "name" : "weatherslave", + "targetIndexes" : + [ + 0, + 1, + 2 + ] + } + ], + "targets" : + [ + { + "directoryIndex" : 0, + "id" : "Debug::@6890427a1f51a3e7e1df", + "jsonFile" : "target-Debug-esp32dev-0f489e50f206165ee1b3.json", + "name" : "Debug", + "projectIndex" : 0 + }, + { + "directoryIndex" : 0, + "id" : "Production::@6890427a1f51a3e7e1df", + "jsonFile" : "target-Production-esp32dev-63f95244049cb01431c1.json", + "name" : "Production", + "projectIndex" : 0 + }, + { + "directoryIndex" : 0, + "id" : "Z_DUMMY_TARGET::@6890427a1f51a3e7e1df", + "jsonFile" : "target-Z_DUMMY_TARGET-esp32dev-f4680aed9131d29cab0c.json", + "name" : "Z_DUMMY_TARGET", + "projectIndex" : 0 + } + ] + } + ], + "kind" : "codemodel", + "paths" : + { + "build" : "D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev", + "source" : "D:/03MyGit/arduino/esp32mainboard/weatherslave" + }, + "version" : + { + "major" : 2, + "minor" : 3 + } +} diff --git a/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/directory-.-esp32dev-d0094a50bb2071803777.json b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/directory-.-esp32dev-d0094a50bb2071803777.json new file mode 100644 index 0000000..3a67af9 --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/directory-.-esp32dev-d0094a50bb2071803777.json @@ -0,0 +1,14 @@ +{ + "backtraceGraph" : + { + "commands" : [], + "files" : [], + "nodes" : [] + }, + "installers" : [], + "paths" : + { + "build" : ".", + "source" : "." + } +} diff --git a/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/index-2022-04-26T08-21-02-0302.json b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/index-2022-04-26T08-21-02-0302.json new file mode 100644 index 0000000..cb7e452 --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/index-2022-04-26T08-21-02-0302.json @@ -0,0 +1,108 @@ +{ + "cmake" : + { + "generator" : + { + "multiConfig" : false, + "name" : "Ninja" + }, + "paths" : + { + "cmake" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/cmake.exe", + "cpack" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/cpack.exe", + "ctest" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/ctest.exe", + "root" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21" + }, + "version" : + { + "isDirty" : false, + "major" : 3, + "minor" : 21, + "patch" : 1, + "string" : "3.21.1", + "suffix" : "" + } + }, + "objects" : + [ + { + "jsonFile" : "codemodel-v2-ebfe8f24e7c4dbf9bfc5.json", + "kind" : "codemodel", + "version" : + { + "major" : 2, + "minor" : 3 + } + }, + { + "jsonFile" : "cache-v2-48c699f4eb61630da033.json", + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } + }, + { + "jsonFile" : "cmakeFiles-v1-80fcd9daf7c86928ecbf.json", + "kind" : "cmakeFiles", + "version" : + { + "major" : 1, + "minor" : 0 + } + }, + { + "jsonFile" : "toolchains-v1-4bdc8f4b982f82c54b45.json", + "kind" : "toolchains", + "version" : + { + "major" : 1, + "minor" : 0 + } + } + ], + "reply" : + { + "cache-v2" : + { + "jsonFile" : "cache-v2-48c699f4eb61630da033.json", + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } + }, + "cmakeFiles-v1" : + { + "jsonFile" : "cmakeFiles-v1-80fcd9daf7c86928ecbf.json", + "kind" : "cmakeFiles", + "version" : + { + "major" : 1, + "minor" : 0 + } + }, + "codemodel-v2" : + { + "jsonFile" : "codemodel-v2-ebfe8f24e7c4dbf9bfc5.json", + "kind" : "codemodel", + "version" : + { + "major" : 2, + "minor" : 3 + } + }, + "toolchains-v1" : + { + "jsonFile" : "toolchains-v1-4bdc8f4b982f82c54b45.json", + "kind" : "toolchains", + "version" : + { + "major" : 1, + "minor" : 0 + } + } + } +} diff --git a/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/target-Debug-esp32dev-0f489e50f206165ee1b3.json b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/target-Debug-esp32dev-0f489e50f206165ee1b3.json new file mode 100644 index 0000000..c47f7e5 --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/target-Debug-esp32dev-0f489e50f206165ee1b3.json @@ -0,0 +1,66 @@ +{ + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_custom_target" + ], + "files" : + [ + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 27, + "parent" : 0 + } + ] + }, + "id" : "Debug::@6890427a1f51a3e7e1df", + "name" : "Debug", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "", + "sourceIndexes" : + [ + 0 + ] + }, + { + "name" : "CMake Rules", + "sourceIndexes" : + [ + 1 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "isGenerated" : true, + "path" : "cmake-build-esp32dev/CMakeFiles/Debug", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 0, + "isGenerated" : true, + "path" : "cmake-build-esp32dev/CMakeFiles/Debug.rule", + "sourceGroupIndex" : 1 + } + ], + "type" : "UTILITY" +} diff --git a/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/target-Production-esp32dev-63f95244049cb01431c1.json b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/target-Production-esp32dev-63f95244049cb01431c1.json new file mode 100644 index 0000000..84e2ee5 --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/target-Production-esp32dev-63f95244049cb01431c1.json @@ -0,0 +1,66 @@ +{ + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_custom_target" + ], + "files" : + [ + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 21, + "parent" : 0 + } + ] + }, + "id" : "Production::@6890427a1f51a3e7e1df", + "name" : "Production", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "", + "sourceIndexes" : + [ + 0 + ] + }, + { + "name" : "CMake Rules", + "sourceIndexes" : + [ + 1 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "isGenerated" : true, + "path" : "cmake-build-esp32dev/CMakeFiles/Production", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 0, + "isGenerated" : true, + "path" : "cmake-build-esp32dev/CMakeFiles/Production.rule", + "sourceGroupIndex" : 1 + } + ], + "type" : "UTILITY" +} diff --git a/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/target-Z_DUMMY_TARGET-esp32dev-f4680aed9131d29cab0c.json b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/target-Z_DUMMY_TARGET-esp32dev-f4680aed9131d29cab0c.json new file mode 100644 index 0000000..5aefce2 --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/target-Z_DUMMY_TARGET-esp32dev-f4680aed9131d29cab0c.json @@ -0,0 +1,102 @@ +{ + "artifacts" : + [ + { + "path" : "Z_DUMMY_TARGET" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_executable" + ], + "files" : + [ + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 33, + "parent" : 0 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-fno-rtti -std=gnu++17 -fno-exceptions -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -D_GNU_SOURCE -ffunction-sections -fdata-sections -Wall -Werror=return-type -free -fipa-pta" + }, + { + "fragment" : "-std=gnu++1z" + } + ], + "language" : "CXX", + "languageStandard" : + { + "backtraces" : + [ + 1 + ], + "standard" : "17" + }, + "sourceIndexes" : + [ + 0 + ] + } + ], + "id" : "Z_DUMMY_TARGET::@6890427a1f51a3e7e1df", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "-fno-rtti -std=gnu++17 -fno-exceptions -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -D_GNU_SOURCE -ffunction-sections -fdata-sections -Wall -Werror=return-type -free -fipa-pta", + "role" : "flags" + }, + { + "fragment" : "", + "role" : "flags" + } + ], + "language" : "CXX" + }, + "name" : "Z_DUMMY_TARGET", + "nameOnDisk" : "Z_DUMMY_TARGET", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "src/main.cpp", + "sourceGroupIndex" : 0 + } + ], + "type" : "EXECUTABLE" +} diff --git a/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/toolchains-v1-4bdc8f4b982f82c54b45.json b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/toolchains-v1-4bdc8f4b982f82c54b45.json new file mode 100644 index 0000000..d540d2c --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/.cmake/api/v1/reply/toolchains-v1-4bdc8f4b982f82c54b45.json @@ -0,0 +1,62 @@ +{ + "kind" : "toolchains", + "toolchains" : + [ + { + "compiler" : + { + "id" : "GNU", + "implicit" : + { + "includeDirectories" : [], + "linkDirectories" : [], + "linkFrameworkDirectories" : [], + "linkLibraries" : [] + }, + "path" : "C:/Users/xin/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-gcc.exe", + "version" : "7.3.0" + }, + "language" : "C", + "sourceFileExtensions" : + [ + "c", + "m" + ] + }, + { + "compiler" : + { + "id" : "GNU", + "implicit" : + { + "includeDirectories" : [], + "linkDirectories" : [], + "linkFrameworkDirectories" : [], + "linkLibraries" : [] + }, + "path" : "C:/Users/xin/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-g++.exe", + "version" : "7.3.0" + }, + "language" : "CXX", + "sourceFileExtensions" : + [ + "C", + "M", + "c++", + "cc", + "cpp", + "cxx", + "mm", + "mpp", + "CPP", + "ixx", + "cppm" + ] + } + ], + "version" : + { + "major" : 1, + "minor" : 0 + } +} diff --git a/weatherslave/cmake-build-esp32dev/CMakeCache.txt b/weatherslave/cmake-build-esp32dev/CMakeCache.txt new file mode 100644 index 0000000..adeed05 --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/CMakeCache.txt @@ -0,0 +1,394 @@ +# This is the CMakeCache file. +# For build in directory: d:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev +# It was generated by CMake: C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/cmake.exe +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Path to a program. +CMAKE_ADDR2LINE:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/addr2line.exe + +//Path to a program. +CMAKE_AR:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ar.exe + +//Choose the type of build, options are: None Debug Release RelWithDebInfo +// MinSizeRel ... +CMAKE_BUILD_TYPE:STRING=esp32dev + +//Build Types reflect PlatformIO Environments +CMAKE_CONFIGURATION_TYPES:STRING=esp_wroom_02 + +//CXX compiler +CMAKE_CXX_COMPILER:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/c++.exe + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_AR:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ar.exe + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_RANLIB:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ranlib.exe + +//Flags used by the CXX compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the CXX compiler during DEBUG builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=-g + +//Flags used by the CXX compiler during ESP32DEV builds. +CMAKE_CXX_FLAGS_ESP32DEV:STRING= + +//Flags used by the CXX compiler during MINSIZEREL builds. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the CXX compiler during RELEASE builds. +CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the CXX compiler during RELWITHDEBINFO builds. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//C compiler +CMAKE_C_COMPILER:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc.exe + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_AR:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ar.exe + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_RANLIB:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ranlib.exe + +//Flags used by the C compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the C compiler during DEBUG builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the C compiler during ESP32DEV builds. +CMAKE_C_FLAGS_ESP32DEV:STRING= + +//Flags used by the C compiler during MINSIZEREL builds. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the C compiler during RELEASE builds. +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the C compiler during RELWITHDEBINFO builds. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Path to a program. +CMAKE_DLLTOOL:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/dlltool.exe + +//Flags used by the linker during all build types. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during DEBUG builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during ESP32DEV builds. +CMAKE_EXE_LINKER_FLAGS_ESP32DEV:STRING= + +//Flags used by the linker during MINSIZEREL builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during RELEASE builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during RELWITHDEBINFO builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Enable/Disable output of compile commands during generation. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL= + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/weatherslave + +//Path to a program. +CMAKE_LINKER:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ld.exe + +//make program +CMAKE_MAKE_PROGRAM:FILEPATH=C:/Program Files/JetBrains/CLion 2021.1.1/bin/ninja/win/ninja.exe + +//Flags used by the linker during the creation of modules during +// all build types. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of modules during +// DEBUG builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of modules during +// ESP32DEV builds. +CMAKE_MODULE_LINKER_FLAGS_ESP32DEV:STRING= + +//Flags used by the linker during the creation of modules during +// MINSIZEREL builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of modules during +// RELEASE builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of modules during +// RELWITHDEBINFO builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/nm.exe + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/objcopy.exe + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/objdump.exe + +//Value Computed by CMake +CMAKE_PROJECT_DESCRIPTION:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_HOMEPAGE_URL:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=weatherslave + +//Path to a program. +CMAKE_RANLIB:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ranlib.exe + +//Path to a program. +CMAKE_READELF:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/readelf.exe + +//Flags used by the linker during the creation of shared libraries +// during all build types. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of shared libraries +// during DEBUG builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of shared libraries +// during ESP32DEV builds. +CMAKE_SHARED_LINKER_FLAGS_ESP32DEV:STRING= + +//Flags used by the linker during the creation of shared libraries +// during MINSIZEREL builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELEASE builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELWITHDEBINFO builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries +// during all build types. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of static libraries +// during DEBUG builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of static libraries +// during ESP32DEV builds. +CMAKE_STATIC_LINKER_FLAGS_ESP32DEV:STRING= + +//Flags used by the linker during the creation of static libraries +// during MINSIZEREL builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELEASE builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELWITHDEBINFO builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/strip.exe + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Value Computed by CMake +weatherslave_BINARY_DIR:STATIC=D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev + +//Value Computed by CMake +weatherslave_IS_TOP_LEVEL:STATIC=ON + +//Value Computed by CMake +weatherslave_SOURCE_DIR:STATIC=D:/03MyGit/arduino/esp32mainboard/weatherslave + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_ADDR2LINE +CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=d:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=21 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/cmake.exe +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/cpack.exe +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/ctest.exe +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR +CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB +CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_ESP32DEV +CMAKE_CXX_FLAGS_ESP32DEV-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_AR +CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB +CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_ESP32DEV +CMAKE_C_FLAGS_ESP32DEV-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_DLLTOOL +CMAKE_DLLTOOL-ADVANCED:INTERNAL=1 +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_ESP32DEV +CMAKE_EXE_LINKER_FLAGS_ESP32DEV-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Ninja +//Generator instance identifier. +CMAKE_GENERATOR_INSTANCE:INTERNAL= +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=D:/03MyGit/arduino/esp32mainboard/weatherslave +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_ESP32DEV +CMAKE_MODULE_LINKER_FLAGS_ESP32DEV-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//Platform information initialized +CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_READELF +CMAKE_READELF-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_ESP32DEV +CMAKE_SHARED_LINKER_FLAGS_ESP32DEV-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_ESP32DEV +CMAKE_STATIC_LINKER_FLAGS_ESP32DEV-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 + diff --git a/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CMakeCCompiler.cmake b/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CMakeCCompiler.cmake new file mode 100644 index 0000000..66a5eca --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CMakeCCompiler.cmake @@ -0,0 +1,80 @@ +set(CMAKE_C_COMPILER "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc.exe") +set(CMAKE_C_COMPILER_ARG1 "") +set(CMAKE_C_COMPILER_ID "GNU") +set(CMAKE_C_COMPILER_VERSION "7.3.0") +set(CMAKE_C_COMPILER_VERSION_INTERNAL "") +set(CMAKE_C_COMPILER_WRAPPER "") +set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") +set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert") +set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") +set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") +set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") +set(CMAKE_C17_COMPILE_FEATURES "") +set(CMAKE_C23_COMPILE_FEATURES "") + +set(CMAKE_C_PLATFORM_ID "MinGW") +set(CMAKE_C_SIMULATE_ID "") +set(CMAKE_C_COMPILER_FRONTEND_VARIANT "") +set(CMAKE_C_SIMULATE_VERSION "") + + + + +set(CMAKE_AR "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ar.exe") +set(CMAKE_C_COMPILER_AR "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ar.exe") +set(CMAKE_RANLIB "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ranlib.exe") +set(CMAKE_C_COMPILER_RANLIB "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ranlib.exe") +set(CMAKE_LINKER "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ld.exe") +set(CMAKE_MT "") +set(CMAKE_COMPILER_IS_GNUCC 1) +set(CMAKE_C_COMPILER_LOADED 1) +set(CMAKE_C_COMPILER_WORKS 1) +set(CMAKE_C_ABI_COMPILED 0) +set(CMAKE_COMPILER_IS_MINGW 1) +set(CMAKE_COMPILER_IS_CYGWIN ) +if(CMAKE_COMPILER_IS_CYGWIN) + set(CYGWIN 1) + set(UNIX 1) +endif() + +set(CMAKE_C_COMPILER_ENV_VAR "CC") + +if(CMAKE_COMPILER_IS_MINGW) + set(MINGW 1) +endif() +set(CMAKE_C_COMPILER_ID_RUN 1) +set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) +set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_C_LINKER_PREFERENCE 10) + +# Save compiler ABI information. +set(CMAKE_C_SIZEOF_DATA_PTR "") +set(CMAKE_C_COMPILER_ABI "") +set(CMAKE_C_BYTE_ORDER "") +set(CMAKE_C_LIBRARY_ARCHITECTURE "") + +if(CMAKE_C_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_C_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") +endif() + +if(CMAKE_C_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "") +endif() + +set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "") +set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "") +set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "") +set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CMakeCXXCompiler.cmake b/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CMakeCXXCompiler.cmake new file mode 100644 index 0000000..5786a2b --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CMakeCXXCompiler.cmake @@ -0,0 +1,91 @@ +set(CMAKE_CXX_COMPILER "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/c++.exe") +set(CMAKE_CXX_COMPILER_ARG1 "") +set(CMAKE_CXX_COMPILER_ID "GNU") +set(CMAKE_CXX_COMPILER_VERSION "7.3.0") +set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "") +set(CMAKE_CXX_COMPILER_WRAPPER "") +set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14") +set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17") +set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") +set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") +set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") +set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17") +set(CMAKE_CXX20_COMPILE_FEATURES "") +set(CMAKE_CXX23_COMPILE_FEATURES "") + +set(CMAKE_CXX_PLATFORM_ID "MinGW") +set(CMAKE_CXX_SIMULATE_ID "") +set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "") +set(CMAKE_CXX_SIMULATE_VERSION "") + + + + +set(CMAKE_AR "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ar.exe") +set(CMAKE_CXX_COMPILER_AR "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ar.exe") +set(CMAKE_RANLIB "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ranlib.exe") +set(CMAKE_CXX_COMPILER_RANLIB "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ranlib.exe") +set(CMAKE_LINKER "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ld.exe") +set(CMAKE_MT "") +set(CMAKE_COMPILER_IS_GNUCXX 1) +set(CMAKE_CXX_COMPILER_LOADED 1) +set(CMAKE_CXX_COMPILER_WORKS 1) +set(CMAKE_CXX_ABI_COMPILED 0) +set(CMAKE_COMPILER_IS_MINGW 1) +set(CMAKE_COMPILER_IS_CYGWIN ) +if(CMAKE_COMPILER_IS_CYGWIN) + set(CYGWIN 1) + set(UNIX 1) +endif() + +set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") + +if(CMAKE_COMPILER_IS_MINGW) + set(MINGW 1) +endif() +set(CMAKE_CXX_COMPILER_ID_RUN 1) +set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm) +set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) + +foreach (lang C OBJC OBJCXX) + if (CMAKE_${lang}_COMPILER_ID_RUN) + foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS) + list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension}) + endforeach() + endif() +endforeach() + +set(CMAKE_CXX_LINKER_PREFERENCE 30) +set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) + +# Save compiler ABI information. +set(CMAKE_CXX_SIZEOF_DATA_PTR "") +set(CMAKE_CXX_COMPILER_ABI "") +set(CMAKE_CXX_BYTE_ORDER "") +set(CMAKE_CXX_LIBRARY_ARCHITECTURE "") + +if(CMAKE_CXX_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_CXX_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") +endif() + +if(CMAKE_CXX_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "") +endif() + +set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "") +set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") +set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "") +set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CMakeSystem.cmake b/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CMakeSystem.cmake new file mode 100644 index 0000000..9d31622 --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CMakeSystem.cmake @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Windows-10.0.19044") +set(CMAKE_HOST_SYSTEM_NAME "Windows") +set(CMAKE_HOST_SYSTEM_VERSION "10.0.19044") +set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64") + + + +set(CMAKE_SYSTEM "Generic") +set(CMAKE_SYSTEM_NAME "Generic") +set(CMAKE_SYSTEM_VERSION "") +set(CMAKE_SYSTEM_PROCESSOR "") + +set(CMAKE_CROSSCOMPILING "TRUE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git a/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CompilerIdC/CMakeCCompilerId.c b/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CompilerIdC/CMakeCCompilerId.c new file mode 100644 index 0000000..051f748 --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CompilerIdC/CMakeCCompilerId.c @@ -0,0 +1,807 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +#if defined(__18CXX) +# define ID_VOID_MAIN +#endif +#if defined(__CLASSIC_C__) +/* cv-qualifiers did not exist in K&R C */ +# define const +# define volatile +#endif + +#if !defined(__has_include) +/* If the compiler does not have __has_include, pretend the answer is + always no. */ +# define __has_include(x) 0 +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a version is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#endif +#if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +#endif +#if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +#elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +#endif +#if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +#endif +#if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +#endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_C) +# define COMPILER_ID "SunPro" +# if __SUNPRO_C >= 0x5100 + /* __SUNPRO_C = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# endif + +#elif defined(__HP_cc) +# define COMPILER_ID "HP" + /* __HP_cc = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) + +#elif defined(__DECC) +# define COMPILER_ID "Compaq" + /* __DECC_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) + +#elif defined(__IBMC__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 +# define COMPILER_ID "XL" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__CLANG_FUJITSU) +# define COMPILER_ID "FujitsuClang" +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#elif defined(__FUJITSU) +# define COMPILER_ID "Fujitsu" +# if defined(__FCC_version__) +# define COMPILER_VERSION __FCC_version__ +# elif defined(__FCC_major__) +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# endif +# if defined(__fcc_version) +# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) +# elif defined(__FCC_VERSION) +# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) +# endif + + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__TINYC__) +# define COMPILER_ID "TinyCC" + +#elif defined(__BCC__) +# define COMPILER_ID "Bruce" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) && __has_include() +# define COMPILER_ID "ROCMClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# elif defined(__clang__) +# define SIMULATE_ID "Clang" +# elif defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif +# if defined(__clang__) && __has_include() +# include +# define COMPILER_VERSION_MAJOR DEC(HIP_VERSION_MAJOR) +# define COMPILER_VERSION_MINOR DEC(HIP_VERSION_MINOR) +# define COMPILER_VERSION_PATCH DEC(HIP_VERSION_PATCH) +# endif + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + +#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) +# define COMPILER_ID "SDCC" +# if defined(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) +# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) +# else + /* SDCC = VRP */ +# define COMPILER_VERSION_MAJOR DEC(SDCC/100) +# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) +# define COMPILER_VERSION_PATCH DEC(SDCC % 10) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__MSYS__) +# define PLATFORM_ID "MSYS" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number. */ +#ifdef COMPILER_VERSION +char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; + +/* Construct a string literal encoding the version number components. */ +#elif defined(COMPILER_VERSION_MAJOR) +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#elif defined(COMPILER_VERSION_INTERNAL_STR) +char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +#if !defined(__STDC__) && !defined(__clang__) +# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__) +# define C_DIALECT "90" +# else +# define C_DIALECT +# endif +#elif __STDC_VERSION__ > 201710L +# define C_DIALECT "23" +#elif __STDC_VERSION__ >= 201710L +# define C_DIALECT "17" +#elif __STDC_VERSION__ >= 201000L +# define C_DIALECT "11" +#elif __STDC_VERSION__ >= 199901L +# define C_DIALECT "99" +#else +# define C_DIALECT "90" +#endif +const char* info_language_dialect_default = + "INFO" ":" "dialect_default[" C_DIALECT "]"; + +/*--------------------------------------------------------------------------*/ + +#ifdef ID_VOID_MAIN +void main() {} +#else +# if defined(__CLASSIC_C__) +int main(argc, argv) int argc; char *argv[]; +# else +int main(int argc, char* argv[]) +# endif +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_dialect_default[argc]; + (void)argv; + return require; +} +#endif diff --git a/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CompilerIdC/a.exe b/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CompilerIdC/a.exe new file mode 100644 index 0000000..a9413a5 Binary files /dev/null and b/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CompilerIdC/a.exe differ diff --git a/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CompilerIdCXX/CMakeCXXCompilerId.cpp b/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CompilerIdCXX/CMakeCXXCompilerId.cpp new file mode 100644 index 0000000..f675021 --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CompilerIdCXX/CMakeCXXCompilerId.cpp @@ -0,0 +1,795 @@ +/* This source file must have a .cpp extension so that all C++ compilers + recognize the extension without flags. Borland does not know .cxx for + example. */ +#ifndef __cplusplus +# error "A C compiler has been selected for C++." +#endif + +#if !defined(__has_include) +/* If the compiler does not have __has_include, pretend the answer is + always no. */ +# define __has_include(x) 0 +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__COMO__) +# define COMPILER_ID "Comeau" + /* __COMO_VERSION__ = VRR */ +# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) +# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) + +#elif defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a version is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#endif +#if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +#endif +#if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +#elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +#endif +#if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +#endif +#if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +#endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_CC) +# define COMPILER_ID "SunPro" +# if __SUNPRO_CC >= 0x5100 + /* __SUNPRO_CC = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# endif + +#elif defined(__HP_aCC) +# define COMPILER_ID "HP" + /* __HP_aCC = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) + +#elif defined(__DECCXX) +# define COMPILER_ID "Compaq" + /* __DECCXX_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) + +#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 +# define COMPILER_ID "XL" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__CLANG_FUJITSU) +# define COMPILER_ID "FujitsuClang" +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#elif defined(__FUJITSU) +# define COMPILER_ID "Fujitsu" +# if defined(__FCC_version__) +# define COMPILER_VERSION __FCC_version__ +# elif defined(__FCC_major__) +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# endif +# if defined(__fcc_version) +# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) +# elif defined(__FCC_VERSION) +# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) +# endif + + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) && __has_include() +# define COMPILER_ID "ROCMClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# elif defined(__clang__) +# define SIMULATE_ID "Clang" +# elif defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif +# if defined(__clang__) && __has_include() +# include +# define COMPILER_VERSION_MAJOR DEC(HIP_VERSION_MAJOR) +# define COMPILER_VERSION_MINOR DEC(HIP_VERSION_MINOR) +# define COMPILER_VERSION_PATCH DEC(HIP_VERSION_PATCH) +# endif + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) || defined(__GNUG__) +# define COMPILER_ID "GNU" +# if defined(__GNUC__) +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# else +# define COMPILER_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__MSYS__) +# define PLATFORM_ID "MSYS" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number. */ +#ifdef COMPILER_VERSION +char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; + +/* Construct a string literal encoding the version number components. */ +#elif defined(COMPILER_VERSION_MAJOR) +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#elif defined(COMPILER_VERSION_INTERNAL_STR) +char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L +# if defined(__INTEL_CXX11_MODE__) +# if defined(__cpp_aggregate_nsdmi) +# define CXX_STD 201402L +# else +# define CXX_STD 201103L +# endif +# else +# define CXX_STD 199711L +# endif +#elif defined(_MSC_VER) && defined(_MSVC_LANG) +# define CXX_STD _MSVC_LANG +#else +# define CXX_STD __cplusplus +#endif + +const char* info_language_dialect_default = "INFO" ":" "dialect_default[" +#if CXX_STD > 202002L + "23" +#elif CXX_STD > 201703L + "20" +#elif CXX_STD >= 201703L + "17" +#elif CXX_STD >= 201402L + "14" +#elif CXX_STD >= 201103L + "11" +#else + "98" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_dialect_default[argc]; + (void)argv; + return require; +} diff --git a/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CompilerIdCXX/a.exe b/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CompilerIdCXX/a.exe new file mode 100644 index 0000000..ead2dc1 Binary files /dev/null and b/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CompilerIdCXX/a.exe differ diff --git a/weatherslave/cmake-build-esp32dev/CMakeFiles/CMakeError.log b/weatherslave/cmake-build-esp32dev/CMakeFiles/CMakeError.log new file mode 100644 index 0000000..d5726b7 --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/CMakeFiles/CMakeError.log @@ -0,0 +1,132 @@ +Detecting C compiler ABI info failed to compile with the following output: +Change Dir: D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/CMakeFiles/CMakeTmp + +Run Build Command(s):C:/Program Files/JetBrains/CLion 2021.1.1/bin/ninja/win/ninja.exe cmTC_db4ea && [1/2] Building C object CMakeFiles/cmTC_db4ea.dir/CMakeCCompilerABI.c.obj +Using built-in specs. +COLLECT_GCC=C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\gcc.exe +Target: x86_64-w64-mingw32 +Configured with: ../../../src/gcc-7.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/lib -L/c/mingw730/prerequisites/x86_64-zlib-static/lib -L/c/mingw730/prerequisites/x86_64-w64-mingw32-static/lib ' +Thread model: posix +gcc version 7.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_db4ea.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona' + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/cc1.exe -quiet -v -iprefix C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/ -D_REENTRANT C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=core2 -march=nocona -auxbase-strip CMakeFiles/cmTC_db4ea.dir/CMakeCCompilerABI.c.obj -version -o C:\Users\xin\AppData\Local\Temp\ccnSd788.s +GNU C11 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) version 7.3.0 (x86_64-w64-mingw32) + compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include" +ignoring nonexistent directory "C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64C:/msys64-2/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include" +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed" +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include" +ignoring nonexistent directory "C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/mingw/include" +#include "..." search starts here: +#include <...> search starts here: + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include +End of search list. +GNU C11 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) version 7.3.0 (x86_64-w64-mingw32) + compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +Compiler executable checksum: afb3948cd5c0c8f535365414e7310436 +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_db4ea.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona' + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/as.exe -v -o CMakeFiles/cmTC_db4ea.dir/CMakeCCompilerABI.c.obj C:\Users\xin\AppData\Local\Temp\ccnSd788.s +GNU assembler version 2.30 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.30 +COMPILER_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ +LIBRARY_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../ +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_db4ea.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona' +[2/2] Linking C executable cmTC_db4ea +Using built-in specs. +COLLECT_GCC=C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\gcc.exe +COLLECT_LTO_WRAPPER=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe +Target: x86_64-w64-mingw32 +Configured with: ../../../src/gcc-7.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/lib -L/c/mingw730/prerequisites/x86_64-zlib-static/lib -L/c/mingw730/prerequisites/x86_64-w64-mingw32-static/lib ' +Thread model: posix +gcc version 7.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) +COMPILER_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ +LIBRARY_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_db4ea.exe' '-mtune=core2' '-march=nocona' + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/collect2.exe -plugin C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/liblto_plugin-0.dll -plugin-opt=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\xin\AppData\Local\Temp\ccfojgth.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-liconv -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt --sysroot=C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 -m i386pep -Bdynamic -o cmTC_db4ea.exe C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtbegin.o -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0 -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../.. CMakeFiles/cmTC_db4ea.dir/CMakeCCompilerABI.c.obj -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtend.o +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_db4ea.exe' '-mtune=core2' '-march=nocona' + + +Cannot copy output executable + '' +to destination specified by COPY_FILE: + 'D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CMakeDetermineCompilerABI_C.bin' +Unable to find the executable at any of: + D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/CMakeFiles/CMakeTmp/cmTC_db4ea + D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/CMakeFiles/CMakeTmp/Debug/cmTC_db4ea + D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/CMakeFiles/CMakeTmp/Development/cmTC_db4ea + + +Detecting CXX compiler ABI info failed to compile with the following output: +Change Dir: D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/CMakeFiles/CMakeTmp + +Run Build Command(s):C:/Program Files/JetBrains/CLion 2021.1.1/bin/ninja/win/ninja.exe cmTC_9b786 && [1/2] Building CXX object CMakeFiles/cmTC_9b786.dir/CMakeCXXCompilerABI.cpp.obj +Using built-in specs. +COLLECT_GCC=C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\c++.exe +Target: x86_64-w64-mingw32 +Configured with: ../../../src/gcc-7.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/lib -L/c/mingw730/prerequisites/x86_64-zlib-static/lib -L/c/mingw730/prerequisites/x86_64-w64-mingw32-static/lib ' +Thread model: posix +gcc version 7.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_9b786.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=core2' '-march=nocona' + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/cc1plus.exe -quiet -v -iprefix C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/ -D_REENTRANT C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=core2 -march=nocona -auxbase-strip CMakeFiles/cmTC_9b786.dir/CMakeCXXCompilerABI.cpp.obj -version -o C:\Users\xin\AppData\Local\Temp\ccWBxv2i.s +GNU C++14 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) version 7.3.0 (x86_64-w64-mingw32) + compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++" +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32" +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward" +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include" +ignoring nonexistent directory "C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64C:/msys64-2/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include" +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed" +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include" +ignoring nonexistent directory "C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/mingw/include" +#include "..." search starts here: +#include <...> search starts here: + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++ + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32 + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include +End of search list. +GNU C++14 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) version 7.3.0 (x86_64-w64-mingw32) + compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +Compiler executable checksum: 86cf749bb84a0f12f1d61bff4e68fffd +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_9b786.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=core2' '-march=nocona' + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/as.exe -v -o CMakeFiles/cmTC_9b786.dir/CMakeCXXCompilerABI.cpp.obj C:\Users\xin\AppData\Local\Temp\ccWBxv2i.s +GNU assembler version 2.30 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.30 +COMPILER_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ +LIBRARY_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../ +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_9b786.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=core2' '-march=nocona' +[2/2] Linking CXX executable cmTC_9b786 +Using built-in specs. +COLLECT_GCC=C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\c++.exe +COLLECT_LTO_WRAPPER=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe +Target: x86_64-w64-mingw32 +Configured with: ../../../src/gcc-7.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/lib -L/c/mingw730/prerequisites/x86_64-zlib-static/lib -L/c/mingw730/prerequisites/x86_64-w64-mingw32-static/lib ' +Thread model: posix +gcc version 7.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) +COMPILER_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ +LIBRARY_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_9b786.exe' '-shared-libgcc' '-mtune=core2' '-march=nocona' + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/collect2.exe -plugin C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/liblto_plugin-0.dll -plugin-opt=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\xin\AppData\Local\Temp\ccIWAY4m.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-liconv -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt --sysroot=C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 -m i386pep -Bdynamic -o cmTC_9b786.exe C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtbegin.o -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0 -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../.. CMakeFiles/cmTC_9b786.dir/CMakeCXXCompilerABI.cpp.obj -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtend.o +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_9b786.exe' '-shared-libgcc' '-mtune=core2' '-march=nocona' + + +Cannot copy output executable + '' +to destination specified by COPY_FILE: + 'D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CMakeDetermineCompilerABI_CXX.bin' +Unable to find the executable at any of: + D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/CMakeFiles/CMakeTmp/cmTC_9b786 + D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/CMakeFiles/CMakeTmp/Debug/cmTC_9b786 + D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/CMakeFiles/CMakeTmp/Development/cmTC_9b786 + + diff --git a/weatherslave/cmake-build-esp32dev/CMakeFiles/CMakeOutput.log b/weatherslave/cmake-build-esp32dev/CMakeFiles/CMakeOutput.log new file mode 100644 index 0000000..0f30afa --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/CMakeFiles/CMakeOutput.log @@ -0,0 +1,28 @@ +The target system is: Generic - - +The host system is: Windows - 10.0.19044 - AMD64 +Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. +Compiler: C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc.exe +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe" + +The C compiler identification is GNU, found in "D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CompilerIdC/a.exe" + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. +Compiler: C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/c++.exe +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe" + +The CXX compiler identification is GNU, found in "D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/CMakeFiles/3.21.1/CompilerIdCXX/a.exe" + diff --git a/weatherslave/cmake-build-esp32dev/CMakeFiles/TargetDirectories.txt b/weatherslave/cmake-build-esp32dev/CMakeFiles/TargetDirectories.txt new file mode 100644 index 0000000..c392b4c --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,5 @@ +D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/CMakeFiles/Production.dir +D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/CMakeFiles/edit_cache.dir +D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/CMakeFiles/Debug.dir +D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/CMakeFiles/Z_DUMMY_TARGET.dir +D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/CMakeFiles/rebuild_cache.dir diff --git a/weatherslave/cmake-build-esp32dev/CMakeFiles/clion-environment.txt b/weatherslave/cmake-build-esp32dev/CMakeFiles/clion-environment.txt new file mode 100644 index 0000000..3d7552a --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/CMakeFiles/clion-environment.txt @@ -0,0 +1,4 @@ +ToolSet: w64 6.0 (local)@C:\Qt\Qt5.12.7\Tools\mingw730_64 +Options: + +Options:-DCMAKE_MAKE_PROGRAM=C:/Program Files/JetBrains/CLion 2021.1.1/bin/ninja/win/ninja.exe \ No newline at end of file diff --git a/weatherslave/cmake-build-esp32dev/CMakeFiles/clion-log.txt b/weatherslave/cmake-build-esp32dev/CMakeFiles/clion-log.txt new file mode 100644 index 0000000..7b1f096 --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/CMakeFiles/clion-log.txt @@ -0,0 +1,14 @@ +"C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=esp32dev "-DCMAKE_MAKE_PROGRAM=C:/Program Files/JetBrains/CLion 2021.1.1/bin/ninja/win/ninja.exe" -G Ninja D:\03MyGit\arduino\esp32mainboard\weatherslave +-- The C compiler identification is GNU 7.3.0 +-- The CXX compiler identification is GNU 7.3.0 +-- Detecting C compiler ABI info +-- Detecting C compiler ABI info - failed +-- Detecting C compile features +-- Detecting C compile features - done +-- Detecting CXX compiler ABI info +-- Detecting CXX compiler ABI info - failed +-- Detecting CXX compile features +-- Detecting CXX compile features - done +-- Configuring done +-- Generating done +-- Build files have been written to: D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev diff --git a/weatherslave/cmake-build-esp32dev/CMakeFiles/cmake.check_cache b/weatherslave/cmake-build-esp32dev/CMakeFiles/cmake.check_cache new file mode 100644 index 0000000..3dccd73 --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/weatherslave/cmake-build-esp32dev/CMakeFiles/rules.ninja b/weatherslave/cmake-build-esp32dev/CMakeFiles/rules.ninja new file mode 100644 index 0000000..0c6d5cc --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/CMakeFiles/rules.ninja @@ -0,0 +1,64 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Ninja" Generator, CMake Version 3.21 + +# This file contains all the rules used to get the outputs files +# built from the input files. +# It is included in the main 'build.ninja'. + +# ============================================================================= +# Project: weatherslave +# Configurations: esp32dev +# ============================================================================= +# ============================================================================= + +############################################# +# Rule for running custom commands. + +rule CUSTOM_COMMAND + command = $COMMAND + description = $DESC + + +############################################# +# Rule for compiling CXX files. + +rule CXX_COMPILER__Z_DUMMY_TARGET_esp32dev + depfile = $DEP_FILE + deps = gcc + command = C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $in + description = Building CXX object $out + + +############################################# +# Rule for linking CXX executable. + +rule CXX_EXECUTABLE_LINKER__Z_DUMMY_TARGET_esp32dev + command = cmd.exe /C "$PRE_LINK && C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe $FLAGS $LINK_FLAGS $in -o $TARGET_FILE $LINK_PATH $LINK_LIBRARIES && $POST_BUILD" + description = Linking CXX executable $TARGET_FILE + restat = $RESTAT + + +############################################# +# Rule for re-running cmake. + +rule RERUN_CMAKE + command = "C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" --regenerate-during-build -SD:\03MyGit\arduino\esp32mainboard\weatherslave -BD:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp32dev + description = Re-running CMake... + generator = 1 + + +############################################# +# Rule for cleaning all built files. + +rule CLEAN + command = "C:\Program Files\JetBrains\CLion 2021.1.1\bin\ninja\win\ninja.exe" $FILE_ARG -t clean $TARGETS + description = Cleaning all built files... + + +############################################# +# Rule for printing all primary targets available. + +rule HELP + command = "C:\Program Files\JetBrains\CLion 2021.1.1\bin\ninja\win\ninja.exe" -t targets + description = All primary targets available: + diff --git a/weatherslave/cmake-build-esp32dev/Testing/Temporary/LastTest.log b/weatherslave/cmake-build-esp32dev/Testing/Temporary/LastTest.log new file mode 100644 index 0000000..1bef8e5 --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/Testing/Temporary/LastTest.log @@ -0,0 +1,3 @@ +Start testing: Apr 26 16:21 ?D1??? +---------------------------------------------------------- +End testing: Apr 26 16:21 ?D1??? diff --git a/weatherslave/cmake-build-esp32dev/build.ninja b/weatherslave/cmake-build-esp32dev/build.ninja new file mode 100644 index 0000000..7610239 --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/build.ninja @@ -0,0 +1,171 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Ninja" Generator, CMake Version 3.21 + +# This file contains all the build statements describing the +# compilation DAG. + +# ============================================================================= +# Write statements declared in CMakeLists.txt: +# +# Which is the root file. +# ============================================================================= + +# ============================================================================= +# Project: weatherslave +# Configurations: esp32dev +# ============================================================================= + +############################################# +# Minimal version of Ninja required by this file + +ninja_required_version = 1.5 + + +############################################# +# Set configuration variable for custom commands. + +CONFIGURATION = esp32dev +# ============================================================================= +# Include auxiliary files. + + +############################################# +# Include rules file. + +include CMakeFiles/rules.ninja + +# ============================================================================= + +############################################# +# Logical path to working directory; prefix for absolute paths. + +cmake_ninja_workdir = D$:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/ + +############################################# +# Utility command for Production + +build Production: phony CMakeFiles/Production + + +############################################# +# Utility command for edit_cache + +build CMakeFiles/edit_cache.util: CUSTOM_COMMAND + COMMAND = cmd.exe /C "cd /D D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp32dev && "C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" -E echo "No interactive CMake dialog available."" + DESC = No interactive CMake dialog available... + restat = 1 + +build edit_cache: phony CMakeFiles/edit_cache.util + + +############################################# +# Utility command for Debug + +build Debug: phony CMakeFiles/Debug + +# ============================================================================= +# Object build statements for EXECUTABLE target Z_DUMMY_TARGET + + +############################################# +# Order-only phony target for Z_DUMMY_TARGET + +build cmake_object_order_depends_target_Z_DUMMY_TARGET: phony || CMakeFiles/Z_DUMMY_TARGET.dir + +build CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.obj: CXX_COMPILER__Z_DUMMY_TARGET_esp32dev D$:/03MyGit/arduino/esp32mainboard/weatherslave/src/main.cpp || cmake_object_order_depends_target_Z_DUMMY_TARGET + DEP_FILE = CMakeFiles\Z_DUMMY_TARGET.dir\src\main.cpp.obj.d + FLAGS = -fno-rtti -std=gnu++17 -fno-exceptions -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -D_GNU_SOURCE -ffunction-sections -fdata-sections -Wall -Werror=return-type -free -fipa-pta -std=gnu++1z + OBJECT_DIR = CMakeFiles\Z_DUMMY_TARGET.dir + OBJECT_FILE_DIR = CMakeFiles\Z_DUMMY_TARGET.dir\src + TARGET_COMPILE_PDB = CMakeFiles\Z_DUMMY_TARGET.dir\ + TARGET_PDB = Z_DUMMY_TARGET.pdb + + +# ============================================================================= +# Link build statements for EXECUTABLE target Z_DUMMY_TARGET + + +############################################# +# Link the executable Z_DUMMY_TARGET + +build Z_DUMMY_TARGET: CXX_EXECUTABLE_LINKER__Z_DUMMY_TARGET_esp32dev CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.obj + FLAGS = -fno-rtti -std=gnu++17 -fno-exceptions -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -D_GNU_SOURCE -ffunction-sections -fdata-sections -Wall -Werror=return-type -free -fipa-pta + OBJECT_DIR = CMakeFiles\Z_DUMMY_TARGET.dir + POST_BUILD = cd . + PRE_LINK = cd . + TARGET_COMPILE_PDB = CMakeFiles\Z_DUMMY_TARGET.dir\ + TARGET_FILE = Z_DUMMY_TARGET + TARGET_PDB = Z_DUMMY_TARGET.pdb + + +############################################# +# Utility command for rebuild_cache + +build CMakeFiles/rebuild_cache.util: CUSTOM_COMMAND + COMMAND = cmd.exe /C "cd /D D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp32dev && "C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" --regenerate-during-build -SD:\03MyGit\arduino\esp32mainboard\weatherslave -BD:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp32dev" + DESC = Running CMake to regenerate build system... + pool = console + restat = 1 + +build rebuild_cache: phony CMakeFiles/rebuild_cache.util + + +############################################# +# Custom command for CMakeFiles\Production + +build CMakeFiles/Production | ${cmake_ninja_workdir}CMakeFiles/Production: CUSTOM_COMMAND + COMMAND = cmd.exe /C "cd /D D:\03MyGit\arduino\esp32mainboard\weatherslave && platformio -c clion run -eesp32dev" + + +############################################# +# Custom command for CMakeFiles\Debug + +build CMakeFiles/Debug | ${cmake_ninja_workdir}CMakeFiles/Debug: CUSTOM_COMMAND + COMMAND = cmd.exe /C "cd /D D:\03MyGit\arduino\esp32mainboard\weatherslave && platformio -c clion debug -eesp32dev" + +# ============================================================================= +# Target aliases. + +# ============================================================================= +# Folder targets. + +# ============================================================================= + +############################################# +# Folder: D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev + +build all: phony Production Debug Z_DUMMY_TARGET + +# ============================================================================= +# Built-in targets + + +############################################# +# Re-run CMake if any of its inputs changed. + +build build.ninja: RERUN_CMAKE | ../CMakeLists.txt ../CMakeListsPrivate.txt C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCCompiler.cmake.in C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCCompilerABI.c C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCXXCompiler.cmake.in C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCXXCompilerABI.cpp C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCXXInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCommonLanguageInclude.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCompilerIdDetection.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCXXCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCompileFeatures.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCompilerABI.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCompilerId.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineSystem.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeFindBinUtils.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeGenericSystem.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeInitializeConfigs.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeLanguageInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeParseImplicitIncludeInfo.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeParseImplicitLinkInfo.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeParseLibraryArchitecture.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeSystem.cmake.in C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeSystemSpecificInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeSystemSpecificInitialize.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeTestCCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeTestCXXCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeTestCompilerCommon.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/ADSP-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/ARMCC-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/ARMClang-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/AppleClang-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Borland-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Bruce-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/CMakeCommonCompilerMacros.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Clang-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Clang-DetermineCompilerInternal.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Compaq-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Cray-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Embarcadero-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Fujitsu-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GHS-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-C.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-CXX.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-FindBinUtils.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/HP-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/HP-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IAR-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Intel-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/MSVC-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/NVHPC-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/NVIDIA-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/PGI-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/PathScale-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/ROCMClang-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/SCO-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/SDCC-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/SunPro-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/TI-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Watcom-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/XL-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/XL-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/XLClang-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/XLClang-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/zOS-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Internal/FeatureTesting.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Platform/Generic.cmake CMakeCache.txt CMakeFiles/3.21.1/CMakeCCompiler.cmake CMakeFiles/3.21.1/CMakeCXXCompiler.cmake CMakeFiles/3.21.1/CMakeSystem.cmake + pool = console + + +############################################# +# A missing CMake input file is not an error. + +build ../CMakeLists.txt ../CMakeListsPrivate.txt C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCCompiler.cmake.in C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCCompilerABI.c C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCXXCompiler.cmake.in C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCXXCompilerABI.cpp C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCXXInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCommonLanguageInclude.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCompilerIdDetection.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCXXCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCompileFeatures.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCompilerABI.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineCompilerId.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeDetermineSystem.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeFindBinUtils.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeGenericSystem.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeInitializeConfigs.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeLanguageInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeParseImplicitIncludeInfo.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeParseImplicitLinkInfo.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeParseLibraryArchitecture.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeSystem.cmake.in C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeSystemSpecificInformation.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeSystemSpecificInitialize.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeTestCCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeTestCXXCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeTestCompilerCommon.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/ADSP-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/ARMCC-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/ARMClang-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/AppleClang-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Borland-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Bruce-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/CMakeCommonCompilerMacros.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Clang-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Clang-DetermineCompilerInternal.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Compaq-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Cray-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Embarcadero-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Fujitsu-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GHS-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-C.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-CXX.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-FindBinUtils.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/HP-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/HP-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IAR-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Intel-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/MSVC-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/NVHPC-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/NVIDIA-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/PGI-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/PathScale-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/ROCMClang-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/SCO-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/SDCC-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/SunPro-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/TI-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/Watcom-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/XL-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/XL-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/XLClang-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/XLClang-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/zOS-C-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Internal/FeatureTesting.cmake C$:/Program$ Files/JetBrains/CLion$ 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Platform/Generic.cmake CMakeCache.txt CMakeFiles/3.21.1/CMakeCCompiler.cmake CMakeFiles/3.21.1/CMakeCXXCompiler.cmake CMakeFiles/3.21.1/CMakeSystem.cmake: phony + + +############################################# +# Clean all the built files. + +build clean: CLEAN + + +############################################# +# Print all primary targets available. + +build help: HELP + + +############################################# +# Make the all target the default. + +default all diff --git a/weatherslave/cmake-build-esp32dev/cmake_install.cmake b/weatherslave/cmake-build-esp32dev/cmake_install.cmake new file mode 100644 index 0000000..cab6b9a --- /dev/null +++ b/weatherslave/cmake-build-esp32dev/cmake_install.cmake @@ -0,0 +1,49 @@ +# Install script for directory: D:/03MyGit/arduino/esp32mainboard/weatherslave + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/weatherslave") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "esp32dev") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "TRUE") +endif() + +# Set default install directory permissions. +if(NOT DEFINED CMAKE_OBJDUMP) + set(CMAKE_OBJDUMP "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/objdump.exe") +endif() + +if(CMAKE_INSTALL_COMPONENT) + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") +else() + set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +endif() + +string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT + "${CMAKE_INSTALL_MANIFEST_FILES}") +file(WRITE "D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp32dev/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/query/cache-v2 b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/query/cache-v2 new file mode 100644 index 0000000..e69de29 diff --git a/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/query/cmakeFiles-v1 b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/query/cmakeFiles-v1 new file mode 100644 index 0000000..e69de29 diff --git a/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/query/codemodel-v2 b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/query/codemodel-v2 new file mode 100644 index 0000000..e69de29 diff --git a/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/query/toolchains-v1 b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/query/toolchains-v1 new file mode 100644 index 0000000..e69de29 diff --git a/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/cache-v2-c97b4c610811fbf22484.json b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/cache-v2-c97b4c610811fbf22484.json new file mode 100644 index 0000000..bc3e732 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/cache-v2-c97b4c610811fbf22484.json @@ -0,0 +1,1475 @@ +{ + "entries" : + [ + { + "name" : "CMAKE_ADDR2LINE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/addr2line.exe" + }, + { + "name" : "CMAKE_AR", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ar.exe" + }, + { + "name" : "CMAKE_BUILD_TYPE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ..." + } + ], + "type" : "STRING", + "value" : "esp_wroom_02" + }, + { + "name" : "CMAKE_CACHEFILE_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "This is the directory where this CMakeCache.txt was created" + } + ], + "type" : "INTERNAL", + "value" : "d:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02" + }, + { + "name" : "CMAKE_CACHE_MAJOR_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Major version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "3" + }, + { + "name" : "CMAKE_CACHE_MINOR_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Minor version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "21" + }, + { + "name" : "CMAKE_CACHE_PATCH_VERSION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Patch version of cmake used to create the current loaded cache" + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_CODEBLOCKS_COMPILER_ID", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Id string of the compiler for the CodeBlocks IDE. Automatically detected when left empty" + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_CODEBLOCKS_EXECUTABLE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "The CodeBlocks executable" + } + ], + "type" : "FILEPATH", + "value" : "CMAKE_CODEBLOCKS_EXECUTABLE-NOTFOUND" + }, + { + "name" : "CMAKE_CODEBLOCKS_MAKE_ARGUMENTS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Additional command line arguments when CodeBlocks invokes make. Enter e.g. -j to get parallel builds" + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_COLOR_MAKEFILE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Enable/Disable color output during build." + } + ], + "type" : "BOOL", + "value" : "ON" + }, + { + "name" : "CMAKE_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to CMake executable." + } + ], + "type" : "INTERNAL", + "value" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/cmake.exe" + }, + { + "name" : "CMAKE_CONFIGURATION_TYPES", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Build Types reflect PlatformIO Environments" + } + ], + "type" : "STRING", + "value" : "esp_wroom_02" + }, + { + "name" : "CMAKE_CPACK_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to cpack program executable." + } + ], + "type" : "INTERNAL", + "value" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/cpack.exe" + }, + { + "name" : "CMAKE_CTEST_COMMAND", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to ctest program executable." + } + ], + "type" : "INTERNAL", + "value" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/ctest.exe" + }, + { + "name" : "CMAKE_CXX_COMPILER", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "CXX compiler" + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/g++.exe" + }, + { + "name" : "CMAKE_CXX_COMPILER_AR", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler" + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ar.exe" + }, + { + "name" : "CMAKE_CXX_COMPILER_RANLIB", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler" + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ranlib.exe" + }, + { + "name" : "CMAKE_CXX_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_CXX_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "-g" + }, + { + "name" : "CMAKE_CXX_FLAGS_ESP_WROOM_02", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during ESP_WROOM_02 builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_CXX_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "-Os -DNDEBUG" + }, + { + "name" : "CMAKE_CXX_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "-O3 -DNDEBUG" + }, + { + "name" : "CMAKE_CXX_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the CXX compiler during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "-O2 -g -DNDEBUG" + }, + { + "name" : "CMAKE_C_COMPILER", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "C compiler" + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc.exe" + }, + { + "name" : "CMAKE_C_COMPILER_AR", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler" + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ar.exe" + }, + { + "name" : "CMAKE_C_COMPILER_RANLIB", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler" + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ranlib.exe" + }, + { + "name" : "CMAKE_C_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_C_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "-g" + }, + { + "name" : "CMAKE_C_FLAGS_ESP_WROOM_02", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during ESP_WROOM_02 builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_C_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "-Os -DNDEBUG" + }, + { + "name" : "CMAKE_C_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "-O3 -DNDEBUG" + }, + { + "name" : "CMAKE_C_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the C compiler during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "-O2 -g -DNDEBUG" + }, + { + "name" : "CMAKE_DLLTOOL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/dlltool.exe" + }, + { + "name" : "CMAKE_EXECUTABLE_FORMAT", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Executable file format" + } + ], + "type" : "INTERNAL", + "value" : "Unknown" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_ESP_WROOM_02", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during ESP_WROOM_02 builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_EXTRA_GENERATOR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of external makefile project generator." + } + ], + "type" : "INTERNAL", + "value" : "CodeBlocks" + }, + { + "name" : "CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_DEFINED_MACROS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "CXX compiler system defined macros" + } + ], + "type" : "INTERNAL", + "value" : "__STDC__;1;__STDC_VERSION__;201112L;__STDC_UTF_16__;1;__STDC_UTF_32__;1;__STDC_HOSTED__;1;__GNUC__;7;__GNUC_MINOR__;3;__GNUC_PATCHLEVEL__;0;__VERSION__;\"7.3.0\";__ATOMIC_RELAXED;0;__ATOMIC_SEQ_CST;5;__ATOMIC_ACQUIRE;2;__ATOMIC_RELEASE;3;__ATOMIC_ACQ_REL;4;__ATOMIC_CONSUME;1;__pic__;1;__PIC__;1;__FINITE_MATH_ONLY__;0;__SIZEOF_INT__;4;__SIZEOF_LONG__;4;__SIZEOF_LONG_LONG__;8;__SIZEOF_SHORT__;2;__SIZEOF_FLOAT__;4;__SIZEOF_DOUBLE__;8;__SIZEOF_LONG_DOUBLE__;16;__SIZEOF_SIZE_T__;8;__CHAR_BIT__;8;__BIGGEST_ALIGNMENT__;16;__ORDER_LITTLE_ENDIAN__;1234;__ORDER_BIG_ENDIAN__;4321;__ORDER_PDP_ENDIAN__;3412;__BYTE_ORDER__;__ORDER_LITTLE_ENDIAN__;__FLOAT_WORD_ORDER__;__ORDER_LITTLE_ENDIAN__;__SIZEOF_POINTER__;8;__SIZE_TYPE__;long long unsigned int;__PTRDIFF_TYPE__;long long int;__WCHAR_TYPE__;short unsigned int;__WINT_TYPE__;short unsigned int;__INTMAX_TYPE__;long long int;__UINTMAX_TYPE__;long long unsigned int;__CHAR16_TYPE__;short unsigned int;__CHAR32_TYPE__;unsigned int;__SIG_ATOMIC_TYPE__;int;__INT8_TYPE__;signed char;__INT16_TYPE__;short int;__INT32_TYPE__;int;__INT64_TYPE__;long long int;__UINT8_TYPE__;unsigned char;__UINT16_TYPE__;short unsigned int;__UINT32_TYPE__;unsigned int;__UINT64_TYPE__;long long unsigned int;__INT_LEAST8_TYPE__;signed char;__INT_LEAST16_TYPE__;short int;__INT_LEAST32_TYPE__;int;__INT_LEAST64_TYPE__;long long int;__UINT_LEAST8_TYPE__;unsigned char;__UINT_LEAST16_TYPE__;short unsigned int;__UINT_LEAST32_TYPE__;unsigned int;__UINT_LEAST64_TYPE__;long long unsigned int;__INT_FAST8_TYPE__;signed char;__INT_FAST16_TYPE__;short int;__INT_FAST32_TYPE__;int;__INT_FAST64_TYPE__;long long int;__UINT_FAST8_TYPE__;unsigned char;__UINT_FAST16_TYPE__;short unsigned int;__UINT_FAST32_TYPE__;unsigned int;__UINT_FAST64_TYPE__;long long unsigned int;__INTPTR_TYPE__;long long int;__UINTPTR_TYPE__;long long unsigned int;__has_include(STR);__has_include__(STR);__has_include_next(STR);__has_include_next__(STR);__GXX_ABI_VERSION;1011;__SCHAR_MAX__;0x7f;__SHRT_MAX__;0x7fff;__INT_MAX__;0x7fffffff;__LONG_MAX__;0x7fffffffL;__LONG_LONG_MAX__;0x7fffffffffffffffLL;__WCHAR_MAX__;0xffff;__WCHAR_MIN__;0;__WINT_MAX__;0xffff;__WINT_MIN__;0;__PTRDIFF_MAX__;0x7fffffffffffffffLL;__SIZE_MAX__;0xffffffffffffffffULL;__SCHAR_WIDTH__;8;__SHRT_WIDTH__;16;__INT_WIDTH__;32;__LONG_WIDTH__;32;__LONG_LONG_WIDTH__;64;__WCHAR_WIDTH__;16;__WINT_WIDTH__;16;__PTRDIFF_WIDTH__;64;__SIZE_WIDTH__;64;__INTMAX_MAX__;0x7fffffffffffffffLL;__INTMAX_C(c);c ## LL;__UINTMAX_MAX__;0xffffffffffffffffULL;__UINTMAX_C(c);c ## ULL;__INTMAX_WIDTH__;64;__SIG_ATOMIC_MAX__;0x7fffffff;__SIG_ATOMIC_MIN__;(-__SIG_ATOMIC_MAX__ - 1);__SIG_ATOMIC_WIDTH__;32;__INT8_MAX__;0x7f;__INT16_MAX__;0x7fff;__INT32_MAX__;0x7fffffff;__INT64_MAX__;0x7fffffffffffffffLL;__UINT8_MAX__;0xff;__UINT16_MAX__;0xffff;__UINT32_MAX__;0xffffffffU;__UINT64_MAX__;0xffffffffffffffffULL;__INT_LEAST8_MAX__;0x7f;__INT8_C(c);c;__INT_LEAST8_WIDTH__;8;__INT_LEAST16_MAX__;0x7fff;__INT16_C(c);c;__INT_LEAST16_WIDTH__;16;__INT_LEAST32_MAX__;0x7fffffff;__INT32_C(c);c;__INT_LEAST32_WIDTH__;32;__INT_LEAST64_MAX__;0x7fffffffffffffffLL;__INT64_C(c);c ## LL;__INT_LEAST64_WIDTH__;64;__UINT_LEAST8_MAX__;0xff;__UINT8_C(c);c;__UINT_LEAST16_MAX__;0xffff;__UINT16_C(c);c;__UINT_LEAST32_MAX__;0xffffffffU;__UINT32_C(c);c ## U;__UINT_LEAST64_MAX__;0xffffffffffffffffULL;__UINT64_C(c);c ## ULL;__INT_FAST8_MAX__;0x7f;__INT_FAST8_WIDTH__;8;__INT_FAST16_MAX__;0x7fff;__INT_FAST16_WIDTH__;16;__INT_FAST32_MAX__;0x7fffffff;__INT_FAST32_WIDTH__;32;__INT_FAST64_MAX__;0x7fffffffffffffffLL;__INT_FAST64_WIDTH__;64;__UINT_FAST8_MAX__;0xff;__UINT_FAST16_MAX__;0xffff;__UINT_FAST32_MAX__;0xffffffffU;__UINT_FAST64_MAX__;0xffffffffffffffffULL;__INTPTR_MAX__;0x7fffffffffffffffLL;__INTPTR_WIDTH__;64;__UINTPTR_MAX__;0xffffffffffffffffULL;__GCC_IEC_559;2;__GCC_IEC_559_COMPLEX;2;__FLT_EVAL_METHOD__;0;__FLT_EVAL_METHOD_TS_18661_3__;0;__DEC_EVAL_METHOD__;2;__FLT_RADIX__;2;__FLT_MANT_DIG__;24;__FLT_DIG__;6;__FLT_MIN_EXP__;(-125);__FLT_MIN_10_EXP__;(-37);__FLT_MAX_EXP__;128;__FLT_MAX_10_EXP__;38;__FLT_DECIMAL_DIG__;9;__FLT_MAX__;3.40282346638528859811704183484516925e+38F;__FLT_MIN__;1.17549435082228750796873653722224568e-38F;__FLT_EPSILON__;1.19209289550781250000000000000000000e-7F;__FLT_DENORM_MIN__;1.40129846432481707092372958328991613e-45F;__FLT_HAS_DENORM__;1;__FLT_HAS_INFINITY__;1;__FLT_HAS_QUIET_NAN__;1;__DBL_MANT_DIG__;53;__DBL_DIG__;15;__DBL_MIN_EXP__;(-1021);__DBL_MIN_10_EXP__;(-307);__DBL_MAX_EXP__;1024;__DBL_MAX_10_EXP__;308;__DBL_DECIMAL_DIG__;17;__DBL_MAX__;((double)1.79769313486231570814527423731704357e+308L);__DBL_MIN__;((double)2.22507385850720138309023271733240406e-308L);__DBL_EPSILON__;((double)2.22044604925031308084726333618164062e-16L);__DBL_DENORM_MIN__;((double)4.94065645841246544176568792868221372e-324L);__DBL_HAS_DENORM__;1;__DBL_HAS_INFINITY__;1;__DBL_HAS_QUIET_NAN__;1;__LDBL_MANT_DIG__;64;__LDBL_DIG__;18;__LDBL_MIN_EXP__;(-16381);__LDBL_MIN_10_EXP__;(-4931);__LDBL_MAX_EXP__;16384;__LDBL_MAX_10_EXP__;4932;__DECIMAL_DIG__;21;__LDBL_DECIMAL_DIG__;21;__LDBL_MAX__;1.18973149535723176502126385303097021e+4932L;__LDBL_MIN__;3.36210314311209350626267781732175260e-4932L;__LDBL_EPSILON__;1.08420217248550443400745280086994171e-19L;__LDBL_DENORM_MIN__;3.64519953188247460252840593361941982e-4951L;__LDBL_HAS_DENORM__;1;__LDBL_HAS_INFINITY__;1;__LDBL_HAS_QUIET_NAN__;1;__FLT32_MANT_DIG__;24;__FLT32_DIG__;6;__FLT32_MIN_EXP__;(-125);__FLT32_MIN_10_EXP__;(-37);__FLT32_MAX_EXP__;128;__FLT32_MAX_10_EXP__;38;__FLT32_DECIMAL_DIG__;9;__FLT32_MAX__;3.40282346638528859811704183484516925e+38F32;__FLT32_MIN__;1.17549435082228750796873653722224568e-38F32;__FLT32_EPSILON__;1.19209289550781250000000000000000000e-7F32;__FLT32_DENORM_MIN__;1.40129846432481707092372958328991613e-45F32;__FLT32_HAS_DENORM__;1;__FLT32_HAS_INFINITY__;1;__FLT32_HAS_QUIET_NAN__;1;__FLT64_MANT_DIG__;53;__FLT64_DIG__;15;__FLT64_MIN_EXP__;(-1021);__FLT64_MIN_10_EXP__;(-307);__FLT64_MAX_EXP__;1024;__FLT64_MAX_10_EXP__;308;__FLT64_DECIMAL_DIG__;17;__FLT64_MAX__;1.79769313486231570814527423731704357e+308F64;__FLT64_MIN__;2.22507385850720138309023271733240406e-308F64;__FLT64_EPSILON__;2.22044604925031308084726333618164062e-16F64;__FLT64_DENORM_MIN__;4.94065645841246544176568792868221372e-324F64;__FLT64_HAS_DENORM__;1;__FLT64_HAS_INFINITY__;1;__FLT64_HAS_QUIET_NAN__;1;__FLT128_MANT_DIG__;113;__FLT128_DIG__;33;__FLT128_MIN_EXP__;(-16381);__FLT128_MIN_10_EXP__;(-4931);__FLT128_MAX_EXP__;16384;__FLT128_MAX_10_EXP__;4932;__FLT128_DECIMAL_DIG__;36;__FLT128_MAX__;1.18973149535723176508575932662800702e+4932F128;__FLT128_MIN__;3.36210314311209350626267781732175260e-4932F128;__FLT128_EPSILON__;1.92592994438723585305597794258492732e-34F128;__FLT128_DENORM_MIN__;6.47517511943802511092443895822764655e-4966F128;__FLT128_HAS_DENORM__;1;__FLT128_HAS_INFINITY__;1;__FLT128_HAS_QUIET_NAN__;1;__FLT32X_MANT_DIG__;53;__FLT32X_DIG__;15;__FLT32X_MIN_EXP__;(-1021);__FLT32X_MIN_10_EXP__;(-307);__FLT32X_MAX_EXP__;1024;__FLT32X_MAX_10_EXP__;308;__FLT32X_DECIMAL_DIG__;17;__FLT32X_MAX__;1.79769313486231570814527423731704357e+308F32x;__FLT32X_MIN__;2.22507385850720138309023271733240406e-308F32x;__FLT32X_EPSILON__;2.22044604925031308084726333618164062e-16F32x;__FLT32X_DENORM_MIN__;4.94065645841246544176568792868221372e-324F32x;__FLT32X_HAS_DENORM__;1;__FLT32X_HAS_INFINITY__;1;__FLT32X_HAS_QUIET_NAN__;1;__FLT64X_MANT_DIG__;64;__FLT64X_DIG__;18;__FLT64X_MIN_EXP__;(-16381);__FLT64X_MIN_10_EXP__;(-4931);__FLT64X_MAX_EXP__;16384;__FLT64X_MAX_10_EXP__;4932;__FLT64X_DECIMAL_DIG__;21;__FLT64X_MAX__;1.18973149535723176502126385303097021e+4932F64x;__FLT64X_MIN__;3.36210314311209350626267781732175260e-4932F64x;__FLT64X_EPSILON__;1.08420217248550443400745280086994171e-19F64x;__FLT64X_DENORM_MIN__;3.64519953188247460252840593361941982e-4951F64x;__FLT64X_HAS_DENORM__;1;__FLT64X_HAS_INFINITY__;1;__FLT64X_HAS_QUIET_NAN__;1;__DEC32_MANT_DIG__;7;__DEC32_MIN_EXP__;(-94);__DEC32_MAX_EXP__;97;__DEC32_MIN__;1E-95DF;__DEC32_MAX__;9.999999E96DF;__DEC32_EPSILON__;1E-6DF;__DEC32_SUBNORMAL_MIN__;0.000001E-95DF;__DEC64_MANT_DIG__;16;__DEC64_MIN_EXP__;(-382);__DEC64_MAX_EXP__;385;__DEC64_MIN__;1E-383DD;__DEC64_MAX__;9.999999999999999E384DD;__DEC64_EPSILON__;1E-15DD;__DEC64_SUBNORMAL_MIN__;0.000000000000001E-383DD;__DEC128_MANT_DIG__;34;__DEC128_MIN_EXP__;(-6142);__DEC128_MAX_EXP__;6145;__DEC128_MIN__;1E-6143DL;__DEC128_MAX__;9.999999999999999999999999999999999E6144DL;__DEC128_EPSILON__;1E-33DL;__DEC128_SUBNORMAL_MIN__;0.000000000000000000000000000000001E-6143DL;__REGISTER_PREFIX__; ;__USER_LABEL_PREFIX__; ;__GNUC_STDC_INLINE__;1;__NO_INLINE__;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16;1;__GCC_ATOMIC_BOOL_LOCK_FREE;2;__GCC_ATOMIC_CHAR_LOCK_FREE;2;__GCC_ATOMIC_CHAR16_T_LOCK_FREE;2;__GCC_ATOMIC_CHAR32_T_LOCK_FREE;2;__GCC_ATOMIC_WCHAR_T_LOCK_FREE;2;__GCC_ATOMIC_SHORT_LOCK_FREE;2;__GCC_ATOMIC_INT_LOCK_FREE;2;__GCC_ATOMIC_LONG_LOCK_FREE;2;__GCC_ATOMIC_LLONG_LOCK_FREE;2;__GCC_ATOMIC_TEST_AND_SET_TRUEVAL;1;__GCC_ATOMIC_POINTER_LOCK_FREE;2;__PRAGMA_REDEFINE_EXTNAME;1;__SIZEOF_INT128__;16;__SIZEOF_WCHAR_T__;2;__SIZEOF_WINT_T__;2;__SIZEOF_PTRDIFF_T__;8;__amd64;1;__amd64__;1;__x86_64;1;__x86_64__;1;__SIZEOF_FLOAT80__;16;__SIZEOF_FLOAT128__;16;__ATOMIC_HLE_ACQUIRE;65536;__ATOMIC_HLE_RELEASE;131072;__GCC_ASM_FLAG_OUTPUTS__;1;__nocona;1;__nocona__;1;__tune_core2__;1;__code_model_medium__;1;__MMX__;1;__SSE__;1;__SSE2__;1;__SSE3__;1;__FXSR__;1;__SSE_MATH__;1;__SSE2_MATH__;1;__SEG_FS;1;__SEG_GS;1;__SEH__;1;__stdcall;__attribute__((__stdcall__));__fastcall;__attribute__((__fastcall__));__thiscall;__attribute__((__thiscall__));__cdecl;__attribute__((__cdecl__));_stdcall;__attribute__((__stdcall__));_fastcall;__attribute__((__fastcall__));_thiscall;__attribute__((__thiscall__));_cdecl;__attribute__((__cdecl__));__GXX_MERGED_TYPEINFO_NAMES;0;__GXX_TYPEINFO_EQUALITY_INLINE;0;__MSVCRT__;1;__MINGW32__;1;_WIN32;1;__WIN32;1;__WIN32__;1;WIN32;1;__WINNT;1;__WINNT__;1;WINNT;1;_INTEGRAL_MAX_BITS;64;__MINGW64__;1;__WIN64;1;__WIN64__;1;WIN64;1;_WIN64;1;__declspec(x);__attribute__((x));__DECIMAL_BID_FORMAT__;1;_REENTRANT;1;__STDC__;1;__cplusplus;201402L;__STDC_UTF_16__;1;__STDC_UTF_32__;1;__STDC_HOSTED__;1;__GNUC__;7;__GNUC_MINOR__;3;__GNUC_PATCHLEVEL__;0;__VERSION__;\"7.3.0\";__ATOMIC_RELAXED;0;__ATOMIC_SEQ_CST;5;__ATOMIC_ACQUIRE;2;__ATOMIC_RELEASE;3;__ATOMIC_ACQ_REL;4;__ATOMIC_CONSUME;1;__pic__;1;__PIC__;1;__FINITE_MATH_ONLY__;0;__SIZEOF_INT__;4;__SIZEOF_LONG__;4;__SIZEOF_LONG_LONG__;8;__SIZEOF_SHORT__;2;__SIZEOF_FLOAT__;4;__SIZEOF_DOUBLE__;8;__SIZEOF_LONG_DOUBLE__;16;__SIZEOF_SIZE_T__;8;__CHAR_BIT__;8;__BIGGEST_ALIGNMENT__;16;__ORDER_LITTLE_ENDIAN__;1234;__ORDER_BIG_ENDIAN__;4321;__ORDER_PDP_ENDIAN__;3412;__BYTE_ORDER__;__ORDER_LITTLE_ENDIAN__;__FLOAT_WORD_ORDER__;__ORDER_LITTLE_ENDIAN__;__SIZEOF_POINTER__;8;__GNUG__;7;__SIZE_TYPE__;long long unsigned int;__PTRDIFF_TYPE__;long long int;__WCHAR_TYPE__;short unsigned int;__WINT_TYPE__;short unsigned int;__INTMAX_TYPE__;long long int;__UINTMAX_TYPE__;long long unsigned int;__CHAR16_TYPE__;short unsigned int;__CHAR32_TYPE__;unsigned int;__SIG_ATOMIC_TYPE__;int;__INT8_TYPE__;signed char;__INT16_TYPE__;short int;__INT32_TYPE__;int;__INT64_TYPE__;long long int;__UINT8_TYPE__;unsigned char;__UINT16_TYPE__;short unsigned int;__UINT32_TYPE__;unsigned int;__UINT64_TYPE__;long long unsigned int;__INT_LEAST8_TYPE__;signed char;__INT_LEAST16_TYPE__;short int;__INT_LEAST32_TYPE__;int;__INT_LEAST64_TYPE__;long long int;__UINT_LEAST8_TYPE__;unsigned char;__UINT_LEAST16_TYPE__;short unsigned int;__UINT_LEAST32_TYPE__;unsigned int;__UINT_LEAST64_TYPE__;long long unsigned int;__INT_FAST8_TYPE__;signed char;__INT_FAST16_TYPE__;short int;__INT_FAST32_TYPE__;int;__INT_FAST64_TYPE__;long long int;__UINT_FAST8_TYPE__;unsigned char;__UINT_FAST16_TYPE__;short unsigned int;__UINT_FAST32_TYPE__;unsigned int;__UINT_FAST64_TYPE__;long long unsigned int;__INTPTR_TYPE__;long long int;__UINTPTR_TYPE__;long long unsigned int;__has_include(STR);__has_include__(STR);__has_include_next(STR);__has_include_next__(STR);__GXX_WEAK__;1;__DEPRECATED;1;__GXX_RTTI;1;__cpp_rtti;199711;__GXX_EXPERIMENTAL_CXX0X__;1;__cpp_binary_literals;201304;__cpp_hex_float;201603;__cpp_runtime_arrays;198712;__cpp_unicode_characters;200704;__cpp_raw_strings;200710;__cpp_unicode_literals;200710;__cpp_user_defined_literals;200809;__cpp_lambdas;200907;__cpp_range_based_for;200907;__cpp_static_assert;200410;__cpp_decltype;200707;__cpp_attributes;200809;__cpp_rvalue_reference;200610;__cpp_rvalue_references;200610;__cpp_variadic_templates;200704;__cpp_initializer_lists;200806;__cpp_delegating_constructors;200604;__cpp_nsdmi;200809;__cpp_inheriting_constructors;201511;__cpp_ref_qualifiers;200710;__cpp_alias_templates;200704;__cpp_return_type_deduction;201304;__cpp_init_captures;201304;__cpp_generic_lambdas;201304;__cpp_constexpr;201304;__cpp_decltype_auto;201304;__cpp_aggregate_nsdmi;201304;__cpp_variable_templates;201304;__cpp_digit_separators;201309;__cpp_sized_deallocation;201309;__cpp_threadsafe_static_init;200806;__EXCEPTIONS;1;__cpp_exceptions;199711;__GXX_ABI_VERSION;1011;__SCHAR_MAX__;0x7f;__SHRT_MAX__;0x7fff;__INT_MAX__;0x7fffffff;__LONG_MAX__;0x7fffffffL;__LONG_LONG_MAX__;0x7fffffffffffffffLL;__WCHAR_MAX__;0xffff;__WCHAR_MIN__;0;__WINT_MAX__;0xffff;__WINT_MIN__;0;__PTRDIFF_MAX__;0x7fffffffffffffffLL;__SIZE_MAX__;0xffffffffffffffffULL;__SCHAR_WIDTH__;8;__SHRT_WIDTH__;16;__INT_WIDTH__;32;__LONG_WIDTH__;32;__LONG_LONG_WIDTH__;64;__WCHAR_WIDTH__;16;__WINT_WIDTH__;16;__PTRDIFF_WIDTH__;64;__SIZE_WIDTH__;64;__GLIBCXX_TYPE_INT_N_0;__int128;__GLIBCXX_BITSIZE_INT_N_0;128;__INTMAX_MAX__;0x7fffffffffffffffLL;__INTMAX_C(c);c ## LL;__UINTMAX_MAX__;0xffffffffffffffffULL;__UINTMAX_C(c);c ## ULL;__INTMAX_WIDTH__;64;__SIG_ATOMIC_MAX__;0x7fffffff;__SIG_ATOMIC_MIN__;(-__SIG_ATOMIC_MAX__ - 1);__SIG_ATOMIC_WIDTH__;32;__INT8_MAX__;0x7f;__INT16_MAX__;0x7fff;__INT32_MAX__;0x7fffffff;__INT64_MAX__;0x7fffffffffffffffLL;__UINT8_MAX__;0xff;__UINT16_MAX__;0xffff;__UINT32_MAX__;0xffffffffU;__UINT64_MAX__;0xffffffffffffffffULL;__INT_LEAST8_MAX__;0x7f;__INT8_C(c);c;__INT_LEAST8_WIDTH__;8;__INT_LEAST16_MAX__;0x7fff;__INT16_C(c);c;__INT_LEAST16_WIDTH__;16;__INT_LEAST32_MAX__;0x7fffffff;__INT32_C(c);c;__INT_LEAST32_WIDTH__;32;__INT_LEAST64_MAX__;0x7fffffffffffffffLL;__INT64_C(c);c ## LL;__INT_LEAST64_WIDTH__;64;__UINT_LEAST8_MAX__;0xff;__UINT8_C(c);c;__UINT_LEAST16_MAX__;0xffff;__UINT16_C(c);c;__UINT_LEAST32_MAX__;0xffffffffU;__UINT32_C(c);c ## U;__UINT_LEAST64_MAX__;0xffffffffffffffffULL;__UINT64_C(c);c ## ULL;__INT_FAST8_MAX__;0x7f;__INT_FAST8_WIDTH__;8;__INT_FAST16_MAX__;0x7fff;__INT_FAST16_WIDTH__;16;__INT_FAST32_MAX__;0x7fffffff;__INT_FAST32_WIDTH__;32;__INT_FAST64_MAX__;0x7fffffffffffffffLL;__INT_FAST64_WIDTH__;64;__UINT_FAST8_MAX__;0xff;__UINT_FAST16_MAX__;0xffff;__UINT_FAST32_MAX__;0xffffffffU;__UINT_FAST64_MAX__;0xffffffffffffffffULL;__INTPTR_MAX__;0x7fffffffffffffffLL;__INTPTR_WIDTH__;64;__UINTPTR_MAX__;0xffffffffffffffffULL;__GCC_IEC_559;2;__GCC_IEC_559_COMPLEX;2;__FLT_EVAL_METHOD__;0;__FLT_EVAL_METHOD_TS_18661_3__;0;__DEC_EVAL_METHOD__;2;__FLT_RADIX__;2;__FLT_MANT_DIG__;24;__FLT_DIG__;6;__FLT_MIN_EXP__;(-125);__FLT_MIN_10_EXP__;(-37);__FLT_MAX_EXP__;128;__FLT_MAX_10_EXP__;38;__FLT_DECIMAL_DIG__;9;__FLT_MAX__;3.40282346638528859811704183484516925e+38F;__FLT_MIN__;1.17549435082228750796873653722224568e-38F;__FLT_EPSILON__;1.19209289550781250000000000000000000e-7F;__FLT_DENORM_MIN__;1.40129846432481707092372958328991613e-45F;__FLT_HAS_DENORM__;1;__FLT_HAS_INFINITY__;1;__FLT_HAS_QUIET_NAN__;1;__DBL_MANT_DIG__;53;__DBL_DIG__;15;__DBL_MIN_EXP__;(-1021);__DBL_MIN_10_EXP__;(-307);__DBL_MAX_EXP__;1024;__DBL_MAX_10_EXP__;308;__DBL_DECIMAL_DIG__;17;__DBL_MAX__;double(1.79769313486231570814527423731704357e+308L);__DBL_MIN__;double(2.22507385850720138309023271733240406e-308L);__DBL_EPSILON__;double(2.22044604925031308084726333618164062e-16L);__DBL_DENORM_MIN__;double(4.94065645841246544176568792868221372e-324L);__DBL_HAS_DENORM__;1;__DBL_HAS_INFINITY__;1;__DBL_HAS_QUIET_NAN__;1;__LDBL_MANT_DIG__;64;__LDBL_DIG__;18;__LDBL_MIN_EXP__;(-16381);__LDBL_MIN_10_EXP__;(-4931);__LDBL_MAX_EXP__;16384;__LDBL_MAX_10_EXP__;4932;__DECIMAL_DIG__;21;__LDBL_DECIMAL_DIG__;21;__LDBL_MAX__;1.18973149535723176502126385303097021e+4932L;__LDBL_MIN__;3.36210314311209350626267781732175260e-4932L;__LDBL_EPSILON__;1.08420217248550443400745280086994171e-19L;__LDBL_DENORM_MIN__;3.64519953188247460252840593361941982e-4951L;__LDBL_HAS_DENORM__;1;__LDBL_HAS_INFINITY__;1;__LDBL_HAS_QUIET_NAN__;1;__FLT32_MANT_DIG__;24;__FLT32_DIG__;6;__FLT32_MIN_EXP__;(-125);__FLT32_MIN_10_EXP__;(-37);__FLT32_MAX_EXP__;128;__FLT32_MAX_10_EXP__;38;__FLT32_DECIMAL_DIG__;9;__FLT32_MAX__;3.40282346638528859811704183484516925e+38F32;__FLT32_MIN__;1.17549435082228750796873653722224568e-38F32;__FLT32_EPSILON__;1.19209289550781250000000000000000000e-7F32;__FLT32_DENORM_MIN__;1.40129846432481707092372958328991613e-45F32;__FLT32_HAS_DENORM__;1;__FLT32_HAS_INFINITY__;1;__FLT32_HAS_QUIET_NAN__;1;__FLT64_MANT_DIG__;53;__FLT64_DIG__;15;__FLT64_MIN_EXP__;(-1021);__FLT64_MIN_10_EXP__;(-307);__FLT64_MAX_EXP__;1024;__FLT64_MAX_10_EXP__;308;__FLT64_DECIMAL_DIG__;17;__FLT64_MAX__;1.79769313486231570814527423731704357e+308F64;__FLT64_MIN__;2.22507385850720138309023271733240406e-308F64;__FLT64_EPSILON__;2.22044604925031308084726333618164062e-16F64;__FLT64_DENORM_MIN__;4.94065645841246544176568792868221372e-324F64;__FLT64_HAS_DENORM__;1;__FLT64_HAS_INFINITY__;1;__FLT64_HAS_QUIET_NAN__;1;__FLT128_MANT_DIG__;113;__FLT128_DIG__;33;__FLT128_MIN_EXP__;(-16381);__FLT128_MIN_10_EXP__;(-4931);__FLT128_MAX_EXP__;16384;__FLT128_MAX_10_EXP__;4932;__FLT128_DECIMAL_DIG__;36;__FLT128_MAX__;1.18973149535723176508575932662800702e+4932F128;__FLT128_MIN__;3.36210314311209350626267781732175260e-4932F128;__FLT128_EPSILON__;1.92592994438723585305597794258492732e-34F128;__FLT128_DENORM_MIN__;6.47517511943802511092443895822764655e-4966F128;__FLT128_HAS_DENORM__;1;__FLT128_HAS_INFINITY__;1;__FLT128_HAS_QUIET_NAN__;1;__FLT32X_MANT_DIG__;53;__FLT32X_DIG__;15;__FLT32X_MIN_EXP__;(-1021);__FLT32X_MIN_10_EXP__;(-307);__FLT32X_MAX_EXP__;1024;__FLT32X_MAX_10_EXP__;308;__FLT32X_DECIMAL_DIG__;17;__FLT32X_MAX__;1.79769313486231570814527423731704357e+308F32x;__FLT32X_MIN__;2.22507385850720138309023271733240406e-308F32x;__FLT32X_EPSILON__;2.22044604925031308084726333618164062e-16F32x;__FLT32X_DENORM_MIN__;4.94065645841246544176568792868221372e-324F32x;__FLT32X_HAS_DENORM__;1;__FLT32X_HAS_INFINITY__;1;__FLT32X_HAS_QUIET_NAN__;1;__FLT64X_MANT_DIG__;64;__FLT64X_DIG__;18;__FLT64X_MIN_EXP__;(-16381);__FLT64X_MIN_10_EXP__;(-4931);__FLT64X_MAX_EXP__;16384;__FLT64X_MAX_10_EXP__;4932;__FLT64X_DECIMAL_DIG__;21;__FLT64X_MAX__;1.18973149535723176502126385303097021e+4932F64x;__FLT64X_MIN__;3.36210314311209350626267781732175260e-4932F64x;__FLT64X_EPSILON__;1.08420217248550443400745280086994171e-19F64x;__FLT64X_DENORM_MIN__;3.64519953188247460252840593361941982e-4951F64x;__FLT64X_HAS_DENORM__;1;__FLT64X_HAS_INFINITY__;1;__FLT64X_HAS_QUIET_NAN__;1;__DEC32_MANT_DIG__;7;__DEC32_MIN_EXP__;(-94);__DEC32_MAX_EXP__;97;__DEC32_MIN__;1E-95DF;__DEC32_MAX__;9.999999E96DF;__DEC32_EPSILON__;1E-6DF;__DEC32_SUBNORMAL_MIN__;0.000001E-95DF;__DEC64_MANT_DIG__;16;__DEC64_MIN_EXP__;(-382);__DEC64_MAX_EXP__;385;__DEC64_MIN__;1E-383DD;__DEC64_MAX__;9.999999999999999E384DD;__DEC64_EPSILON__;1E-15DD;__DEC64_SUBNORMAL_MIN__;0.000000000000001E-383DD;__DEC128_MANT_DIG__;34;__DEC128_MIN_EXP__;(-6142);__DEC128_MAX_EXP__;6145;__DEC128_MIN__;1E-6143DL;__DEC128_MAX__;9.999999999999999999999999999999999E6144DL;__DEC128_EPSILON__;1E-33DL;__DEC128_SUBNORMAL_MIN__;0.000000000000000000000000000000001E-6143DL;__REGISTER_PREFIX__; ;__USER_LABEL_PREFIX__; ;__GNUC_STDC_INLINE__;1;__NO_INLINE__;1;__WCHAR_UNSIGNED__;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16;1;__GCC_ATOMIC_BOOL_LOCK_FREE;2;__GCC_ATOMIC_CHAR_LOCK_FREE;2;__GCC_ATOMIC_CHAR16_T_LOCK_FREE;2;__GCC_ATOMIC_CHAR32_T_LOCK_FREE;2;__GCC_ATOMIC_WCHAR_T_LOCK_FREE;2;__GCC_ATOMIC_SHORT_LOCK_FREE;2;__GCC_ATOMIC_INT_LOCK_FREE;2;__GCC_ATOMIC_LONG_LOCK_FREE;2;__GCC_ATOMIC_LLONG_LOCK_FREE;2;__GCC_ATOMIC_TEST_AND_SET_TRUEVAL;1;__GCC_ATOMIC_POINTER_LOCK_FREE;2;__PRAGMA_REDEFINE_EXTNAME;1;__SIZEOF_INT128__;16;__SIZEOF_WCHAR_T__;2;__SIZEOF_WINT_T__;2;__SIZEOF_PTRDIFF_T__;8;__amd64;1;__amd64__;1;__x86_64;1;__x86_64__;1;__SIZEOF_FLOAT80__;16;__SIZEOF_FLOAT128__;16;__ATOMIC_HLE_ACQUIRE;65536;__ATOMIC_HLE_RELEASE;131072;__GCC_ASM_FLAG_OUTPUTS__;1;__nocona;1;__nocona__;1;__tune_core2__;1;__code_model_medium__;1;__MMX__;1;__SSE__;1;__SSE2__;1;__SSE3__;1;__FXSR__;1;__SSE_MATH__;1;__SSE2_MATH__;1;__SEG_FS;1;__SEG_GS;1;__SEH__;1;__stdcall;__attribute__((__stdcall__));__fastcall;__attribute__((__fastcall__));__thiscall;__attribute__((__thiscall__));__cdecl;__attribute__((__cdecl__));_stdcall;__attribute__((__stdcall__));_fastcall;__attribute__((__fastcall__));_thiscall;__attribute__((__thiscall__));_cdecl;__attribute__((__cdecl__));__GXX_MERGED_TYPEINFO_NAMES;0;__GXX_TYPEINFO_EQUALITY_INLINE;0;__MSVCRT__;1;__MINGW32__;1;_WIN32;1;__WIN32;1;__WIN32__;1;WIN32;1;__WINNT;1;__WINNT__;1;WINNT;1;_INTEGRAL_MAX_BITS;64;__MINGW64__;1;__WIN64;1;__WIN64__;1;WIN64;1;_WIN64;1;__declspec(x);__attribute__((x));__DECIMAL_BID_FORMAT__;1;_REENTRANT;1" + }, + { + "name" : "CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "CXX compiler system include directories" + } + ], + "type" : "INTERNAL", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include" + }, + { + "name" : "CMAKE_EXTRA_GENERATOR_C_SYSTEM_DEFINED_MACROS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "C compiler system defined macros" + } + ], + "type" : "INTERNAL", + "value" : "__STDC__;1;__STDC_VERSION__;201112L;__STDC_UTF_16__;1;__STDC_UTF_32__;1;__STDC_HOSTED__;1;__GNUC__;7;__GNUC_MINOR__;3;__GNUC_PATCHLEVEL__;0;__VERSION__;\"7.3.0\";__ATOMIC_RELAXED;0;__ATOMIC_SEQ_CST;5;__ATOMIC_ACQUIRE;2;__ATOMIC_RELEASE;3;__ATOMIC_ACQ_REL;4;__ATOMIC_CONSUME;1;__pic__;1;__PIC__;1;__FINITE_MATH_ONLY__;0;__SIZEOF_INT__;4;__SIZEOF_LONG__;4;__SIZEOF_LONG_LONG__;8;__SIZEOF_SHORT__;2;__SIZEOF_FLOAT__;4;__SIZEOF_DOUBLE__;8;__SIZEOF_LONG_DOUBLE__;16;__SIZEOF_SIZE_T__;8;__CHAR_BIT__;8;__BIGGEST_ALIGNMENT__;16;__ORDER_LITTLE_ENDIAN__;1234;__ORDER_BIG_ENDIAN__;4321;__ORDER_PDP_ENDIAN__;3412;__BYTE_ORDER__;__ORDER_LITTLE_ENDIAN__;__FLOAT_WORD_ORDER__;__ORDER_LITTLE_ENDIAN__;__SIZEOF_POINTER__;8;__SIZE_TYPE__;long long unsigned int;__PTRDIFF_TYPE__;long long int;__WCHAR_TYPE__;short unsigned int;__WINT_TYPE__;short unsigned int;__INTMAX_TYPE__;long long int;__UINTMAX_TYPE__;long long unsigned int;__CHAR16_TYPE__;short unsigned int;__CHAR32_TYPE__;unsigned int;__SIG_ATOMIC_TYPE__;int;__INT8_TYPE__;signed char;__INT16_TYPE__;short int;__INT32_TYPE__;int;__INT64_TYPE__;long long int;__UINT8_TYPE__;unsigned char;__UINT16_TYPE__;short unsigned int;__UINT32_TYPE__;unsigned int;__UINT64_TYPE__;long long unsigned int;__INT_LEAST8_TYPE__;signed char;__INT_LEAST16_TYPE__;short int;__INT_LEAST32_TYPE__;int;__INT_LEAST64_TYPE__;long long int;__UINT_LEAST8_TYPE__;unsigned char;__UINT_LEAST16_TYPE__;short unsigned int;__UINT_LEAST32_TYPE__;unsigned int;__UINT_LEAST64_TYPE__;long long unsigned int;__INT_FAST8_TYPE__;signed char;__INT_FAST16_TYPE__;short int;__INT_FAST32_TYPE__;int;__INT_FAST64_TYPE__;long long int;__UINT_FAST8_TYPE__;unsigned char;__UINT_FAST16_TYPE__;short unsigned int;__UINT_FAST32_TYPE__;unsigned int;__UINT_FAST64_TYPE__;long long unsigned int;__INTPTR_TYPE__;long long int;__UINTPTR_TYPE__;long long unsigned int;__has_include(STR);__has_include__(STR);__has_include_next(STR);__has_include_next__(STR);__GXX_ABI_VERSION;1011;__SCHAR_MAX__;0x7f;__SHRT_MAX__;0x7fff;__INT_MAX__;0x7fffffff;__LONG_MAX__;0x7fffffffL;__LONG_LONG_MAX__;0x7fffffffffffffffLL;__WCHAR_MAX__;0xffff;__WCHAR_MIN__;0;__WINT_MAX__;0xffff;__WINT_MIN__;0;__PTRDIFF_MAX__;0x7fffffffffffffffLL;__SIZE_MAX__;0xffffffffffffffffULL;__SCHAR_WIDTH__;8;__SHRT_WIDTH__;16;__INT_WIDTH__;32;__LONG_WIDTH__;32;__LONG_LONG_WIDTH__;64;__WCHAR_WIDTH__;16;__WINT_WIDTH__;16;__PTRDIFF_WIDTH__;64;__SIZE_WIDTH__;64;__INTMAX_MAX__;0x7fffffffffffffffLL;__INTMAX_C(c);c ## LL;__UINTMAX_MAX__;0xffffffffffffffffULL;__UINTMAX_C(c);c ## ULL;__INTMAX_WIDTH__;64;__SIG_ATOMIC_MAX__;0x7fffffff;__SIG_ATOMIC_MIN__;(-__SIG_ATOMIC_MAX__ - 1);__SIG_ATOMIC_WIDTH__;32;__INT8_MAX__;0x7f;__INT16_MAX__;0x7fff;__INT32_MAX__;0x7fffffff;__INT64_MAX__;0x7fffffffffffffffLL;__UINT8_MAX__;0xff;__UINT16_MAX__;0xffff;__UINT32_MAX__;0xffffffffU;__UINT64_MAX__;0xffffffffffffffffULL;__INT_LEAST8_MAX__;0x7f;__INT8_C(c);c;__INT_LEAST8_WIDTH__;8;__INT_LEAST16_MAX__;0x7fff;__INT16_C(c);c;__INT_LEAST16_WIDTH__;16;__INT_LEAST32_MAX__;0x7fffffff;__INT32_C(c);c;__INT_LEAST32_WIDTH__;32;__INT_LEAST64_MAX__;0x7fffffffffffffffLL;__INT64_C(c);c ## LL;__INT_LEAST64_WIDTH__;64;__UINT_LEAST8_MAX__;0xff;__UINT8_C(c);c;__UINT_LEAST16_MAX__;0xffff;__UINT16_C(c);c;__UINT_LEAST32_MAX__;0xffffffffU;__UINT32_C(c);c ## U;__UINT_LEAST64_MAX__;0xffffffffffffffffULL;__UINT64_C(c);c ## ULL;__INT_FAST8_MAX__;0x7f;__INT_FAST8_WIDTH__;8;__INT_FAST16_MAX__;0x7fff;__INT_FAST16_WIDTH__;16;__INT_FAST32_MAX__;0x7fffffff;__INT_FAST32_WIDTH__;32;__INT_FAST64_MAX__;0x7fffffffffffffffLL;__INT_FAST64_WIDTH__;64;__UINT_FAST8_MAX__;0xff;__UINT_FAST16_MAX__;0xffff;__UINT_FAST32_MAX__;0xffffffffU;__UINT_FAST64_MAX__;0xffffffffffffffffULL;__INTPTR_MAX__;0x7fffffffffffffffLL;__INTPTR_WIDTH__;64;__UINTPTR_MAX__;0xffffffffffffffffULL;__GCC_IEC_559;2;__GCC_IEC_559_COMPLEX;2;__FLT_EVAL_METHOD__;0;__FLT_EVAL_METHOD_TS_18661_3__;0;__DEC_EVAL_METHOD__;2;__FLT_RADIX__;2;__FLT_MANT_DIG__;24;__FLT_DIG__;6;__FLT_MIN_EXP__;(-125);__FLT_MIN_10_EXP__;(-37);__FLT_MAX_EXP__;128;__FLT_MAX_10_EXP__;38;__FLT_DECIMAL_DIG__;9;__FLT_MAX__;3.40282346638528859811704183484516925e+38F;__FLT_MIN__;1.17549435082228750796873653722224568e-38F;__FLT_EPSILON__;1.19209289550781250000000000000000000e-7F;__FLT_DENORM_MIN__;1.40129846432481707092372958328991613e-45F;__FLT_HAS_DENORM__;1;__FLT_HAS_INFINITY__;1;__FLT_HAS_QUIET_NAN__;1;__DBL_MANT_DIG__;53;__DBL_DIG__;15;__DBL_MIN_EXP__;(-1021);__DBL_MIN_10_EXP__;(-307);__DBL_MAX_EXP__;1024;__DBL_MAX_10_EXP__;308;__DBL_DECIMAL_DIG__;17;__DBL_MAX__;((double)1.79769313486231570814527423731704357e+308L);__DBL_MIN__;((double)2.22507385850720138309023271733240406e-308L);__DBL_EPSILON__;((double)2.22044604925031308084726333618164062e-16L);__DBL_DENORM_MIN__;((double)4.94065645841246544176568792868221372e-324L);__DBL_HAS_DENORM__;1;__DBL_HAS_INFINITY__;1;__DBL_HAS_QUIET_NAN__;1;__LDBL_MANT_DIG__;64;__LDBL_DIG__;18;__LDBL_MIN_EXP__;(-16381);__LDBL_MIN_10_EXP__;(-4931);__LDBL_MAX_EXP__;16384;__LDBL_MAX_10_EXP__;4932;__DECIMAL_DIG__;21;__LDBL_DECIMAL_DIG__;21;__LDBL_MAX__;1.18973149535723176502126385303097021e+4932L;__LDBL_MIN__;3.36210314311209350626267781732175260e-4932L;__LDBL_EPSILON__;1.08420217248550443400745280086994171e-19L;__LDBL_DENORM_MIN__;3.64519953188247460252840593361941982e-4951L;__LDBL_HAS_DENORM__;1;__LDBL_HAS_INFINITY__;1;__LDBL_HAS_QUIET_NAN__;1;__FLT32_MANT_DIG__;24;__FLT32_DIG__;6;__FLT32_MIN_EXP__;(-125);__FLT32_MIN_10_EXP__;(-37);__FLT32_MAX_EXP__;128;__FLT32_MAX_10_EXP__;38;__FLT32_DECIMAL_DIG__;9;__FLT32_MAX__;3.40282346638528859811704183484516925e+38F32;__FLT32_MIN__;1.17549435082228750796873653722224568e-38F32;__FLT32_EPSILON__;1.19209289550781250000000000000000000e-7F32;__FLT32_DENORM_MIN__;1.40129846432481707092372958328991613e-45F32;__FLT32_HAS_DENORM__;1;__FLT32_HAS_INFINITY__;1;__FLT32_HAS_QUIET_NAN__;1;__FLT64_MANT_DIG__;53;__FLT64_DIG__;15;__FLT64_MIN_EXP__;(-1021);__FLT64_MIN_10_EXP__;(-307);__FLT64_MAX_EXP__;1024;__FLT64_MAX_10_EXP__;308;__FLT64_DECIMAL_DIG__;17;__FLT64_MAX__;1.79769313486231570814527423731704357e+308F64;__FLT64_MIN__;2.22507385850720138309023271733240406e-308F64;__FLT64_EPSILON__;2.22044604925031308084726333618164062e-16F64;__FLT64_DENORM_MIN__;4.94065645841246544176568792868221372e-324F64;__FLT64_HAS_DENORM__;1;__FLT64_HAS_INFINITY__;1;__FLT64_HAS_QUIET_NAN__;1;__FLT128_MANT_DIG__;113;__FLT128_DIG__;33;__FLT128_MIN_EXP__;(-16381);__FLT128_MIN_10_EXP__;(-4931);__FLT128_MAX_EXP__;16384;__FLT128_MAX_10_EXP__;4932;__FLT128_DECIMAL_DIG__;36;__FLT128_MAX__;1.18973149535723176508575932662800702e+4932F128;__FLT128_MIN__;3.36210314311209350626267781732175260e-4932F128;__FLT128_EPSILON__;1.92592994438723585305597794258492732e-34F128;__FLT128_DENORM_MIN__;6.47517511943802511092443895822764655e-4966F128;__FLT128_HAS_DENORM__;1;__FLT128_HAS_INFINITY__;1;__FLT128_HAS_QUIET_NAN__;1;__FLT32X_MANT_DIG__;53;__FLT32X_DIG__;15;__FLT32X_MIN_EXP__;(-1021);__FLT32X_MIN_10_EXP__;(-307);__FLT32X_MAX_EXP__;1024;__FLT32X_MAX_10_EXP__;308;__FLT32X_DECIMAL_DIG__;17;__FLT32X_MAX__;1.79769313486231570814527423731704357e+308F32x;__FLT32X_MIN__;2.22507385850720138309023271733240406e-308F32x;__FLT32X_EPSILON__;2.22044604925031308084726333618164062e-16F32x;__FLT32X_DENORM_MIN__;4.94065645841246544176568792868221372e-324F32x;__FLT32X_HAS_DENORM__;1;__FLT32X_HAS_INFINITY__;1;__FLT32X_HAS_QUIET_NAN__;1;__FLT64X_MANT_DIG__;64;__FLT64X_DIG__;18;__FLT64X_MIN_EXP__;(-16381);__FLT64X_MIN_10_EXP__;(-4931);__FLT64X_MAX_EXP__;16384;__FLT64X_MAX_10_EXP__;4932;__FLT64X_DECIMAL_DIG__;21;__FLT64X_MAX__;1.18973149535723176502126385303097021e+4932F64x;__FLT64X_MIN__;3.36210314311209350626267781732175260e-4932F64x;__FLT64X_EPSILON__;1.08420217248550443400745280086994171e-19F64x;__FLT64X_DENORM_MIN__;3.64519953188247460252840593361941982e-4951F64x;__FLT64X_HAS_DENORM__;1;__FLT64X_HAS_INFINITY__;1;__FLT64X_HAS_QUIET_NAN__;1;__DEC32_MANT_DIG__;7;__DEC32_MIN_EXP__;(-94);__DEC32_MAX_EXP__;97;__DEC32_MIN__;1E-95DF;__DEC32_MAX__;9.999999E96DF;__DEC32_EPSILON__;1E-6DF;__DEC32_SUBNORMAL_MIN__;0.000001E-95DF;__DEC64_MANT_DIG__;16;__DEC64_MIN_EXP__;(-382);__DEC64_MAX_EXP__;385;__DEC64_MIN__;1E-383DD;__DEC64_MAX__;9.999999999999999E384DD;__DEC64_EPSILON__;1E-15DD;__DEC64_SUBNORMAL_MIN__;0.000000000000001E-383DD;__DEC128_MANT_DIG__;34;__DEC128_MIN_EXP__;(-6142);__DEC128_MAX_EXP__;6145;__DEC128_MIN__;1E-6143DL;__DEC128_MAX__;9.999999999999999999999999999999999E6144DL;__DEC128_EPSILON__;1E-33DL;__DEC128_SUBNORMAL_MIN__;0.000000000000000000000000000000001E-6143DL;__REGISTER_PREFIX__; ;__USER_LABEL_PREFIX__; ;__GNUC_STDC_INLINE__;1;__NO_INLINE__;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16;1;__GCC_ATOMIC_BOOL_LOCK_FREE;2;__GCC_ATOMIC_CHAR_LOCK_FREE;2;__GCC_ATOMIC_CHAR16_T_LOCK_FREE;2;__GCC_ATOMIC_CHAR32_T_LOCK_FREE;2;__GCC_ATOMIC_WCHAR_T_LOCK_FREE;2;__GCC_ATOMIC_SHORT_LOCK_FREE;2;__GCC_ATOMIC_INT_LOCK_FREE;2;__GCC_ATOMIC_LONG_LOCK_FREE;2;__GCC_ATOMIC_LLONG_LOCK_FREE;2;__GCC_ATOMIC_TEST_AND_SET_TRUEVAL;1;__GCC_ATOMIC_POINTER_LOCK_FREE;2;__PRAGMA_REDEFINE_EXTNAME;1;__SIZEOF_INT128__;16;__SIZEOF_WCHAR_T__;2;__SIZEOF_WINT_T__;2;__SIZEOF_PTRDIFF_T__;8;__amd64;1;__amd64__;1;__x86_64;1;__x86_64__;1;__SIZEOF_FLOAT80__;16;__SIZEOF_FLOAT128__;16;__ATOMIC_HLE_ACQUIRE;65536;__ATOMIC_HLE_RELEASE;131072;__GCC_ASM_FLAG_OUTPUTS__;1;__nocona;1;__nocona__;1;__tune_core2__;1;__code_model_medium__;1;__MMX__;1;__SSE__;1;__SSE2__;1;__SSE3__;1;__FXSR__;1;__SSE_MATH__;1;__SSE2_MATH__;1;__SEG_FS;1;__SEG_GS;1;__SEH__;1;__stdcall;__attribute__((__stdcall__));__fastcall;__attribute__((__fastcall__));__thiscall;__attribute__((__thiscall__));__cdecl;__attribute__((__cdecl__));_stdcall;__attribute__((__stdcall__));_fastcall;__attribute__((__fastcall__));_thiscall;__attribute__((__thiscall__));_cdecl;__attribute__((__cdecl__));__GXX_MERGED_TYPEINFO_NAMES;0;__GXX_TYPEINFO_EQUALITY_INLINE;0;__MSVCRT__;1;__MINGW32__;1;_WIN32;1;__WIN32;1;__WIN32__;1;WIN32;1;__WINNT;1;__WINNT__;1;WINNT;1;_INTEGRAL_MAX_BITS;64;__MINGW64__;1;__WIN64;1;__WIN64__;1;WIN64;1;_WIN64;1;__declspec(x);__attribute__((x));__DECIMAL_BID_FORMAT__;1;_REENTRANT;1" + }, + { + "name" : "CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "C compiler system include directories" + } + ], + "type" : "INTERNAL", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include" + }, + { + "name" : "CMAKE_GENERATOR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator." + } + ], + "type" : "INTERNAL", + "value" : "MinGW Makefiles" + }, + { + "name" : "CMAKE_GENERATOR_INSTANCE", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Generator instance identifier." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_GENERATOR_PLATFORM", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator platform." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_GENERATOR_TOOLSET", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Name of generator toolset." + } + ], + "type" : "INTERNAL", + "value" : "" + }, + { + "name" : "CMAKE_HOME_DIRECTORY", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Source directory with the top level CMakeLists.txt file for this project" + } + ], + "type" : "INTERNAL", + "value" : "D:/03MyGit/arduino/esp32mainboard/weatherslave" + }, + { + "name" : "CMAKE_INSTALL_PREFIX", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Install path prefix, prepended onto install directories." + } + ], + "type" : "PATH", + "value" : "C:/Program Files (x86)/weatherslave" + }, + { + "name" : "CMAKE_LINKER", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ld.exe" + }, + { + "name" : "CMAKE_MAKE_PROGRAM", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/mingw32-make.exe" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_ESP_WROOM_02", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during ESP_WROOM_02 builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of modules during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_NM", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/nm.exe" + }, + { + "name" : "CMAKE_NUMBER_OF_MAKEFILES", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "number of local generators" + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_OBJCOPY", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/objcopy.exe" + }, + { + "name" : "CMAKE_OBJDUMP", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/objdump.exe" + }, + { + "name" : "CMAKE_PLATFORM_INFO_INITIALIZED", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Platform information initialized" + } + ], + "type" : "INTERNAL", + "value" : "1" + }, + { + "name" : "CMAKE_PROJECT_DESCRIPTION", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "" + }, + { + "name" : "CMAKE_PROJECT_HOMEPAGE_URL", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "" + }, + { + "name" : "CMAKE_PROJECT_NAME", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "weatherslave" + }, + { + "name" : "CMAKE_RANLIB", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ranlib.exe" + }, + { + "name" : "CMAKE_READELF", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/readelf.exe" + }, + { + "name" : "CMAKE_ROOT", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to CMake installation." + } + ], + "type" : "INTERNAL", + "value" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_ESP_WROOM_02", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during ESP_WROOM_02 builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of shared libraries during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_SKIP_INSTALL_RPATH", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If set, runtime paths are not added when installing shared libraries, but are added when building." + } + ], + "type" : "BOOL", + "value" : "NO" + }, + { + "name" : "CMAKE_SKIP_RPATH", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If set, runtime paths are not added when using shared libraries." + } + ], + "type" : "BOOL", + "value" : "NO" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during all build types." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_DEBUG", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during DEBUG builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_ESP_WROOM_02", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during ESP_WROOM_02 builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during MINSIZEREL builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_RELEASE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during RELEASE builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Flags used by the linker during the creation of static libraries during RELWITHDEBINFO builds." + } + ], + "type" : "STRING", + "value" : "" + }, + { + "name" : "CMAKE_STRIP", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/strip.exe" + }, + { + "name" : "CMAKE_VERBOSE_MAKEFILE", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo." + } + ], + "type" : "BOOL", + "value" : "FALSE" + }, + { + "name" : "ProcessorCount_cmd_getconf", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "ProcessorCount_cmd_getconf-NOTFOUND" + }, + { + "name" : "ProcessorCount_cmd_lsconf", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "ProcessorCount_cmd_lsconf-NOTFOUND" + }, + { + "name" : "ProcessorCount_cmd_machinfo", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "ProcessorCount_cmd_machinfo-NOTFOUND" + }, + { + "name" : "ProcessorCount_cmd_mpsched", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "ProcessorCount_cmd_mpsched-NOTFOUND" + }, + { + "name" : "ProcessorCount_cmd_nproc", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "ProcessorCount_cmd_nproc-NOTFOUND" + }, + { + "name" : "ProcessorCount_cmd_pidin", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "ProcessorCount_cmd_pidin-NOTFOUND" + }, + { + "name" : "ProcessorCount_cmd_psrinfo", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "ProcessorCount_cmd_psrinfo-NOTFOUND" + }, + { + "name" : "ProcessorCount_cmd_sysctl", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "ProcessorCount_cmd_sysctl-NOTFOUND" + }, + { + "name" : "ProcessorCount_cmd_sysinfo", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "ProcessorCount_cmd_sysinfo-NOTFOUND" + }, + { + "name" : "ProcessorCount_cmd_uname", + "properties" : + [ + { + "name" : "ADVANCED", + "value" : "1" + }, + { + "name" : "HELPSTRING", + "value" : "Path to a program." + } + ], + "type" : "FILEPATH", + "value" : "ProcessorCount_cmd_uname-NOTFOUND" + }, + { + "name" : "weatherslave_BINARY_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02" + }, + { + "name" : "weatherslave_IS_TOP_LEVEL", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "ON" + }, + { + "name" : "weatherslave_SOURCE_DIR", + "properties" : + [ + { + "name" : "HELPSTRING", + "value" : "Value Computed by CMake" + } + ], + "type" : "STATIC", + "value" : "D:/03MyGit/arduino/esp32mainboard/weatherslave" + } + ], + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } +} diff --git a/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/cmakeFiles-v1-643fbeb1996dd32a8b26.json b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/cmakeFiles-v1-643fbeb1996dd32a8b26.json new file mode 100644 index 0000000..c7222d4 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/cmakeFiles-v1-643fbeb1996dd32a8b26.json @@ -0,0 +1,139 @@ +{ + "inputs" : + [ + { + "path" : "CMakeLists.txt" + }, + { + "isGenerated" : true, + "path" : "cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CMakeSystem.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeSystemSpecificInitialize.cmake" + }, + { + "isGenerated" : true, + "path" : "cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CMakeCCompiler.cmake" + }, + { + "isGenerated" : true, + "path" : "cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CMakeCXXCompiler.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeSystemSpecificInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeGenericSystem.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeInitializeConfigs.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Platform/Generic.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeFindCodeBlocks.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/ProcessorCount.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeLanguageInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-C.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/CMakeCommonCompilerMacros.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Platform/Generic.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCommonLanguageInclude.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCXXInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeLanguageInformation.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-CXX.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Platform/Generic.cmake" + }, + { + "isCMake" : true, + "isExternal" : true, + "path" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCommonLanguageInclude.cmake" + }, + { + "path" : "CMakeListsPrivate.txt" + } + ], + "kind" : "cmakeFiles", + "paths" : + { + "build" : "D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02", + "source" : "D:/03MyGit/arduino/esp32mainboard/weatherslave" + }, + "version" : + { + "major" : 1, + "minor" : 0 + } +} diff --git a/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/codemodel-v2-abde2250b6a7e865cdeb.json b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/codemodel-v2-abde2250b6a7e865cdeb.json new file mode 100644 index 0000000..5d61b45 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/codemodel-v2-abde2250b6a7e865cdeb.json @@ -0,0 +1,78 @@ +{ + "configurations" : + [ + { + "directories" : + [ + { + "build" : ".", + "jsonFile" : "directory-.-esp_wroom_02-d0094a50bb2071803777.json", + "minimumCMakeVersion" : + { + "string" : "3.13" + }, + "projectIndex" : 0, + "source" : ".", + "targetIndexes" : + [ + 0, + 1, + 2 + ] + } + ], + "name" : "esp_wroom_02", + "projects" : + [ + { + "directoryIndexes" : + [ + 0 + ], + "name" : "weatherslave", + "targetIndexes" : + [ + 0, + 1, + 2 + ] + } + ], + "targets" : + [ + { + "directoryIndex" : 0, + "id" : "Debug::@6890427a1f51a3e7e1df", + "jsonFile" : "target-Debug-esp_wroom_02-2cb3bb0fa7f752965bbf.json", + "name" : "Debug", + "projectIndex" : 0 + }, + { + "directoryIndex" : 0, + "id" : "Production::@6890427a1f51a3e7e1df", + "jsonFile" : "target-Production-esp_wroom_02-a4267d0935582fcf1589.json", + "name" : "Production", + "projectIndex" : 0 + }, + { + "directoryIndex" : 0, + "id" : "Z_DUMMY_TARGET::@6890427a1f51a3e7e1df", + "jsonFile" : "target-Z_DUMMY_TARGET-esp_wroom_02-5b74bc48ced322022f18.json", + "name" : "Z_DUMMY_TARGET", + "projectIndex" : 0 + } + ] + } + ], + "kind" : "codemodel", + "paths" : + { + "build" : "D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02", + "source" : "D:/03MyGit/arduino/esp32mainboard/weatherslave" + }, + "version" : + { + "major" : 2, + "minor" : 3 + } +} diff --git a/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/directory-.-esp_wroom_02-d0094a50bb2071803777.json b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/directory-.-esp_wroom_02-d0094a50bb2071803777.json new file mode 100644 index 0000000..3a67af9 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/directory-.-esp_wroom_02-d0094a50bb2071803777.json @@ -0,0 +1,14 @@ +{ + "backtraceGraph" : + { + "commands" : [], + "files" : [], + "nodes" : [] + }, + "installers" : [], + "paths" : + { + "build" : ".", + "source" : "." + } +} diff --git a/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/index-2022-04-27T04-57-28-0448.json b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/index-2022-04-27T04-57-28-0448.json new file mode 100644 index 0000000..539bc35 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/index-2022-04-27T04-57-28-0448.json @@ -0,0 +1,108 @@ +{ + "cmake" : + { + "generator" : + { + "multiConfig" : false, + "name" : "MinGW Makefiles" + }, + "paths" : + { + "cmake" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/cmake.exe", + "cpack" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/cpack.exe", + "ctest" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/ctest.exe", + "root" : "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21" + }, + "version" : + { + "isDirty" : false, + "major" : 3, + "minor" : 21, + "patch" : 1, + "string" : "3.21.1", + "suffix" : "" + } + }, + "objects" : + [ + { + "jsonFile" : "codemodel-v2-abde2250b6a7e865cdeb.json", + "kind" : "codemodel", + "version" : + { + "major" : 2, + "minor" : 3 + } + }, + { + "jsonFile" : "cache-v2-c97b4c610811fbf22484.json", + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } + }, + { + "jsonFile" : "cmakeFiles-v1-643fbeb1996dd32a8b26.json", + "kind" : "cmakeFiles", + "version" : + { + "major" : 1, + "minor" : 0 + } + }, + { + "jsonFile" : "toolchains-v1-4bdc8f4b982f82c54b45.json", + "kind" : "toolchains", + "version" : + { + "major" : 1, + "minor" : 0 + } + } + ], + "reply" : + { + "cache-v2" : + { + "jsonFile" : "cache-v2-c97b4c610811fbf22484.json", + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } + }, + "cmakeFiles-v1" : + { + "jsonFile" : "cmakeFiles-v1-643fbeb1996dd32a8b26.json", + "kind" : "cmakeFiles", + "version" : + { + "major" : 1, + "minor" : 0 + } + }, + "codemodel-v2" : + { + "jsonFile" : "codemodel-v2-abde2250b6a7e865cdeb.json", + "kind" : "codemodel", + "version" : + { + "major" : 2, + "minor" : 3 + } + }, + "toolchains-v1" : + { + "jsonFile" : "toolchains-v1-4bdc8f4b982f82c54b45.json", + "kind" : "toolchains", + "version" : + { + "major" : 1, + "minor" : 0 + } + } + } +} diff --git a/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/target-Debug-esp_wroom_02-2cb3bb0fa7f752965bbf.json b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/target-Debug-esp_wroom_02-2cb3bb0fa7f752965bbf.json new file mode 100644 index 0000000..5ca2276 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/target-Debug-esp_wroom_02-2cb3bb0fa7f752965bbf.json @@ -0,0 +1,66 @@ +{ + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_custom_target" + ], + "files" : + [ + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 27, + "parent" : 0 + } + ] + }, + "id" : "Debug::@6890427a1f51a3e7e1df", + "name" : "Debug", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "", + "sourceIndexes" : + [ + 0 + ] + }, + { + "name" : "CMake Rules", + "sourceIndexes" : + [ + 1 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "isGenerated" : true, + "path" : "cmake-build-esp_wroom_02/CMakeFiles/Debug", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 0, + "isGenerated" : true, + "path" : "cmake-build-esp_wroom_02/CMakeFiles/Debug.rule", + "sourceGroupIndex" : 1 + } + ], + "type" : "UTILITY" +} diff --git a/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/target-Production-esp_wroom_02-a4267d0935582fcf1589.json b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/target-Production-esp_wroom_02-a4267d0935582fcf1589.json new file mode 100644 index 0000000..b1c6169 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/target-Production-esp_wroom_02-a4267d0935582fcf1589.json @@ -0,0 +1,66 @@ +{ + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_custom_target" + ], + "files" : + [ + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 21, + "parent" : 0 + } + ] + }, + "id" : "Production::@6890427a1f51a3e7e1df", + "name" : "Production", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "", + "sourceIndexes" : + [ + 0 + ] + }, + { + "name" : "CMake Rules", + "sourceIndexes" : + [ + 1 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "isGenerated" : true, + "path" : "cmake-build-esp_wroom_02/CMakeFiles/Production", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 0, + "isGenerated" : true, + "path" : "cmake-build-esp_wroom_02/CMakeFiles/Production.rule", + "sourceGroupIndex" : 1 + } + ], + "type" : "UTILITY" +} diff --git a/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/target-Z_DUMMY_TARGET-esp_wroom_02-5b74bc48ced322022f18.json b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/target-Z_DUMMY_TARGET-esp_wroom_02-5b74bc48ced322022f18.json new file mode 100644 index 0000000..fe78cb0 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/target-Z_DUMMY_TARGET-esp_wroom_02-5b74bc48ced322022f18.json @@ -0,0 +1,1022 @@ +{ + "artifacts" : + [ + { + "path" : "Z_DUMMY_TARGET" + } + ], + "backtrace" : 1, + "backtraceGraph" : + { + "commands" : + [ + "add_executable", + "add_definitions", + "include", + "include_directories" + ], + "files" : + [ + "CMakeLists.txt", + "CMakeListsPrivate.txt" + ], + "nodes" : + [ + { + "file" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 33, + "parent" : 0 + }, + { + "command" : 2, + "file" : 0, + "line" : 15, + "parent" : 0 + }, + { + "file" : 1, + "parent" : 2 + }, + { + "command" : 1, + "file" : 1, + "line" : 32, + "parent" : 3 + }, + { + "command" : 1, + "file" : 1, + "line" : 27, + "parent" : 3 + }, + { + "command" : 1, + "file" : 1, + "line" : 33, + "parent" : 3 + }, + { + "command" : 1, + "file" : 1, + "line" : 28, + "parent" : 3 + }, + { + "command" : 1, + "file" : 1, + "line" : 26, + "parent" : 3 + }, + { + "command" : 1, + "file" : 1, + "line" : 34, + "parent" : 3 + }, + { + "command" : 1, + "file" : 1, + "line" : 29, + "parent" : 3 + }, + { + "command" : 1, + "file" : 1, + "line" : 31, + "parent" : 3 + }, + { + "command" : 1, + "file" : 1, + "line" : 38, + "parent" : 3 + }, + { + "command" : 1, + "file" : 1, + "line" : 39, + "parent" : 3 + }, + { + "command" : 1, + "file" : 1, + "line" : 35, + "parent" : 3 + }, + { + "command" : 1, + "file" : 1, + "line" : 42, + "parent" : 3 + }, + { + "command" : 1, + "file" : 1, + "line" : 41, + "parent" : 3 + }, + { + "command" : 1, + "file" : 1, + "line" : 36, + "parent" : 3 + }, + { + "command" : 1, + "file" : 1, + "line" : 25, + "parent" : 3 + }, + { + "command" : 1, + "file" : 1, + "line" : 37, + "parent" : 3 + }, + { + "command" : 1, + "file" : 1, + "line" : 40, + "parent" : 3 + }, + { + "command" : 1, + "file" : 1, + "line" : 30, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 44, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 45, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 46, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 47, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 48, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 49, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 50, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 51, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 52, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 53, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 54, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 55, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 56, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 57, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 58, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 59, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 60, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 61, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 62, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 63, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 64, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 65, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 66, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 67, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 68, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 69, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 70, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 71, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 72, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 73, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 74, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 75, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 76, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 77, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 78, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 79, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 80, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 81, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 82, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 83, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 84, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 85, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 86, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 87, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 88, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 89, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 90, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 91, + "parent" : 3 + }, + { + "command" : 3, + "file" : 1, + "line" : 92, + "parent" : 3 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-fno-rtti -std=gnu++17 -fno-exceptions -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -D_GNU_SOURCE -ffunction-sections -fdata-sections -Wall -Werror=return-type -free -fipa-pta" + }, + { + "fragment" : "-std=gnu++1z" + } + ], + "defines" : + [ + { + "backtrace" : 4, + "define" : "ARDUINO=10805" + }, + { + "backtrace" : 5, + "define" : "ARDUINO_ARCH_ESP8266" + }, + { + "backtrace" : 6, + "define" : "ARDUINO_BOARD=\"PLATFORMIO_ESP_WROOM_02\"" + }, + { + "backtrace" : 7, + "define" : "ARDUINO_ESP8266_ESP_WROOM_02" + }, + { + "backtrace" : 8, + "define" : "ESP8266" + }, + { + "backtrace" : 9, + "define" : "FLASHMODE_QIO" + }, + { + "backtrace" : 10, + "define" : "F_CPU=80000000L" + }, + { + "backtrace" : 11, + "define" : "ICACHE_FLASH" + }, + { + "backtrace" : 12, + "define" : "LWIP_FEATURES=1" + }, + { + "backtrace" : 13, + "define" : "LWIP_IPV6=0" + }, + { + "backtrace" : 14, + "define" : "LWIP_OPEN_SRC" + }, + { + "backtrace" : 15, + "define" : "MMU_ICACHE_SIZE=0x8000" + }, + { + "backtrace" : 16, + "define" : "MMU_IRAM_SIZE=0x8000" + }, + { + "backtrace" : 17, + "define" : "NONOSDK22x_190703=1" + }, + { + "backtrace" : 18, + "define" : "PLATFORMIO=50205" + }, + { + "backtrace" : 19, + "define" : "TCP_MSS=536" + }, + { + "backtrace" : 20, + "define" : "VTABLES_IN_FLASH" + }, + { + "backtrace" : 21, + "define" : "__ets__" + } + ], + "includes" : + [ + { + "backtrace" : 22, + "path" : "D:/03MyGit/arduino/esp32mainboard/weatherslave/include" + }, + { + "backtrace" : 23, + "path" : "D:/03MyGit/arduino/esp32mainboard/weatherslave/src" + }, + { + "backtrace" : 24, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/SoftwareSerial/src" + }, + { + "backtrace" : 25, + "path" : "D:/03MyGit/arduino/esp32mainboard/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library" + }, + { + "backtrace" : 26, + "path" : "D:/03MyGit/arduino/esp32mainboard/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO" + }, + { + "backtrace" : 27, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/SPI" + }, + { + "backtrace" : 28, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/Wire" + }, + { + "backtrace" : 29, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/tools/sdk/include" + }, + { + "backtrace" : 30, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/cores/esp8266" + }, + { + "backtrace" : 31, + "path" : "C:/Users/xin/.platformio/packages/toolchain-xtensa/include" + }, + { + "backtrace" : 32, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip2/include" + }, + { + "backtrace" : 33, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/variants/nodemcu" + }, + { + "backtrace" : 34, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/ArduinoOTA" + }, + { + "backtrace" : 35, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/DNSServer/src" + }, + { + "backtrace" : 36, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/EEPROM" + }, + { + "backtrace" : 37, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266AVRISP/src" + }, + { + "backtrace" : 38, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266HTTPClient/src" + }, + { + "backtrace" : 39, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266HTTPUpdateServer/src" + }, + { + "backtrace" : 40, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266LLMNR" + }, + { + "backtrace" : 41, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266NetBIOS" + }, + { + "backtrace" : 42, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266SSDP" + }, + { + "backtrace" : 43, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266SdFat/src" + }, + { + "backtrace" : 44, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WebServer/src" + }, + { + "backtrace" : 45, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFi/src" + }, + { + "backtrace" : 46, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFiMesh/src" + }, + { + "backtrace" : 47, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266httpUpdate/src" + }, + { + "backtrace" : 48, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266mDNS/src" + }, + { + "backtrace" : 49, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/Ethernet/src" + }, + { + "backtrace" : 50, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/GDBStub/src" + }, + { + "backtrace" : 51, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/Hash/src" + }, + { + "backtrace" : 52, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/I2S/src" + }, + { + "backtrace" : 53, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/LittleFS/src" + }, + { + "backtrace" : 54, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/Netdump/src" + }, + { + "backtrace" : 55, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/SD/src" + }, + { + "backtrace" : 56, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/SDFS/src" + }, + { + "backtrace" : 57, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/SPISlave/src" + }, + { + "backtrace" : 58, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/Servo/src" + }, + { + "backtrace" : 59, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/TFT_Touch_Shield_V2" + }, + { + "backtrace" : 60, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/Ticker/src" + }, + { + "backtrace" : 61, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/esp8266/src" + }, + { + "backtrace" : 62, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/lwIP_PPP/src" + }, + { + "backtrace" : 63, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/lwIP_enc28j60/src" + }, + { + "backtrace" : 64, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/lwIP_w5100/src" + }, + { + "backtrace" : 65, + "path" : "C:/Users/xin/.platformio/packages/framework-arduinoespressif8266/libraries/lwIP_w5500/src" + }, + { + "backtrace" : 66, + "path" : "C:/Users/xin/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0" + }, + { + "backtrace" : 67, + "path" : "C:/Users/xin/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/xtensa-lx106-elf" + }, + { + "backtrace" : 68, + "path" : "C:/Users/xin/.platformio/packages/toolchain-xtensa/lib/gcc/xtensa-lx106-elf/10.3.0/include" + }, + { + "backtrace" : 69, + "path" : "C:/Users/xin/.platformio/packages/toolchain-xtensa/lib/gcc/xtensa-lx106-elf/10.3.0/include-fixed" + }, + { + "backtrace" : 70, + "path" : "C:/Users/xin/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include" + } + ], + "language" : "CXX", + "languageStandard" : + { + "backtraces" : + [ + 1 + ], + "standard" : "17" + }, + "sourceIndexes" : + [ + 0, + 5, + 7, + 10, + 28 + ] + } + ], + "id" : "Z_DUMMY_TARGET::@6890427a1f51a3e7e1df", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "-fno-rtti -std=gnu++17 -fno-exceptions -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -D_GNU_SOURCE -ffunction-sections -fdata-sections -Wall -Werror=return-type -free -fipa-pta", + "role" : "flags" + }, + { + "fragment" : "", + "role" : "flags" + } + ], + "language" : "CXX" + }, + "name" : "Z_DUMMY_TARGET", + "nameOnDisk" : "Z_DUMMY_TARGET", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0, + 5, + 7, + 10, + 28 + ] + }, + { + "name" : "", + "sourceIndexes" : + [ + 1, + 2, + 3, + 4, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 30, + 31, + 32, + 33, + 34, + 35 + ] + }, + { + "name" : "Header Files", + "sourceIndexes" : + [ + 6, + 8, + 9, + 11, + 29 + ] + } + ], + "sources" : + [ + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : "src/main.cpp", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/.github/ISSUE_TEMPLATE.md", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/.github/PULL_REQUEST_TEMPLATE.md", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/.github/workflows/githubci.yml", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/.piopm", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_BusIO_Register.cpp", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_BusIO_Register.h", + "sourceGroupIndex" : 2 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_I2CDevice.cpp", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_I2CDevice.h", + "sourceGroupIndex" : 2 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_I2CRegister.h", + "sourceGroupIndex" : 2 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_SPIDevice.cpp", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_SPIDevice.h", + "sourceGroupIndex" : 2 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/CMakeLists.txt", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/README.md", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/component.mk", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/i2c_address_detect/i2c_address_detect.ino", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/i2c_readwrite/i2c_readwrite.ino", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/i2c_registers/i2c_registers.ino", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/i2corspi_register/i2corspi_register.ino", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/spi_modetest/spi_modetest.ino", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/spi_readwrite/spi_readwrite.ino", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/spi_register_bits/spi_register_bits.ino", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/examples/spi_registers/spi_registers.ino", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit BusIO/library.properties", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/.github/ISSUE_TEMPLATE.md", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/.github/PULL_REQUEST_TEMPLATE.md", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/.github/workflows/githubci.yml", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/.piopm", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "compileGroupIndex" : 0, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/Adafruit_MLX90614.cpp", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/Adafruit_MLX90614.h", + "sourceGroupIndex" : 2 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/README.md", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/code-of-conduct.md", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/examples/mlx_set_emissivity/mlx_set_emissivity.ino", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/examples/mlxtest/mlxtest.ino", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/library.properties", + "sourceGroupIndex" : 1 + }, + { + "backtrace" : 1, + "path" : ".pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/license.txt", + "sourceGroupIndex" : 1 + } + ], + "type" : "EXECUTABLE" +} diff --git a/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/toolchains-v1-4bdc8f4b982f82c54b45.json b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/toolchains-v1-4bdc8f4b982f82c54b45.json new file mode 100644 index 0000000..d540d2c --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/.cmake/api/v1/reply/toolchains-v1-4bdc8f4b982f82c54b45.json @@ -0,0 +1,62 @@ +{ + "kind" : "toolchains", + "toolchains" : + [ + { + "compiler" : + { + "id" : "GNU", + "implicit" : + { + "includeDirectories" : [], + "linkDirectories" : [], + "linkFrameworkDirectories" : [], + "linkLibraries" : [] + }, + "path" : "C:/Users/xin/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-gcc.exe", + "version" : "7.3.0" + }, + "language" : "C", + "sourceFileExtensions" : + [ + "c", + "m" + ] + }, + { + "compiler" : + { + "id" : "GNU", + "implicit" : + { + "includeDirectories" : [], + "linkDirectories" : [], + "linkFrameworkDirectories" : [], + "linkLibraries" : [] + }, + "path" : "C:/Users/xin/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-g++.exe", + "version" : "7.3.0" + }, + "language" : "CXX", + "sourceFileExtensions" : + [ + "C", + "M", + "c++", + "cc", + "cpp", + "cxx", + "mm", + "mpp", + "CPP", + "ixx", + "cppm" + ] + } + ], + "version" : + { + "major" : 1, + "minor" : 0 + } +} diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeCache.txt b/weatherslave/cmake-build-esp_wroom_02/CMakeCache.txt new file mode 100644 index 0000000..1ab1632 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeCache.txt @@ -0,0 +1,463 @@ +# This is the CMakeCache file. +# For build in directory: d:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02 +# It was generated by CMake: C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/cmake.exe +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Path to a program. +CMAKE_ADDR2LINE:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/addr2line.exe + +//Path to a program. +CMAKE_AR:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ar.exe + +//Choose the type of build, options are: None Debug Release RelWithDebInfo +// MinSizeRel ... +CMAKE_BUILD_TYPE:STRING=esp_wroom_02 + +//Id string of the compiler for the CodeBlocks IDE. Automatically +// detected when left empty +CMAKE_CODEBLOCKS_COMPILER_ID:STRING= + +//The CodeBlocks executable +CMAKE_CODEBLOCKS_EXECUTABLE:FILEPATH=CMAKE_CODEBLOCKS_EXECUTABLE-NOTFOUND + +//Additional command line arguments when CodeBlocks invokes make. +// Enter e.g. -j to get parallel builds +CMAKE_CODEBLOCKS_MAKE_ARGUMENTS:STRING= + +//Enable/Disable color output during build. +CMAKE_COLOR_MAKEFILE:BOOL=ON + +//Build Types reflect PlatformIO Environments +CMAKE_CONFIGURATION_TYPES:STRING=esp_wroom_02 + +//CXX compiler +CMAKE_CXX_COMPILER:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/g++.exe + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_AR:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ar.exe + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_RANLIB:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ranlib.exe + +//Flags used by the CXX compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the CXX compiler during DEBUG builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=-g + +//Flags used by the CXX compiler during ESP_WROOM_02 builds. +CMAKE_CXX_FLAGS_ESP_WROOM_02:STRING= + +//Flags used by the CXX compiler during MINSIZEREL builds. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the CXX compiler during RELEASE builds. +CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the CXX compiler during RELWITHDEBINFO builds. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//C compiler +CMAKE_C_COMPILER:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc.exe + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_AR:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ar.exe + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_RANLIB:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ranlib.exe + +//Flags used by the C compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the C compiler during DEBUG builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the C compiler during ESP_WROOM_02 builds. +CMAKE_C_FLAGS_ESP_WROOM_02:STRING= + +//Flags used by the C compiler during MINSIZEREL builds. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the C compiler during RELEASE builds. +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the C compiler during RELWITHDEBINFO builds. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Path to a program. +CMAKE_DLLTOOL:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/dlltool.exe + +//Flags used by the linker during all build types. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during DEBUG builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during ESP_WROOM_02 builds. +CMAKE_EXE_LINKER_FLAGS_ESP_WROOM_02:STRING= + +//Flags used by the linker during MINSIZEREL builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during RELEASE builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during RELWITHDEBINFO builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/weatherslave + +//Path to a program. +CMAKE_LINKER:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ld.exe + +//Path to a program. +CMAKE_MAKE_PROGRAM:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/mingw32-make.exe + +//Flags used by the linker during the creation of modules during +// all build types. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of modules during +// DEBUG builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of modules during +// ESP_WROOM_02 builds. +CMAKE_MODULE_LINKER_FLAGS_ESP_WROOM_02:STRING= + +//Flags used by the linker during the creation of modules during +// MINSIZEREL builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of modules during +// RELEASE builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of modules during +// RELWITHDEBINFO builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/nm.exe + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/objcopy.exe + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/objdump.exe + +//Value Computed by CMake +CMAKE_PROJECT_DESCRIPTION:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_HOMEPAGE_URL:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=weatherslave + +//Path to a program. +CMAKE_RANLIB:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ranlib.exe + +//Path to a program. +CMAKE_READELF:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/readelf.exe + +//Flags used by the linker during the creation of shared libraries +// during all build types. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of shared libraries +// during DEBUG builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of shared libraries +// during ESP_WROOM_02 builds. +CMAKE_SHARED_LINKER_FLAGS_ESP_WROOM_02:STRING= + +//Flags used by the linker during the creation of shared libraries +// during MINSIZEREL builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELEASE builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELWITHDEBINFO builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries +// during all build types. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of static libraries +// during DEBUG builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of static libraries +// during ESP_WROOM_02 builds. +CMAKE_STATIC_LINKER_FLAGS_ESP_WROOM_02:STRING= + +//Flags used by the linker during the creation of static libraries +// during MINSIZEREL builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELEASE builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELWITHDEBINFO builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/strip.exe + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Path to a program. +ProcessorCount_cmd_getconf:FILEPATH=ProcessorCount_cmd_getconf-NOTFOUND + +//Path to a program. +ProcessorCount_cmd_lsconf:FILEPATH=ProcessorCount_cmd_lsconf-NOTFOUND + +//Path to a program. +ProcessorCount_cmd_machinfo:FILEPATH=ProcessorCount_cmd_machinfo-NOTFOUND + +//Path to a program. +ProcessorCount_cmd_mpsched:FILEPATH=ProcessorCount_cmd_mpsched-NOTFOUND + +//Path to a program. +ProcessorCount_cmd_nproc:FILEPATH=ProcessorCount_cmd_nproc-NOTFOUND + +//Path to a program. +ProcessorCount_cmd_pidin:FILEPATH=ProcessorCount_cmd_pidin-NOTFOUND + +//Path to a program. +ProcessorCount_cmd_psrinfo:FILEPATH=ProcessorCount_cmd_psrinfo-NOTFOUND + +//Path to a program. +ProcessorCount_cmd_sysctl:FILEPATH=ProcessorCount_cmd_sysctl-NOTFOUND + +//Path to a program. +ProcessorCount_cmd_sysinfo:FILEPATH=ProcessorCount_cmd_sysinfo-NOTFOUND + +//Path to a program. +ProcessorCount_cmd_uname:FILEPATH=ProcessorCount_cmd_uname-NOTFOUND + +//Value Computed by CMake +weatherslave_BINARY_DIR:STATIC=D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02 + +//Value Computed by CMake +weatherslave_IS_TOP_LEVEL:STATIC=ON + +//Value Computed by CMake +weatherslave_SOURCE_DIR:STATIC=D:/03MyGit/arduino/esp32mainboard/weatherslave + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_ADDR2LINE +CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=d:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02 +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=21 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 +//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE +CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/cmake.exe +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/cpack.exe +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/bin/ctest.exe +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR +CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB +CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_ESP_WROOM_02 +CMAKE_CXX_FLAGS_ESP_WROOM_02-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_AR +CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB +CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_ESP_WROOM_02 +CMAKE_C_FLAGS_ESP_WROOM_02-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_DLLTOOL +CMAKE_DLLTOOL-ADVANCED:INTERNAL=1 +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_ESP_WROOM_02 +CMAKE_EXE_LINKER_FLAGS_ESP_WROOM_02-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL=CodeBlocks +//CXX compiler system defined macros +CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_DEFINED_MACROS:INTERNAL=__STDC__;1;__STDC_VERSION__;201112L;__STDC_UTF_16__;1;__STDC_UTF_32__;1;__STDC_HOSTED__;1;__GNUC__;7;__GNUC_MINOR__;3;__GNUC_PATCHLEVEL__;0;__VERSION__;"7.3.0";__ATOMIC_RELAXED;0;__ATOMIC_SEQ_CST;5;__ATOMIC_ACQUIRE;2;__ATOMIC_RELEASE;3;__ATOMIC_ACQ_REL;4;__ATOMIC_CONSUME;1;__pic__;1;__PIC__;1;__FINITE_MATH_ONLY__;0;__SIZEOF_INT__;4;__SIZEOF_LONG__;4;__SIZEOF_LONG_LONG__;8;__SIZEOF_SHORT__;2;__SIZEOF_FLOAT__;4;__SIZEOF_DOUBLE__;8;__SIZEOF_LONG_DOUBLE__;16;__SIZEOF_SIZE_T__;8;__CHAR_BIT__;8;__BIGGEST_ALIGNMENT__;16;__ORDER_LITTLE_ENDIAN__;1234;__ORDER_BIG_ENDIAN__;4321;__ORDER_PDP_ENDIAN__;3412;__BYTE_ORDER__;__ORDER_LITTLE_ENDIAN__;__FLOAT_WORD_ORDER__;__ORDER_LITTLE_ENDIAN__;__SIZEOF_POINTER__;8;__SIZE_TYPE__;long long unsigned int;__PTRDIFF_TYPE__;long long int;__WCHAR_TYPE__;short unsigned int;__WINT_TYPE__;short unsigned int;__INTMAX_TYPE__;long long int;__UINTMAX_TYPE__;long long unsigned int;__CHAR16_TYPE__;short unsigned int;__CHAR32_TYPE__;unsigned int;__SIG_ATOMIC_TYPE__;int;__INT8_TYPE__;signed char;__INT16_TYPE__;short int;__INT32_TYPE__;int;__INT64_TYPE__;long long int;__UINT8_TYPE__;unsigned char;__UINT16_TYPE__;short unsigned int;__UINT32_TYPE__;unsigned int;__UINT64_TYPE__;long long unsigned int;__INT_LEAST8_TYPE__;signed char;__INT_LEAST16_TYPE__;short int;__INT_LEAST32_TYPE__;int;__INT_LEAST64_TYPE__;long long int;__UINT_LEAST8_TYPE__;unsigned char;__UINT_LEAST16_TYPE__;short unsigned int;__UINT_LEAST32_TYPE__;unsigned int;__UINT_LEAST64_TYPE__;long long unsigned int;__INT_FAST8_TYPE__;signed char;__INT_FAST16_TYPE__;short int;__INT_FAST32_TYPE__;int;__INT_FAST64_TYPE__;long long int;__UINT_FAST8_TYPE__;unsigned char;__UINT_FAST16_TYPE__;short unsigned int;__UINT_FAST32_TYPE__;unsigned int;__UINT_FAST64_TYPE__;long long unsigned int;__INTPTR_TYPE__;long long int;__UINTPTR_TYPE__;long long unsigned int;__has_include(STR);__has_include__(STR);__has_include_next(STR);__has_include_next__(STR);__GXX_ABI_VERSION;1011;__SCHAR_MAX__;0x7f;__SHRT_MAX__;0x7fff;__INT_MAX__;0x7fffffff;__LONG_MAX__;0x7fffffffL;__LONG_LONG_MAX__;0x7fffffffffffffffLL;__WCHAR_MAX__;0xffff;__WCHAR_MIN__;0;__WINT_MAX__;0xffff;__WINT_MIN__;0;__PTRDIFF_MAX__;0x7fffffffffffffffLL;__SIZE_MAX__;0xffffffffffffffffULL;__SCHAR_WIDTH__;8;__SHRT_WIDTH__;16;__INT_WIDTH__;32;__LONG_WIDTH__;32;__LONG_LONG_WIDTH__;64;__WCHAR_WIDTH__;16;__WINT_WIDTH__;16;__PTRDIFF_WIDTH__;64;__SIZE_WIDTH__;64;__INTMAX_MAX__;0x7fffffffffffffffLL;__INTMAX_C(c);c ## LL;__UINTMAX_MAX__;0xffffffffffffffffULL;__UINTMAX_C(c);c ## ULL;__INTMAX_WIDTH__;64;__SIG_ATOMIC_MAX__;0x7fffffff;__SIG_ATOMIC_MIN__;(-__SIG_ATOMIC_MAX__ - 1);__SIG_ATOMIC_WIDTH__;32;__INT8_MAX__;0x7f;__INT16_MAX__;0x7fff;__INT32_MAX__;0x7fffffff;__INT64_MAX__;0x7fffffffffffffffLL;__UINT8_MAX__;0xff;__UINT16_MAX__;0xffff;__UINT32_MAX__;0xffffffffU;__UINT64_MAX__;0xffffffffffffffffULL;__INT_LEAST8_MAX__;0x7f;__INT8_C(c);c;__INT_LEAST8_WIDTH__;8;__INT_LEAST16_MAX__;0x7fff;__INT16_C(c);c;__INT_LEAST16_WIDTH__;16;__INT_LEAST32_MAX__;0x7fffffff;__INT32_C(c);c;__INT_LEAST32_WIDTH__;32;__INT_LEAST64_MAX__;0x7fffffffffffffffLL;__INT64_C(c);c ## LL;__INT_LEAST64_WIDTH__;64;__UINT_LEAST8_MAX__;0xff;__UINT8_C(c);c;__UINT_LEAST16_MAX__;0xffff;__UINT16_C(c);c;__UINT_LEAST32_MAX__;0xffffffffU;__UINT32_C(c);c ## U;__UINT_LEAST64_MAX__;0xffffffffffffffffULL;__UINT64_C(c);c ## ULL;__INT_FAST8_MAX__;0x7f;__INT_FAST8_WIDTH__;8;__INT_FAST16_MAX__;0x7fff;__INT_FAST16_WIDTH__;16;__INT_FAST32_MAX__;0x7fffffff;__INT_FAST32_WIDTH__;32;__INT_FAST64_MAX__;0x7fffffffffffffffLL;__INT_FAST64_WIDTH__;64;__UINT_FAST8_MAX__;0xff;__UINT_FAST16_MAX__;0xffff;__UINT_FAST32_MAX__;0xffffffffU;__UINT_FAST64_MAX__;0xffffffffffffffffULL;__INTPTR_MAX__;0x7fffffffffffffffLL;__INTPTR_WIDTH__;64;__UINTPTR_MAX__;0xffffffffffffffffULL;__GCC_IEC_559;2;__GCC_IEC_559_COMPLEX;2;__FLT_EVAL_METHOD__;0;__FLT_EVAL_METHOD_TS_18661_3__;0;__DEC_EVAL_METHOD__;2;__FLT_RADIX__;2;__FLT_MANT_DIG__;24;__FLT_DIG__;6;__FLT_MIN_EXP__;(-125);__FLT_MIN_10_EXP__;(-37);__FLT_MAX_EXP__;128;__FLT_MAX_10_EXP__;38;__FLT_DECIMAL_DIG__;9;__FLT_MAX__;3.40282346638528859811704183484516925e+38F;__FLT_MIN__;1.17549435082228750796873653722224568e-38F;__FLT_EPSILON__;1.19209289550781250000000000000000000e-7F;__FLT_DENORM_MIN__;1.40129846432481707092372958328991613e-45F;__FLT_HAS_DENORM__;1;__FLT_HAS_INFINITY__;1;__FLT_HAS_QUIET_NAN__;1;__DBL_MANT_DIG__;53;__DBL_DIG__;15;__DBL_MIN_EXP__;(-1021);__DBL_MIN_10_EXP__;(-307);__DBL_MAX_EXP__;1024;__DBL_MAX_10_EXP__;308;__DBL_DECIMAL_DIG__;17;__DBL_MAX__;((double)1.79769313486231570814527423731704357e+308L);__DBL_MIN__;((double)2.22507385850720138309023271733240406e-308L);__DBL_EPSILON__;((double)2.22044604925031308084726333618164062e-16L);__DBL_DENORM_MIN__;((double)4.94065645841246544176568792868221372e-324L);__DBL_HAS_DENORM__;1;__DBL_HAS_INFINITY__;1;__DBL_HAS_QUIET_NAN__;1;__LDBL_MANT_DIG__;64;__LDBL_DIG__;18;__LDBL_MIN_EXP__;(-16381);__LDBL_MIN_10_EXP__;(-4931);__LDBL_MAX_EXP__;16384;__LDBL_MAX_10_EXP__;4932;__DECIMAL_DIG__;21;__LDBL_DECIMAL_DIG__;21;__LDBL_MAX__;1.18973149535723176502126385303097021e+4932L;__LDBL_MIN__;3.36210314311209350626267781732175260e-4932L;__LDBL_EPSILON__;1.08420217248550443400745280086994171e-19L;__LDBL_DENORM_MIN__;3.64519953188247460252840593361941982e-4951L;__LDBL_HAS_DENORM__;1;__LDBL_HAS_INFINITY__;1;__LDBL_HAS_QUIET_NAN__;1;__FLT32_MANT_DIG__;24;__FLT32_DIG__;6;__FLT32_MIN_EXP__;(-125);__FLT32_MIN_10_EXP__;(-37);__FLT32_MAX_EXP__;128;__FLT32_MAX_10_EXP__;38;__FLT32_DECIMAL_DIG__;9;__FLT32_MAX__;3.40282346638528859811704183484516925e+38F32;__FLT32_MIN__;1.17549435082228750796873653722224568e-38F32;__FLT32_EPSILON__;1.19209289550781250000000000000000000e-7F32;__FLT32_DENORM_MIN__;1.40129846432481707092372958328991613e-45F32;__FLT32_HAS_DENORM__;1;__FLT32_HAS_INFINITY__;1;__FLT32_HAS_QUIET_NAN__;1;__FLT64_MANT_DIG__;53;__FLT64_DIG__;15;__FLT64_MIN_EXP__;(-1021);__FLT64_MIN_10_EXP__;(-307);__FLT64_MAX_EXP__;1024;__FLT64_MAX_10_EXP__;308;__FLT64_DECIMAL_DIG__;17;__FLT64_MAX__;1.79769313486231570814527423731704357e+308F64;__FLT64_MIN__;2.22507385850720138309023271733240406e-308F64;__FLT64_EPSILON__;2.22044604925031308084726333618164062e-16F64;__FLT64_DENORM_MIN__;4.94065645841246544176568792868221372e-324F64;__FLT64_HAS_DENORM__;1;__FLT64_HAS_INFINITY__;1;__FLT64_HAS_QUIET_NAN__;1;__FLT128_MANT_DIG__;113;__FLT128_DIG__;33;__FLT128_MIN_EXP__;(-16381);__FLT128_MIN_10_EXP__;(-4931);__FLT128_MAX_EXP__;16384;__FLT128_MAX_10_EXP__;4932;__FLT128_DECIMAL_DIG__;36;__FLT128_MAX__;1.18973149535723176508575932662800702e+4932F128;__FLT128_MIN__;3.36210314311209350626267781732175260e-4932F128;__FLT128_EPSILON__;1.92592994438723585305597794258492732e-34F128;__FLT128_DENORM_MIN__;6.47517511943802511092443895822764655e-4966F128;__FLT128_HAS_DENORM__;1;__FLT128_HAS_INFINITY__;1;__FLT128_HAS_QUIET_NAN__;1;__FLT32X_MANT_DIG__;53;__FLT32X_DIG__;15;__FLT32X_MIN_EXP__;(-1021);__FLT32X_MIN_10_EXP__;(-307);__FLT32X_MAX_EXP__;1024;__FLT32X_MAX_10_EXP__;308;__FLT32X_DECIMAL_DIG__;17;__FLT32X_MAX__;1.79769313486231570814527423731704357e+308F32x;__FLT32X_MIN__;2.22507385850720138309023271733240406e-308F32x;__FLT32X_EPSILON__;2.22044604925031308084726333618164062e-16F32x;__FLT32X_DENORM_MIN__;4.94065645841246544176568792868221372e-324F32x;__FLT32X_HAS_DENORM__;1;__FLT32X_HAS_INFINITY__;1;__FLT32X_HAS_QUIET_NAN__;1;__FLT64X_MANT_DIG__;64;__FLT64X_DIG__;18;__FLT64X_MIN_EXP__;(-16381);__FLT64X_MIN_10_EXP__;(-4931);__FLT64X_MAX_EXP__;16384;__FLT64X_MAX_10_EXP__;4932;__FLT64X_DECIMAL_DIG__;21;__FLT64X_MAX__;1.18973149535723176502126385303097021e+4932F64x;__FLT64X_MIN__;3.36210314311209350626267781732175260e-4932F64x;__FLT64X_EPSILON__;1.08420217248550443400745280086994171e-19F64x;__FLT64X_DENORM_MIN__;3.64519953188247460252840593361941982e-4951F64x;__FLT64X_HAS_DENORM__;1;__FLT64X_HAS_INFINITY__;1;__FLT64X_HAS_QUIET_NAN__;1;__DEC32_MANT_DIG__;7;__DEC32_MIN_EXP__;(-94);__DEC32_MAX_EXP__;97;__DEC32_MIN__;1E-95DF;__DEC32_MAX__;9.999999E96DF;__DEC32_EPSILON__;1E-6DF;__DEC32_SUBNORMAL_MIN__;0.000001E-95DF;__DEC64_MANT_DIG__;16;__DEC64_MIN_EXP__;(-382);__DEC64_MAX_EXP__;385;__DEC64_MIN__;1E-383DD;__DEC64_MAX__;9.999999999999999E384DD;__DEC64_EPSILON__;1E-15DD;__DEC64_SUBNORMAL_MIN__;0.000000000000001E-383DD;__DEC128_MANT_DIG__;34;__DEC128_MIN_EXP__;(-6142);__DEC128_MAX_EXP__;6145;__DEC128_MIN__;1E-6143DL;__DEC128_MAX__;9.999999999999999999999999999999999E6144DL;__DEC128_EPSILON__;1E-33DL;__DEC128_SUBNORMAL_MIN__;0.000000000000000000000000000000001E-6143DL;__REGISTER_PREFIX__; ;__USER_LABEL_PREFIX__; ;__GNUC_STDC_INLINE__;1;__NO_INLINE__;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16;1;__GCC_ATOMIC_BOOL_LOCK_FREE;2;__GCC_ATOMIC_CHAR_LOCK_FREE;2;__GCC_ATOMIC_CHAR16_T_LOCK_FREE;2;__GCC_ATOMIC_CHAR32_T_LOCK_FREE;2;__GCC_ATOMIC_WCHAR_T_LOCK_FREE;2;__GCC_ATOMIC_SHORT_LOCK_FREE;2;__GCC_ATOMIC_INT_LOCK_FREE;2;__GCC_ATOMIC_LONG_LOCK_FREE;2;__GCC_ATOMIC_LLONG_LOCK_FREE;2;__GCC_ATOMIC_TEST_AND_SET_TRUEVAL;1;__GCC_ATOMIC_POINTER_LOCK_FREE;2;__PRAGMA_REDEFINE_EXTNAME;1;__SIZEOF_INT128__;16;__SIZEOF_WCHAR_T__;2;__SIZEOF_WINT_T__;2;__SIZEOF_PTRDIFF_T__;8;__amd64;1;__amd64__;1;__x86_64;1;__x86_64__;1;__SIZEOF_FLOAT80__;16;__SIZEOF_FLOAT128__;16;__ATOMIC_HLE_ACQUIRE;65536;__ATOMIC_HLE_RELEASE;131072;__GCC_ASM_FLAG_OUTPUTS__;1;__nocona;1;__nocona__;1;__tune_core2__;1;__code_model_medium__;1;__MMX__;1;__SSE__;1;__SSE2__;1;__SSE3__;1;__FXSR__;1;__SSE_MATH__;1;__SSE2_MATH__;1;__SEG_FS;1;__SEG_GS;1;__SEH__;1;__stdcall;__attribute__((__stdcall__));__fastcall;__attribute__((__fastcall__));__thiscall;__attribute__((__thiscall__));__cdecl;__attribute__((__cdecl__));_stdcall;__attribute__((__stdcall__));_fastcall;__attribute__((__fastcall__));_thiscall;__attribute__((__thiscall__));_cdecl;__attribute__((__cdecl__));__GXX_MERGED_TYPEINFO_NAMES;0;__GXX_TYPEINFO_EQUALITY_INLINE;0;__MSVCRT__;1;__MINGW32__;1;_WIN32;1;__WIN32;1;__WIN32__;1;WIN32;1;__WINNT;1;__WINNT__;1;WINNT;1;_INTEGRAL_MAX_BITS;64;__MINGW64__;1;__WIN64;1;__WIN64__;1;WIN64;1;_WIN64;1;__declspec(x);__attribute__((x));__DECIMAL_BID_FORMAT__;1;_REENTRANT;1;__STDC__;1;__cplusplus;201402L;__STDC_UTF_16__;1;__STDC_UTF_32__;1;__STDC_HOSTED__;1;__GNUC__;7;__GNUC_MINOR__;3;__GNUC_PATCHLEVEL__;0;__VERSION__;"7.3.0";__ATOMIC_RELAXED;0;__ATOMIC_SEQ_CST;5;__ATOMIC_ACQUIRE;2;__ATOMIC_RELEASE;3;__ATOMIC_ACQ_REL;4;__ATOMIC_CONSUME;1;__pic__;1;__PIC__;1;__FINITE_MATH_ONLY__;0;__SIZEOF_INT__;4;__SIZEOF_LONG__;4;__SIZEOF_LONG_LONG__;8;__SIZEOF_SHORT__;2;__SIZEOF_FLOAT__;4;__SIZEOF_DOUBLE__;8;__SIZEOF_LONG_DOUBLE__;16;__SIZEOF_SIZE_T__;8;__CHAR_BIT__;8;__BIGGEST_ALIGNMENT__;16;__ORDER_LITTLE_ENDIAN__;1234;__ORDER_BIG_ENDIAN__;4321;__ORDER_PDP_ENDIAN__;3412;__BYTE_ORDER__;__ORDER_LITTLE_ENDIAN__;__FLOAT_WORD_ORDER__;__ORDER_LITTLE_ENDIAN__;__SIZEOF_POINTER__;8;__GNUG__;7;__SIZE_TYPE__;long long unsigned int;__PTRDIFF_TYPE__;long long int;__WCHAR_TYPE__;short unsigned int;__WINT_TYPE__;short unsigned int;__INTMAX_TYPE__;long long int;__UINTMAX_TYPE__;long long unsigned int;__CHAR16_TYPE__;short unsigned int;__CHAR32_TYPE__;unsigned int;__SIG_ATOMIC_TYPE__;int;__INT8_TYPE__;signed char;__INT16_TYPE__;short int;__INT32_TYPE__;int;__INT64_TYPE__;long long int;__UINT8_TYPE__;unsigned char;__UINT16_TYPE__;short unsigned int;__UINT32_TYPE__;unsigned int;__UINT64_TYPE__;long long unsigned int;__INT_LEAST8_TYPE__;signed char;__INT_LEAST16_TYPE__;short int;__INT_LEAST32_TYPE__;int;__INT_LEAST64_TYPE__;long long int;__UINT_LEAST8_TYPE__;unsigned char;__UINT_LEAST16_TYPE__;short unsigned int;__UINT_LEAST32_TYPE__;unsigned int;__UINT_LEAST64_TYPE__;long long unsigned int;__INT_FAST8_TYPE__;signed char;__INT_FAST16_TYPE__;short int;__INT_FAST32_TYPE__;int;__INT_FAST64_TYPE__;long long int;__UINT_FAST8_TYPE__;unsigned char;__UINT_FAST16_TYPE__;short unsigned int;__UINT_FAST32_TYPE__;unsigned int;__UINT_FAST64_TYPE__;long long unsigned int;__INTPTR_TYPE__;long long int;__UINTPTR_TYPE__;long long unsigned int;__has_include(STR);__has_include__(STR);__has_include_next(STR);__has_include_next__(STR);__GXX_WEAK__;1;__DEPRECATED;1;__GXX_RTTI;1;__cpp_rtti;199711;__GXX_EXPERIMENTAL_CXX0X__;1;__cpp_binary_literals;201304;__cpp_hex_float;201603;__cpp_runtime_arrays;198712;__cpp_unicode_characters;200704;__cpp_raw_strings;200710;__cpp_unicode_literals;200710;__cpp_user_defined_literals;200809;__cpp_lambdas;200907;__cpp_range_based_for;200907;__cpp_static_assert;200410;__cpp_decltype;200707;__cpp_attributes;200809;__cpp_rvalue_reference;200610;__cpp_rvalue_references;200610;__cpp_variadic_templates;200704;__cpp_initializer_lists;200806;__cpp_delegating_constructors;200604;__cpp_nsdmi;200809;__cpp_inheriting_constructors;201511;__cpp_ref_qualifiers;200710;__cpp_alias_templates;200704;__cpp_return_type_deduction;201304;__cpp_init_captures;201304;__cpp_generic_lambdas;201304;__cpp_constexpr;201304;__cpp_decltype_auto;201304;__cpp_aggregate_nsdmi;201304;__cpp_variable_templates;201304;__cpp_digit_separators;201309;__cpp_sized_deallocation;201309;__cpp_threadsafe_static_init;200806;__EXCEPTIONS;1;__cpp_exceptions;199711;__GXX_ABI_VERSION;1011;__SCHAR_MAX__;0x7f;__SHRT_MAX__;0x7fff;__INT_MAX__;0x7fffffff;__LONG_MAX__;0x7fffffffL;__LONG_LONG_MAX__;0x7fffffffffffffffLL;__WCHAR_MAX__;0xffff;__WCHAR_MIN__;0;__WINT_MAX__;0xffff;__WINT_MIN__;0;__PTRDIFF_MAX__;0x7fffffffffffffffLL;__SIZE_MAX__;0xffffffffffffffffULL;__SCHAR_WIDTH__;8;__SHRT_WIDTH__;16;__INT_WIDTH__;32;__LONG_WIDTH__;32;__LONG_LONG_WIDTH__;64;__WCHAR_WIDTH__;16;__WINT_WIDTH__;16;__PTRDIFF_WIDTH__;64;__SIZE_WIDTH__;64;__GLIBCXX_TYPE_INT_N_0;__int128;__GLIBCXX_BITSIZE_INT_N_0;128;__INTMAX_MAX__;0x7fffffffffffffffLL;__INTMAX_C(c);c ## LL;__UINTMAX_MAX__;0xffffffffffffffffULL;__UINTMAX_C(c);c ## ULL;__INTMAX_WIDTH__;64;__SIG_ATOMIC_MAX__;0x7fffffff;__SIG_ATOMIC_MIN__;(-__SIG_ATOMIC_MAX__ - 1);__SIG_ATOMIC_WIDTH__;32;__INT8_MAX__;0x7f;__INT16_MAX__;0x7fff;__INT32_MAX__;0x7fffffff;__INT64_MAX__;0x7fffffffffffffffLL;__UINT8_MAX__;0xff;__UINT16_MAX__;0xffff;__UINT32_MAX__;0xffffffffU;__UINT64_MAX__;0xffffffffffffffffULL;__INT_LEAST8_MAX__;0x7f;__INT8_C(c);c;__INT_LEAST8_WIDTH__;8;__INT_LEAST16_MAX__;0x7fff;__INT16_C(c);c;__INT_LEAST16_WIDTH__;16;__INT_LEAST32_MAX__;0x7fffffff;__INT32_C(c);c;__INT_LEAST32_WIDTH__;32;__INT_LEAST64_MAX__;0x7fffffffffffffffLL;__INT64_C(c);c ## LL;__INT_LEAST64_WIDTH__;64;__UINT_LEAST8_MAX__;0xff;__UINT8_C(c);c;__UINT_LEAST16_MAX__;0xffff;__UINT16_C(c);c;__UINT_LEAST32_MAX__;0xffffffffU;__UINT32_C(c);c ## U;__UINT_LEAST64_MAX__;0xffffffffffffffffULL;__UINT64_C(c);c ## ULL;__INT_FAST8_MAX__;0x7f;__INT_FAST8_WIDTH__;8;__INT_FAST16_MAX__;0x7fff;__INT_FAST16_WIDTH__;16;__INT_FAST32_MAX__;0x7fffffff;__INT_FAST32_WIDTH__;32;__INT_FAST64_MAX__;0x7fffffffffffffffLL;__INT_FAST64_WIDTH__;64;__UINT_FAST8_MAX__;0xff;__UINT_FAST16_MAX__;0xffff;__UINT_FAST32_MAX__;0xffffffffU;__UINT_FAST64_MAX__;0xffffffffffffffffULL;__INTPTR_MAX__;0x7fffffffffffffffLL;__INTPTR_WIDTH__;64;__UINTPTR_MAX__;0xffffffffffffffffULL;__GCC_IEC_559;2;__GCC_IEC_559_COMPLEX;2;__FLT_EVAL_METHOD__;0;__FLT_EVAL_METHOD_TS_18661_3__;0;__DEC_EVAL_METHOD__;2;__FLT_RADIX__;2;__FLT_MANT_DIG__;24;__FLT_DIG__;6;__FLT_MIN_EXP__;(-125);__FLT_MIN_10_EXP__;(-37);__FLT_MAX_EXP__;128;__FLT_MAX_10_EXP__;38;__FLT_DECIMAL_DIG__;9;__FLT_MAX__;3.40282346638528859811704183484516925e+38F;__FLT_MIN__;1.17549435082228750796873653722224568e-38F;__FLT_EPSILON__;1.19209289550781250000000000000000000e-7F;__FLT_DENORM_MIN__;1.40129846432481707092372958328991613e-45F;__FLT_HAS_DENORM__;1;__FLT_HAS_INFINITY__;1;__FLT_HAS_QUIET_NAN__;1;__DBL_MANT_DIG__;53;__DBL_DIG__;15;__DBL_MIN_EXP__;(-1021);__DBL_MIN_10_EXP__;(-307);__DBL_MAX_EXP__;1024;__DBL_MAX_10_EXP__;308;__DBL_DECIMAL_DIG__;17;__DBL_MAX__;double(1.79769313486231570814527423731704357e+308L);__DBL_MIN__;double(2.22507385850720138309023271733240406e-308L);__DBL_EPSILON__;double(2.22044604925031308084726333618164062e-16L);__DBL_DENORM_MIN__;double(4.94065645841246544176568792868221372e-324L);__DBL_HAS_DENORM__;1;__DBL_HAS_INFINITY__;1;__DBL_HAS_QUIET_NAN__;1;__LDBL_MANT_DIG__;64;__LDBL_DIG__;18;__LDBL_MIN_EXP__;(-16381);__LDBL_MIN_10_EXP__;(-4931);__LDBL_MAX_EXP__;16384;__LDBL_MAX_10_EXP__;4932;__DECIMAL_DIG__;21;__LDBL_DECIMAL_DIG__;21;__LDBL_MAX__;1.18973149535723176502126385303097021e+4932L;__LDBL_MIN__;3.36210314311209350626267781732175260e-4932L;__LDBL_EPSILON__;1.08420217248550443400745280086994171e-19L;__LDBL_DENORM_MIN__;3.64519953188247460252840593361941982e-4951L;__LDBL_HAS_DENORM__;1;__LDBL_HAS_INFINITY__;1;__LDBL_HAS_QUIET_NAN__;1;__FLT32_MANT_DIG__;24;__FLT32_DIG__;6;__FLT32_MIN_EXP__;(-125);__FLT32_MIN_10_EXP__;(-37);__FLT32_MAX_EXP__;128;__FLT32_MAX_10_EXP__;38;__FLT32_DECIMAL_DIG__;9;__FLT32_MAX__;3.40282346638528859811704183484516925e+38F32;__FLT32_MIN__;1.17549435082228750796873653722224568e-38F32;__FLT32_EPSILON__;1.19209289550781250000000000000000000e-7F32;__FLT32_DENORM_MIN__;1.40129846432481707092372958328991613e-45F32;__FLT32_HAS_DENORM__;1;__FLT32_HAS_INFINITY__;1;__FLT32_HAS_QUIET_NAN__;1;__FLT64_MANT_DIG__;53;__FLT64_DIG__;15;__FLT64_MIN_EXP__;(-1021);__FLT64_MIN_10_EXP__;(-307);__FLT64_MAX_EXP__;1024;__FLT64_MAX_10_EXP__;308;__FLT64_DECIMAL_DIG__;17;__FLT64_MAX__;1.79769313486231570814527423731704357e+308F64;__FLT64_MIN__;2.22507385850720138309023271733240406e-308F64;__FLT64_EPSILON__;2.22044604925031308084726333618164062e-16F64;__FLT64_DENORM_MIN__;4.94065645841246544176568792868221372e-324F64;__FLT64_HAS_DENORM__;1;__FLT64_HAS_INFINITY__;1;__FLT64_HAS_QUIET_NAN__;1;__FLT128_MANT_DIG__;113;__FLT128_DIG__;33;__FLT128_MIN_EXP__;(-16381);__FLT128_MIN_10_EXP__;(-4931);__FLT128_MAX_EXP__;16384;__FLT128_MAX_10_EXP__;4932;__FLT128_DECIMAL_DIG__;36;__FLT128_MAX__;1.18973149535723176508575932662800702e+4932F128;__FLT128_MIN__;3.36210314311209350626267781732175260e-4932F128;__FLT128_EPSILON__;1.92592994438723585305597794258492732e-34F128;__FLT128_DENORM_MIN__;6.47517511943802511092443895822764655e-4966F128;__FLT128_HAS_DENORM__;1;__FLT128_HAS_INFINITY__;1;__FLT128_HAS_QUIET_NAN__;1;__FLT32X_MANT_DIG__;53;__FLT32X_DIG__;15;__FLT32X_MIN_EXP__;(-1021);__FLT32X_MIN_10_EXP__;(-307);__FLT32X_MAX_EXP__;1024;__FLT32X_MAX_10_EXP__;308;__FLT32X_DECIMAL_DIG__;17;__FLT32X_MAX__;1.79769313486231570814527423731704357e+308F32x;__FLT32X_MIN__;2.22507385850720138309023271733240406e-308F32x;__FLT32X_EPSILON__;2.22044604925031308084726333618164062e-16F32x;__FLT32X_DENORM_MIN__;4.94065645841246544176568792868221372e-324F32x;__FLT32X_HAS_DENORM__;1;__FLT32X_HAS_INFINITY__;1;__FLT32X_HAS_QUIET_NAN__;1;__FLT64X_MANT_DIG__;64;__FLT64X_DIG__;18;__FLT64X_MIN_EXP__;(-16381);__FLT64X_MIN_10_EXP__;(-4931);__FLT64X_MAX_EXP__;16384;__FLT64X_MAX_10_EXP__;4932;__FLT64X_DECIMAL_DIG__;21;__FLT64X_MAX__;1.18973149535723176502126385303097021e+4932F64x;__FLT64X_MIN__;3.36210314311209350626267781732175260e-4932F64x;__FLT64X_EPSILON__;1.08420217248550443400745280086994171e-19F64x;__FLT64X_DENORM_MIN__;3.64519953188247460252840593361941982e-4951F64x;__FLT64X_HAS_DENORM__;1;__FLT64X_HAS_INFINITY__;1;__FLT64X_HAS_QUIET_NAN__;1;__DEC32_MANT_DIG__;7;__DEC32_MIN_EXP__;(-94);__DEC32_MAX_EXP__;97;__DEC32_MIN__;1E-95DF;__DEC32_MAX__;9.999999E96DF;__DEC32_EPSILON__;1E-6DF;__DEC32_SUBNORMAL_MIN__;0.000001E-95DF;__DEC64_MANT_DIG__;16;__DEC64_MIN_EXP__;(-382);__DEC64_MAX_EXP__;385;__DEC64_MIN__;1E-383DD;__DEC64_MAX__;9.999999999999999E384DD;__DEC64_EPSILON__;1E-15DD;__DEC64_SUBNORMAL_MIN__;0.000000000000001E-383DD;__DEC128_MANT_DIG__;34;__DEC128_MIN_EXP__;(-6142);__DEC128_MAX_EXP__;6145;__DEC128_MIN__;1E-6143DL;__DEC128_MAX__;9.999999999999999999999999999999999E6144DL;__DEC128_EPSILON__;1E-33DL;__DEC128_SUBNORMAL_MIN__;0.000000000000000000000000000000001E-6143DL;__REGISTER_PREFIX__; ;__USER_LABEL_PREFIX__; ;__GNUC_STDC_INLINE__;1;__NO_INLINE__;1;__WCHAR_UNSIGNED__;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16;1;__GCC_ATOMIC_BOOL_LOCK_FREE;2;__GCC_ATOMIC_CHAR_LOCK_FREE;2;__GCC_ATOMIC_CHAR16_T_LOCK_FREE;2;__GCC_ATOMIC_CHAR32_T_LOCK_FREE;2;__GCC_ATOMIC_WCHAR_T_LOCK_FREE;2;__GCC_ATOMIC_SHORT_LOCK_FREE;2;__GCC_ATOMIC_INT_LOCK_FREE;2;__GCC_ATOMIC_LONG_LOCK_FREE;2;__GCC_ATOMIC_LLONG_LOCK_FREE;2;__GCC_ATOMIC_TEST_AND_SET_TRUEVAL;1;__GCC_ATOMIC_POINTER_LOCK_FREE;2;__PRAGMA_REDEFINE_EXTNAME;1;__SIZEOF_INT128__;16;__SIZEOF_WCHAR_T__;2;__SIZEOF_WINT_T__;2;__SIZEOF_PTRDIFF_T__;8;__amd64;1;__amd64__;1;__x86_64;1;__x86_64__;1;__SIZEOF_FLOAT80__;16;__SIZEOF_FLOAT128__;16;__ATOMIC_HLE_ACQUIRE;65536;__ATOMIC_HLE_RELEASE;131072;__GCC_ASM_FLAG_OUTPUTS__;1;__nocona;1;__nocona__;1;__tune_core2__;1;__code_model_medium__;1;__MMX__;1;__SSE__;1;__SSE2__;1;__SSE3__;1;__FXSR__;1;__SSE_MATH__;1;__SSE2_MATH__;1;__SEG_FS;1;__SEG_GS;1;__SEH__;1;__stdcall;__attribute__((__stdcall__));__fastcall;__attribute__((__fastcall__));__thiscall;__attribute__((__thiscall__));__cdecl;__attribute__((__cdecl__));_stdcall;__attribute__((__stdcall__));_fastcall;__attribute__((__fastcall__));_thiscall;__attribute__((__thiscall__));_cdecl;__attribute__((__cdecl__));__GXX_MERGED_TYPEINFO_NAMES;0;__GXX_TYPEINFO_EQUALITY_INLINE;0;__MSVCRT__;1;__MINGW32__;1;_WIN32;1;__WIN32;1;__WIN32__;1;WIN32;1;__WINNT;1;__WINNT__;1;WINNT;1;_INTEGRAL_MAX_BITS;64;__MINGW64__;1;__WIN64;1;__WIN64__;1;WIN64;1;_WIN64;1;__declspec(x);__attribute__((x));__DECIMAL_BID_FORMAT__;1;_REENTRANT;1 +//CXX compiler system include directories +CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS:INTERNAL=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include +//C compiler system defined macros +CMAKE_EXTRA_GENERATOR_C_SYSTEM_DEFINED_MACROS:INTERNAL=__STDC__;1;__STDC_VERSION__;201112L;__STDC_UTF_16__;1;__STDC_UTF_32__;1;__STDC_HOSTED__;1;__GNUC__;7;__GNUC_MINOR__;3;__GNUC_PATCHLEVEL__;0;__VERSION__;"7.3.0";__ATOMIC_RELAXED;0;__ATOMIC_SEQ_CST;5;__ATOMIC_ACQUIRE;2;__ATOMIC_RELEASE;3;__ATOMIC_ACQ_REL;4;__ATOMIC_CONSUME;1;__pic__;1;__PIC__;1;__FINITE_MATH_ONLY__;0;__SIZEOF_INT__;4;__SIZEOF_LONG__;4;__SIZEOF_LONG_LONG__;8;__SIZEOF_SHORT__;2;__SIZEOF_FLOAT__;4;__SIZEOF_DOUBLE__;8;__SIZEOF_LONG_DOUBLE__;16;__SIZEOF_SIZE_T__;8;__CHAR_BIT__;8;__BIGGEST_ALIGNMENT__;16;__ORDER_LITTLE_ENDIAN__;1234;__ORDER_BIG_ENDIAN__;4321;__ORDER_PDP_ENDIAN__;3412;__BYTE_ORDER__;__ORDER_LITTLE_ENDIAN__;__FLOAT_WORD_ORDER__;__ORDER_LITTLE_ENDIAN__;__SIZEOF_POINTER__;8;__SIZE_TYPE__;long long unsigned int;__PTRDIFF_TYPE__;long long int;__WCHAR_TYPE__;short unsigned int;__WINT_TYPE__;short unsigned int;__INTMAX_TYPE__;long long int;__UINTMAX_TYPE__;long long unsigned int;__CHAR16_TYPE__;short unsigned int;__CHAR32_TYPE__;unsigned int;__SIG_ATOMIC_TYPE__;int;__INT8_TYPE__;signed char;__INT16_TYPE__;short int;__INT32_TYPE__;int;__INT64_TYPE__;long long int;__UINT8_TYPE__;unsigned char;__UINT16_TYPE__;short unsigned int;__UINT32_TYPE__;unsigned int;__UINT64_TYPE__;long long unsigned int;__INT_LEAST8_TYPE__;signed char;__INT_LEAST16_TYPE__;short int;__INT_LEAST32_TYPE__;int;__INT_LEAST64_TYPE__;long long int;__UINT_LEAST8_TYPE__;unsigned char;__UINT_LEAST16_TYPE__;short unsigned int;__UINT_LEAST32_TYPE__;unsigned int;__UINT_LEAST64_TYPE__;long long unsigned int;__INT_FAST8_TYPE__;signed char;__INT_FAST16_TYPE__;short int;__INT_FAST32_TYPE__;int;__INT_FAST64_TYPE__;long long int;__UINT_FAST8_TYPE__;unsigned char;__UINT_FAST16_TYPE__;short unsigned int;__UINT_FAST32_TYPE__;unsigned int;__UINT_FAST64_TYPE__;long long unsigned int;__INTPTR_TYPE__;long long int;__UINTPTR_TYPE__;long long unsigned int;__has_include(STR);__has_include__(STR);__has_include_next(STR);__has_include_next__(STR);__GXX_ABI_VERSION;1011;__SCHAR_MAX__;0x7f;__SHRT_MAX__;0x7fff;__INT_MAX__;0x7fffffff;__LONG_MAX__;0x7fffffffL;__LONG_LONG_MAX__;0x7fffffffffffffffLL;__WCHAR_MAX__;0xffff;__WCHAR_MIN__;0;__WINT_MAX__;0xffff;__WINT_MIN__;0;__PTRDIFF_MAX__;0x7fffffffffffffffLL;__SIZE_MAX__;0xffffffffffffffffULL;__SCHAR_WIDTH__;8;__SHRT_WIDTH__;16;__INT_WIDTH__;32;__LONG_WIDTH__;32;__LONG_LONG_WIDTH__;64;__WCHAR_WIDTH__;16;__WINT_WIDTH__;16;__PTRDIFF_WIDTH__;64;__SIZE_WIDTH__;64;__INTMAX_MAX__;0x7fffffffffffffffLL;__INTMAX_C(c);c ## LL;__UINTMAX_MAX__;0xffffffffffffffffULL;__UINTMAX_C(c);c ## ULL;__INTMAX_WIDTH__;64;__SIG_ATOMIC_MAX__;0x7fffffff;__SIG_ATOMIC_MIN__;(-__SIG_ATOMIC_MAX__ - 1);__SIG_ATOMIC_WIDTH__;32;__INT8_MAX__;0x7f;__INT16_MAX__;0x7fff;__INT32_MAX__;0x7fffffff;__INT64_MAX__;0x7fffffffffffffffLL;__UINT8_MAX__;0xff;__UINT16_MAX__;0xffff;__UINT32_MAX__;0xffffffffU;__UINT64_MAX__;0xffffffffffffffffULL;__INT_LEAST8_MAX__;0x7f;__INT8_C(c);c;__INT_LEAST8_WIDTH__;8;__INT_LEAST16_MAX__;0x7fff;__INT16_C(c);c;__INT_LEAST16_WIDTH__;16;__INT_LEAST32_MAX__;0x7fffffff;__INT32_C(c);c;__INT_LEAST32_WIDTH__;32;__INT_LEAST64_MAX__;0x7fffffffffffffffLL;__INT64_C(c);c ## LL;__INT_LEAST64_WIDTH__;64;__UINT_LEAST8_MAX__;0xff;__UINT8_C(c);c;__UINT_LEAST16_MAX__;0xffff;__UINT16_C(c);c;__UINT_LEAST32_MAX__;0xffffffffU;__UINT32_C(c);c ## U;__UINT_LEAST64_MAX__;0xffffffffffffffffULL;__UINT64_C(c);c ## ULL;__INT_FAST8_MAX__;0x7f;__INT_FAST8_WIDTH__;8;__INT_FAST16_MAX__;0x7fff;__INT_FAST16_WIDTH__;16;__INT_FAST32_MAX__;0x7fffffff;__INT_FAST32_WIDTH__;32;__INT_FAST64_MAX__;0x7fffffffffffffffLL;__INT_FAST64_WIDTH__;64;__UINT_FAST8_MAX__;0xff;__UINT_FAST16_MAX__;0xffff;__UINT_FAST32_MAX__;0xffffffffU;__UINT_FAST64_MAX__;0xffffffffffffffffULL;__INTPTR_MAX__;0x7fffffffffffffffLL;__INTPTR_WIDTH__;64;__UINTPTR_MAX__;0xffffffffffffffffULL;__GCC_IEC_559;2;__GCC_IEC_559_COMPLEX;2;__FLT_EVAL_METHOD__;0;__FLT_EVAL_METHOD_TS_18661_3__;0;__DEC_EVAL_METHOD__;2;__FLT_RADIX__;2;__FLT_MANT_DIG__;24;__FLT_DIG__;6;__FLT_MIN_EXP__;(-125);__FLT_MIN_10_EXP__;(-37);__FLT_MAX_EXP__;128;__FLT_MAX_10_EXP__;38;__FLT_DECIMAL_DIG__;9;__FLT_MAX__;3.40282346638528859811704183484516925e+38F;__FLT_MIN__;1.17549435082228750796873653722224568e-38F;__FLT_EPSILON__;1.19209289550781250000000000000000000e-7F;__FLT_DENORM_MIN__;1.40129846432481707092372958328991613e-45F;__FLT_HAS_DENORM__;1;__FLT_HAS_INFINITY__;1;__FLT_HAS_QUIET_NAN__;1;__DBL_MANT_DIG__;53;__DBL_DIG__;15;__DBL_MIN_EXP__;(-1021);__DBL_MIN_10_EXP__;(-307);__DBL_MAX_EXP__;1024;__DBL_MAX_10_EXP__;308;__DBL_DECIMAL_DIG__;17;__DBL_MAX__;((double)1.79769313486231570814527423731704357e+308L);__DBL_MIN__;((double)2.22507385850720138309023271733240406e-308L);__DBL_EPSILON__;((double)2.22044604925031308084726333618164062e-16L);__DBL_DENORM_MIN__;((double)4.94065645841246544176568792868221372e-324L);__DBL_HAS_DENORM__;1;__DBL_HAS_INFINITY__;1;__DBL_HAS_QUIET_NAN__;1;__LDBL_MANT_DIG__;64;__LDBL_DIG__;18;__LDBL_MIN_EXP__;(-16381);__LDBL_MIN_10_EXP__;(-4931);__LDBL_MAX_EXP__;16384;__LDBL_MAX_10_EXP__;4932;__DECIMAL_DIG__;21;__LDBL_DECIMAL_DIG__;21;__LDBL_MAX__;1.18973149535723176502126385303097021e+4932L;__LDBL_MIN__;3.36210314311209350626267781732175260e-4932L;__LDBL_EPSILON__;1.08420217248550443400745280086994171e-19L;__LDBL_DENORM_MIN__;3.64519953188247460252840593361941982e-4951L;__LDBL_HAS_DENORM__;1;__LDBL_HAS_INFINITY__;1;__LDBL_HAS_QUIET_NAN__;1;__FLT32_MANT_DIG__;24;__FLT32_DIG__;6;__FLT32_MIN_EXP__;(-125);__FLT32_MIN_10_EXP__;(-37);__FLT32_MAX_EXP__;128;__FLT32_MAX_10_EXP__;38;__FLT32_DECIMAL_DIG__;9;__FLT32_MAX__;3.40282346638528859811704183484516925e+38F32;__FLT32_MIN__;1.17549435082228750796873653722224568e-38F32;__FLT32_EPSILON__;1.19209289550781250000000000000000000e-7F32;__FLT32_DENORM_MIN__;1.40129846432481707092372958328991613e-45F32;__FLT32_HAS_DENORM__;1;__FLT32_HAS_INFINITY__;1;__FLT32_HAS_QUIET_NAN__;1;__FLT64_MANT_DIG__;53;__FLT64_DIG__;15;__FLT64_MIN_EXP__;(-1021);__FLT64_MIN_10_EXP__;(-307);__FLT64_MAX_EXP__;1024;__FLT64_MAX_10_EXP__;308;__FLT64_DECIMAL_DIG__;17;__FLT64_MAX__;1.79769313486231570814527423731704357e+308F64;__FLT64_MIN__;2.22507385850720138309023271733240406e-308F64;__FLT64_EPSILON__;2.22044604925031308084726333618164062e-16F64;__FLT64_DENORM_MIN__;4.94065645841246544176568792868221372e-324F64;__FLT64_HAS_DENORM__;1;__FLT64_HAS_INFINITY__;1;__FLT64_HAS_QUIET_NAN__;1;__FLT128_MANT_DIG__;113;__FLT128_DIG__;33;__FLT128_MIN_EXP__;(-16381);__FLT128_MIN_10_EXP__;(-4931);__FLT128_MAX_EXP__;16384;__FLT128_MAX_10_EXP__;4932;__FLT128_DECIMAL_DIG__;36;__FLT128_MAX__;1.18973149535723176508575932662800702e+4932F128;__FLT128_MIN__;3.36210314311209350626267781732175260e-4932F128;__FLT128_EPSILON__;1.92592994438723585305597794258492732e-34F128;__FLT128_DENORM_MIN__;6.47517511943802511092443895822764655e-4966F128;__FLT128_HAS_DENORM__;1;__FLT128_HAS_INFINITY__;1;__FLT128_HAS_QUIET_NAN__;1;__FLT32X_MANT_DIG__;53;__FLT32X_DIG__;15;__FLT32X_MIN_EXP__;(-1021);__FLT32X_MIN_10_EXP__;(-307);__FLT32X_MAX_EXP__;1024;__FLT32X_MAX_10_EXP__;308;__FLT32X_DECIMAL_DIG__;17;__FLT32X_MAX__;1.79769313486231570814527423731704357e+308F32x;__FLT32X_MIN__;2.22507385850720138309023271733240406e-308F32x;__FLT32X_EPSILON__;2.22044604925031308084726333618164062e-16F32x;__FLT32X_DENORM_MIN__;4.94065645841246544176568792868221372e-324F32x;__FLT32X_HAS_DENORM__;1;__FLT32X_HAS_INFINITY__;1;__FLT32X_HAS_QUIET_NAN__;1;__FLT64X_MANT_DIG__;64;__FLT64X_DIG__;18;__FLT64X_MIN_EXP__;(-16381);__FLT64X_MIN_10_EXP__;(-4931);__FLT64X_MAX_EXP__;16384;__FLT64X_MAX_10_EXP__;4932;__FLT64X_DECIMAL_DIG__;21;__FLT64X_MAX__;1.18973149535723176502126385303097021e+4932F64x;__FLT64X_MIN__;3.36210314311209350626267781732175260e-4932F64x;__FLT64X_EPSILON__;1.08420217248550443400745280086994171e-19F64x;__FLT64X_DENORM_MIN__;3.64519953188247460252840593361941982e-4951F64x;__FLT64X_HAS_DENORM__;1;__FLT64X_HAS_INFINITY__;1;__FLT64X_HAS_QUIET_NAN__;1;__DEC32_MANT_DIG__;7;__DEC32_MIN_EXP__;(-94);__DEC32_MAX_EXP__;97;__DEC32_MIN__;1E-95DF;__DEC32_MAX__;9.999999E96DF;__DEC32_EPSILON__;1E-6DF;__DEC32_SUBNORMAL_MIN__;0.000001E-95DF;__DEC64_MANT_DIG__;16;__DEC64_MIN_EXP__;(-382);__DEC64_MAX_EXP__;385;__DEC64_MIN__;1E-383DD;__DEC64_MAX__;9.999999999999999E384DD;__DEC64_EPSILON__;1E-15DD;__DEC64_SUBNORMAL_MIN__;0.000000000000001E-383DD;__DEC128_MANT_DIG__;34;__DEC128_MIN_EXP__;(-6142);__DEC128_MAX_EXP__;6145;__DEC128_MIN__;1E-6143DL;__DEC128_MAX__;9.999999999999999999999999999999999E6144DL;__DEC128_EPSILON__;1E-33DL;__DEC128_SUBNORMAL_MIN__;0.000000000000000000000000000000001E-6143DL;__REGISTER_PREFIX__; ;__USER_LABEL_PREFIX__; ;__GNUC_STDC_INLINE__;1;__NO_INLINE__;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16;1;__GCC_ATOMIC_BOOL_LOCK_FREE;2;__GCC_ATOMIC_CHAR_LOCK_FREE;2;__GCC_ATOMIC_CHAR16_T_LOCK_FREE;2;__GCC_ATOMIC_CHAR32_T_LOCK_FREE;2;__GCC_ATOMIC_WCHAR_T_LOCK_FREE;2;__GCC_ATOMIC_SHORT_LOCK_FREE;2;__GCC_ATOMIC_INT_LOCK_FREE;2;__GCC_ATOMIC_LONG_LOCK_FREE;2;__GCC_ATOMIC_LLONG_LOCK_FREE;2;__GCC_ATOMIC_TEST_AND_SET_TRUEVAL;1;__GCC_ATOMIC_POINTER_LOCK_FREE;2;__PRAGMA_REDEFINE_EXTNAME;1;__SIZEOF_INT128__;16;__SIZEOF_WCHAR_T__;2;__SIZEOF_WINT_T__;2;__SIZEOF_PTRDIFF_T__;8;__amd64;1;__amd64__;1;__x86_64;1;__x86_64__;1;__SIZEOF_FLOAT80__;16;__SIZEOF_FLOAT128__;16;__ATOMIC_HLE_ACQUIRE;65536;__ATOMIC_HLE_RELEASE;131072;__GCC_ASM_FLAG_OUTPUTS__;1;__nocona;1;__nocona__;1;__tune_core2__;1;__code_model_medium__;1;__MMX__;1;__SSE__;1;__SSE2__;1;__SSE3__;1;__FXSR__;1;__SSE_MATH__;1;__SSE2_MATH__;1;__SEG_FS;1;__SEG_GS;1;__SEH__;1;__stdcall;__attribute__((__stdcall__));__fastcall;__attribute__((__fastcall__));__thiscall;__attribute__((__thiscall__));__cdecl;__attribute__((__cdecl__));_stdcall;__attribute__((__stdcall__));_fastcall;__attribute__((__fastcall__));_thiscall;__attribute__((__thiscall__));_cdecl;__attribute__((__cdecl__));__GXX_MERGED_TYPEINFO_NAMES;0;__GXX_TYPEINFO_EQUALITY_INLINE;0;__MSVCRT__;1;__MINGW32__;1;_WIN32;1;__WIN32;1;__WIN32__;1;WIN32;1;__WINNT;1;__WINNT__;1;WINNT;1;_INTEGRAL_MAX_BITS;64;__MINGW64__;1;__WIN64;1;__WIN64__;1;WIN64;1;_WIN64;1;__declspec(x);__attribute__((x));__DECIMAL_BID_FORMAT__;1;_REENTRANT;1 +//C compiler system include directories +CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS:INTERNAL=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include +//Name of generator. +CMAKE_GENERATOR:INTERNAL=MinGW Makefiles +//Generator instance identifier. +CMAKE_GENERATOR_INSTANCE:INTERNAL= +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=D:/03MyGit/arduino/esp32mainboard/weatherslave +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_ESP_WROOM_02 +CMAKE_MODULE_LINKER_FLAGS_ESP_WROOM_02-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//Platform information initialized +CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_READELF +CMAKE_READELF-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_ESP_WROOM_02 +CMAKE_SHARED_LINKER_FLAGS_ESP_WROOM_02-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_ESP_WROOM_02 +CMAKE_STATIC_LINKER_FLAGS_ESP_WROOM_02-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: ProcessorCount_cmd_getconf +ProcessorCount_cmd_getconf-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: ProcessorCount_cmd_lsconf +ProcessorCount_cmd_lsconf-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: ProcessorCount_cmd_machinfo +ProcessorCount_cmd_machinfo-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: ProcessorCount_cmd_mpsched +ProcessorCount_cmd_mpsched-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: ProcessorCount_cmd_nproc +ProcessorCount_cmd_nproc-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: ProcessorCount_cmd_pidin +ProcessorCount_cmd_pidin-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: ProcessorCount_cmd_psrinfo +ProcessorCount_cmd_psrinfo-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: ProcessorCount_cmd_sysctl +ProcessorCount_cmd_sysctl-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: ProcessorCount_cmd_uname +ProcessorCount_cmd_uname-ADVANCED:INTERNAL=1 + diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CMakeCCompiler.cmake b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CMakeCCompiler.cmake new file mode 100644 index 0000000..66a5eca --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CMakeCCompiler.cmake @@ -0,0 +1,80 @@ +set(CMAKE_C_COMPILER "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc.exe") +set(CMAKE_C_COMPILER_ARG1 "") +set(CMAKE_C_COMPILER_ID "GNU") +set(CMAKE_C_COMPILER_VERSION "7.3.0") +set(CMAKE_C_COMPILER_VERSION_INTERNAL "") +set(CMAKE_C_COMPILER_WRAPPER "") +set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") +set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert") +set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") +set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") +set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") +set(CMAKE_C17_COMPILE_FEATURES "") +set(CMAKE_C23_COMPILE_FEATURES "") + +set(CMAKE_C_PLATFORM_ID "MinGW") +set(CMAKE_C_SIMULATE_ID "") +set(CMAKE_C_COMPILER_FRONTEND_VARIANT "") +set(CMAKE_C_SIMULATE_VERSION "") + + + + +set(CMAKE_AR "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ar.exe") +set(CMAKE_C_COMPILER_AR "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ar.exe") +set(CMAKE_RANLIB "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ranlib.exe") +set(CMAKE_C_COMPILER_RANLIB "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ranlib.exe") +set(CMAKE_LINKER "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ld.exe") +set(CMAKE_MT "") +set(CMAKE_COMPILER_IS_GNUCC 1) +set(CMAKE_C_COMPILER_LOADED 1) +set(CMAKE_C_COMPILER_WORKS 1) +set(CMAKE_C_ABI_COMPILED 0) +set(CMAKE_COMPILER_IS_MINGW 1) +set(CMAKE_COMPILER_IS_CYGWIN ) +if(CMAKE_COMPILER_IS_CYGWIN) + set(CYGWIN 1) + set(UNIX 1) +endif() + +set(CMAKE_C_COMPILER_ENV_VAR "CC") + +if(CMAKE_COMPILER_IS_MINGW) + set(MINGW 1) +endif() +set(CMAKE_C_COMPILER_ID_RUN 1) +set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) +set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_C_LINKER_PREFERENCE 10) + +# Save compiler ABI information. +set(CMAKE_C_SIZEOF_DATA_PTR "") +set(CMAKE_C_COMPILER_ABI "") +set(CMAKE_C_BYTE_ORDER "") +set(CMAKE_C_LIBRARY_ARCHITECTURE "") + +if(CMAKE_C_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_C_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") +endif() + +if(CMAKE_C_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "") +endif() + +set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "") +set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "") +set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "") +set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CMakeCXXCompiler.cmake b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CMakeCXXCompiler.cmake new file mode 100644 index 0000000..def336e --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CMakeCXXCompiler.cmake @@ -0,0 +1,91 @@ +set(CMAKE_CXX_COMPILER "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/g++.exe") +set(CMAKE_CXX_COMPILER_ARG1 "") +set(CMAKE_CXX_COMPILER_ID "GNU") +set(CMAKE_CXX_COMPILER_VERSION "7.3.0") +set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "") +set(CMAKE_CXX_COMPILER_WRAPPER "") +set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14") +set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17") +set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") +set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") +set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") +set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17") +set(CMAKE_CXX20_COMPILE_FEATURES "") +set(CMAKE_CXX23_COMPILE_FEATURES "") + +set(CMAKE_CXX_PLATFORM_ID "MinGW") +set(CMAKE_CXX_SIMULATE_ID "") +set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "") +set(CMAKE_CXX_SIMULATE_VERSION "") + + + + +set(CMAKE_AR "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ar.exe") +set(CMAKE_CXX_COMPILER_AR "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ar.exe") +set(CMAKE_RANLIB "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ranlib.exe") +set(CMAKE_CXX_COMPILER_RANLIB "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc-ranlib.exe") +set(CMAKE_LINKER "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/ld.exe") +set(CMAKE_MT "") +set(CMAKE_COMPILER_IS_GNUCXX 1) +set(CMAKE_CXX_COMPILER_LOADED 1) +set(CMAKE_CXX_COMPILER_WORKS 1) +set(CMAKE_CXX_ABI_COMPILED 0) +set(CMAKE_COMPILER_IS_MINGW 1) +set(CMAKE_COMPILER_IS_CYGWIN ) +if(CMAKE_COMPILER_IS_CYGWIN) + set(CYGWIN 1) + set(UNIX 1) +endif() + +set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") + +if(CMAKE_COMPILER_IS_MINGW) + set(MINGW 1) +endif() +set(CMAKE_CXX_COMPILER_ID_RUN 1) +set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm) +set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) + +foreach (lang C OBJC OBJCXX) + if (CMAKE_${lang}_COMPILER_ID_RUN) + foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS) + list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension}) + endforeach() + endif() +endforeach() + +set(CMAKE_CXX_LINKER_PREFERENCE 30) +set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) + +# Save compiler ABI information. +set(CMAKE_CXX_SIZEOF_DATA_PTR "") +set(CMAKE_CXX_COMPILER_ABI "") +set(CMAKE_CXX_BYTE_ORDER "") +set(CMAKE_CXX_LIBRARY_ARCHITECTURE "") + +if(CMAKE_CXX_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_CXX_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") +endif() + +if(CMAKE_CXX_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "") +endif() + +set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "") +set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") +set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "") +set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CMakeSystem.cmake b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CMakeSystem.cmake new file mode 100644 index 0000000..9d31622 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CMakeSystem.cmake @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Windows-10.0.19044") +set(CMAKE_HOST_SYSTEM_NAME "Windows") +set(CMAKE_HOST_SYSTEM_VERSION "10.0.19044") +set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64") + + + +set(CMAKE_SYSTEM "Generic") +set(CMAKE_SYSTEM_NAME "Generic") +set(CMAKE_SYSTEM_VERSION "") +set(CMAKE_SYSTEM_PROCESSOR "") + +set(CMAKE_CROSSCOMPILING "TRUE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CompilerIdC/CMakeCCompilerId.c b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CompilerIdC/CMakeCCompilerId.c new file mode 100644 index 0000000..051f748 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CompilerIdC/CMakeCCompilerId.c @@ -0,0 +1,807 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +#if defined(__18CXX) +# define ID_VOID_MAIN +#endif +#if defined(__CLASSIC_C__) +/* cv-qualifiers did not exist in K&R C */ +# define const +# define volatile +#endif + +#if !defined(__has_include) +/* If the compiler does not have __has_include, pretend the answer is + always no. */ +# define __has_include(x) 0 +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a version is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#endif +#if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +#endif +#if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +#elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +#endif +#if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +#endif +#if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +#endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_C) +# define COMPILER_ID "SunPro" +# if __SUNPRO_C >= 0x5100 + /* __SUNPRO_C = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# endif + +#elif defined(__HP_cc) +# define COMPILER_ID "HP" + /* __HP_cc = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) + +#elif defined(__DECC) +# define COMPILER_ID "Compaq" + /* __DECC_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) + +#elif defined(__IBMC__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 +# define COMPILER_ID "XL" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__CLANG_FUJITSU) +# define COMPILER_ID "FujitsuClang" +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#elif defined(__FUJITSU) +# define COMPILER_ID "Fujitsu" +# if defined(__FCC_version__) +# define COMPILER_VERSION __FCC_version__ +# elif defined(__FCC_major__) +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# endif +# if defined(__fcc_version) +# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) +# elif defined(__FCC_VERSION) +# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) +# endif + + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__TINYC__) +# define COMPILER_ID "TinyCC" + +#elif defined(__BCC__) +# define COMPILER_ID "Bruce" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) && __has_include() +# define COMPILER_ID "ROCMClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# elif defined(__clang__) +# define SIMULATE_ID "Clang" +# elif defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif +# if defined(__clang__) && __has_include() +# include +# define COMPILER_VERSION_MAJOR DEC(HIP_VERSION_MAJOR) +# define COMPILER_VERSION_MINOR DEC(HIP_VERSION_MINOR) +# define COMPILER_VERSION_PATCH DEC(HIP_VERSION_PATCH) +# endif + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + +#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) +# define COMPILER_ID "SDCC" +# if defined(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) +# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) +# else + /* SDCC = VRP */ +# define COMPILER_VERSION_MAJOR DEC(SDCC/100) +# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) +# define COMPILER_VERSION_PATCH DEC(SDCC % 10) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__MSYS__) +# define PLATFORM_ID "MSYS" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number. */ +#ifdef COMPILER_VERSION +char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; + +/* Construct a string literal encoding the version number components. */ +#elif defined(COMPILER_VERSION_MAJOR) +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#elif defined(COMPILER_VERSION_INTERNAL_STR) +char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +#if !defined(__STDC__) && !defined(__clang__) +# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__) +# define C_DIALECT "90" +# else +# define C_DIALECT +# endif +#elif __STDC_VERSION__ > 201710L +# define C_DIALECT "23" +#elif __STDC_VERSION__ >= 201710L +# define C_DIALECT "17" +#elif __STDC_VERSION__ >= 201000L +# define C_DIALECT "11" +#elif __STDC_VERSION__ >= 199901L +# define C_DIALECT "99" +#else +# define C_DIALECT "90" +#endif +const char* info_language_dialect_default = + "INFO" ":" "dialect_default[" C_DIALECT "]"; + +/*--------------------------------------------------------------------------*/ + +#ifdef ID_VOID_MAIN +void main() {} +#else +# if defined(__CLASSIC_C__) +int main(argc, argv) int argc; char *argv[]; +# else +int main(int argc, char* argv[]) +# endif +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_dialect_default[argc]; + (void)argv; + return require; +} +#endif diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CompilerIdC/a.exe b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CompilerIdC/a.exe new file mode 100644 index 0000000..4d102f1 Binary files /dev/null and b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CompilerIdC/a.exe differ diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CompilerIdCXX/CMakeCXXCompilerId.cpp b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CompilerIdCXX/CMakeCXXCompilerId.cpp new file mode 100644 index 0000000..f675021 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CompilerIdCXX/CMakeCXXCompilerId.cpp @@ -0,0 +1,795 @@ +/* This source file must have a .cpp extension so that all C++ compilers + recognize the extension without flags. Borland does not know .cxx for + example. */ +#ifndef __cplusplus +# error "A C compiler has been selected for C++." +#endif + +#if !defined(__has_include) +/* If the compiler does not have __has_include, pretend the answer is + always no. */ +# define __has_include(x) 0 +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__COMO__) +# define COMPILER_ID "Comeau" + /* __COMO_VERSION__ = VRR */ +# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) +# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) + +#elif defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a version is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#endif +#if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +#endif +#if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +#elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +#endif +#if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +#endif +#if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +#endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_CC) +# define COMPILER_ID "SunPro" +# if __SUNPRO_CC >= 0x5100 + /* __SUNPRO_CC = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# endif + +#elif defined(__HP_aCC) +# define COMPILER_ID "HP" + /* __HP_aCC = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) + +#elif defined(__DECCXX) +# define COMPILER_ID "Compaq" + /* __DECCXX_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) + +#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 +# define COMPILER_ID "XL" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__CLANG_FUJITSU) +# define COMPILER_ID "FujitsuClang" +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#elif defined(__FUJITSU) +# define COMPILER_ID "Fujitsu" +# if defined(__FCC_version__) +# define COMPILER_VERSION __FCC_version__ +# elif defined(__FCC_major__) +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# endif +# if defined(__fcc_version) +# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) +# elif defined(__FCC_VERSION) +# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) +# endif + + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) && __has_include() +# define COMPILER_ID "ROCMClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# elif defined(__clang__) +# define SIMULATE_ID "Clang" +# elif defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif +# if defined(__clang__) && __has_include() +# include +# define COMPILER_VERSION_MAJOR DEC(HIP_VERSION_MAJOR) +# define COMPILER_VERSION_MINOR DEC(HIP_VERSION_MINOR) +# define COMPILER_VERSION_PATCH DEC(HIP_VERSION_PATCH) +# endif + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) || defined(__GNUG__) +# define COMPILER_ID "GNU" +# if defined(__GNUC__) +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# else +# define COMPILER_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__MSYS__) +# define PLATFORM_ID "MSYS" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number. */ +#ifdef COMPILER_VERSION +char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; + +/* Construct a string literal encoding the version number components. */ +#elif defined(COMPILER_VERSION_MAJOR) +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#elif defined(COMPILER_VERSION_INTERNAL_STR) +char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L +# if defined(__INTEL_CXX11_MODE__) +# if defined(__cpp_aggregate_nsdmi) +# define CXX_STD 201402L +# else +# define CXX_STD 201103L +# endif +# else +# define CXX_STD 199711L +# endif +#elif defined(_MSC_VER) && defined(_MSVC_LANG) +# define CXX_STD _MSVC_LANG +#else +# define CXX_STD __cplusplus +#endif + +const char* info_language_dialect_default = "INFO" ":" "dialect_default[" +#if CXX_STD > 202002L + "23" +#elif CXX_STD > 201703L + "20" +#elif CXX_STD >= 201703L + "17" +#elif CXX_STD >= 201402L + "14" +#elif CXX_STD >= 201103L + "11" +#else + "98" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_dialect_default[argc]; + (void)argv; + return require; +} diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CompilerIdCXX/a.exe b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CompilerIdCXX/a.exe new file mode 100644 index 0000000..34ad435 Binary files /dev/null and b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CompilerIdCXX/a.exe differ diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeDirectoryInformation.cmake b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000..173e4e6 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "MinGW Makefiles" Generator, CMake Version 3.21 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "D:/03MyGit/arduino/esp32mainboard/weatherslave") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeError.log b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeError.log new file mode 100644 index 0000000..1a34755 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeError.log @@ -0,0 +1,144 @@ +Detecting C compiler ABI info failed to compile with the following output: +Change Dir: D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeTmp + +Run Build Command(s):C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/mingw32-make.exe -f Makefile cmTC_d77d0/fast && C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/mingw32-make.exe -f CMakeFiles\cmTC_d77d0.dir\build.make CMakeFiles/cmTC_d77d0.dir/build +mingw32-make.exe[1]: Entering directory 'D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_d77d0.dir/CMakeCCompilerABI.c.obj +C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\gcc.exe -v -o CMakeFiles\cmTC_d77d0.dir\CMakeCCompilerABI.c.obj -c "C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\share\cmake-3.21\Modules\CMakeCCompilerABI.c" +Using built-in specs. +COLLECT_GCC=C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\gcc.exe +Target: x86_64-w64-mingw32 +Configured with: ../../../src/gcc-7.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/lib -L/c/mingw730/prerequisites/x86_64-zlib-static/lib -L/c/mingw730/prerequisites/x86_64-w64-mingw32-static/lib ' +Thread model: posix +gcc version 7.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles\cmTC_d77d0.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona' + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/cc1.exe -quiet -v -iprefix C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/ -D_REENTRANT C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\share\cmake-3.21\Modules\CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=core2 -march=nocona -auxbase-strip CMakeFiles\cmTC_d77d0.dir\CMakeCCompilerABI.c.obj -version -o C:\Users\xin\AppData\Local\Temp\ccAfrodu.s +GNU C11 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) version 7.3.0 (x86_64-w64-mingw32) + compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include" +ignoring nonexistent directory "C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64C:/msys64-2/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include" +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed" +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include" +ignoring nonexistent directory "C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/mingw/include" +#include "..." search starts here: +#include <...> search starts here: + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include +End of search list. +GNU C11 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) version 7.3.0 (x86_64-w64-mingw32) + compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +Compiler executable checksum: afb3948cd5c0c8f535365414e7310436 +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles\cmTC_d77d0.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona' + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/as.exe -v -o CMakeFiles\cmTC_d77d0.dir\CMakeCCompilerABI.c.obj C:\Users\xin\AppData\Local\Temp\ccAfrodu.s +GNU assembler version 2.30 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.30 +COMPILER_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ +LIBRARY_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../ +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles\cmTC_d77d0.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=core2' '-march=nocona' +Linking C executable cmTC_d77d0 +"C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_d77d0.dir\link.txt --verbose=1 +C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\gcc.exe -v CMakeFiles/cmTC_d77d0.dir/CMakeCCompilerABI.c.obj -o cmTC_d77d0 +Using built-in specs. +COLLECT_GCC=C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\gcc.exe +COLLECT_LTO_WRAPPER=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe +Target: x86_64-w64-mingw32 +Configured with: ../../../src/gcc-7.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/lib -L/c/mingw730/prerequisites/x86_64-zlib-static/lib -L/c/mingw730/prerequisites/x86_64-w64-mingw32-static/lib ' +Thread model: posix +gcc version 7.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) +COMPILER_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ +LIBRARY_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_d77d0.exe' '-mtune=core2' '-march=nocona' + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/collect2.exe -plugin C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/liblto_plugin-0.dll -plugin-opt=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\xin\AppData\Local\Temp\cckJ1fTH.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-liconv -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt --sysroot=C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 -m i386pep -Bdynamic -o cmTC_d77d0.exe C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtbegin.o -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0 -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../.. CMakeFiles/cmTC_d77d0.dir/CMakeCCompilerABI.c.obj -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtend.o +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_d77d0.exe' '-mtune=core2' '-march=nocona' +mingw32-make.exe[1]: Leaving directory 'D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeTmp' + + +Cannot copy output executable + '' +to destination specified by COPY_FILE: + 'D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CMakeDetermineCompilerABI_C.bin' +Unable to find the executable at any of: + D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeTmp/cmTC_d77d0 + D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeTmp/Debug/cmTC_d77d0 + D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeTmp/Development/cmTC_d77d0 + + +Detecting CXX compiler ABI info failed to compile with the following output: +Change Dir: D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeTmp + +Run Build Command(s):C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/mingw32-make.exe -f Makefile cmTC_91b14/fast && C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/mingw32-make.exe -f CMakeFiles\cmTC_91b14.dir\build.make CMakeFiles/cmTC_91b14.dir/build +mingw32-make.exe[1]: Entering directory 'D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_91b14.dir/CMakeCXXCompilerABI.cpp.obj +C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\g++.exe -v -o CMakeFiles\cmTC_91b14.dir\CMakeCXXCompilerABI.cpp.obj -c "C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\share\cmake-3.21\Modules\CMakeCXXCompilerABI.cpp" +Using built-in specs. +COLLECT_GCC=C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\g++.exe +Target: x86_64-w64-mingw32 +Configured with: ../../../src/gcc-7.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/lib -L/c/mingw730/prerequisites/x86_64-zlib-static/lib -L/c/mingw730/prerequisites/x86_64-w64-mingw32-static/lib ' +Thread model: posix +gcc version 7.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles\cmTC_91b14.dir\CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=core2' '-march=nocona' + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/cc1plus.exe -quiet -v -iprefix C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/ -D_REENTRANT C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\share\cmake-3.21\Modules\CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=core2 -march=nocona -auxbase-strip CMakeFiles\cmTC_91b14.dir\CMakeCXXCompilerABI.cpp.obj -version -o C:\Users\xin\AppData\Local\Temp\ccslaY95.s +GNU C++14 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) version 7.3.0 (x86_64-w64-mingw32) + compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++" +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32" +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward" +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include" +ignoring nonexistent directory "C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64C:/msys64-2/mingw64/lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include" +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed" +ignoring duplicate directory "C:/Qt/Qt5.12.7/Tools/mingw730_64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include" +ignoring nonexistent directory "C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/mingw/include" +#include "..." search starts here: +#include <...> search starts here: + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++ + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32 + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include +End of search list. +GNU C++14 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) version 7.3.0 (x86_64-w64-mingw32) + compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.18-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +Compiler executable checksum: 86cf749bb84a0f12f1d61bff4e68fffd +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles\cmTC_91b14.dir\CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=core2' '-march=nocona' + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/as.exe -v -o CMakeFiles\cmTC_91b14.dir\CMakeCXXCompilerABI.cpp.obj C:\Users\xin\AppData\Local\Temp\ccslaY95.s +GNU assembler version 2.30 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.30 +COMPILER_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ +LIBRARY_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../ +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles\cmTC_91b14.dir\CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=core2' '-march=nocona' +Linking CXX executable cmTC_91b14 +"C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_91b14.dir\link.txt --verbose=1 +C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\g++.exe -v CMakeFiles/cmTC_91b14.dir/CMakeCXXCompilerABI.cpp.obj -o cmTC_91b14 +Using built-in specs. +COLLECT_GCC=C:\Qt\Qt5.12.7\Tools\mingw730_64\bin\g++.exe +COLLECT_LTO_WRAPPER=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe +Target: x86_64-w64-mingw32 +Configured with: ../../../src/gcc-7.3.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw730/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/lib -L/c/mingw730/prerequisites/x86_64-zlib-static/lib -L/c/mingw730/prerequisites/x86_64-w64-mingw32-static/lib ' +Thread model: posix +gcc version 7.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) +COMPILER_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ +LIBRARY_PATH=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/;C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_91b14.exe' '-shared-libgcc' '-mtune=core2' '-march=nocona' + C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/collect2.exe -plugin C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/liblto_plugin-0.dll -plugin-opt=C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\xin\AppData\Local\Temp\ccLI8emc.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-liconv -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt --sysroot=C:/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 -m i386pep -Bdynamic -o cmTC_91b14.exe C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtbegin.o -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0 -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/lib -LC:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../.. CMakeFiles/cmTC_91b14.dir/CMakeCXXCompilerABI.cpp.obj -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/crtend.o +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_91b14.exe' '-shared-libgcc' '-mtune=core2' '-march=nocona' +mingw32-make.exe[1]: Leaving directory 'D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeTmp' + + +Cannot copy output executable + '' +to destination specified by COPY_FILE: + 'D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CMakeDetermineCompilerABI_CXX.bin' +Unable to find the executable at any of: + D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeTmp/cmTC_91b14 + D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeTmp/Debug/cmTC_91b14 + D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeTmp/Development/cmTC_91b14 + + diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeOutput.log b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeOutput.log new file mode 100644 index 0000000..af9d102 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeOutput.log @@ -0,0 +1,28 @@ +The target system is: Generic - - +The host system is: Windows - 10.0.19044 - AMD64 +Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. +Compiler: C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/gcc.exe +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe" + +The C compiler identification is GNU, found in "D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CompilerIdC/a.exe" + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. +Compiler: C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/g++.exe +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe" + +The CXX compiler identification is GNU, found in "D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/3.21.1/CompilerIdCXX/a.exe" + diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeRuleHashes.txt b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeRuleHashes.txt new file mode 100644 index 0000000..f724203 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/CMakeRuleHashes.txt @@ -0,0 +1,3 @@ +# Hashes of file build rules. +97dd8654826a62b67bf0b12d79e0067d CMakeFiles/Debug +a50e9418045207aa61f5b726d1e8159b CMakeFiles/Production diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/DependInfo.cmake b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/DependInfo.cmake new file mode 100644 index 0000000..dc55e44 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/DependInfo.cmake @@ -0,0 +1,18 @@ + +# Consider dependencies only in project. +set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF) + +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + ) + +# The set of dependency files which are needed: +set(CMAKE_DEPENDS_DEPENDENCY_FILES + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/build.make b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/build.make new file mode 100644 index 0000000..37e8549 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/build.make @@ -0,0 +1,86 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "MinGW Makefiles" Generator, CMake Version 3.21 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +SHELL = cmd.exe + +# The CMake executable. +CMAKE_COMMAND = "C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" + +# The command to remove a file. +RM = "C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = D:\03MyGit\arduino\esp32mainboard\weatherslave + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02 + +# Utility rule file for Debug. + +# Include any custom commands dependencies for this target. +include CMakeFiles/Debug.dir/compiler_depend.make + +# Include the progress variables for this target. +include CMakeFiles/Debug.dir/progress.make + +CMakeFiles/Debug: + cd /d D:\03MyGit\arduino\esp32mainboard\weatherslave && platformio -c clion debug -eesp_wroom_02 + +Debug: CMakeFiles/Debug +Debug: CMakeFiles/Debug.dir/build.make +.PHONY : Debug + +# Rule to build all files generated by this target. +CMakeFiles/Debug.dir/build: Debug +.PHONY : CMakeFiles/Debug.dir/build + +CMakeFiles/Debug.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles\Debug.dir\cmake_clean.cmake +.PHONY : CMakeFiles/Debug.dir/clean + +CMakeFiles/Debug.dir/depend: + $(CMAKE_COMMAND) -E cmake_depends "MinGW Makefiles" D:\03MyGit\arduino\esp32mainboard\weatherslave D:\03MyGit\arduino\esp32mainboard\weatherslave D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02 D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02 D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles\Debug.dir\DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/Debug.dir/depend + diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/cmake_clean.cmake b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/cmake_clean.cmake new file mode 100644 index 0000000..93a96a0 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +file(REMOVE_RECURSE + "CMakeFiles/Debug" +) + +# Per-language clean rules from dependency scanning. +foreach(lang ) + include(CMakeFiles/Debug.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/compiler_depend.make b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/compiler_depend.make new file mode 100644 index 0000000..8f58b17 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/compiler_depend.make @@ -0,0 +1,2 @@ +# Empty custom commands generated dependencies file for Debug. +# This may be replaced when dependencies are built. diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/compiler_depend.ts b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/compiler_depend.ts new file mode 100644 index 0000000..9434a10 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/compiler_depend.ts @@ -0,0 +1,2 @@ +# CMAKE generated file: DO NOT EDIT! +# Timestamp file for custom commands dependencies management for Debug. diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/progress.make b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir/progress.make @@ -0,0 +1 @@ + diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Makefile.cmake b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Makefile.cmake new file mode 100644 index 0000000..f24b2d5 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Makefile.cmake @@ -0,0 +1,49 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "MinGW Makefiles" Generator, CMake Version 3.21 + +# The generator used is: +set(CMAKE_DEPENDS_GENERATOR "MinGW Makefiles") + +# The top level Makefile was generated from the following files: +set(CMAKE_MAKEFILE_DEPENDS + "CMakeCache.txt" + "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCInformation.cmake" + "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCXXInformation.cmake" + "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeCommonLanguageInclude.cmake" + "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake" + "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeFindCodeBlocks.cmake" + "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeGenericSystem.cmake" + "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeInitializeConfigs.cmake" + "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeLanguageInformation.cmake" + "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeSystemSpecificInformation.cmake" + "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/CMakeSystemSpecificInitialize.cmake" + "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/CMakeCommonCompilerMacros.cmake" + "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-C.cmake" + "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU-CXX.cmake" + "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Compiler/GNU.cmake" + "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/Platform/Generic.cmake" + "C:/Program Files/JetBrains/CLion 2021.1.1/bin/cmake/win/share/cmake-3.21/Modules/ProcessorCount.cmake" + "../CMakeLists.txt" + "../CMakeListsPrivate.txt" + "CMakeFiles/3.21.1/CMakeCCompiler.cmake" + "CMakeFiles/3.21.1/CMakeCXXCompiler.cmake" + "CMakeFiles/3.21.1/CMakeSystem.cmake" + ) + +# The corresponding makefile is: +set(CMAKE_MAKEFILE_OUTPUTS + "Makefile" + "CMakeFiles/cmake.check_cache" + ) + +# Byproducts of CMake generate step: +set(CMAKE_MAKEFILE_PRODUCTS + "CMakeFiles/CMakeDirectoryInformation.cmake" + ) + +# Dependency information for all targets: +set(CMAKE_DEPEND_INFO_FILES + "CMakeFiles/Production.dir/DependInfo.cmake" + "CMakeFiles/Debug.dir/DependInfo.cmake" + "CMakeFiles/Z_DUMMY_TARGET.dir/DependInfo.cmake" + ) diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Makefile2 b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Makefile2 new file mode 100644 index 0000000..a363d65 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Makefile2 @@ -0,0 +1,167 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "MinGW Makefiles" Generator, CMake Version 3.21 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +SHELL = cmd.exe + +# The CMake executable. +CMAKE_COMMAND = "C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" + +# The command to remove a file. +RM = "C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = D:\03MyGit\arduino\esp32mainboard\weatherslave + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02 + +#============================================================================= +# Directory level rules for the build root directory + +# The main recursive "all" target. +all: CMakeFiles/Production.dir/all +all: CMakeFiles/Debug.dir/all +all: CMakeFiles/Z_DUMMY_TARGET.dir/all +.PHONY : all + +# The main recursive "preinstall" target. +preinstall: +.PHONY : preinstall + +# The main recursive "clean" target. +clean: CMakeFiles/Production.dir/clean +clean: CMakeFiles/Debug.dir/clean +clean: CMakeFiles/Z_DUMMY_TARGET.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target CMakeFiles/Production.dir + +# All Build rule for target. +CMakeFiles/Production.dir/all: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Production.dir\build.make CMakeFiles/Production.dir/depend + $(MAKE) $(MAKESILENT) -f CMakeFiles\Production.dir\build.make CMakeFiles/Production.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles --progress-num= "Built target Production" +.PHONY : CMakeFiles/Production.dir/all + +# Build rule for subdir invocation for target. +CMakeFiles/Production.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles 0 + $(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 CMakeFiles/Production.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles 0 +.PHONY : CMakeFiles/Production.dir/rule + +# Convenience name for target. +Production: CMakeFiles/Production.dir/rule +.PHONY : Production + +# clean rule for target. +CMakeFiles/Production.dir/clean: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Production.dir\build.make CMakeFiles/Production.dir/clean +.PHONY : CMakeFiles/Production.dir/clean + +#============================================================================= +# Target rules for target CMakeFiles/Debug.dir + +# All Build rule for target. +CMakeFiles/Debug.dir/all: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Debug.dir\build.make CMakeFiles/Debug.dir/depend + $(MAKE) $(MAKESILENT) -f CMakeFiles\Debug.dir\build.make CMakeFiles/Debug.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles --progress-num= "Built target Debug" +.PHONY : CMakeFiles/Debug.dir/all + +# Build rule for subdir invocation for target. +CMakeFiles/Debug.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles 0 + $(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 CMakeFiles/Debug.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles 0 +.PHONY : CMakeFiles/Debug.dir/rule + +# Convenience name for target. +Debug: CMakeFiles/Debug.dir/rule +.PHONY : Debug + +# clean rule for target. +CMakeFiles/Debug.dir/clean: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Debug.dir\build.make CMakeFiles/Debug.dir/clean +.PHONY : CMakeFiles/Debug.dir/clean + +#============================================================================= +# Target rules for target CMakeFiles/Z_DUMMY_TARGET.dir + +# All Build rule for target. +CMakeFiles/Z_DUMMY_TARGET.dir/all: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/depend + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles --progress-num=1,2,3,4,5,6 "Built target Z_DUMMY_TARGET" +.PHONY : CMakeFiles/Z_DUMMY_TARGET.dir/all + +# Build rule for subdir invocation for target. +CMakeFiles/Z_DUMMY_TARGET.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles 6 + $(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 CMakeFiles/Z_DUMMY_TARGET.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles 0 +.PHONY : CMakeFiles/Z_DUMMY_TARGET.dir/rule + +# Convenience name for target. +Z_DUMMY_TARGET: CMakeFiles/Z_DUMMY_TARGET.dir/rule +.PHONY : Z_DUMMY_TARGET + +# clean rule for target. +CMakeFiles/Z_DUMMY_TARGET.dir/clean: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/clean +.PHONY : CMakeFiles/Z_DUMMY_TARGET.dir/clean + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/DependInfo.cmake b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/DependInfo.cmake new file mode 100644 index 0000000..dc55e44 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/DependInfo.cmake @@ -0,0 +1,18 @@ + +# Consider dependencies only in project. +set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF) + +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + ) + +# The set of dependency files which are needed: +set(CMAKE_DEPENDS_DEPENDENCY_FILES + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/build.make b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/build.make new file mode 100644 index 0000000..3500779 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/build.make @@ -0,0 +1,86 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "MinGW Makefiles" Generator, CMake Version 3.21 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +SHELL = cmd.exe + +# The CMake executable. +CMAKE_COMMAND = "C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" + +# The command to remove a file. +RM = "C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = D:\03MyGit\arduino\esp32mainboard\weatherslave + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02 + +# Utility rule file for Production. + +# Include any custom commands dependencies for this target. +include CMakeFiles/Production.dir/compiler_depend.make + +# Include the progress variables for this target. +include CMakeFiles/Production.dir/progress.make + +CMakeFiles/Production: + cd /d D:\03MyGit\arduino\esp32mainboard\weatherslave && platformio -c clion run -eesp_wroom_02 + +Production: CMakeFiles/Production +Production: CMakeFiles/Production.dir/build.make +.PHONY : Production + +# Rule to build all files generated by this target. +CMakeFiles/Production.dir/build: Production +.PHONY : CMakeFiles/Production.dir/build + +CMakeFiles/Production.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles\Production.dir\cmake_clean.cmake +.PHONY : CMakeFiles/Production.dir/clean + +CMakeFiles/Production.dir/depend: + $(CMAKE_COMMAND) -E cmake_depends "MinGW Makefiles" D:\03MyGit\arduino\esp32mainboard\weatherslave D:\03MyGit\arduino\esp32mainboard\weatherslave D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02 D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02 D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles\Production.dir\DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/Production.dir/depend + diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/cmake_clean.cmake b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/cmake_clean.cmake new file mode 100644 index 0000000..90e8df3 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +file(REMOVE_RECURSE + "CMakeFiles/Production" +) + +# Per-language clean rules from dependency scanning. +foreach(lang ) + include(CMakeFiles/Production.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/compiler_depend.make b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/compiler_depend.make new file mode 100644 index 0000000..5e9fc84 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/compiler_depend.make @@ -0,0 +1,2 @@ +# Empty custom commands generated dependencies file for Production. +# This may be replaced when dependencies are built. diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/compiler_depend.ts b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/compiler_depend.ts new file mode 100644 index 0000000..a1befd2 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/compiler_depend.ts @@ -0,0 +1,2 @@ +# CMAKE generated file: DO NOT EDIT! +# Timestamp file for custom commands dependencies management for Production. diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/progress.make b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir/progress.make @@ -0,0 +1 @@ + diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/TargetDirectories.txt b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/TargetDirectories.txt new file mode 100644 index 0000000..bebe57a --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,5 @@ +D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Production.dir +D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/edit_cache.dir +D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Debug.dir +D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir +D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/rebuild_cache.dir diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/DependInfo.cmake b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/DependInfo.cmake new file mode 100644 index 0000000..c7690a7 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/DependInfo.cmake @@ -0,0 +1,23 @@ + +# Consider dependencies only in project. +set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF) + +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + ) + +# The set of dependency files which are needed: +set(CMAKE_DEPENDS_DEPENDENCY_FILES + "D:/03MyGit/arduino/esp32mainboard/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_BusIO_Register.cpp" "CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.obj" "gcc" "CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.obj.d" + "D:/03MyGit/arduino/esp32mainboard/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_I2CDevice.cpp" "CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.obj" "gcc" "CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.obj.d" + "D:/03MyGit/arduino/esp32mainboard/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit BusIO/Adafruit_SPIDevice.cpp" "CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.obj" "gcc" "CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.obj.d" + "D:/03MyGit/arduino/esp32mainboard/weatherslave/.pio/libdeps/esp_wroom_02/Adafruit MLX90614 Library/Adafruit_MLX90614.cpp" "CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.obj" "gcc" "CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.obj.d" + "D:/03MyGit/arduino/esp32mainboard/weatherslave/src/main.cpp" "CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.obj" "gcc" "CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.obj.d" + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/build.make b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/build.make new file mode 100644 index 0000000..10efa6b --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/build.make @@ -0,0 +1,173 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "MinGW Makefiles" Generator, CMake Version 3.21 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +SHELL = cmd.exe + +# The CMake executable. +CMAKE_COMMAND = "C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" + +# The command to remove a file. +RM = "C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = D:\03MyGit\arduino\esp32mainboard\weatherslave + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02 + +# Include any dependencies generated for this target. +include CMakeFiles/Z_DUMMY_TARGET.dir/depend.make +# Include any dependencies generated by the compiler for this target. +include CMakeFiles/Z_DUMMY_TARGET.dir/compiler_depend.make + +# Include the progress variables for this target. +include CMakeFiles/Z_DUMMY_TARGET.dir/progress.make + +# Include the compile flags for this target's objects. +include CMakeFiles/Z_DUMMY_TARGET.dir/flags.make + +CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.obj: CMakeFiles/Z_DUMMY_TARGET.dir/flags.make +CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.obj: ../src/main.cpp +CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.obj: CMakeFiles/Z_DUMMY_TARGET.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.obj" + C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.obj -MF CMakeFiles\Z_DUMMY_TARGET.dir\src\main.cpp.obj.d -o CMakeFiles\Z_DUMMY_TARGET.dir\src\main.cpp.obj -c D:\03MyGit\arduino\esp32mainboard\weatherslave\src\main.cpp + +CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.i" + C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E D:\03MyGit\arduino\esp32mainboard\weatherslave\src\main.cpp > CMakeFiles\Z_DUMMY_TARGET.dir\src\main.cpp.i + +CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.s" + C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S D:\03MyGit\arduino\esp32mainboard\weatherslave\src\main.cpp -o CMakeFiles\Z_DUMMY_TARGET.dir\src\main.cpp.s + +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.obj: CMakeFiles/Z_DUMMY_TARGET.dir/flags.make +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.obj: ../.pio/libdeps/esp_wroom_02/Adafruit\ BusIO/Adafruit_BusIO_Register.cpp +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.obj: CMakeFiles/Z_DUMMY_TARGET.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.obj" + C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.obj -MF CMakeFiles\Z_DUMMY_TARGET.dir\.pio\libdeps\esp_wroom_02\Adafruit_BusIO\Adafruit_BusIO_Register.cpp.obj.d -o CMakeFiles\Z_DUMMY_TARGET.dir\.pio\libdeps\esp_wroom_02\Adafruit_BusIO\Adafruit_BusIO_Register.cpp.obj -c "D:\03MyGit\arduino\esp32mainboard\weatherslave\.pio\libdeps\esp_wroom_02\Adafruit BusIO\Adafruit_BusIO_Register.cpp" + +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.i" + C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E "D:\03MyGit\arduino\esp32mainboard\weatherslave\.pio\libdeps\esp_wroom_02\Adafruit BusIO\Adafruit_BusIO_Register.cpp" > CMakeFiles\Z_DUMMY_TARGET.dir\.pio\libdeps\esp_wroom_02\Adafruit_BusIO\Adafruit_BusIO_Register.cpp.i + +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.s" + C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S "D:\03MyGit\arduino\esp32mainboard\weatherslave\.pio\libdeps\esp_wroom_02\Adafruit BusIO\Adafruit_BusIO_Register.cpp" -o CMakeFiles\Z_DUMMY_TARGET.dir\.pio\libdeps\esp_wroom_02\Adafruit_BusIO\Adafruit_BusIO_Register.cpp.s + +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.obj: CMakeFiles/Z_DUMMY_TARGET.dir/flags.make +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.obj: ../.pio/libdeps/esp_wroom_02/Adafruit\ BusIO/Adafruit_I2CDevice.cpp +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.obj: CMakeFiles/Z_DUMMY_TARGET.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Building CXX object CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.obj" + C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.obj -MF CMakeFiles\Z_DUMMY_TARGET.dir\.pio\libdeps\esp_wroom_02\Adafruit_BusIO\Adafruit_I2CDevice.cpp.obj.d -o CMakeFiles\Z_DUMMY_TARGET.dir\.pio\libdeps\esp_wroom_02\Adafruit_BusIO\Adafruit_I2CDevice.cpp.obj -c "D:\03MyGit\arduino\esp32mainboard\weatherslave\.pio\libdeps\esp_wroom_02\Adafruit BusIO\Adafruit_I2CDevice.cpp" + +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.i" + C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E "D:\03MyGit\arduino\esp32mainboard\weatherslave\.pio\libdeps\esp_wroom_02\Adafruit BusIO\Adafruit_I2CDevice.cpp" > CMakeFiles\Z_DUMMY_TARGET.dir\.pio\libdeps\esp_wroom_02\Adafruit_BusIO\Adafruit_I2CDevice.cpp.i + +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.s" + C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S "D:\03MyGit\arduino\esp32mainboard\weatherslave\.pio\libdeps\esp_wroom_02\Adafruit BusIO\Adafruit_I2CDevice.cpp" -o CMakeFiles\Z_DUMMY_TARGET.dir\.pio\libdeps\esp_wroom_02\Adafruit_BusIO\Adafruit_I2CDevice.cpp.s + +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.obj: CMakeFiles/Z_DUMMY_TARGET.dir/flags.make +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.obj: ../.pio/libdeps/esp_wroom_02/Adafruit\ BusIO/Adafruit_SPIDevice.cpp +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.obj: CMakeFiles/Z_DUMMY_TARGET.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Building CXX object CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.obj" + C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.obj -MF CMakeFiles\Z_DUMMY_TARGET.dir\.pio\libdeps\esp_wroom_02\Adafruit_BusIO\Adafruit_SPIDevice.cpp.obj.d -o CMakeFiles\Z_DUMMY_TARGET.dir\.pio\libdeps\esp_wroom_02\Adafruit_BusIO\Adafruit_SPIDevice.cpp.obj -c "D:\03MyGit\arduino\esp32mainboard\weatherslave\.pio\libdeps\esp_wroom_02\Adafruit BusIO\Adafruit_SPIDevice.cpp" + +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.i" + C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E "D:\03MyGit\arduino\esp32mainboard\weatherslave\.pio\libdeps\esp_wroom_02\Adafruit BusIO\Adafruit_SPIDevice.cpp" > CMakeFiles\Z_DUMMY_TARGET.dir\.pio\libdeps\esp_wroom_02\Adafruit_BusIO\Adafruit_SPIDevice.cpp.i + +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.s" + C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S "D:\03MyGit\arduino\esp32mainboard\weatherslave\.pio\libdeps\esp_wroom_02\Adafruit BusIO\Adafruit_SPIDevice.cpp" -o CMakeFiles\Z_DUMMY_TARGET.dir\.pio\libdeps\esp_wroom_02\Adafruit_BusIO\Adafruit_SPIDevice.cpp.s + +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.obj: CMakeFiles/Z_DUMMY_TARGET.dir/flags.make +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.obj: ../.pio/libdeps/esp_wroom_02/Adafruit\ MLX90614\ Library/Adafruit_MLX90614.cpp +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.obj: CMakeFiles/Z_DUMMY_TARGET.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles --progress-num=$(CMAKE_PROGRESS_5) "Building CXX object CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.obj" + C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.obj -MF CMakeFiles\Z_DUMMY_TARGET.dir\.pio\libdeps\esp_wroom_02\Adafruit_MLX90614_Library\Adafruit_MLX90614.cpp.obj.d -o CMakeFiles\Z_DUMMY_TARGET.dir\.pio\libdeps\esp_wroom_02\Adafruit_MLX90614_Library\Adafruit_MLX90614.cpp.obj -c "D:\03MyGit\arduino\esp32mainboard\weatherslave\.pio\libdeps\esp_wroom_02\Adafruit MLX90614 Library\Adafruit_MLX90614.cpp" + +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.i" + C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E "D:\03MyGit\arduino\esp32mainboard\weatherslave\.pio\libdeps\esp_wroom_02\Adafruit MLX90614 Library\Adafruit_MLX90614.cpp" > CMakeFiles\Z_DUMMY_TARGET.dir\.pio\libdeps\esp_wroom_02\Adafruit_MLX90614_Library\Adafruit_MLX90614.cpp.i + +CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.s" + C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S "D:\03MyGit\arduino\esp32mainboard\weatherslave\.pio\libdeps\esp_wroom_02\Adafruit MLX90614 Library\Adafruit_MLX90614.cpp" -o CMakeFiles\Z_DUMMY_TARGET.dir\.pio\libdeps\esp_wroom_02\Adafruit_MLX90614_Library\Adafruit_MLX90614.cpp.s + +# Object files for target Z_DUMMY_TARGET +Z_DUMMY_TARGET_OBJECTS = \ +"CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.obj" \ +"CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.obj" \ +"CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.obj" \ +"CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.obj" \ +"CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.obj" + +# External object files for target Z_DUMMY_TARGET +Z_DUMMY_TARGET_EXTERNAL_OBJECTS = + +Z_DUMMY_TARGET: CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.obj +Z_DUMMY_TARGET: CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.obj +Z_DUMMY_TARGET: CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.obj +Z_DUMMY_TARGET: CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.obj +Z_DUMMY_TARGET: CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.obj +Z_DUMMY_TARGET: CMakeFiles/Z_DUMMY_TARGET.dir/build.make +Z_DUMMY_TARGET: CMakeFiles/Z_DUMMY_TARGET.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles --progress-num=$(CMAKE_PROGRESS_6) "Linking CXX executable Z_DUMMY_TARGET" + $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles\Z_DUMMY_TARGET.dir\link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +CMakeFiles/Z_DUMMY_TARGET.dir/build: Z_DUMMY_TARGET +.PHONY : CMakeFiles/Z_DUMMY_TARGET.dir/build + +CMakeFiles/Z_DUMMY_TARGET.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles\Z_DUMMY_TARGET.dir\cmake_clean.cmake +.PHONY : CMakeFiles/Z_DUMMY_TARGET.dir/clean + +CMakeFiles/Z_DUMMY_TARGET.dir/depend: + $(CMAKE_COMMAND) -E cmake_depends "MinGW Makefiles" D:\03MyGit\arduino\esp32mainboard\weatherslave D:\03MyGit\arduino\esp32mainboard\weatherslave D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02 D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02 D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles\Z_DUMMY_TARGET.dir\DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/Z_DUMMY_TARGET.dir/depend + diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/cmake_clean.cmake b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/cmake_clean.cmake new file mode 100644 index 0000000..4e91798 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/cmake_clean.cmake @@ -0,0 +1,20 @@ +file(REMOVE_RECURSE + "CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.obj" + "CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.obj.d" + "CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.obj" + "CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.obj.d" + "CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.obj" + "CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.obj.d" + "CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.obj" + "CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.obj.d" + "CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.obj" + "CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.obj.d" + "Z_DUMMY_TARGET" + "Z_DUMMY_TARGET.manifest" + "Z_DUMMY_TARGET.pdb" +) + +# Per-language clean rules from dependency scanning. +foreach(lang CXX) + include(CMakeFiles/Z_DUMMY_TARGET.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/compiler_depend.make b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/compiler_depend.make new file mode 100644 index 0000000..4d3d5c1 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/compiler_depend.make @@ -0,0 +1,2 @@ +# Empty compiler generated dependencies file for Z_DUMMY_TARGET. +# This may be replaced when dependencies are built. diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/compiler_depend.ts b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/compiler_depend.ts new file mode 100644 index 0000000..6273a6b --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/compiler_depend.ts @@ -0,0 +1,2 @@ +# CMAKE generated file: DO NOT EDIT! +# Timestamp file for compiler generated dependencies management for Z_DUMMY_TARGET. diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/depend.make b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/depend.make new file mode 100644 index 0000000..ab7fd8f --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/depend.make @@ -0,0 +1,2 @@ +# Empty dependencies file for Z_DUMMY_TARGET. +# This may be replaced when dependencies are built. diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/flags.make b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/flags.make new file mode 100644 index 0000000..9ee0603 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "MinGW Makefiles" Generator, CMake Version 3.21 + +# compile CXX with C:/Users/xin/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-g++.exe +CXX_DEFINES = -DARDUINO=10805 -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD=\"PLATFORMIO_ESP_WROOM_02\" -DARDUINO_ESP8266_ESP_WROOM_02 -DESP8266 -DFLASHMODE_QIO -DF_CPU=80000000L -DICACHE_FLASH -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DLWIP_OPEN_SRC -DMMU_ICACHE_SIZE=0x8000 -DMMU_IRAM_SIZE=0x8000 -DNONOSDK22x_190703=1 -DPLATFORMIO=50205 -DTCP_MSS=536 -DVTABLES_IN_FLASH -D__ets__ + +CXX_INCLUDES = -ID:\03MyGit\arduino\esp32mainboard\weatherslave\include -ID:\03MyGit\arduino\esp32mainboard\weatherslave\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\SoftwareSerial\src -ID:\03MyGit\arduino\ESP32M~1\WEATHE~1\PIO~1\libdeps\ESP_WR~1\ADAFRU~1 -ID:\03MyGit\arduino\ESP32M~1\WEATHE~1\PIO~1\libdeps\ESP_WR~1\ADAFRU~2 -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\SPI -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\Wire -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\tools\sdk\include -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\cores\esp8266 -IC:\Users\xin\.platformio\packages\toolchain-xtensa\include -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\tools\sdk\lwip2\include -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\variants\nodemcu -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\ArduinoOTA -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\DNSServer\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\EEPROM -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266AVRISP\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266HTTPClient\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266HTTPUpdateServer\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266LLMNR -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266NetBIOS -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266SSDP -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266SdFat\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WebServer\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WiFi\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WiFiMesh\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266httpUpdate\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266mDNS\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\Ethernet\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\GDBStub\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\Hash\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\I2S\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\LittleFS\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\Netdump\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\SD\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\SDFS\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\SPISlave\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\Servo\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\TFT_Touch_Shield_V2 -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\Ticker\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\esp8266\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\lwIP_PPP\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\lwIP_enc28j60\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\lwIP_w5100\src -IC:\Users\xin\.platformio\packages\framework-arduinoespressif8266\libraries\lwIP_w5500\src -IC:\Users\xin\.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\c++\10.3.0 -IC:\Users\xin\.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include\c++\10.3.0\xtensa-lx106-elf -IC:\Users\xin\.platformio\packages\toolchain-xtensa\lib\gcc\xtensa-lx106-elf\10.3.0\include -IC:\Users\xin\.platformio\packages\toolchain-xtensa\lib\gcc\xtensa-lx106-elf\10.3.0\include-fixed -IC:\Users\xin\.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\include + +CXX_FLAGS = -fno-rtti -std=gnu++17 -fno-exceptions -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -D_GNU_SOURCE -ffunction-sections -fdata-sections -Wall -Werror=return-type -free -fipa-pta -std=gnu++1z + diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/link.txt b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/link.txt new file mode 100644 index 0000000..18901e3 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/link.txt @@ -0,0 +1 @@ +C:\Users\xin\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-g++.exe -fno-rtti -std=gnu++17 -fno-exceptions -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -D_GNU_SOURCE -ffunction-sections -fdata-sections -Wall -Werror=return-type -free -fipa-pta CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.obj CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.obj CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.obj CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.obj CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.obj -o Z_DUMMY_TARGET diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/progress.make b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/progress.make new file mode 100644 index 0000000..daba7fa --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/Z_DUMMY_TARGET.dir/progress.make @@ -0,0 +1,7 @@ +CMAKE_PROGRESS_1 = 1 +CMAKE_PROGRESS_2 = 2 +CMAKE_PROGRESS_3 = 3 +CMAKE_PROGRESS_4 = 4 +CMAKE_PROGRESS_5 = 5 +CMAKE_PROGRESS_6 = 6 + diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/clion-environment.txt b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/clion-environment.txt new file mode 100644 index 0000000..a338827 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/clion-environment.txt @@ -0,0 +1,4 @@ +ToolSet: w64 6.0 (local)@C:\Qt\Qt5.12.7\Tools\mingw730_64 +Options: + +Options: \ No newline at end of file diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/clion-log.txt b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/clion-log.txt new file mode 100644 index 0000000..df9e37a --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/clion-log.txt @@ -0,0 +1,4 @@ +"C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=esp_wroom_02 -G "CodeBlocks - MinGW Makefiles" D:\03MyGit\arduino\esp32mainboard\weatherslave +-- Configuring done +-- Generating done +-- Build files have been written to: D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02 diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/cmake.check_cache b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/cmake.check_cache new file mode 100644 index 0000000..3dccd73 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/progress.marks b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/progress.marks new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/CMakeFiles/progress.marks @@ -0,0 +1 @@ +6 diff --git a/weatherslave/cmake-build-esp_wroom_02/Makefile b/weatherslave/cmake-build-esp_wroom_02/Makefile new file mode 100644 index 0000000..94b62a0 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/Makefile @@ -0,0 +1,316 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "MinGW Makefiles" Generator, CMake Version 3.21 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +SHELL = cmd.exe + +# The CMake executable. +CMAKE_COMMAND = "C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" + +# The command to remove a file. +RM = "C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = D:\03MyGit\arduino\esp32mainboard\weatherslave + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02 + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." + "C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" -E echo "No interactive CMake dialog available." +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + "C:\Program Files\JetBrains\CLion 2021.1.1\bin\cmake\win\bin\cmake.exe" --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# The main all target +all: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\\CMakeFiles\progress.marks + $(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start D:\03MyGit\arduino\esp32mainboard\weatherslave\cmake-build-esp_wroom_02\CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + $(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 1 +.PHONY : depend + +#============================================================================= +# Target rules for targets named Production + +# Build rule for target. +Production: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 Production +.PHONY : Production + +# fast build rule for target. +Production/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Production.dir\build.make CMakeFiles/Production.dir/build +.PHONY : Production/fast + +#============================================================================= +# Target rules for targets named Debug + +# Build rule for target. +Debug: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 Debug +.PHONY : Debug + +# fast build rule for target. +Debug/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Debug.dir\build.make CMakeFiles/Debug.dir/build +.PHONY : Debug/fast + +#============================================================================= +# Target rules for targets named Z_DUMMY_TARGET + +# Build rule for target. +Z_DUMMY_TARGET: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 Z_DUMMY_TARGET +.PHONY : Z_DUMMY_TARGET + +# fast build rule for target. +Z_DUMMY_TARGET/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/build +.PHONY : Z_DUMMY_TARGET/fast + +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.obj: .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.obj +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.obj + +# target to build an object file +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.obj: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.obj +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.obj + +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.i: .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.i +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.i + +# target to preprocess a source file +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.i +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.i + +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.s: .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.s +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.s + +# target to generate assembly for a file +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.s +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.cpp.s + +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.obj: .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.obj +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.obj + +# target to build an object file +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.obj: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.obj +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.obj + +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.i: .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.i +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.i + +# target to preprocess a source file +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.i +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.i + +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.s: .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.s +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.s + +# target to generate assembly for a file +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.s +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.cpp.s + +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.obj: .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.obj +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.obj + +# target to build an object file +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.obj: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.obj +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.obj + +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.i: .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.i +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.i + +# target to preprocess a source file +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.i +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.i + +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.s: .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.s +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.s + +# target to generate assembly for a file +.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.s +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.cpp.s + +.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.obj: .pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.obj +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.obj + +# target to build an object file +.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.obj: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.obj +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.obj + +.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.i: .pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.i +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.i + +# target to preprocess a source file +.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.i +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.i + +.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.s: .pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.s +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.s + +# target to generate assembly for a file +.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/.pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.s +.PHONY : .pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp.s + +src/main.obj: src/main.cpp.obj +.PHONY : src/main.obj + +# target to build an object file +src/main.cpp.obj: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.obj +.PHONY : src/main.cpp.obj + +src/main.i: src/main.cpp.i +.PHONY : src/main.i + +# target to preprocess a source file +src/main.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.i +.PHONY : src/main.cpp.i + +src/main.s: src/main.cpp.s +.PHONY : src/main.s + +# target to generate assembly for a file +src/main.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles\Z_DUMMY_TARGET.dir\build.make CMakeFiles/Z_DUMMY_TARGET.dir/src/main.cpp.s +.PHONY : src/main.cpp.s + +# Help Target +help: + @echo The following are some of the valid targets for this Makefile: + @echo ... all (the default if no target is provided) + @echo ... clean + @echo ... depend + @echo ... edit_cache + @echo ... rebuild_cache + @echo ... Debug + @echo ... Production + @echo ... Z_DUMMY_TARGET + @echo ... .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.obj + @echo ... .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.i + @echo ... .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_BusIO_Register.s + @echo ... .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.obj + @echo ... .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.i + @echo ... .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_I2CDevice.s + @echo ... .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.obj + @echo ... .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.i + @echo ... .pio/libdeps/esp_wroom_02/Adafruit_BusIO/Adafruit_SPIDevice.s + @echo ... .pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.obj + @echo ... .pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.i + @echo ... .pio/libdeps/esp_wroom_02/Adafruit_MLX90614_Library/Adafruit_MLX90614.s + @echo ... src/main.obj + @echo ... src/main.i + @echo ... src/main.s +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/weatherslave/cmake-build-esp_wroom_02/Testing/Temporary/LastTest.log b/weatherslave/cmake-build-esp_wroom_02/Testing/Temporary/LastTest.log new file mode 100644 index 0000000..a6e2400 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/Testing/Temporary/LastTest.log @@ -0,0 +1,3 @@ +Start testing: Jun 24 09:09 ?D1??? +---------------------------------------------------------- +End testing: Jun 24 09:09 ?D1??? diff --git a/weatherslave/cmake-build-esp_wroom_02/cmake_install.cmake b/weatherslave/cmake-build-esp_wroom_02/cmake_install.cmake new file mode 100644 index 0000000..be9b502 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/cmake_install.cmake @@ -0,0 +1,49 @@ +# Install script for directory: D:/03MyGit/arduino/esp32mainboard/weatherslave + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/weatherslave") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "esp_wroom_02") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "TRUE") +endif() + +# Set default install directory permissions. +if(NOT DEFINED CMAKE_OBJDUMP) + set(CMAKE_OBJDUMP "C:/Qt/Qt5.12.7/Tools/mingw730_64/bin/objdump.exe") +endif() + +if(CMAKE_INSTALL_COMPONENT) + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") +else() + set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +endif() + +string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT + "${CMAKE_INSTALL_MANIFEST_FILES}") +file(WRITE "D:/03MyGit/arduino/esp32mainboard/weatherslave/cmake-build-esp_wroom_02/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/weatherslave/cmake-build-esp_wroom_02/weatherslave.cbp b/weatherslave/cmake-build-esp_wroom_02/weatherslave.cbp new file mode 100644 index 0000000..ca2e544 --- /dev/null +++ b/weatherslave/cmake-build-esp_wroom_02/weatherslave.cbp @@ -0,0 +1,352 @@ + + + + + + diff --git a/weatherslave/include/README b/weatherslave/include/README new file mode 100644 index 0000000..194dcd4 --- /dev/null +++ b/weatherslave/include/README @@ -0,0 +1,39 @@ + +This directory is intended for project header files. + +A header file is a file containing C declarations and macro definitions +to be shared between several project source files. You request the use of a +header file in your project source file (C, C++, etc) located in `src` folder +by including it, with the C preprocessing directive `#include'. + +```src/main.c + +#include "header.h" + +int main (void) +{ + ... +} +``` + +Including a header file produces the same results as copying the header file +into each source file that needs it. Such copying would be time-consuming +and error-prone. With a header file, the related declarations appear +in only one place. If they need to be changed, they can be changed in one +place, and programs that include the header file will automatically use the +new version when next recompiled. The header file eliminates the labor of +finding and changing all the copies as well as the risk that a failure to +find one copy will result in inconsistencies within a program. + +In C, the usual convention is to give header files names that end with `.h'. +It is most portable to use only letters, digits, dashes, and underscores in +header file names, and at most one dot. + +Read more about using header files in official GCC documentation: + +* Include Syntax +* Include Operation +* Once-Only Headers +* Computed Includes + +https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html diff --git a/weatherslave/lib/README b/weatherslave/lib/README new file mode 100644 index 0000000..6debab1 --- /dev/null +++ b/weatherslave/lib/README @@ -0,0 +1,46 @@ + +This directory is intended for project specific (private) libraries. +PlatformIO will compile them to static libraries and link into executable file. + +The source code of each library should be placed in a an own separate directory +("lib/your_library_name/[here are source files]"). + +For example, see a structure of the following two libraries `Foo` and `Bar`: + +|--lib +| | +| |--Bar +| | |--docs +| | |--examples +| | |--src +| | |- Bar.c +| | |- Bar.h +| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html +| | +| |--Foo +| | |- Foo.c +| | |- Foo.h +| | +| |- README --> THIS FILE +| +|- platformio.ini +|--src + |- main.c + +and a contents of `src/main.c`: +``` +#include +#include + +int main (void) +{ + ... +} + +``` + +PlatformIO Library Dependency Finder will find automatically dependent +libraries scanning project source files. + +More information about PlatformIO Library Dependency Finder +- https://docs.platformio.org/page/librarymanager/ldf.html diff --git a/weatherslave/platformio.ini b/weatherslave/platformio.ini new file mode 100644 index 0000000..ca1cb4d --- /dev/null +++ b/weatherslave/platformio.ini @@ -0,0 +1,18 @@ +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; https://docs.platformio.org/page/projectconf.html + +[env:esp_wroom_02] +platform = espressif8266 +board = esp_wroom_02 +framework = arduino +lib_deps = + adafruit/Adafruit MLX90614 Library@^2.1.3 + sparkfun/SparkFun u-blox Arduino Library@^1.8.11 +monitor_speed = 38400 diff --git a/weatherslave/src/main.cpp b/weatherslave/src/main.cpp new file mode 100644 index 0000000..2f528ba --- /dev/null +++ b/weatherslave/src/main.cpp @@ -0,0 +1,231 @@ +#include +#include "SoftwareSerial.h" +#include "Wire.h" +#include +//#define DEBUG_SERIAL Serial +#include +#include "SparkFun_Ublox_Arduino_Library.h" +SoftwareSerial mySerial(2,12); +SFE_UBLOX_GPS myGPS; +//== CHANGE THIS ============ +double new_emissivity =0.95; +//=========================== + +Adafruit_MLX90614 mlx = Adafruit_MLX90614(); +u_char ret[17]; +#define MYPORT_TX 14 +#define MYPORT_RX 13 +SoftwareSerial myPort(MYPORT_RX,MYPORT_TX, false); +SoftwareSerial GPSSeiral(2, 12, false); +//HardwareSerial myPort(1); +//swSer(14, 12, false, 256); +u_char a[]={0x01,0x04,0x00,0x00,0x00 ,0x06,0x70,0x08}; +u_char yuliang[]={0x02, 0x03, 0x00, 0x00 ,0x00, 0x01, 0x84, 0x39}; +u_char ClearYL[]={0x02,0x06,0x00, 0x00 ,0x00 ,0x5A ,0X09 ,0Xc2}; +u_char yuliangfuliangdu[]={0x02,0x03,0x00,0x02,0x00,0x02,0x65,0xf8}; + +u_char openGNRMC[]={0xF1,0xD9,0x06,0x01,0x03,0x00,0xF0,0x05,0x01,0x00,0x1A}; +u_char gpsSaveConfig[]={0xF1,0xD9,0x06,0x09,0x08,0x00,0x00,0x00,0x00,0x00,0x2F,0x00,0x00,0x00,0x46,0xB7}; +void getMLX() +{ + double a =mlx.readObjectTempC(); + Serial.write((char*) &a,8); +} +void getWehter() +{ + while (myPort.read()!=-1); + myPort.write(a,8); + + + + delay(90); + + for (int j = 0; j <17 ; ++j) { + ret[j]=myPort.read(); + } + float VV=(ret[3]*256+ret[4])*1.0/100; + float DD=(ret[5]*256+ret[6])*1.0/10; + float TT=(ret[7]*256+ret[8])*1.0/100; + float HH=(ret[9]*256+ret[10])*1.0/100; + long PP=(ret[13]*256+ret[14])*256*256+(ret[11]*256+ret[12]); +#ifdef DEBG + Serial.println("VV:"+String(VV)+" DD:"+String(DD)+" TT:"+String(TT)+" HH:"+String(HH)+" PP:"+String(PP)); +#endif + Serial.write(ret,17); + + //delay(2000); +} +void getYuliang() +{ + while (myPort.read()!=-1); + myPort.write(yuliang,8); + delay(90); + + for (int j = 0; j <7; ++j) { + ret[j]=myPort.read(); + } + float Value=ret[3]*256+ret[4]; + Value=Value/10; + // Serial.write(ret,7); + Serial.print(Value); + Serial.print("#"); + +} + +void getYuliangfuliang() +{ + while (myPort.read()!=-1); + myPort.write(yuliangfuliangdu,8); + delay(90); + + for (int j = 0; j <7; ++j) { + ret[j]=myPort.read(); + } + int32_t Value=(ret[3]*256+ret[4])*256*256+ret[5]*256+ret[6]; + // Value=Value/10; + // Serial.write(ret,7); + Serial.print(Value); + Serial.print("#"); + +} + + +void claeryuliang(){ + while (myPort.read()!=-1); + myPort.write(ClearYL,8); + delay(90); + for (int j = 0; j <8; ++j) { + ret[j]=myPort.read(); + } + Serial.print("OK"); +} +TwoWire wireme; +void setup() { + // put your setup code here, to run once: + //Wire.begin(4,5); + + Serial.begin(38400); + Serial.println("init ok"); + myPort.begin(9600, SWSERIAL_8N1, MYPORT_RX, MYPORT_TX, false); + pinMode(16,OUTPUT); + digitalWrite(16,LOW); + delay(2000); + digitalWrite(16,HIGH); + GPSSeiral.begin(115200, SWSERIAL_8N1, 2, 12, false); + + + if (!mlx.begin(MLX90614_I2CADDR)) { + Serial.println("Error connecting to MLX sensor. Check wiring."); + //while (1); + }; + mlx.writeEmissivity(new_emissivity); // this does the 0x0000 erase write + Serial.println(sizeof(openGNRMC)); + int ii=10; +do { + Serial.println("GPS: trying 38400 baud"); + mySerial.begin(38400); + if (myGPS.begin(mySerial) == true) break; + + delay(100); + Serial.println("GPS: trying 9600 baud"); + mySerial.begin(9600); + if (myGPS.begin(mySerial) == true) { + Serial.println("GPS: connected at 9600 baud, switching to 38400"); + myGPS.setSerialRate(38400); + delay(100); + } else { + //myGPS.factoryReset(); + delay(2000); //Wait a bit before trying again to limit the Serial output + } + } while(ii--); + Serial.println("GPS serial connected"); + + myGPS.setUART1Output(COM_TYPE_UBX); //Set the UART port to output UBX only + myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) + myGPS.saveConfiguration(); //Save the current settings to flash and BBR + ///myGPS.enableDebugging(); + + + /// for (size_t i = 0; i < 100; i++) + // { + // GPSSeiral.write(openGNRMC,sizeof(openGNRMC)); + // GPSSeiral.write(gpsSaveConfig,sizeof(gpsSaveConfig)); + // delay(5); + /* code */ + // } + + + + + + + + +} + +String gettodvalue(int a) +{ + if (a<10) + { + return "0"+String(a); + /* code */ + }else + { + return String(a); + } + +} +void loop() { + if(Serial.available()) + { + String str=Serial.readStringUntil('#'); + //Serial.println("data come"); + //Serial.println(str); + if (str=="WindSensor") + { + getWehter(); + } + if(str=="MLX") + { + getMLX(); + + } + if(str=="YULIANG") + { + + getYuliang(); + } + if(str=="YLFZ") + { + + getYuliangfuliang(); + } + if(str=="ClearYL") + { + + claeryuliang(); + } + if (str=="GETGPS") + { + + Serial.println("Time_"+String(myGPS.getYear()) + +"-"+gettodvalue(myGPS.getMonth()) + +"-"+gettodvalue(myGPS.getDay()) + +" "+gettodvalue(myGPS.getHour()) + +":"+gettodvalue(myGPS.getMinute()) + +":"+gettodvalue(myGPS.getSecond()) + +"#Number_"+String(myGPS.getSIV())+"#Latitude_"+String(myGPS.getLatitude()/10000000.0,7)+"#Longtitude_"+String(myGPS.getLongitude()/10000000.0,7)+"\n"); + /* code */ + } + } + // myPort.println("adfsdafsdf"); + //getYuliang(); + // delay(1000); + + + //GPSSeiral.print(Serial.readString()); + /// getWehter(); + // delay(1000); +} + +