1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-07-29 10:23:45 +02:00

Wifi reliability (#45)

* First pass at wifi inbound FSA
* Fixup detector loop
* Remove asyncBanned
Unused, uninitialized
* Move wifi setup loop out of .ino
Wifi auto detect Serial 1,2,3
* Correct capitalization
* Uno compiles clean
* Command distributor
Moved command execution routing out of Wifi code for future use by Ethernet interface.
Co-authored-by: Fred <fndecker@gmail.com>
This commit is contained in:
Asbelos
2020-10-05 18:42:31 +01:00
committed by GitHub
parent abd83bf7d6
commit 3f06fb08df
10 changed files with 440 additions and 219 deletions

20
CommandDistributor.h Normal file
View File

@@ -0,0 +1,20 @@
#ifndef CommandDistributor_h
#define CommandDistributor_h
#include "DCCEXParser.h"
typedef void (*HTTP_CALLBACK)(Print *stream, byte *cmd);
class CommandDistributor {
public :
static void setHTTPCallback(HTTP_CALLBACK callback);
static bool parse(byte clientId,byte* buffer, Print * streamer);
private:
static HTTP_CALLBACK httpCallback;
static bool isHTTP(byte * buffer);
static DCCEXParser * parser;
};
#endif