Skip to content

Commit

Permalink
reanabled old modes on ZeDMD HD for PPUC compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalkbrenner committed Dec 30, 2023
1 parent 114e2eb commit 1900b14
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#define ZEDMD_VERSION_MAJOR 3 // X Digits
#define ZEDMD_VERSION_MINOR 4 // Max 2 Digits
#define ZEDMD_VERSION_PATCH 1 // Max 2 Digits
#define ZEDMD_VERSION_PATCH 2 // Max 2 Digits

#ifdef ZEDMD_HD
#define PANEL_WIDTH 128 // Width: number of LEDs for 1 panel.
Expand Down Expand Up @@ -98,9 +98,6 @@ uint8_t pwd_length;
AsyncUDP udp;
IPAddress ip;

unsigned long rotNextRotationTime[1];
#else
#ifdef ZEDMD_HD
unsigned long rotNextRotationTime[1];
#else
// color rotation
Expand All @@ -112,7 +109,6 @@ uint8_t tmpColor[3] = {0};

bool upscaling = true;
#endif
#endif

// Pinout derived from ESP32-HUB75-MatrixPanel-I2S-DMA.h
#define R1_PIN 25
Expand Down Expand Up @@ -305,7 +301,7 @@ void ClearScreen()
dma_display->setBrightness8(lumval[lumstep]);
}

#if !defined(ZEDMD_WIFI) && !defined(ZEDMD_HD)
#if !defined(ZEDMD_WIFI)
bool CmpColor(uint8_t *px1, uint8_t *px2, uint8_t colors)
{
if (colors == 3)
Expand Down Expand Up @@ -673,7 +669,7 @@ void fillPanelUsingPalette()
}
}

#if !defined(ZEDMD_WIFI) && !defined(ZEDMD_HD)
#if !defined(ZEDMD_WIFI)
void fillPanelUsingChangedPalette(bool *paletteAffected)
{
int pos;
Expand Down Expand Up @@ -1115,7 +1111,7 @@ bool SerialReadBuffer(uint8_t *pBuffer, unsigned int BufferSize, bool fixedSize

void updateColorRotations(void)
{
#if !defined(ZEDMD_WIFI) && !defined(ZEDMD_HD)
#if !defined(ZEDMD_WIFI)
bool rotPaletteAffected[64] = {0};
unsigned long actime = millis();
bool rotfound = false;
Expand Down Expand Up @@ -1363,7 +1359,7 @@ void loop()
break;
}

#if !defined(ZEDMD_WIFI) && !defined(ZEDMD_HD)
#if !defined(ZEDMD_WIFI)
case 20: // turn off upscaling
{
upscaling = false;
Expand Down Expand Up @@ -1578,9 +1574,7 @@ void loop()
free(renderBuffer);
break;
}
#endif

#if !defined(ZEDMD_WIFI) && !defined(ZEDMD_HD)
case 3: // mode RGB24
{
// We need to cover downscaling, too.
Expand Down

0 comments on commit 1900b14

Please sign in to comment.