Commit 9f6604b1 authored by Eric Duminil's avatar Eric Duminil
Browse files

Headers refactor.

parent e8460aba
Pipeline #3143 passed with stage
in 1 minute and 48 seconds
......@@ -37,8 +37,4 @@
#include "co2_sensor.h"
#include "led_effects.h"
void keepServicesAlive();
void checkFlashButton();
void checkSerialInput();
#endif
......@@ -122,6 +122,13 @@ void setup() {
#endif
}
/*****************************************************************
* Helper functions *
*****************************************************************/
void keepServicesAlive();
void checkFlashButton();
void checkSerialInput();
/*****************************************************************
* Main loop *
*****************************************************************/
......
......@@ -7,9 +7,11 @@
#include "sensor_console.h"
#include "src/lib/PubSubClient/src/PubSubClient.h"
#include "wifi_util.h"
namespace config {
extern uint16_t mqtt_sending_interval; // [s]
}
namespace mqtt {
extern char last_successful_publish[];
extern bool connected;
......
......@@ -8,10 +8,11 @@
*/
namespace sensor_console {
void defineCommand(const char *command, void (*function)(void), const __FlashStringHelper *ifsh);
void defineIntCommand(const char *command, void (*function)(int32_t), const __FlashStringHelper *ifsh);
void processSerialInput(const byte in_byte);
void runCommand(const char *command);
void defineIntCommand(const char *command, void (*function)(int32_t), const __FlashStringHelper *ifsh);
void defineCommand(const char *command, void (*function)(void), const __FlashStringHelper *ifsh);
}
#endif
......@@ -42,8 +42,9 @@ public:
Ampel();
};
extern Ampel ampel;
//NOTE: Only use seconds() for duration comparison, not timestamps comparison. Otherwise, problems happen when millis roll over.
#define seconds() (millis() / 1000UL)
extern Ampel ampel;
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment