@@ -15,15 +15,15 @@ void rdmPersonalityChangedCb(dmx_port_t dmxPort, const rdm_header_t *header,
1515 DMXInput *dmx = static_cast <DMXInput *>(context);
1616
1717 if (!dmx) {
18- USER_PRINTLN (" DMX: Error: no context in rdmPersonalityChangedCb" );
18+ DEBUG_PRINTLN (" DMX: Error: no context in rdmPersonalityChangedCb" );
1919 return ;
2020 }
2121
2222 if (header->cc == RDM_CC_SET_COMMAND_RESPONSE) {
2323 const uint8_t personality = dmx_get_current_personality (dmx->inputPortNum );
2424 DMXMode = std::min (DMX_MODE_PRESET, std::max (DMX_MODE_SINGLE_RGB, int (personality)));
2525 doSerializeConfig = true ;
26- USER_PRINTF (" DMX personality changed to to: %d\n " , DMXMode);
26+ DEBUG_PRINTF (" DMX personality changed to to: %d\n " , DMXMode);
2727 }
2828}
2929
@@ -33,15 +33,15 @@ void rdmAddressChangedCb(dmx_port_t dmxPort, const rdm_header_t *header,
3333 DMXInput *dmx = static_cast <DMXInput *>(context);
3434
3535 if (!dmx) {
36- USER_PRINTLN (" DMX: Error: no context in rdmAddressChangedCb" );
36+ DEBUG_PRINTLN (" DMX: Error: no context in rdmAddressChangedCb" );
3737 return ;
3838 }
3939
4040 if (header->cc == RDM_CC_SET_COMMAND_RESPONSE) {
4141 const uint16_t addr = dmx_get_start_address (dmx->inputPortNum );
4242 DMXAddress = std::min (512 , int (addr));
4343 doSerializeConfig = true ;
44- USER_PRINTF (" DMX start addr changed to: %d\n " , DMXAddress);
44+ DEBUG_PRINTF (" DMX start addr changed to: %d\n " , DMXAddress);
4545 }
4646}
4747
@@ -105,15 +105,15 @@ bool DMXInput::installDriver()
105105{
106106
107107 const auto config = createConfig ();
108- USER_PRINTF (" DMX port: %u\n " , inputPortNum);
108+ DEBUG_PRINTF (" DMX port: %u\n " , inputPortNum);
109109 if (!dmx_driver_install (inputPortNum, &config, DMX_INTR_FLAGS_DEFAULT)) {
110- USER_PRINTF (" Error: Failed to install dmx driver\n " );
110+ DEBUG_PRINTF (" Error: Failed to install dmx driver\n " );
111111 return false ;
112112 }
113113
114- USER_PRINTF (" Listening for DMX on pin %u\n " , rxPin);
115- USER_PRINTF (" Sending DMX on pin %u\n " , txPin);
116- USER_PRINTF (" DMX enable pin is: %u\n " , enPin);
114+ DEBUG_PRINTF (" Listening for DMX on pin %u\n " , rxPin);
115+ DEBUG_PRINTF (" Sending DMX on pin %u\n " , txPin);
116+ DEBUG_PRINTF (" DMX enable pin is: %u\n " , enPin);
117117 dmx_set_pin (inputPortNum, txPin, rxPin, enPin);
118118
119119 rdm_register_dmx_start_address (inputPortNum, rdmAddressChangedCb, this );
@@ -129,7 +129,7 @@ void DMXInput::init(uint8_t rxPin, uint8_t txPin, uint8_t enPin, uint8_t inputPo
129129 // TODO add again once dmx output has been merged
130130 // if(inputPortNum == dmxOutputPort)
131131 // {
132- // USER_PRINTF ("DMXInput: Error: Input port == output port");
132+ // DEBUG_PRINTF ("DMXInput: Error: Input port == output port");
133133 // return;
134134 // }
135135#endif
@@ -138,7 +138,7 @@ void DMXInput::init(uint8_t rxPin, uint8_t txPin, uint8_t enPin, uint8_t inputPo
138138 this ->inputPortNum = inputPortNum;
139139 }
140140 else {
141- USER_PRINTF (" DMXInput: Error: invalid inputPortNum: %d\n " , inputPortNum);
141+ DEBUG_PRINTF (" DMXInput: Error: invalid inputPortNum: %d\n " , inputPortNum);
142142 return ;
143143 }
144144
@@ -148,12 +148,12 @@ void DMXInput::init(uint8_t rxPin, uint8_t txPin, uint8_t enPin, uint8_t inputPo
148148 {(int8_t )txPin, false }, // these are not used as gpio pins, thus isOutput is always false.
149149 {(int8_t )rxPin, false },
150150 {(int8_t )enPin, false }};
151- const bool pinsAllocated = pinManager. allocateMultiplePins (pins, 3 , PinOwner::DMX_INPUT);
151+ const bool pinsAllocated = PinManager:: allocateMultiplePins (pins, 3 , PinOwner::DMX_INPUT);
152152 if (!pinsAllocated) {
153- USER_PRINTF (" DMXInput: Error: Failed to allocate pins for DMX_INPUT. Pins already in use:\n " );
154- USER_PRINTF (" rx in use by: %s\n " , pinManager.getPinOwnerText (rxPin).c_str ());
155- USER_PRINTF (" tx in use by: %s\n " , pinManager.getPinOwnerText (txPin).c_str ());
156- USER_PRINTF (" en in use by: %s\n " , pinManager.getPinOwnerText (enPin).c_str ());
153+ DEBUG_PRINTF (" DMXInput: Error: Failed to allocate pins for DMX_INPUT. Pins already in use:\n " );
154+ DEBUG_PRINTF (" rx in use by: %s\n " , pinManager.getPinOwnerText (rxPin).c_str ());
155+ DEBUG_PRINTF (" tx in use by: %s\n " , pinManager.getPinOwnerText (txPin).c_str ());
156+ DEBUG_PRINTF (" en in use by: %s\n " , pinManager.getPinOwnerText (enPin).c_str ());
157157 return ;
158158 }
159159
@@ -165,11 +165,11 @@ void DMXInput::init(uint8_t rxPin, uint8_t txPin, uint8_t enPin, uint8_t inputPo
165165 // pin to core 0 because wled is running on core 1
166166 xTaskCreatePinnedToCore (dmxReceiverTask, " DMX_RCV_TASK" , 10240 , this , 2 , &task, 0 );
167167 if (!task) {
168- USER_PRINTF (" Error: Failed to create dmx rcv task" );
168+ DEBUG_PRINTF (" Error: Failed to create dmx rcv task" );
169169 }
170170 }
171171 else {
172- USER_PRINTLN (" DMX input disabled due to rxPin, enPin or txPin not set" );
172+ DEBUG_PRINTLN (" DMX input disabled due to rxPin, enPin or txPin not set" );
173173 return ;
174174 }
175175}
@@ -187,7 +187,7 @@ void DMXInput::updateInternal()
187187 if (dmx_receive (inputPortNum, &packet, DMX_TIMEOUT_TICK)) {
188188 if (!packet.err ) {
189189 if (!connected) {
190- USER_PRINTLN (" DMX Input - connected" );
190+ DEBUG_PRINTLN (" DMX Input - connected" );
191191 }
192192 connected = true ;
193193 identify = isIdentifyOn ();
@@ -202,7 +202,7 @@ void DMXInput::updateInternal()
202202 }
203203 else {
204204 if (connected) {
205- USER_PRINTLN (" DMX Input - disconnected" );
205+ DEBUG_PRINTLN (" DMX Input - disconnected" );
206206 }
207207 connected = false ;
208208 }
0 commit comments