Skip to content

Commit e93a1ec

Browse files
committed
Whitespace change
1 parent 5fde381 commit e93a1ec

File tree

1 file changed

+32
-29
lines changed

1 file changed

+32
-29
lines changed

Firmware/RTK_Everywhere/RTK_Everywhere.ino

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#define COMPILE_MQTT_CLIENT // Comment out to remove MQTT Client functionality
4242
#define COMPILE_OTA_AUTO // Comment out to disable automatic over-the-air firmware update
4343
#define COMPILE_HTTP_CLIENT // Comment out to disable HTTP Client (PointPerfect ZTP) functionality
44-
#endif // COMPILE_WIFI || COMPILE_ETHERNET
44+
#endif // COMPILE_WIFI || COMPILE_ETHERNET
4545

4646
// Always define ENABLE_DEVELOPER to enable its use in conditional statements
4747
#ifndef ENABLE_DEVELOPER
@@ -68,33 +68,34 @@
6868

6969
#define NTRIP_SERVER_MAX 4
7070

71-
#ifdef COMPILE_NETWORK
72-
#include <NetworkClient.h>
73-
#include <NetworkClientSecure.h>
74-
#include <NetworkUdp.h>
75-
#include <DNSServer.h> //Built-in.
71+
#ifdef COMPILE_NETWORK
7672
#include "ESP32OTAPull.h" //http://librarymanager/All#ESP-OTA-Pull Used for getting new firmware from RTK Binaries repo
73+
#include <DNSServer.h> //Built-in.
7774
#include <ESPmDNS.h> //Built-in.
7875
#include <HTTPClient.h> //Built-in. Needed for ThingStream API for ZTP
7976
#include <MqttClient.h> //http://librarymanager/All#ArduinoMqttClient by Arduino v0.1.8
80-
#endif // COMPILE_NETWORK
77+
#include <NetworkClient.h>
78+
#include <NetworkClientSecure.h>
79+
#include <NetworkUdp.h>
80+
#endif // COMPILE_NETWORK
8181

82-
bool RTK_CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC = false; // Flag used by the special build of libmbedtls (libmbedcrypto) to select external memory
82+
bool RTK_CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC =
83+
false; // Flag used by the special build of libmbedtls (libmbedcrypto) to select external memory
8384

8485
volatile bool httpClientModeNeeded = false; // This is set to true by updateProvisioning
8586

86-
#define THINGSTREAM_SERVER "api.thingstream.io" //!< the thingstream Rest API server domain
87-
#define THINGSTREAM_ZTPPATH "/ztp/pointperfect/credentials" //!< ZTP rest api
87+
#define THINGSTREAM_SERVER "api.thingstream.io" //!< the thingstream Rest API server domain
88+
#define THINGSTREAM_ZTPPATH "/ztp/pointperfect/credentials" //!< ZTP rest api
8889
static const char THINGSTREAM_ZTPURL[] = "https://" THINGSTREAM_SERVER THINGSTREAM_ZTPPATH; // full ZTP url
89-
const uint16_t HTTPS_PORT = 443; //!< The HTTPS default port
90+
const uint16_t HTTPS_PORT = 443; //!< The HTTPS default port
9091

9192
#ifdef COMPILE_ETHERNET
9293
#include <ETH.h>
93-
#endif // COMPILE_ETHERNET
94+
#endif // COMPILE_ETHERNET
9495

