Skip to content

Commit

Permalink
I broke something in the last release, this should fix it
Browse files Browse the repository at this point in the history
  • Loading branch information
Architeuthis-Flux committed Jun 19, 2024
1 parent 94572ac commit 6b72c7e
Show file tree
Hide file tree
Showing 141 changed files with 9,716 additions and 12 deletions.

This file was deleted.

19 changes: 19 additions & 0 deletions JumperlessNano/src/FileParsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1508,6 +1508,7 @@ void debugFlagInit(void)
rotaryEncoderMode = EEPROM.read(ROTARYENCODER_MODE_ADDRESS);

probeSwap = EEPROM.read(PROBESWAPADDRESS);
loadFileOnStart = EEPROM.read(LOADFILEONSTART_ADDRESS);

#else

Expand All @@ -1522,6 +1523,8 @@ void debugFlagInit(void)

// debugLEDs = 1;
#endif
if (loadFileOnStart != 0 && loadFileOnStart != 1)
EEPROM.write(LOADFILEONSTART_ADDRESS, 0);

if (debugFP != 0 && debugFP != 1)
EEPROM.write(DEBUG_FILEPARSINGADDRESS, 0);
Expand Down Expand Up @@ -1747,6 +1750,22 @@ void debugFlagSet(int flag)
}
break;
}
case 7:
{
if (loadFileOnStart == 0)
{
EEPROM.write(LOADFILEONSTART_ADDRESS, 1);

loadFileOnStart = 1;
}
else
{
EEPROM.write(LOADFILEONSTART_ADDRESS, 0);

loadFileOnStart = 0;
}
break;
}
}
delay(4);
EEPROM.commit();
Expand Down
2 changes: 2 additions & 0 deletions JumperlessNano/src/FileParsing.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ extern bool debugNTCC2;
extern bool debugLEDs;
extern bool debugMM;

extern int loadFileOnStart;

// #include "RotaryEncoder.h"


Expand Down
2 changes: 1 addition & 1 deletion JumperlessNano/src/JumperlessDefinesRP2040.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extern volatile int sendAllPathsCore2;
#define BUTTON_ENC 0



#define LOADFILEONSTART_ADDRESS 29
#define ROTARYENCODER_MODE_ADDRESS 31
#define DEBUG_FILEPARSINGADDRESS 32
#define TIME_FILEPARSINGADDRESS 33
Expand Down
7 changes: 4 additions & 3 deletions JumperlessNano/src/LEDs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,11 +579,12 @@ void showSavedColors(int slot)
// delayMicroseconds(100);
// saveRawColors(slot);
}
if (rotaryEncoderMode == 1)
{

for (int i = 0; i < LED_COUNT; i++)
{
leds.setPixelColor(i, savedLEDcolors[slot][i]);
if (rotaryEncoderMode == 1)
{

if (i == slotLEDpositions[netSlot])
{
Expand Down Expand Up @@ -832,7 +833,7 @@ void lightUpNet(int netNumber, int node, int onOff, int brightness2, int hueShif
// Serial.print(node);
// Serial.print(" onOff: ");
// Serial.print(onOff);
if (net[netNumber].nodes[1] != 0 && net[netNumber].nodes[1] <= NANO_A7)
if ((net[netNumber].nodes[1] != 0 && net[netNumber].nodes[1] <= NANO_A7 )||net[netNumber].nodes[0] != 0 && net[netNumber].nodes[0] <= NANO_A7 )
{

for (int j = 0; j < MAX_NODES; j++)
Expand Down
4 changes: 2 additions & 2 deletions JumperlessNano/src/Probing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,15 +589,15 @@ probeActive = 1;
assignNetColors();
// // Serial.print("bridgesToPaths\n\r");
// delay(18);
showNets();
//showNets();
showLEDsCore2 = 1;
rawOtherColors[1] = 0x550004;
showLEDsCore2 = 1;

sendAllPathsCore2 = 1;
// delay(25);
// pinMode(probePin, INPUT);
delay(300);
delay(100);
row[1] = -2;

// sprintf(oledBuffer, " ");
Expand Down
29 changes: 24 additions & 5 deletions JumperlessNano/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@ unsigned long lastNetConfirmTimer = 0;

volatile int sendAllPathsCore2 = 0; // this signals the core 2 to send all the paths to the CH446Q

int loadFileOnStart = 1;
int rotEncInit = 0;
// https://wokwi.com/projects/367384677537829889

int core2setupFinished = 0;

void setup()
{
pinMode(0, OUTPUT);
Expand Down Expand Up @@ -117,7 +120,12 @@ void setup()

setDac0_5Vvoltage(0.0);
setDac1_8Vvoltage(1.9);
createSlots(-1, rotaryEncoderMode);

// if (rotaryEncoderMode == 1)
// {
createSlots(-1, rotaryEncoderMode);
//}
//
clearAllNTCC();

// if (rotaryEncoderMode == 1)
Expand All @@ -143,7 +151,7 @@ void setup1()
startupColors();
delay(4);
lightUpRail();

core2setupFinished = 1;
delay(4);

showLEDsCore2 = 1;
Expand All @@ -159,7 +167,7 @@ int baudRate = 115200;

int restoredNodeFile = 0;

const char firmwareVersion[] = "1.3.13"; //// remember to update this
const char firmwareVersion[] = "1.3.15"; //// remember to update this

int firstLoop = 1;
volatile int probeActive = 1;
Expand Down Expand Up @@ -222,6 +230,14 @@ void loop()

goto loadfile;
}
// if (firstLoop == 1 && rotaryEncoderMode == 0 && loadFileOnStart == 1)
// {
// delay(50);
// firstLoop = 0;
// probeActive = 0;

// goto loadfile;
// }

// Serial.print("Slot: ");
// Serial.println(netSlot);
Expand Down Expand Up @@ -503,7 +519,7 @@ goto dontshowmenu;
case 'x':
{

if (netSlot == NUM_SLOTS)
if (netSlot == NUM_SLOTS-1)
{
netSlot = 0;
} else {
Expand Down Expand Up @@ -540,7 +556,8 @@ goto dontshowmenu;
getNodesToConnect();
bridgesToPaths();
clearLEDs();
assignNetColors();
//leds.clear();
//assignNetColors();
digitalWrite(RESETPIN, HIGH);
delayMicroseconds(100);
// Serial.print("bridgesToPaths\n\r");
Expand Down Expand Up @@ -762,6 +779,8 @@ goto dontshowmenu;
{
Serial.print("18");
}
Serial.print("\n\n\r7. load slots on start = ");
Serial.print(loadFileOnStart? "on" : "off");

Serial.print("\n\n\n\r");

Expand Down
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 6b72c7e

Please sign in to comment.