debugflags update

This commit is contained in:
Kevin Santo Cappuccio 2023-06-26 12:23:28 -07:00
parent 3cecc3a9e6
commit ec010a16f6
4 changed files with 45 additions and 14 deletions

View File

@ -668,18 +668,33 @@ void parseStringToBridges(void)
void debugFlagInit(void)
{
#ifdef EEPROMSTUFF
debugFP = EEPROM.read(DEBUG_FILEPARSINGADDRESS);
debugFPtime = EEPROM.read(TIME_FILEPARSINGADDRESS);
debugNM = EEPROM.read(DEBUG_NETMANAGERADDRESS);
debugNMtime = EEPROM.read(TIME_NETMANAGERADDRESS);
debugNTCC = EEPROM.read(DEBUG_NETTOCHIPCONNECTIONSADDRESS);
debugNTCC2 = EEPROM.read(DEBUG_NETTOCHIPCONNECTIONSALTADDRESS);
debugLEDs = EEPROM.read(DEBUG_LEDSADDRESS);
//debugLEDs = EEPROM.read(DEBUG_LEDSADDRESS);
#else
debugFP = 1;
debugFPtime = 1;
debugNM = 1;
debugNMtime = 1;
debugNTCC = 1;
debugNTCC2 = 1;
// debugLEDs = 1;
#endif
}

View File

@ -1,3 +1,7 @@
#define PIOSTUFF 1 //comment these out to remove them
#define EEPROMSTUFF 1
#define FSSTUFF 1
#define DEBUG_FILEPARSINGADDRESS 32

View File

@ -4,6 +4,8 @@
#include "MatrixStateRP2040.h"
Adafruit_NeoPixel leds(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
rgbColor netColors[MAX_NETS] = {0};
@ -11,10 +13,13 @@ rgbColor netColors[MAX_NETS] = {0};
uint8_t saturation = 254;
uint8_t brightness = BRIGHTNESS;
bool debugLEDs = 1;
#ifdef EEPROMSTUFF
debugLEDs = EEPROM.read(DEBUG_LEDSADDRESS);
#include <EEPROM.h>
bool debugLEDs = EEPROM.read(DEBUG_LEDSADDRESS);
#else
bool debugLEDs = 1;
#endif
@ -78,7 +83,7 @@ void rainbowy(int saturation, int brightness, int wait)
void clearLEDs(void)
{
for (int i = 0; i < 59; i++)
for (int i = 0; i < 60; i++)
{ // For each pixel in strip...
leds.setPixelColor(i, 0); // Set pixel's color (in RAM)

View File

@ -1,3 +1,5 @@
#include <Arduino.h>
#include "JumperlessDefinesRP2040.h"
#include "NetManager.h"
@ -14,9 +16,7 @@
#define PIOSTUFF 1 //comment these out to remove them
#define EEPROMSTUFF 1
#define FSSTUFF 1
@ -48,10 +48,12 @@ void setup()
{
//
// initArduino();
debugFlagInit();
#ifdef EEPROMSTUFF
EEPROM.begin(256);
debugFlagInit();
#endif
#ifdef PIOSTUFF
initCH446Q();
@ -72,7 +74,7 @@ void setup()
// if (EEPROM.read(CLEARBEFORECOMMANDADDRESS) == 0)
//{
#ifdef FSSTUFF
#ifdef FSSTUFF5
if (LittleFS.exists("/nodeFile.txt"))
{
delay(20);
@ -208,6 +210,7 @@ menu:
timer = millis();
#ifdef FSSTUFF
clearNodeFile();
savePreformattedNodeFile();
openNodeFile();
@ -234,7 +237,9 @@ menu:
digitalWrite(RESETPIN, HIGH);
delay(1);
// clearNodeFile();
#ifdef FSSTUFF
clearNodeFile();
#endif
digitalWrite(RESETPIN, LOW);
clearAllNTCC();
clearLEDs();
@ -348,7 +353,7 @@ menu:
*/
case 'd':
{
// debugFlagInit();
debugFlagInit();
// lastCommandWrite(input);
debugFlags:
@ -357,9 +362,9 @@ menu:
Serial.print("\n\ra-z. exit\n\r");
Serial.print("\n\r1. file parsing = ");
// Serial.print(debugFP);
Serial.print(debugFP);
Serial.print("\n\r2. file parsing time = ");
// Serial.print(debugFPtime);
Serial.print(debugFPtime);
Serial.print("\n\r3. net manager = ");
Serial.print(debugNM);
@ -383,7 +388,9 @@ menu:
if (toggleDebug >= 0 && toggleDebug <= 9)
{
// debugFlagSet(toggleDebug);
#ifdef EEPROMSTUFF
debugFlagSet(toggleDebug);
#endif
goto debugFlags;
}
else