ESPixelStick Firmware
Firmware for the ESPixelStick
Loading...
Searching...
No Matches
main.cpp File Reference
#include <Arduino.h>
#include "ESPixelStick.h"
#include "EFUpdate.h"
#include <Int64String.h>
#include "input/InputMgr.hpp"
#include "output/OutputMgr.hpp"
#include "network/NetworkMgr.hpp"
#include "WebMgr.hpp"
#include "FileMgr.hpp"
#include "service/FPPDiscovery.h"
#include <TimeLib.h>
Include dependency graph for main.cpp:

Macros

#define NO_CONFIG_NEEDED   time_t(-1)
 

Functions

void ScheduleLoadConfig ()
 
void LoadConfig ()
 Load configuration file.
 
void GetConfig (JsonObject &json)
 
void GetDriverName (String &Name)
 
void TestHeap (uint32_t Id)
 Radio configuration.
 
void setup ()
 Arduino Setup.
 
bool validateConfig ()
 Configuration Validations.
 
bool dsDevice (JsonObject &json)
 Deserialize device configuration JSON to config structure - returns true if config change detected.
 
void SetConfig (const char *DataString)
 
bool deserializeCore (JsonObject &json)
 
void deserializeCoreHandler (JsonDocument &jsonDoc)
 
void SaveConfig ()
 
void DeleteConfig ()
 
String serializeCore (bool pretty)
 
void loop ()
 Main Loop.
 
bool RebootInProgress ()
 
void RequestReboot (uint32_t LoopDelay, bool SkipDisable)
 
void _logcon (String &DriverName, String Message)
 
void FeedWDT ()
 

Variables

const String VERSION = "4.x-dev"
 
const String ConfigFileName = "/config.json"
 
const String BUILD_DATE = String(__DATE__) + " - " + String(__TIME__)
 
const uint8_t CurrentConfigVersion = 1
 
config_t config
 
static const uint32_t NotRebootingValue = uint32_t(-1)
 
uint32_t RebootCount = NotRebootingValue
 
uint32_t lastUpdate
 
bool ResetWiFi = false
 
bool IsBooting = true
 
time_t ConfigLoadNeeded = NO_CONFIG_NEEDED
 
bool ConfigSaveNeeded = false
 
uint32_t DiscardedRxData = 0
 
bool ConsoleUartIsActive = true
 

Macro Definition Documentation

◆ NO_CONFIG_NEEDED

#define NO_CONFIG_NEEDED   time_t(-1)

Function Documentation

◆ _logcon()

void _logcon ( String & DriverName,
String Message )

◆ DeleteConfig()

void DeleteConfig ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deserializeCore()

bool deserializeCore ( JsonObject & json)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deserializeCoreHandler()

void deserializeCoreHandler ( JsonDocument & jsonDoc)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dsDevice()

bool dsDevice ( JsonObject & json)

Deserialize device configuration JSON to config structure - returns true if config change detected.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FeedWDT()

void FeedWDT ( )
Here is the caller graph for this function:

◆ GetConfig()

void GetConfig ( JsonObject & json)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDriverName()

void GetDriverName ( String & Name)

◆ LoadConfig()

void LoadConfig ( )

Load configuration file.

Loads and validates the JSON configuration file from the file system. If no configuration file is found, a new one will be created.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loop()

void loop ( )

Main Loop.

Arduino based main loop

Here is the call graph for this function:

◆ RebootInProgress()

bool RebootInProgress ( )
Here is the caller graph for this function:

◆ RequestReboot()

void RequestReboot ( uint32_t LoopDelay,
bool SkipDisable )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SaveConfig()

void SaveConfig ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScheduleLoadConfig()

void ScheduleLoadConfig ( )
Here is the caller graph for this function:

◆ serializeCore()

String serializeCore ( bool pretty)
Here is the call graph for this function:

◆ SetConfig()

void SetConfig ( const char * DataString)
Here is the call graph for this function:

◆ setup()

void setup ( )

Arduino Setup.

Arduino based setup code that is executed at startup.

Here is the call graph for this function:

◆ TestHeap()

void TestHeap ( uint32_t Id)

Radio configuration.

ESP8266 radio configuration routines that are executed at startup.

◆ validateConfig()

bool validateConfig ( )

Configuration Validations.

Validates the config_t (core) configuration structure and forces defaults for invalid entries

Here is the caller graph for this function:

Variable Documentation

◆ BUILD_DATE

const String BUILD_DATE = String(__DATE__) + " - " + String(__TIME__)

◆ config

config_t config

◆ ConfigFileName

const String ConfigFileName = "/config.json"

◆ ConfigLoadNeeded

time_t ConfigLoadNeeded = NO_CONFIG_NEEDED

◆ ConfigSaveNeeded

bool ConfigSaveNeeded = false

◆ ConsoleUartIsActive

bool ConsoleUartIsActive = true

◆ CurrentConfigVersion

const uint8_t CurrentConfigVersion = 1

◆ DiscardedRxData

uint32_t DiscardedRxData = 0

◆ IsBooting

bool IsBooting = true

◆ lastUpdate

uint32_t lastUpdate

◆ NotRebootingValue

const uint32_t NotRebootingValue = uint32_t(-1)
static

◆ RebootCount

uint32_t RebootCount = NotRebootingValue

◆ ResetWiFi

bool ResetWiFi = false

◆ VERSION

const String VERSION = "4.x-dev"