remove unnecessary DMX connection logs and disconnection handling

This commit is contained in:
RaffaelW 2025-04-15 21:47:16 +02:00
parent 33b617b677
commit 6aa4f5dc51

View file

@ -488,13 +488,6 @@ void loop()
/* We should check to make sure that there weren't any DMX errors. */ /* We should check to make sure that there weren't any DMX errors. */
if (!dmx1_packet.err) if (!dmx1_packet.err)
{ {
/* If this is the first DMX data we've received, lets log it! */
if (!dmx1_IsConnected)
{
Serial.println("DMX1 in is connected!");
dmx1_IsConnected = true;
}
/* Don't forget we need to actually read the DMX data into our buffer so /* Don't forget we need to actually read the DMX data into our buffer so
that we can print it out. */ that we can print it out. */
@ -517,15 +510,6 @@ void loop()
Serial.println("A DMX 1 error occurred."); Serial.println("A DMX 1 error occurred.");
} }
} }
else if (dmx1_IsConnected)
{
/* If DMX times out after having been connected, it likely means that the
DMX cable was unplugged. When that happens in this example sketch, we'll
uninstall the DMX driver. */
Serial.println("DMX 1 was disconnected.");
dmx1_IsConnected = false;
// dmx_driver_delete(dmx1);
}
if (direction2 == Input && dmx_receive(dmx2, &dmx2_packet, 0)) if (direction2 == Input && dmx_receive(dmx2, &dmx2_packet, 0))
{ {
@ -543,13 +527,6 @@ void loop()
/* We should check to make sure that there weren't any DMX errors. */ /* We should check to make sure that there weren't any DMX errors. */
if (!dmx2_packet.err) if (!dmx2_packet.err)
{ {
/* If this is the first DMX data we've received, lets log it! */
if (!dmx2_IsConnected)
{
Serial.println("DMX2 in is connected!");
dmx2_IsConnected = true;
}
/* Don't forget we need to actually read the DMX data into our buffer so /* Don't forget we need to actually read the DMX data into our buffer so
that we can print it out. */ that we can print it out. */
@ -572,13 +549,4 @@ void loop()
Serial.println("A DMX 2 error occurred."); Serial.println("A DMX 2 error occurred.");
} }
} }
else if (dmx2_IsConnected)
{
/* If DMX times out after having been connected, it likely means that the
DMX cable was unplugged. When that happens in this example sketch, we'll
uninstall the DMX driver. */
Serial.println("DMX 2 was disconnected.");
dmx2_IsConnected = false;
// dmx_driver_delete(dmx2);
}
} }