mirror of
https://github.com/Architeuthis-Flux/Jumperless.git
synced 2025-02-07 15:01:30 +01:00
debugflags update
This commit is contained in:
parent
3cecc3a9e6
commit
ec010a16f6
@ -668,18 +668,33 @@ void parseStringToBridges(void)
|
|||||||
|
|
||||||
void debugFlagInit(void)
|
void debugFlagInit(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#ifdef EEPROMSTUFF
|
||||||
debugFP = EEPROM.read(DEBUG_FILEPARSINGADDRESS);
|
debugFP = EEPROM.read(DEBUG_FILEPARSINGADDRESS);
|
||||||
debugFPtime = EEPROM.read(TIME_FILEPARSINGADDRESS);
|
debugFPtime = EEPROM.read(TIME_FILEPARSINGADDRESS);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
debugNM = EEPROM.read(DEBUG_NETMANAGERADDRESS);
|
debugNM = EEPROM.read(DEBUG_NETMANAGERADDRESS);
|
||||||
debugNMtime = EEPROM.read(TIME_NETMANAGERADDRESS);
|
debugNMtime = EEPROM.read(TIME_NETMANAGERADDRESS);
|
||||||
|
|
||||||
debugNTCC = EEPROM.read(DEBUG_NETTOCHIPCONNECTIONSADDRESS);
|
debugNTCC = EEPROM.read(DEBUG_NETTOCHIPCONNECTIONSADDRESS);
|
||||||
debugNTCC2 = EEPROM.read(DEBUG_NETTOCHIPCONNECTIONSALTADDRESS);
|
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
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
#define PIOSTUFF 1 //comment these out to remove them
|
||||||
|
#define EEPROMSTUFF 1
|
||||||
|
#define FSSTUFF 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define DEBUG_FILEPARSINGADDRESS 32
|
#define DEBUG_FILEPARSINGADDRESS 32
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include "MatrixStateRP2040.h"
|
#include "MatrixStateRP2040.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Adafruit_NeoPixel leds(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
|
Adafruit_NeoPixel leds(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
|
||||||
|
|
||||||
rgbColor netColors[MAX_NETS] = {0};
|
rgbColor netColors[MAX_NETS] = {0};
|
||||||
@ -11,10 +13,13 @@ rgbColor netColors[MAX_NETS] = {0};
|
|||||||
uint8_t saturation = 254;
|
uint8_t saturation = 254;
|
||||||
uint8_t brightness = BRIGHTNESS;
|
uint8_t brightness = BRIGHTNESS;
|
||||||
|
|
||||||
bool debugLEDs = 1;
|
|
||||||
|
|
||||||
#ifdef EEPROMSTUFF
|
#ifdef EEPROMSTUFF
|
||||||
debugLEDs = EEPROM.read(DEBUG_LEDSADDRESS);
|
#include <EEPROM.h>
|
||||||
|
bool debugLEDs = EEPROM.read(DEBUG_LEDSADDRESS);
|
||||||
|
#else
|
||||||
|
bool debugLEDs = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -78,7 +83,7 @@ void rainbowy(int saturation, int brightness, int wait)
|
|||||||
|
|
||||||
void clearLEDs(void)
|
void clearLEDs(void)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 59; i++)
|
for (int i = 0; i < 60; i++)
|
||||||
{ // For each pixel in strip...
|
{ // For each pixel in strip...
|
||||||
|
|
||||||
leds.setPixelColor(i, 0); // Set pixel's color (in RAM)
|
leds.setPixelColor(i, 0); // Set pixel's color (in RAM)
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "JumperlessDefinesRP2040.h"
|
#include "JumperlessDefinesRP2040.h"
|
||||||
#include "NetManager.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();
|
// initArduino();
|
||||||
|
debugFlagInit();
|
||||||
|
|
||||||
#ifdef EEPROMSTUFF
|
#ifdef EEPROMSTUFF
|
||||||
EEPROM.begin(256);
|
EEPROM.begin(256);
|
||||||
|
|
||||||
debugFlagInit();
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef PIOSTUFF
|
#ifdef PIOSTUFF
|
||||||
initCH446Q();
|
initCH446Q();
|
||||||
@ -72,7 +74,7 @@ void setup()
|
|||||||
|
|
||||||
// if (EEPROM.read(CLEARBEFORECOMMANDADDRESS) == 0)
|
// if (EEPROM.read(CLEARBEFORECOMMANDADDRESS) == 0)
|
||||||
//{
|
//{
|
||||||
#ifdef FSSTUFF
|
#ifdef FSSTUFF5
|
||||||
if (LittleFS.exists("/nodeFile.txt"))
|
if (LittleFS.exists("/nodeFile.txt"))
|
||||||
{
|
{
|
||||||
delay(20);
|
delay(20);
|
||||||
@ -208,6 +210,7 @@ menu:
|
|||||||
|
|
||||||
timer = millis();
|
timer = millis();
|
||||||
#ifdef FSSTUFF
|
#ifdef FSSTUFF
|
||||||
|
clearNodeFile();
|
||||||
savePreformattedNodeFile();
|
savePreformattedNodeFile();
|
||||||
|
|
||||||
openNodeFile();
|
openNodeFile();
|
||||||
@ -234,7 +237,9 @@ menu:
|
|||||||
|
|
||||||
digitalWrite(RESETPIN, HIGH);
|
digitalWrite(RESETPIN, HIGH);
|
||||||
delay(1);
|
delay(1);
|
||||||
// clearNodeFile();
|
#ifdef FSSTUFF
|
||||||
|
clearNodeFile();
|
||||||
|
#endif
|
||||||
digitalWrite(RESETPIN, LOW);
|
digitalWrite(RESETPIN, LOW);
|
||||||
clearAllNTCC();
|
clearAllNTCC();
|
||||||
clearLEDs();
|
clearLEDs();
|
||||||
@ -348,7 +353,7 @@ menu:
|
|||||||
*/
|
*/
|
||||||
case 'd':
|
case 'd':
|
||||||
{
|
{
|
||||||
// debugFlagInit();
|
debugFlagInit();
|
||||||
// lastCommandWrite(input);
|
// lastCommandWrite(input);
|
||||||
|
|
||||||
debugFlags:
|
debugFlags:
|
||||||
@ -357,9 +362,9 @@ menu:
|
|||||||
Serial.print("\n\ra-z. exit\n\r");
|
Serial.print("\n\ra-z. exit\n\r");
|
||||||
|
|
||||||
Serial.print("\n\r1. file parsing = ");
|
Serial.print("\n\r1. file parsing = ");
|
||||||
// Serial.print(debugFP);
|
Serial.print(debugFP);
|
||||||
Serial.print("\n\r2. file parsing time = ");
|
Serial.print("\n\r2. file parsing time = ");
|
||||||
// Serial.print(debugFPtime);
|
Serial.print(debugFPtime);
|
||||||
|
|
||||||
Serial.print("\n\r3. net manager = ");
|
Serial.print("\n\r3. net manager = ");
|
||||||
Serial.print(debugNM);
|
Serial.print(debugNM);
|
||||||
@ -383,7 +388,9 @@ menu:
|
|||||||
|
|
||||||
if (toggleDebug >= 0 && toggleDebug <= 9)
|
if (toggleDebug >= 0 && toggleDebug <= 9)
|
||||||
{
|
{
|
||||||
// debugFlagSet(toggleDebug);
|
#ifdef EEPROMSTUFF
|
||||||
|
debugFlagSet(toggleDebug);
|
||||||
|
#endif
|
||||||
goto debugFlags;
|
goto debugFlags;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user