1
0
mirror of https://github.com/livingcomputermuseum/IFS.git synced 2026-04-04 20:57:23 +00:00

Small tweak to LED logic to ensure it's always in the proper state.

This commit is contained in:
Josh Dersch
2023-10-02 20:34:01 -07:00
parent 5ec467d183
commit e94304a73a

View File

@@ -246,7 +246,6 @@ namespace IFS.Transport
/// </summary>
private void ReceiveFromNetworkInterface()
{
_ledController.SetLed(3, 1);
PruInterfaceControlBlock cb = GetInterfaceControlBlock();
if (cb.r_truncated != 0)
@@ -280,6 +279,8 @@ namespace IFS.Transport
return;
}
_ledController.SetLed(3, 1);
// Grab the received data from the shared PRU memory:
byte[] durationBuffer = new byte[receivedDataLength];
Marshal.Copy(new IntPtr(_sharedPruMemory.ToInt64() + R_PTR_OFFSET), durationBuffer, 0, receivedDataLength);
@@ -291,6 +292,7 @@ namespace IFS.Transport
if (decodedPacket == null)
{
Log.Write(LogType.Warning, LogComponent.E3Mbit, "Received bad packet.");
_ledController.SetLed(3, 0);
return;
}