33# define NUM_UARTS UART_LAST
48 void GetConfig (
byte * Response, uint32_t maxlen);
51 void SetConfig (ArduinoJson::JsonDocument & NewConfig);
60 void WriteChannelData (uint32_t StartChannelId, uint32_t ChannelCount, uint8_t * pData);
61 void ReadChannelData (uint32_t StartChannelId, uint32_t ChannelCount, uint8_t *pTargetData);
68 #ifdef DEFAULT_UART_0_GPIO
69 OutputChannelId_UART_0,
72 #ifdef DEFAULT_UART_1_GPIO
73 OutputChannelId_UART_1,
76 #ifdef DEFAULT_UART_2_GPIO
77 OutputChannelId_UART_2,
80 #ifdef DEFAULT_RMT_0_GPIO
81 OutputChannelId_RMT_0,
84 #ifdef DEFAULT_RMT_1_GPIO
85 OutputChannelId_RMT_1,
88 #ifdef DEFAULT_RMT_2_GPIO
89 OutputChannelId_RMT_2,
92 #ifdef DEFAULT_RMT_3_GPIO
93 OutputChannelId_RMT_3,
96 #ifdef DEFAULT_RMT_4_GPIO
97 OutputChannelId_RMT_4,
100 #ifdef DEFAULT_RMT_5_GPIO
101 OutputChannelId_RMT_5,
104 #ifdef DEFAULT_RMT_6_GPIO
105 OutputChannelId_RMT_6,
108 #ifdef DEFAULT_RMT_7_GPIO
109 OutputChannelId_RMT_7,
112 #ifdef SUPPORT_SPI_OUTPUT
113 OutputChannelId_SPI_1,
116 #if defined(SUPPORT_OutputType_Relay) || defined(SUPPORT_OutputType_Servo_PCA9685)
117 OutputChannelId_Relay,
129 #ifdef SUPPORT_OutputType_WS2811
130 OutputType_WS2811 = 1,
133 #ifdef SUPPORT_OutputType_GECE
137 #ifdef SUPPORT_OutputType_DMX
141 #ifdef SUPPORT_OutputType_Renard
142 OutputType_Renard = 4,
145 #ifdef SUPPORT_OutputType_Serial
146 OutputType_Serial = 5,
149 #ifdef SUPPORT_OutputType_Relay
150 OutputType_Relay = 6,
153 #ifdef SUPPORT_OutputType_Servo_PCA9685
154 OutputType_Servo_PCA9685 = 7,
157 #ifdef SUPPORT_OutputType_UCS1903
158 OutputType_UCS1903 = 8,
161 #ifdef SUPPORT_OutputType_TM1814
162 OutputType_TM1814 = 9,
165 #ifdef SUPPORT_OutputType_WS2801
166 OutputType_WS2801 = 10,
169 #ifdef SUPPORT_OutputType_APA102
170 OutputType_APA102 = 11,
173 #ifdef SUPPORT_OutputType_GS8208
174 OutputType_GS8208 = 12,
177 #ifdef SUPPORT_OutputType_UCS8903
178 OutputType_UCS8903 = 13,
181 #ifdef SUPPORT_OutputType_TLS3001
182 OutputType_TLS3001 = 14,
185 #ifdef SUPPORT_OutputType_GRINCH
186 OutputType_GRINCH = 15,
194#ifdef ARDUINO_ARCH_ESP8266
195# define OM_MAX_NUM_CHANNELS (1200 * 3)
197# define OM_MAX_NUM_CHANNELS (3000 * 3)
231 #define NO_CONFIG_NEEDED time_t(-1)
252#if defined(ARDUINO_ARCH_ESP32)
253 TaskHandle_t myTaskHandle = NULL;
257#define OM_IS_UART (CurrentOutputChannelDriver.PortType == OM_PortType_t::Uart)
258#define OM_IS_RMT (CurrentOutputChannelDriver.PortType == OM_PortType_t::Rmt)
c_FileMgr FileMgr
Definition FileMgr.cpp:2192
#define OM_MAX_NUM_CHANNELS
Definition OutputMgr.hpp:197
#define NO_CONFIG_NEEDED
Definition OutputMgr.hpp:231
#define NUM_UARTS
forward declaration to the pure virtual output class that will be defined later.
Definition OutputMgr.hpp:35
c_OutputMgr OutputMgr
Definition OutputMgr.cpp:1580
void DeleteFlashFile(const String &FileName)
Definition FileMgr.cpp:560
Definition OutputCommon.hpp:31
Definition OutputMgr.hpp:39
e_OutputChannelIds
Definition OutputMgr.hpp:67
@ OutputChannelId_End
Definition OutputMgr.hpp:120
@ OutputChannelId_Start
Definition OutputMgr.hpp:121
e_OutputType
Definition OutputMgr.hpp:126
@ OutputType_Disabled
Definition OutputMgr.hpp:127
@ OutputType_Start
Definition OutputMgr.hpp:191
@ OutputType_End
Definition OutputMgr.hpp:190
void GetDriverName(String &Name)
Definition OutputMgr.hpp:59
void LoadConfig()
Read the current configuration data from nvram.
Definition OutputMgr.cpp:995
void CreateJsonConfig(JsonObject &jsonConfig)
Definition OutputMgr.cpp:281
gpio_num_t ConsoleRxGpio
Definition OutputMgr.hpp:251
void UpdateDisplayBufferReferences(void)
Definition OutputMgr.cpp:1352
bool ProcessJsonConfig(JsonDocument &jsonConfig)
Definition OutputMgr.cpp:1126
c_OutputMgr()
< Start up the driver and put it into a safe mode
Definition OutputMgr.cpp:198
void GetPortCounts(uint16_t &PixelCount, uint16_t &SerialCount)
Definition OutputMgr.hpp:53
void GetConfig(byte *Response, uint32_t maxlen)
Definition OutputMgr.cpp:452
virtual ~c_OutputMgr()
< deallocate any resources and put the output channels into a safe state
Definition OutputMgr.cpp:209
uint32_t UsedBufferSize
Definition OutputMgr.hpp:249
void GetStatus(JsonObject &jsonStatus)
Definition OutputMgr.cpp:463
uint8_t OutputBuffer[OM_MAX_NUM_CHANNELS]
Definition OutputMgr.hpp:248
void SetConfig(const char *NewConfig)
Save the current configuration data to nvram.
Definition OutputMgr.cpp:1225
void DeleteConfig()
Definition OutputMgr.hpp:57
void ClearBuffer()
Definition OutputMgr.cpp:1563
void InstantiateNewOutputChannel(DriverInfo_t &ChannelIndex, e_OutputType NewChannelType, bool StartDriver=true)
Definition OutputMgr.cpp:496
bool BuildingNewConfig
Definition OutputMgr.hpp:236
time_t ConfigLoadNeeded
Definition OutputMgr.hpp:233
bool ConfigInProgress
Definition OutputMgr.hpp:234
bool FindJsonChannelConfig(JsonDocument &jsonConfig, e_OutputChannelIds ChanId, e_OutputType Type, JsonObject &ChanConfig)
Definition OutputMgr.cpp:1034
void Begin()
set up the operating environment based on the current config (or defaults)
Definition OutputMgr.cpp:225
void SetSerialUart()
Definition OutputMgr.cpp:1274
OM_PortType_t
Definition OutputMgr.hpp:201
@ Uart
Definition OutputMgr.hpp:202
@ Undefined
Definition OutputMgr.hpp:206
@ Spi
Definition OutputMgr.hpp:204
@ Relay
Definition OutputMgr.hpp:205
@ Rmt
Definition OutputMgr.hpp:203
uint32_t GetBufferUsedSize()
Get the size (in intensities) of the buffer into which the E1.31 handler will stuff data.
Definition OutputMgr.hpp:55
void PauseOutputs(bool NewState)
Definition OutputMgr.cpp:1423
uint32_t GetBufferSize()
Get the size (in intensities) of the buffer into which the E1.31 handler will stuff data.
Definition OutputMgr.hpp:56
void WriteChannelData(uint32_t StartChannelId, uint32_t ChannelCount, uint8_t *pData)
Definition OutputMgr.cpp:1439
gpio_num_t ConsoleTxGpio
Definition OutputMgr.hpp:250
void ScheduleLoadConfig()
Definition OutputMgr.hpp:46
void CreateNewConfig()
Definition OutputMgr.cpp:361
void ReadChannelData(uint32_t StartChannelId, uint32_t ChannelCount, uint8_t *pTargetData)
Definition OutputMgr.cpp:1503
String ConfigFileName
Definition OutputMgr.hpp:246
DriverInfo_t OutputChannelDrivers[OutputChannelId_End]
Definition OutputMgr.hpp:228
uint8_t * GetBufferAddress()
Get the address of the buffer into which the E1.31 handler will stuff data.
Definition OutputMgr.hpp:54
void Poll()
Call from loop(), renders output data.
Definition OutputMgr.cpp:1319
bool HasBeenInitialized
Definition OutputMgr.hpp:232
bool OutputIsPaused
Definition OutputMgr.hpp:235
Definition OutputMgr.hpp:211
gpio_num_t GpioPin
Definition OutputMgr.hpp:220
c_OutputCommon * pOutputChannelDriver
Definition OutputMgr.hpp:224
OM_PortType_t PortType
Definition OutputMgr.hpp:221
uint32_t OutputChannelSize
Definition OutputMgr.hpp:217
uint32_t OutputChannelEndOffset
Definition OutputMgr.hpp:218
uint32_t OutputBufferStartingOffset
Definition OutputMgr.hpp:212
uint32_t OutputBufferDataSize
Definition OutputMgr.hpp:213
uint32_t OutputBufferEndOffset
Definition OutputMgr.hpp:214
uart_port_t PortId
Definition OutputMgr.hpp:222
e_OutputChannelIds DriverId
Definition OutputMgr.hpp:223
uint32_t OutputChannelStartingOffset
Definition OutputMgr.hpp:216