Skip to content

Commit

Permalink
Reorder include order
Browse files Browse the repository at this point in the history
  • Loading branch information
lbussy committed Feb 23, 2020
1 parent 0e7311e commit c60db3a
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 19 deletions.
1 change: 1 addition & 0 deletions src/bubserial.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ SOFTWARE. */

#include "config.h"
#include "tools.h"
#include "ntphandler.h"
#include <ArduinoLog.h>

void serial();
Expand Down
5 changes: 4 additions & 1 deletion src/execota.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ SOFTWARE. */

#include "tools.h"
#include "jsonconfig.h"
#include "config.h"
// #include "config.h"
#include "webserver.h"
#include <ESP8266WiFi.h>
#include <ESP8266httpUpdate.h>
#include <ESP8266WebServer.h>
#include <ArduinoLog.h>

void execfw();
Expand Down
1 change: 1 addition & 0 deletions src/jsonconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ SOFTWARE. */
#include <ArduinoLog.h>
#include <FS.h>
#include <ArduinoJson.h>
#include <ArduinoLog.h>

class JsonConfig {
private:
Expand Down
11 changes: 4 additions & 7 deletions src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ SOFTWARE. */

#include "bubserial.h"
#include "config.h"
#include "execota.h"
#include "jsonconfig.h"
#include "ntphandler.h"
#include "webserver.h"
#include "wifi.h"
#include "version.h"
#include "targethandler.h"
#include "urltarget.h"
#include "bubbles.h"
#include "mdns.h"
#include <WiFiManager.h>
#include <DoubleResetDetect.h>
#include <ESP8266WiFi.h>
#include <ArduinoLog.h>
#include <ESP8266mDNS.h>
#include <Arduino.h>

// DRD_TIMEOUT = Maximum number of seconds between resets that counts
// as a double reset
Expand All @@ -46,7 +46,4 @@ SOFTWARE. */
#define DRD_TIMEOUT 3.0
#define DRD_ADDRESS 0x00

static bool __attribute__((unused)) doTarget = false; // Semaphore for Target timer
static bool __attribute__((unused)) doBF = false; // Semaphore for BF timer

#endif // _MAIN_H
4 changes: 3 additions & 1 deletion src/mdns.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ SOFTWARE. */
#ifndef _MDNS_H
#define _MDNS_H

#include "main.h"
#include "config.h"
#include "jsonconfig.h"
#include <ArduinoLog.h>
#include <ESP8266mDNS.h>
#include <ESP8266WiFi.h>

void mdnssetup();
IPAddress mdnsquery(char hostname[65]);
Expand Down
5 changes: 3 additions & 2 deletions src/ntphandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ SOFTWARE. */

#include "config.h"
#include "tools.h"
#include <TimeLib.h>
// #include <TimeLib.h>
#include <NtpClientLib.h>
#include <ArduinoLog.h>
#include <ArduinoLog.h>

#define NTP_TIMEOUT 1500

Expand All @@ -39,7 +40,7 @@ class NtpHandler {
NtpHandler() {}
static NtpHandler *single;
// Other Declarations
boolean syncEventTriggered;
bool syncEventTriggered;
NTPSyncEvent_t ntpEvent;
bool hasBeenSet;
void setup();
Expand Down
7 changes: 6 additions & 1 deletion src/tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ SOFTWARE. */
#ifndef _TOOLS_H
#define _TOOLS_H

#include "wifi.h"
// #include "wifi.h"
#include "bubbles.h"
#include <FS.h>
#include <ArduinoLog.h>
#include <ArduinoJson.h>
#include <EEPROM.h>
#include <Arduino.h>

#define EEPROM_ADDRESS 0x00

Expand Down
11 changes: 9 additions & 2 deletions src/webserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,20 @@ SOFTWARE. */
#include "wifi.h"
#include "execota.h"
#include "bubbles.h"
#include "tools.h"
// #include "tools.h"
#include "jsonconfig.h"
#include "bubserial.h"
// #include "bubserial.h"
#include "version.h"
#include "config.h"
#include <ArduinoLog.h>
#include <ArduinoJson.h>
#include <FS.h>
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <ESP8266HTTPClient.h>
#include <ESP8266mDNS.h>
#include <Arduino.h>


class WebServer {
private:
Expand Down
13 changes: 8 additions & 5 deletions src/wifi.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ SOFTWARE. */
#ifndef _WIFI_H
#define _WIFI_H

#include "main.h"
#include "config.h"
#include <ESP8266WiFi.h> //ESP8266 Core WiFi Library
#include <DNSServer.h> //Local DNS Server used for redirecting all requests to the configuration portal
#include <ESP8266WebServer.h> //Local WebServer used to serve the configuration portal
#include <WiFiManager.h> //https://github.com/tzapu/WiFiManager WiFi Configuration Magic
#include "jsonconfig.h"
#include "tools.h"
#include <ESP8266WiFi.h>
#include <Ticker.h>
// #include <DNSServer.h>
// #include <ESP8266WebServer.h>
#include <ArduinoLog.h>
#include <WiFiManager.h>

void wifiBlinker();
void doWiFi();
Expand Down

0 comments on commit c60db3a

Please sign in to comment.