9596
#ifdef COMPILE_WIFI
96-
#include "esp_wifi.h" //Needed for esp_wifi_set_protocol()
97-
#include <WiFi.h> //Built-in.
97+
#include "esp_wifi.h" //Needed for esp_wifi_set_protocol()
98+
#include <WiFi.h> //Built-in.
9899
#include <WiFiClientSecure.h> //Built-in.
99100
#include <WiFiMulti.h> //Built-in.
100101
#endif // COMPILE_WIFI
@@ -286,11 +287,11 @@ char logFileName[sizeof("SFE_Reference_Station_230101_120101.ubx_plusExtraSpace"
286287
}
287288
#endif // COMPILE_WIFI
288289

289-
#define MQTT_CLIENT_STOP(shutdown) \
290-
{ \
291-
if (settings.debugNetworkLayer || settings.debugMqttClientState) \
292-
systemPrintf("mqttClientStop(%s) called by %s %d\r\n", shutdown ? "true" : "false", __FILE__, __LINE__); \
293-
mqttClientStop(shutdown); \
290+
#define MQTT_CLIENT_STOP(shutdown) \
291+
{ \
292+
if (settings.debugNetworkLayer || settings.debugMqttClientState) \
293+
systemPrintf("mqttClientStop(%s) called by %s %d\r\n", shutdown ? "true" : "false", __FILE__, __LINE__); \
294+
mqttClientStop(shutdown); \
294295
}
295296

296297
#define OTA_FIRMWARE_JSON_URL_LENGTH 128
@@ -414,8 +415,8 @@ const byte haeNumberOfDecimals = 8; // Used for printing and transmitting lat/
414415
unsigned long rtcmLastPacketReceived; // Time stamp of RTCM coming in (from BT, NTRIP, etc)
415416
// Monitors the last time we received RTCM. Proctors PMP vs RTCM prioritization.
416417

417-
bool usbSerialIncomingRtcm; // Incoming RTCM over the USB serial port
418-
#define RTCM_CORRECTION_INPUT_TIMEOUT (2 * 1000)
418+
bool usbSerialIncomingRtcm; // Incoming RTCM over the USB serial port
419+
#define RTCM_CORRECTION_INPUT_TIMEOUT (2 * 1000)
419420
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
420421

421422
// GNSS configuration - UM980
@@ -567,7 +568,7 @@ Button *userBtn;
567568
const uint8_t buttonCheckTaskPriority = 1; // 3 being the highest, and 0 being the lowest
568569
const int buttonTaskStackSize = 2000;
569570

570-
const int shutDownButtonTime = 2000; // ms press and hold before shutdown
571+
const int shutDownButtonTime = 2000; // ms press and hold before shutdown
571572
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
572573

573574
// Webserver for serving config page from ESP32 as Acess Point
@@ -576,7 +577,7 @@ const int shutDownButtonTime = 2000; // ms press and hold before shutdown
576577
// Because the incoming string is longer than max len, there are multiple callbacks so we
577578
// use a global to combine the incoming
578579
#define AP_CONFIG_SETTING_SIZE 20000 // 10000 isn't enough if the SD card contains many files
579-
char *settingsCSV; // Push large array onto heap
580+
char *settingsCSV; // Push large array onto heap
580581
char *incomingSettings;
581582
int incomingSettingsSpot;
582583
unsigned long timeSinceLastIncomingSetting;
@@ -585,23 +586,25 @@ unsigned long lastDynamicDataUpdate;
585586
#ifdef COMPILE_WIFI
586587
#ifdef COMPILE_AP
587588

588-
#include <DNSServer.h> // Needed for the captive portal
589-
#include <WebServer.h> // Port 80
590-
#include <esp_http_server.h> // Needed for web sockets only - on port 81
591589
#include "form.h"
590+
#include <DNSServer.h> // Needed for the captive portal
591+
#include <WebServer.h> // Port 80
592+
#include <esp_http_server.h> // Needed for web sockets only - on port 81
592593

593594
// https://github.com/espressif/arduino-esp32/blob/master/libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino
594595
DNSServer *dnsserver;
595596
WebServer *webserver;
596597

597598
httpd_handle_t *wsserver = nullptr;
598-
//httpd_req_t *last_ws_req;
599+
// httpd_req_t *last_ws_req;
599600
int last_ws_fd;
600601

601602
TaskHandle_t updateWebServerTaskHandle;
602603
const uint8_t updateWebServerTaskPriority = 0; // 3 being the highest, and 0 being the lowest
603-
const int updateWebServerTaskStackSize = AP_CONFIG_SETTING_SIZE + 3000; // Needs to be large enough to hold the file manager file list
604-
const int updateWebSocketStackSize = AP_CONFIG_SETTING_SIZE + 3000; // Needs to be large enough to hold the full settings string
604+
const int updateWebServerTaskStackSize =
605+
AP_CONFIG_SETTING_SIZE + 3000; // Needs to be large enough to hold the file manager file list
606+
const int updateWebSocketStackSize =
607+
AP_CONFIG_SETTING_SIZE + 3000; // Needs to be large enough to hold the full settings string
605608

606609
#endif // COMPILE_AP
607610
#endif // COMPILE_WIFI

0 commit comments

Comments
 (0)