From f06d91098d18f4b769260e0d3f365790b4f02466 Mon Sep 17 00:00:00 2001 From: Joseph-Jacobson Date: Wed, 2 Jul 2025 10:13:59 -0700 Subject: [PATCH 01/19] initial changes --- EmotiBit.cpp | 63 +++++++++++++++++++++++++++++++++++----------------- EmotiBit.h | 5 +++-- 2 files changed, 46 insertions(+), 22 deletions(-) diff --git a/EmotiBit.cpp b/EmotiBit.cpp index 13a46a96..3b9972b7 100644 --- a/EmotiBit.cpp +++ b/EmotiBit.cpp @@ -1746,7 +1746,11 @@ uint8_t EmotiBit::update() { dataSendTimer = millis(); - + bool stressTestEnabled = true; + if (stressTestEnabled) + { + delay(500); // Add artificial delay to create stress conditions + } if (_sendTestData) { @@ -3425,33 +3429,64 @@ void EmotiBit::sendData() { for (int16_t i = 0; i < (uint8_t)EmotiBit::DataType::length; i++) { + //Serial.print(_outDataPackets); addPacket((EmotiBit::DataType) i); if (_outDataPackets.length() > OUT_MESSAGE_TARGET_SIZE) { + //writeSdCardMessage(_outDataPackets); //moved out of loop to test + + static int16_t firstIndex; + firstIndex = 0; + while (firstIndex < _outDataPackets.length()) { + static int16_t lastIndex; + if (_outDataPackets.length() - firstIndex > MAX_SEND_LEN) { //used to be MAX_SD_WRITE_LEN + lastIndex = firstIndex + MAX_SEND_LEN; + } + else { + lastIndex = _outDataPackets.length(); + } // Avoid overrunning our reserve memory //if (_outDataPackets.length() > 2000) //{ // Serial.println(_outDataPackets.length()); //} + String s = _outDataPackets.substring(firstIndex, lastIndex); if (getPowerMode() == PowerMode::NORMAL_POWER) { - _emotiBitWiFi.sendData(_outDataPackets); + _emotiBitWiFi.sendData(s); } - //Serial.println("_emotiBitWiFi.sendData()"); - writeSdCardMessage(_outDataPackets); + + //writeSdCardMessage(s); //Serial.println("writeSdCardMessage()"); - _outDataPackets = ""; + firstIndex = lastIndex; + //_outDataPackets = ""; //ToDo determine if this is needed or if we should stay in this loop until all data over target size is split + + } } } if (_outDataPackets.length() > 0) { + //writeSdCardMessage(_outDataPackets); //moved out of loop to test + static int16_t firstIndex; + firstIndex = 0; + while (firstIndex < _outDataPackets.length()) { + static int16_t lastIndex; + if (_outDataPackets.length() - firstIndex > MAX_SEND_LEN) { //used to be MAX_SD_WRITE_LEN + lastIndex = firstIndex + MAX_SEND_LEN; + } + else { + lastIndex = _outDataPackets.length(); + } + String s = _outDataPackets.substring(firstIndex, lastIndex); if (getPowerMode() == PowerMode::NORMAL_POWER) { - _emotiBitWiFi.sendData(_outDataPackets); + _emotiBitWiFi.sendData(s); } - writeSdCardMessage(_outDataPackets); + writeSdCardMessage(s); + firstIndex = lastIndex; + } _outDataPackets = ""; } } @@ -3631,22 +3666,10 @@ bool EmotiBit::writeSdCardMessage(const String & s) { if (_sdWrite && s.length() > 0) { if (_dataFile) { - static int16_t firstIndex; - firstIndex = 0; - while (firstIndex < s.length()) { - static int16_t lastIndex; - if (s.length() - firstIndex > MAX_SD_WRITE_LEN) { - lastIndex = firstIndex + MAX_SD_WRITE_LEN; - } - else { - lastIndex = s.length(); - } #ifdef DEBUG_GET_DATA Serial.println("writing to SD card"); #endif // DEBUG - _dataFile.print(s.substring(firstIndex, lastIndex)); - firstIndex = lastIndex; - } + _dataFile.print(s); static uint32_t syncTimer = millis(); if (millis() - syncTimer > targetFileSyncDelay) diff --git a/EmotiBit.h b/EmotiBit.h index 08c6f430..9eef6af1 100644 --- a/EmotiBit.h +++ b/EmotiBit.h @@ -298,7 +298,8 @@ class EmotiBit { static const uint16_t OUT_MESSAGE_RESERVE_SIZE = 2048; static const uint16_t OUT_MESSAGE_TARGET_SIZE = 1024; static const uint16_t DATA_SEND_INTERVAL = 100; - static const uint16_t MAX_SD_WRITE_LEN = 512; // 512 is the size of the sdFat buffer +// static const uint16_t MAX_SD_WRITE_LEN = 512; // 512 is the size of the sdFat buffer + static const uint16_t MAX_SEND_LEN = 512; // new max send length for splitting in send data, used to be "MAX_SD_WRITE_LEN" static const uint16_t MAX_DATA_BUFFER_SIZE = 48; static const uint16_t NORMAL_POWER_MODE_PACKET_INTERVAL = 200; static const uint16_t LOW_POWER_MODE_PACKET_INTERVAL = 1000; @@ -424,7 +425,7 @@ class EmotiBit { File _dataFile; volatile bool _sdWrite; PowerMode _powerMode; - bool _sendTestData = false; + bool _sendTestData = true; DataType _serialData = DataType::length; volatile bool buttonPressed = false; bool startBufferOverflowTest = false; From 1667d142c05d61827026e7c309d2ea358492dc76 Mon Sep 17 00:00:00 2001 From: Joseph-Jacobson Date: Mon, 14 Jul 2025 14:46:37 -0700 Subject: [PATCH 02/19] Splitting Logic with debugging pipeline --- EmotiBit.cpp | 176 ++++++++++++++++++++++++++++++----------------- EmotiBit.h | 4 +- EmotiBitWiFi.cpp | 30 ++------ 3 files changed, 119 insertions(+), 91 deletions(-) diff --git a/EmotiBit.cpp b/EmotiBit.cpp index 3b9972b7..d48cfc25 100644 --- a/EmotiBit.cpp +++ b/EmotiBit.cpp @@ -1648,7 +1648,7 @@ uint8_t EmotiBit::update() static uint16_t serialPrevAvailable = Serial.available(); if (Serial.available() > serialPrevAvailable) { - if(Serial.read() == 'F') + if(Serial.peek() == 'F') { #ifdef ARDUINO_FEATHER_ESP32 if(!_sdWrite) // if not writing to SD card @@ -1746,24 +1746,6 @@ uint8_t EmotiBit::update() { dataSendTimer = millis(); - bool stressTestEnabled = true; - if (stressTestEnabled) - { - delay(500); // Add artificial delay to create stress conditions - } - - if (_sendTestData) - { - addTestData(_outDataPackets); - if (getPowerMode() == PowerMode::NORMAL_POWER) - { - _emotiBitWiFi.sendData(_outDataPackets); - } - writeSdCardMessage(_outDataPackets); - _outDataPackets = ""; - } - else - { // Perform data calculations in main loop processData(); @@ -1775,7 +1757,6 @@ uint8_t EmotiBit::update() startBufferOverflowTest = false; bufferOverflowTest(); } - } } // Hibernate after writing data @@ -3427,67 +3408,93 @@ void EmotiBit::processData() void EmotiBit::sendData() { + // Test data packets would get added here + if (_sendTestData) + { + addTestData(_outDataPackets); + } + for (int16_t i = 0; i < (uint8_t)EmotiBit::DataType::length; i++) { - //Serial.print(_outDataPackets); - addPacket((EmotiBit::DataType) i); - if (_outDataPackets.length() > OUT_MESSAGE_TARGET_SIZE) + if (!_sendTestData) { - //writeSdCardMessage(_outDataPackets); //moved out of loop to test + addPacket((EmotiBit::DataType) i); + } - static int16_t firstIndex; + if (_outDataPackets.length() > OUT_MESSAGE_TARGET_SIZE) + { + int16_t firstIndex; firstIndex = 0; while (firstIndex < _outDataPackets.length()) { - static int16_t lastIndex; - if (_outDataPackets.length() - firstIndex > MAX_SEND_LEN) { //used to be MAX_SD_WRITE_LEN - lastIndex = firstIndex + MAX_SEND_LEN; - } - else { - lastIndex = _outDataPackets.length(); + int16_t lastIndex; + //Serial.println(firstIndex); + lastIndex = _outDataPackets.length() - 1; // message.length() - 1 to handle \n + + // Search for the largest packet larger than MAX_SEND_LEN + while (lastIndex - firstIndex > MAX_SEND_LEN - 1) { + // Start at the end of the message and search for a packet delimiter less than MAX_SEND_LEN + lastIndex = _outDataPackets.lastIndexOf(EmotiBitPacket::PACKET_DELIMITER_CSV, lastIndex - 1); + //Serial.println(lastIndex); + if (lastIndex <= firstIndex) + { + // If we don't find a packet less than MAX_SEND_LEN, send the whole thing + lastIndex = _outDataPackets.length() - 1; + break; + } } - // Avoid overrunning our reserve memory - //if (_outDataPackets.length() > 2000) - //{ - // Serial.println(_outDataPackets.length()); - //} - - String s = _outDataPackets.substring(firstIndex, lastIndex); - if (getPowerMode() == PowerMode::NORMAL_POWER) - { - _emotiBitWiFi.sendData(s); - } - - //writeSdCardMessage(s); - //Serial.println("writeSdCardMessage()"); + + String s = _outDataPackets.substring(firstIndex, lastIndex + 1); - firstIndex = lastIndex; - //_outDataPackets = ""; //ToDo determine if this is needed or if we should stay in this loop until all data over target size is split + // Write a split marker to SD card (for test/debug only) + if (addSplitter) { + writeSdCardMessage("\nS\n"); + } + if (getPowerMode() == PowerMode::NORMAL_POWER) { + _emotiBitWiFi.sendData(s); + } + writeSdCardMessage(s); + firstIndex = lastIndex + 1; } + _outDataPackets = ""; } } if (_outDataPackets.length() > 0) { - //writeSdCardMessage(_outDataPackets); //moved out of loop to test - static int16_t firstIndex; + int16_t firstIndex; firstIndex = 0; while (firstIndex < _outDataPackets.length()) { - static int16_t lastIndex; - if (_outDataPackets.length() - firstIndex > MAX_SEND_LEN) { //used to be MAX_SD_WRITE_LEN - lastIndex = firstIndex + MAX_SEND_LEN; + int16_t lastIndex; + //Serial.println(firstIndex); + lastIndex = _outDataPackets.length() - 1; // message.length() - 1 to handle \n + + // Search for the largest packet larger than MAX_SEND_LEN + while (lastIndex - firstIndex > MAX_SEND_LEN - 1) { + // Start at the end of the message and search for a packet delimiter less than MAX_SEND_LEN + lastIndex = _outDataPackets.lastIndexOf(EmotiBitPacket::PACKET_DELIMITER_CSV, lastIndex - 1); + //Serial.println(lastIndex); + if (lastIndex <= firstIndex) + { + // If we don't find a packet less than MAX_SEND_LEN, send the whole thing + lastIndex = _outDataPackets.length() - 1; + break; + } } - else { - lastIndex = _outDataPackets.length(); + + String s = _outDataPackets.substring(firstIndex, lastIndex + 1); + + // Write a split marker to SD card (for test/debug only) + if (addSplitter) { + writeSdCardMessage("\nS\n"); + } + + if (getPowerMode() == PowerMode::NORMAL_POWER) { + _emotiBitWiFi.sendData(s); + } + writeSdCardMessage(s); + firstIndex = lastIndex + 1; } - String s = _outDataPackets.substring(firstIndex, lastIndex); - if (getPowerMode() == PowerMode::NORMAL_POWER) - { - _emotiBitWiFi.sendData(s); - } - writeSdCardMessage(s); - firstIndex = lastIndex; - } - _outDataPackets = ""; + _outDataPackets = ""; } } @@ -3863,7 +3870,7 @@ void EmotiBit::updateBatteryIndication(float battPercent) void EmotiBit::addTestData(String &dataMessage) { if (_sdWrite){ //only send test data if we are recording - EmotiBitPacket::createTestDataPacket(dataMessage); + EmotiBitPacket::createTestDataPacket(dataMessage, testDataType); } } @@ -3970,6 +3977,12 @@ void EmotiBit::processDebugInputs(String &debugPackets, uint16_t &packetNumber) Serial.println("Press S to reset maxReadSensors metrics"); Serial.println("[ACUTE TESTING MODE] Press n to printEntireNvm"); Serial.println("[ACUTE TESTING MODE] Press N to eraseEeprom"); + Serial.println("Press z to toggle OFF splitter indicators"); + Serial.println("Press Z to toggle ON splitter indicators"); + Serial.println("Press > to toggle ON Send Test Data"); + Serial.println("Press < to toggle OFF Send Test Data"); + Serial.println("Press @ to toggle Splitter Test Data if Send Test Data is ON"); + Serial.println("Press # to toggle Sawtooth Test Data if Send Test Data is ON"); } else if (c == ':') { @@ -4316,6 +4329,41 @@ void EmotiBit::processDebugInputs(String &debugPackets, uint16_t &packetNumber) _emotibitNvmController.eraseEeprom(); } } + + else if (c == 'Z') + { + addSplitter = true; + Serial.println("Adding Splitter Print"); + } + + else if (c == 'z') + { + addSplitter = false; + Serial.println("Removing Splitter Print"); + } + + else if (c == '>') + { + _sendTestData = true; + Serial.println("Entering Sending Test Data Mode"); + } + else if (c == '@' && _sendTestData == true) + { + testDataType = EmotiBitPacket::TestType::SPLITTER; + Serial.println("TestDataType: SPLITTER"); + } + + else if (c == '#' && _sendTestData == true) + { + testDataType = EmotiBitPacket::TestType::SAWTOOTH; + Serial.println("TestDataType: SAWTOOTH"); + } + + else if (c == '<') + { + _sendTestData = false; + Serial.println("Exiting Sending Test Data Mode"); + } } } diff --git a/EmotiBit.h b/EmotiBit.h index 9eef6af1..9ac30b9d 100644 --- a/EmotiBit.h +++ b/EmotiBit.h @@ -425,7 +425,9 @@ class EmotiBit { File _dataFile; volatile bool _sdWrite; PowerMode _powerMode; - bool _sendTestData = true; + bool _sendTestData = false; + const char* testDataType = EmotiBitPacket::TestType::SAWTOOTH; // Default to SAWTOOTH + bool addSplitter = false; // Adds a splitter indicator to the data packets written to the SD Card DataType _serialData = DataType::length; volatile bool buttonPressed = false; bool startBufferOverflowTest = false; diff --git a/EmotiBitWiFi.cpp b/EmotiBitWiFi.cpp index 96e556c0..a2728401 100644 --- a/EmotiBitWiFi.cpp +++ b/EmotiBitWiFi.cpp @@ -423,32 +423,10 @@ int8_t EmotiBitWiFi::sendUdp(WiFiUDP& udp, const String& message, const IPAddres return wifiStatus; } - int16_t firstIndex; - firstIndex = 0; - while (firstIndex < message.length()) { - int16_t lastIndex; - //Serial.println(firstIndex); - lastIndex = message.length() - 1; // message.length() - 1 to handle \n - - // Search for the largest packet larger than MAX_SEND_LEN - while (lastIndex - firstIndex > MAX_SEND_LEN - 1) { - // Start at the end of the message and search for a packet delimiter less than MAX_SEND_LEN - lastIndex = message.lastIndexOf(EmotiBitPacket::PACKET_DELIMITER_CSV, lastIndex - 1); - //Serial.println(lastIndex); - if (lastIndex <= firstIndex) - { - // If we don't find a packet less than MAX_SEND_LEN, send the whole thing - lastIndex = message.length() - 1; - break; - } - } - //Serial.println(message.substring(firstIndex, lastIndex)); - for (uint8_t n = 0; n < _nDataSends; n++) { - udp.beginPacket(ip, port); - udp.print(message.substring(firstIndex, lastIndex + 1)); // use lastIndex + 1 to get \n back - udp.endPacket(); - } - firstIndex = lastIndex + 1; // increment substring indexes for breaking up sends + for (uint8_t n = 0; n < _nDataSends; n++) { + udp.beginPacket(ip, port); + udp.print(message); + udp.endPacket(); } return SUCCESS; From a6f44444a8ed729246c073f0de1e46f1a481f66c Mon Sep 17 00:00:00 2001 From: Joseph-Jacobson Date: Mon, 14 Jul 2025 15:40:02 -0700 Subject: [PATCH 03/19] Bumped Library Version --- EmotiBit.h | 2 +- library.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/EmotiBit.h b/EmotiBit.h index 9ac30b9d..af52687e 100644 --- a/EmotiBit.h +++ b/EmotiBit.h @@ -55,7 +55,7 @@ class EmotiBit { - String firmware_version = "1.14.0"; + String firmware_version = "1.14.1"; diff --git a/library.properties b/library.properties index f3f76958..84edaa7b 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=EmotiBit FeatherWing -version=1.14.0 +version=1.14.1 author=Connected Future Labs maintainer=Connected Future Labs sentence=A library written for EmotiBit FeatherWing that supports all sensors included on the wing. From b4040142d0f731c082c853b5a1d9080a41b48260 Mon Sep 17 00:00:00 2001 From: Joseph-Jacobson Date: Tue, 15 Jul 2025 13:50:33 -0700 Subject: [PATCH 04/19] new error message for sd card --- EmotiBit.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/EmotiBit.cpp b/EmotiBit.cpp index d48cfc25..18a0ce26 100644 --- a/EmotiBit.cpp +++ b/EmotiBit.cpp @@ -3673,6 +3673,20 @@ bool EmotiBit::writeSdCardMessage(const String & s) { if (_sdWrite && s.length() > 0) { if (_dataFile) { + if (s.length() > MAX_SEND_LEN) + { + Serial.println("Message too long for SD card write: "); + EmotiBitPacket::Header header = EmotiBitPacket::createHeader( + EmotiBitPacket::TypeTag::DATA_OVERFLOW, + millis(), + _outDataPacketCounter++, + 1, 1, 100); + String data = String(s.length()); + String errorPacket = EmotiBitPacket::createPacket(header, data); + Serial.println(errorPacket); + _dataFile.print(errorPacket); + return false; // ToDo: handle this case + } #ifdef DEBUG_GET_DATA Serial.println("writing to SD card"); #endif // DEBUG From 87cc88ab52cea5214ccdb945720f1be04f054e39 Mon Sep 17 00:00:00 2001 From: Joseph-Jacobson Date: Tue, 15 Jul 2025 16:20:24 -0700 Subject: [PATCH 05/19] Moved splitter test into featherwing --- EmotiBit.cpp | 14 +++++------ EmotiBit.h | 4 ++-- testing/MaxLengthDataTest/README.md | 19 +++++++++++++++ testing/MaxLengthDataTest/run_test.sh | 34 +++++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 9 deletions(-) create mode 100644 testing/MaxLengthDataTest/README.md create mode 100644 testing/MaxLengthDataTest/run_test.sh diff --git a/EmotiBit.cpp b/EmotiBit.cpp index 18a0ce26..7051f146 100644 --- a/EmotiBit.cpp +++ b/EmotiBit.cpp @@ -3446,7 +3446,7 @@ void EmotiBit::sendData() String s = _outDataPackets.substring(firstIndex, lastIndex + 1); // Write a split marker to SD card (for test/debug only) - if (addSplitter) { + if (addSplitterIndicator) { writeSdCardMessage("\nS\n"); } @@ -3484,7 +3484,7 @@ void EmotiBit::sendData() String s = _outDataPackets.substring(firstIndex, lastIndex + 1); // Write a split marker to SD card (for test/debug only) - if (addSplitter) { + if (addSplitterIndicator) { writeSdCardMessage("\nS\n"); } @@ -3995,7 +3995,7 @@ void EmotiBit::processDebugInputs(String &debugPackets, uint16_t &packetNumber) Serial.println("Press Z to toggle ON splitter indicators"); Serial.println("Press > to toggle ON Send Test Data"); Serial.println("Press < to toggle OFF Send Test Data"); - Serial.println("Press @ to toggle Splitter Test Data if Send Test Data is ON"); + Serial.println("Press @ to toggle Packet Fixed Length Test if Send Test Data is ON"); Serial.println("Press # to toggle Sawtooth Test Data if Send Test Data is ON"); } else if (c == ':') @@ -4346,13 +4346,13 @@ void EmotiBit::processDebugInputs(String &debugPackets, uint16_t &packetNumber) else if (c == 'Z') { - addSplitter = true; + addSplitterIndicator = true; Serial.println("Adding Splitter Print"); } else if (c == 'z') { - addSplitter = false; + addSplitterIndicator = false; Serial.println("Removing Splitter Print"); } @@ -4363,13 +4363,13 @@ void EmotiBit::processDebugInputs(String &debugPackets, uint16_t &packetNumber) } else if (c == '@' && _sendTestData == true) { - testDataType = EmotiBitPacket::TestType::SPLITTER; + testDataType = "Splitter"; Serial.println("TestDataType: SPLITTER"); } else if (c == '#' && _sendTestData == true) { - testDataType = EmotiBitPacket::TestType::SAWTOOTH; + testDataType = "Sawtooth"; Serial.println("TestDataType: SAWTOOTH"); } diff --git a/EmotiBit.h b/EmotiBit.h index af52687e..d84742db 100644 --- a/EmotiBit.h +++ b/EmotiBit.h @@ -426,8 +426,8 @@ class EmotiBit { volatile bool _sdWrite; PowerMode _powerMode; bool _sendTestData = false; - const char* testDataType = EmotiBitPacket::TestType::SAWTOOTH; // Default to SAWTOOTH - bool addSplitter = false; // Adds a splitter indicator to the data packets written to the SD Card + const char* testDataType = "Sawtooth"; // Default to Sawtooth + bool addSplitterIndicator = false; // Adds a indicator to the data packets written to the SD Card on when a split occurs DataType _serialData = DataType::length; volatile bool buttonPressed = false; bool startBufferOverflowTest = false; diff --git a/testing/MaxLengthDataTest/README.md b/testing/MaxLengthDataTest/README.md new file mode 100644 index 00000000..66700402 --- /dev/null +++ b/testing/MaxLengthDataTest/README.md @@ -0,0 +1,19 @@ +# Description +- This tests verifies that the MaxLengthDataTest data in the EmotiBit SD card does not contain and Debug Overloads under conditions where the test runs up to 512 iterations. +- The data is verified with the bash script, checking the SD card output +- Instructions to run this test can be found in the EmotiBit Test Protocols Document under Max Length Data Test + +The following table shows commands for choosing the test type. A typical workflow will consist of: +1. Going into debug mode +2. Setting sendTestData to true +3. Choosing the Splitter test '@' +4. Pressing record in the oscilliscope and waiting for the test to finish +5. Comparing the SD card result with the bash script, specifying the extension and the test type + +| Command | Details | +|--------|--------| +| Z | Turns on "splitter" indicator, which is a "S" that is printed after each split| +| z | Turns off "splitter" indicator| +| < | Sets "sendTestData" to true| +| > | Sets "sendTestData" to false| +| @ | Sets test data to Splitter| \ No newline at end of file diff --git a/testing/MaxLengthDataTest/run_test.sh b/testing/MaxLengthDataTest/run_test.sh new file mode 100644 index 00000000..acc2f0b3 --- /dev/null +++ b/testing/MaxLengthDataTest/run_test.sh @@ -0,0 +1,34 @@ +#!/bin/bash +set -u + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PROJECT_ROOT="$(dirname "$SCRIPT_DIR")" + +EMOTIBIT_CSV="" + +# Parse required -e or --extension argument +while [[ $# -gt 0 ]]; do + case "$1" in + -e|--extension) + EMOTIBIT_CSV="$2" + shift 2 + ;; + *) + echo "Usage: $0 -e|--extension " + exit 1 + ;; + esac +done + +if [[ -z "$EMOTIBIT_CSV" ]]; then + echo "Error: You must specify -e or --extension " + exit 1 +fi + +if grep -q ',DO,' "$EMOTIBIT_CSV"; then + echo "DO found in $EMOTIBIT_CSV" + exit 1 +else + echo "No DO found in $EMOTIBIT_CSV" + exit 0 +fi \ No newline at end of file From 785167683291243962390b9f2a3de0d133795f57 Mon Sep 17 00:00:00 2001 From: Joseph-Jacobson Date: Tue, 15 Jul 2025 16:45:07 -0700 Subject: [PATCH 06/19] Renamed Folder --- testing/{MaxLengthDataTest => PacketFixedLengthTest}/README.md | 0 testing/{MaxLengthDataTest => PacketFixedLengthTest}/run_test.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename testing/{MaxLengthDataTest => PacketFixedLengthTest}/README.md (100%) rename testing/{MaxLengthDataTest => PacketFixedLengthTest}/run_test.sh (100%) diff --git a/testing/MaxLengthDataTest/README.md b/testing/PacketFixedLengthTest/README.md similarity index 100% rename from testing/MaxLengthDataTest/README.md rename to testing/PacketFixedLengthTest/README.md diff --git a/testing/MaxLengthDataTest/run_test.sh b/testing/PacketFixedLengthTest/run_test.sh similarity index 100% rename from testing/MaxLengthDataTest/run_test.sh rename to testing/PacketFixedLengthTest/run_test.sh From 076a412fe60f10bd4018426f692bc45ad22b396a Mon Sep 17 00:00:00 2001 From: Joseph-Jacobson Date: Wed, 16 Jul 2025 08:46:06 -0700 Subject: [PATCH 07/19] Review edits --- EmotiBit.h | 1 - testing/PacketFixedLengthTest/README.md | 4 ++-- testing/PacketFixedLengthTest/run_test.sh | 3 --- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/EmotiBit.h b/EmotiBit.h index d84742db..581f48c8 100644 --- a/EmotiBit.h +++ b/EmotiBit.h @@ -298,7 +298,6 @@ class EmotiBit { static const uint16_t OUT_MESSAGE_RESERVE_SIZE = 2048; static const uint16_t OUT_MESSAGE_TARGET_SIZE = 1024; static const uint16_t DATA_SEND_INTERVAL = 100; -// static const uint16_t MAX_SD_WRITE_LEN = 512; // 512 is the size of the sdFat buffer static const uint16_t MAX_SEND_LEN = 512; // new max send length for splitting in send data, used to be "MAX_SD_WRITE_LEN" static const uint16_t MAX_DATA_BUFFER_SIZE = 48; static const uint16_t NORMAL_POWER_MODE_PACKET_INTERVAL = 200; diff --git a/testing/PacketFixedLengthTest/README.md b/testing/PacketFixedLengthTest/README.md index 66700402..8707a867 100644 --- a/testing/PacketFixedLengthTest/README.md +++ b/testing/PacketFixedLengthTest/README.md @@ -1,5 +1,5 @@ # Description -- This tests verifies that the MaxLengthDataTest data in the EmotiBit SD card does not contain and Debug Overloads under conditions where the test runs up to 512 iterations. +- This tests verifies that the Packet Fixed Length Test data in the EmotiBit SD card does not contain any Debug Overloads under conditions where the test runs up to 512 iterations. - The data is verified with the bash script, checking the SD card output - Instructions to run this test can be found in the EmotiBit Test Protocols Document under Max Length Data Test @@ -8,7 +8,7 @@ The following table shows commands for choosing the test type. A typical workflo 2. Setting sendTestData to true 3. Choosing the Splitter test '@' 4. Pressing record in the oscilliscope and waiting for the test to finish -5. Comparing the SD card result with the bash script, specifying the extension and the test type +5. Comparing the SD card result with the bash script, specifying the extension | Command | Details | |--------|--------| diff --git a/testing/PacketFixedLengthTest/run_test.sh b/testing/PacketFixedLengthTest/run_test.sh index acc2f0b3..b27846e9 100644 --- a/testing/PacketFixedLengthTest/run_test.sh +++ b/testing/PacketFixedLengthTest/run_test.sh @@ -1,9 +1,6 @@ #!/bin/bash set -u -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -PROJECT_ROOT="$(dirname "$SCRIPT_DIR")" - EMOTIBIT_CSV="" # Parse required -e or --extension argument From 189d1de6cc5676cd0b70f2ee3317412b752701d6 Mon Sep 17 00:00:00 2001 From: Joseph-Jacobson Date: Wed, 16 Jul 2025 08:57:59 -0700 Subject: [PATCH 08/19] minor changes --- EmotiBit.cpp | 2 +- EmotiBit.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/EmotiBit.cpp b/EmotiBit.cpp index 7051f146..097ef97d 100644 --- a/EmotiBit.cpp +++ b/EmotiBit.cpp @@ -3883,7 +3883,7 @@ void EmotiBit::updateBatteryIndication(float battPercent) void EmotiBit::addTestData(String &dataMessage) { - if (_sdWrite){ //only send test data if we are recording + if (_sdWrite) {//only send test data if we are recording EmotiBitPacket::createTestDataPacket(dataMessage, testDataType); } } diff --git a/EmotiBit.h b/EmotiBit.h index 581f48c8..53e3b9d8 100644 --- a/EmotiBit.h +++ b/EmotiBit.h @@ -426,7 +426,7 @@ class EmotiBit { PowerMode _powerMode; bool _sendTestData = false; const char* testDataType = "Sawtooth"; // Default to Sawtooth - bool addSplitterIndicator = false; // Adds a indicator to the data packets written to the SD Card on when a split occurs + bool addSplitterIndicator = false; // Adds an indicator to the data packets written to the SD Card on when a split occurs DataType _serialData = DataType::length; volatile bool buttonPressed = false; bool startBufferOverflowTest = false; From d7dc259c4b6163e0c34ac2859ed173e212f88f31 Mon Sep 17 00:00:00 2001 From: Joseph-Jacobson Date: Mon, 28 Jul 2025 13:48:55 -0700 Subject: [PATCH 09/19] PR changes - removed constant print infos in debug mode - spacing - removed splitter indicator --- EmotiBit.cpp | 87 ++++++++--------------- EmotiBit.h | 5 +- testing/PacketFixedLengthTest/run_test.sh | 6 +- 3 files changed, 34 insertions(+), 64 deletions(-) diff --git a/EmotiBit.cpp b/EmotiBit.cpp index 097ef97d..83a0dfcf 100644 --- a/EmotiBit.cpp +++ b/EmotiBit.cpp @@ -1678,7 +1678,7 @@ uint8_t EmotiBit::update() #endif } - else + else if (!_debugMode) { printEmotiBitInfo(); } @@ -1746,17 +1746,16 @@ uint8_t EmotiBit::update() { dataSendTimer = millis(); - // Perform data calculations in main loop - processData(); - - // Send data to SD card and over wireless - sendData(); + // Perform data calculations in main loop + processData(); + // Send data to SD card and over wireless + sendData(); - if (startBufferOverflowTest) - { - startBufferOverflowTest = false; - bufferOverflowTest(); - } + if (startBufferOverflowTest) + { + startBufferOverflowTest = false; + bufferOverflowTest(); + } } // Hibernate after writing data @@ -3445,11 +3444,6 @@ void EmotiBit::sendData() String s = _outDataPackets.substring(firstIndex, lastIndex + 1); - // Write a split marker to SD card (for test/debug only) - if (addSplitterIndicator) { - writeSdCardMessage("\nS\n"); - } - if (getPowerMode() == PowerMode::NORMAL_POWER) { _emotiBitWiFi.sendData(s); } @@ -3459,7 +3453,7 @@ void EmotiBit::sendData() _outDataPackets = ""; } } - if (_outDataPackets.length() > 0) + if (_outDataPackets.length() > 0) //ToDo: Consider removing this check since it only clears the remaining data on the buffer { int16_t firstIndex; firstIndex = 0; @@ -3483,18 +3477,13 @@ void EmotiBit::sendData() String s = _outDataPackets.substring(firstIndex, lastIndex + 1); - // Write a split marker to SD card (for test/debug only) - if (addSplitterIndicator) { - writeSdCardMessage("\nS\n"); - } - - if (getPowerMode() == PowerMode::NORMAL_POWER) { - _emotiBitWiFi.sendData(s); - } - writeSdCardMessage(s); - firstIndex = lastIndex + 1; + if (getPowerMode() == PowerMode::NORMAL_POWER) { + _emotiBitWiFi.sendData(s); } - _outDataPackets = ""; + writeSdCardMessage(s); + firstIndex = lastIndex + 1; + } + _outDataPackets = ""; } } @@ -3884,7 +3873,7 @@ void EmotiBit::updateBatteryIndication(float battPercent) void EmotiBit::addTestData(String &dataMessage) { if (_sdWrite) {//only send test data if we are recording - EmotiBitPacket::createTestDataPacket(dataMessage, testDataType); + EmotiBitPacket::createTestDataPacket(dataMessage, _testDataType); } } @@ -3991,8 +3980,6 @@ void EmotiBit::processDebugInputs(String &debugPackets, uint16_t &packetNumber) Serial.println("Press S to reset maxReadSensors metrics"); Serial.println("[ACUTE TESTING MODE] Press n to printEntireNvm"); Serial.println("[ACUTE TESTING MODE] Press N to eraseEeprom"); - Serial.println("Press z to toggle OFF splitter indicators"); - Serial.println("Press Z to toggle ON splitter indicators"); Serial.println("Press > to toggle ON Send Test Data"); Serial.println("Press < to toggle OFF Send Test Data"); Serial.println("Press @ to toggle Packet Fixed Length Test if Send Test Data is ON"); @@ -4343,41 +4330,25 @@ void EmotiBit::processDebugInputs(String &debugPackets, uint16_t &packetNumber) _emotibitNvmController.eraseEeprom(); } } - - else if (c == 'Z') - { - addSplitterIndicator = true; - Serial.println("Adding Splitter Print"); - } - - else if (c == 'z') - { - addSplitterIndicator = false; - Serial.println("Removing Splitter Print"); - } - - else if (c == '>') - { + else if (c == '>') { _sendTestData = true; Serial.println("Entering Sending Test Data Mode"); } - else if (c == '@' && _sendTestData == true) - { - testDataType = "Splitter"; - Serial.println("TestDataType: SPLITTER"); - } - - else if (c == '#' && _sendTestData == true) - { - testDataType = "Sawtooth"; - Serial.println("TestDataType: SAWTOOTH"); - } - else if (c == '<') { _sendTestData = false; Serial.println("Exiting Sending Test Data Mode"); } + else if (c == '@' && _sendTestData == true) + { + _testDataType = EmotiBitPacket::TestType::FIXEDPACKETLENGTHTEST; + Serial.println("TestDataType: Fixed Packet Length Test"); + } + else if (c == '#' && _sendTestData == true) + { + _testDataType = EmotiBitPacket::TestType::SAWTOOTHTEST; + Serial.println("TestDataType: Sawtooth Test"); + } } } diff --git a/EmotiBit.h b/EmotiBit.h index 53e3b9d8..59a34318 100644 --- a/EmotiBit.h +++ b/EmotiBit.h @@ -298,7 +298,7 @@ class EmotiBit { static const uint16_t OUT_MESSAGE_RESERVE_SIZE = 2048; static const uint16_t OUT_MESSAGE_TARGET_SIZE = 1024; static const uint16_t DATA_SEND_INTERVAL = 100; - static const uint16_t MAX_SEND_LEN = 512; // new max send length for splitting in send data, used to be "MAX_SD_WRITE_LEN" + static const uint16_t MAX_SEND_LEN = 512; static const uint16_t MAX_DATA_BUFFER_SIZE = 48; static const uint16_t NORMAL_POWER_MODE_PACKET_INTERVAL = 200; static const uint16_t LOW_POWER_MODE_PACKET_INTERVAL = 1000; @@ -425,8 +425,7 @@ class EmotiBit { volatile bool _sdWrite; PowerMode _powerMode; bool _sendTestData = false; - const char* testDataType = "Sawtooth"; // Default to Sawtooth - bool addSplitterIndicator = false; // Adds an indicator to the data packets written to the SD Card on when a split occurs + EmotiBitPacket::TestType _testDataType = EmotiBitPacket::TestType::SAWTOOTHTEST; // Default to Sawtooth DataType _serialData = DataType::length; volatile bool buttonPressed = false; bool startBufferOverflowTest = false; diff --git a/testing/PacketFixedLengthTest/run_test.sh b/testing/PacketFixedLengthTest/run_test.sh index b27846e9..87e46fd7 100644 --- a/testing/PacketFixedLengthTest/run_test.sh +++ b/testing/PacketFixedLengthTest/run_test.sh @@ -6,19 +6,19 @@ EMOTIBIT_CSV="" # Parse required -e or --extension argument while [[ $# -gt 0 ]]; do case "$1" in - -e|--extension) + -p|--path) EMOTIBIT_CSV="$2" shift 2 ;; *) - echo "Usage: $0 -e|--extension " + echo "Usage: $0 -p|--path " exit 1 ;; esac done if [[ -z "$EMOTIBIT_CSV" ]]; then - echo "Error: You must specify -e or --extension " + echo "Error: You must specify -p or --path " exit 1 fi From 7262ae31646d2773d500b672f86ae12712caeb6b Mon Sep 17 00:00:00 2001 From: Joseph-Jacobson Date: Mon, 28 Jul 2025 14:46:33 -0700 Subject: [PATCH 10/19] Removed unnecessary instructions --- testing/PacketFixedLengthTest/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/testing/PacketFixedLengthTest/README.md b/testing/PacketFixedLengthTest/README.md index 8707a867..24d45304 100644 --- a/testing/PacketFixedLengthTest/README.md +++ b/testing/PacketFixedLengthTest/README.md @@ -12,8 +12,6 @@ The following table shows commands for choosing the test type. A typical workflo | Command | Details | |--------|--------| -| Z | Turns on "splitter" indicator, which is a "S" that is printed after each split| -| z | Turns off "splitter" indicator| | < | Sets "sendTestData" to true| | > | Sets "sendTestData" to false| | @ | Sets test data to Splitter| \ No newline at end of file From d2748ec24341cb0f7c08815e3fa7180df15791e9 Mon Sep 17 00:00:00 2001 From: Joseph-Jacobson Date: Tue, 29 Jul 2025 15:18:39 -0700 Subject: [PATCH 11/19] ToDo added --- EmotiBit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EmotiBit.cpp b/EmotiBit.cpp index 83a0dfcf..7bab131b 100644 --- a/EmotiBit.cpp +++ b/EmotiBit.cpp @@ -3442,7 +3442,7 @@ void EmotiBit::sendData() } } - String s = _outDataPackets.substring(firstIndex, lastIndex + 1); + String s = _outDataPackets.substring(firstIndex, lastIndex + 1); //ToDo:: Consider methods to optimize this if (getPowerMode() == PowerMode::NORMAL_POWER) { _emotiBitWiFi.sendData(s); From 03246b55f17d78e6911d59642d4ff03294c84a21 Mon Sep 17 00:00:00 2001 From: Joseph-Jacobson Date: Tue, 5 Aug 2025 10:31:05 -0700 Subject: [PATCH 12/19] Renaming --- EmotiBit.cpp | 4 ++-- EmotiBit.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/EmotiBit.cpp b/EmotiBit.cpp index 7bab131b..44d1819b 100644 --- a/EmotiBit.cpp +++ b/EmotiBit.cpp @@ -4341,12 +4341,12 @@ void EmotiBit::processDebugInputs(String &debugPackets, uint16_t &packetNumber) } else if (c == '@' && _sendTestData == true) { - _testDataType = EmotiBitPacket::TestType::FIXEDPACKETLENGTHTEST; + _testDataType = EmotiBitPacket::TestType::FIXED_PACKET_LENGTH; Serial.println("TestDataType: Fixed Packet Length Test"); } else if (c == '#' && _sendTestData == true) { - _testDataType = EmotiBitPacket::TestType::SAWTOOTHTEST; + _testDataType = EmotiBitPacket::TestType::SAWTOOTH; Serial.println("TestDataType: Sawtooth Test"); } } diff --git a/EmotiBit.h b/EmotiBit.h index 59a34318..867807f7 100644 --- a/EmotiBit.h +++ b/EmotiBit.h @@ -425,7 +425,7 @@ class EmotiBit { volatile bool _sdWrite; PowerMode _powerMode; bool _sendTestData = false; - EmotiBitPacket::TestType _testDataType = EmotiBitPacket::TestType::SAWTOOTHTEST; // Default to Sawtooth + EmotiBitPacket::TestType _testDataType = EmotiBitPacket::TestType::SAWTOOTH; // Default to Sawtooth DataType _serialData = DataType::length; volatile bool buttonPressed = false; bool startBufferOverflowTest = false; From ef762a0ec413b5582bfa6ee239db99c92d6d1216 Mon Sep 17 00:00:00 2001 From: Joseph-Jacobson Date: Wed, 6 Aug 2025 11:10:22 -0700 Subject: [PATCH 13/19] Updated comment --- testing/PacketFixedLengthTest/run_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/PacketFixedLengthTest/run_test.sh b/testing/PacketFixedLengthTest/run_test.sh index 87e46fd7..d4b971d3 100644 --- a/testing/PacketFixedLengthTest/run_test.sh +++ b/testing/PacketFixedLengthTest/run_test.sh @@ -3,7 +3,7 @@ set -u EMOTIBIT_CSV="" -# Parse required -e or --extension argument +# Parse required -p or --path argument while [[ $# -gt 0 ]]; do case "$1" in -p|--path) From 0404b1f7f44ce2a6be0f9c46a866058e92b0f15f Mon Sep 17 00:00:00 2001 From: Joseph-Jacobson Date: Tue, 12 Aug 2025 10:12:31 -0700 Subject: [PATCH 14/19] Minor readme changes --- testing/PacketFixedLengthTest/README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/testing/PacketFixedLengthTest/README.md b/testing/PacketFixedLengthTest/README.md index 24d45304..fbaa8284 100644 --- a/testing/PacketFixedLengthTest/README.md +++ b/testing/PacketFixedLengthTest/README.md @@ -1,17 +1,16 @@ # Description - This tests verifies that the Packet Fixed Length Test data in the EmotiBit SD card does not contain any Debug Overloads under conditions where the test runs up to 512 iterations. - The data is verified with the bash script, checking the SD card output -- Instructions to run this test can be found in the EmotiBit Test Protocols Document under Max Length Data Test The following table shows commands for choosing the test type. A typical workflow will consist of: 1. Going into debug mode 2. Setting sendTestData to true -3. Choosing the Splitter test '@' +3. Choosing the Packet Fixed Length Test '@' 4. Pressing record in the oscilliscope and waiting for the test to finish 5. Comparing the SD card result with the bash script, specifying the extension | Command | Details | |--------|--------| -| < | Sets "sendTestData" to true| -| > | Sets "sendTestData" to false| -| @ | Sets test data to Splitter| \ No newline at end of file +| > | Sets "sendTestData" to true| +| < | Sets "sendTestData" to false| +| @ | Sets test data to Packet Fixed Length Test| \ No newline at end of file From e6fda406391ac9cfc88366adc1d6c5a9c432947f Mon Sep 17 00:00:00 2001 From: Joseph-Jacobson Date: Wed, 20 Aug 2025 08:04:03 -0700 Subject: [PATCH 15/19] PR edits --- EmotiBit.cpp | 3 +-- testing/PacketFixedLengthTest/README.md | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/EmotiBit.cpp b/EmotiBit.cpp index 44d1819b..41d50b21 100644 --- a/EmotiBit.cpp +++ b/EmotiBit.cpp @@ -3407,7 +3407,6 @@ void EmotiBit::processData() void EmotiBit::sendData() { - // Test data packets would get added here if (_sendTestData) { addTestData(_outDataPackets); @@ -3872,7 +3871,7 @@ void EmotiBit::updateBatteryIndication(float battPercent) void EmotiBit::addTestData(String &dataMessage) { - if (_sdWrite) {//only send test data if we are recording + if (_sdWrite) { //only send test data if we are recording so testing has sd card files with defined start/stop points for diffing EmotiBitPacket::createTestDataPacket(dataMessage, _testDataType); } } diff --git a/testing/PacketFixedLengthTest/README.md b/testing/PacketFixedLengthTest/README.md index fbaa8284..5865a39e 100644 --- a/testing/PacketFixedLengthTest/README.md +++ b/testing/PacketFixedLengthTest/README.md @@ -1,5 +1,5 @@ # Description -- This tests verifies that the Packet Fixed Length Test data in the EmotiBit SD card does not contain any Debug Overloads under conditions where the test runs up to 512 iterations. +- This tests verifies that the Packet Fixed Length Test data in the EmotiBit SD card does not go over the 512 max data length. If there are packets that go over that length, then it will be signified by Debug Overloads. - The data is verified with the bash script, checking the SD card output The following table shows commands for choosing the test type. A typical workflow will consist of: From cdcffe27b2946c45aa24615744acf65e428ae52a Mon Sep 17 00:00:00 2001 From: Nitin Nair Date: Thu, 11 Sep 2025 15:46:12 -0400 Subject: [PATCH 16/19] updating workflow to delete all libraries after workflow completes --- .github/workflows/build-and-upload-binaries.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-and-upload-binaries.yml b/.github/workflows/build-and-upload-binaries.yml index df418dee..8ea7f2cd 100644 --- a/.github/workflows/build-and-upload-binaries.yml +++ b/.github/workflows/build-and-upload-binaries.yml @@ -50,3 +50,9 @@ jobs: name: emotibit-firmware-${{ env.VERSION }} path: firmware_binaries/ retention-days: 30 + + - name: Clean up working directory and downloaded libraries + if: always() + run: | + cd ${{ github.workspace }}/.. + rm -rf * From b6d035ec55ab7b5337d40b6a95fa103e23b2204e Mon Sep 17 00:00:00 2001 From: Nitin Nair Date: Thu, 11 Sep 2025 15:57:11 -0400 Subject: [PATCH 17/19] fix:url file naming and dependency in library.properties --- depends_urls.json | 2 +- library.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/depends_urls.json b/depends_urls.json index 27658d7f..02d568c3 100644 --- a/depends_urls.json +++ b/depends_urls.json @@ -18,7 +18,7 @@ "Arduino Low Power": "https://github.com/arduino-libraries/ArduinoLowPower", "RTCZero": "https://github.com/arduino-libraries/RTCZero", "Adafruit IS31FL3731 Library": "https://github.com/adafruit/Adafruit_IS31FL3731", - "Adafruit_GFX_Library": "https://github.com/adafruit/Adafruit-GFX-Library", + "Adafruit GFX Library": "https://github.com/adafruit/Adafruit-GFX-Library", "Adafruit BusIO": "https://github.com/adafruit/Adafruit_BusIO" } } diff --git a/library.properties b/library.properties index f2791c38..904dc66c 100644 --- a/library.properties +++ b/library.properties @@ -7,4 +7,4 @@ paragraph= Requires dependent libraries as shown in the getting started document category=Sensors url=https://github.com/EmotiBit/EmotiBit_FeatherWing architectures=* -depends=EmotiBit BMI160, EmotiBit MAX30101, EmotiBit MLX90632, EmotiBit NCP5623, EmotiBit SI7013, EmotiBit XPlat Utils, EmotiBit ADS1X15, EmotiBit External EEPROM, EmotiBit EmojiLib, EmotiBit ArduinoFilters, EmotiBit SimpleFTPServer, EmotiBit KTD2026, WiFi101, SdFat (=2.2.0), ArduinoJson (=6.21.2), Arduino Low Power (=1.2.2), RTCZero (=1.6.0), Adafruit IS31FL3731 Library (=2.0.2), Adafruit GFX Library (=1.11.9), Adafruit BusIO (1.15.0) +depends=EmotiBit BMI160, EmotiBit MAX30101, EmotiBit MLX90632, EmotiBit NCP5623, EmotiBit SI7013, EmotiBit XPlat Utils, EmotiBit ADS1X15, EmotiBit External EEPROM, EmotiBit EmojiLib, EmotiBit ArduinoFilters, EmotiBit SimpleFTPServer, EmotiBit KTD2026, WiFi101, SdFat (=2.2.0), ArduinoJson (=6.21.2), Arduino Low Power (=1.2.2), RTCZero (=1.6.0), Adafruit IS31FL3731 Library (=2.0.2), Adafruit GFX Library (=1.11.9), Adafruit BusIO (=1.15.0) From 199e41348b52f4bb35a6ccba8259aea0d06fa627 Mon Sep 17 00:00:00 2001 From: Nitin Nair Date: Thu, 11 Sep 2025 16:03:40 -0400 Subject: [PATCH 18/19] fix: check for tag with and without prefix "v" --- download_dependencies.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/download_dependencies.sh b/download_dependencies.sh index ca00639e..694b99bd 100755 --- a/download_dependencies.sh +++ b/download_dependencies.sh @@ -77,11 +77,14 @@ for dep in "${DEPS[@]}"; do if [ -n "$version" ] && [ "$version" != "" ]; then echo " Cloning repository at version: $version" - # Try cloning with v prefix + # Try cloning with v prefix first if git clone --depth 1 --branch "v$version" --single-branch "$github" "$lib_path" 2>/dev/null; then - echo " Cloned at tag: v$version" + echo " Cloned at tag: v$version" + # Try cloning without v prefix + elif git clone --depth 1 --branch "$version" --single-branch "$github" "$lib_path" 2>/dev/null; then + echo " Cloned at tag: $version" else - echo " Warning: Specified version tag 'v$version' not found, cloning default branch" + echo " Warning: Specified version tags 'v$version' and '$version' not found, cloning default branch" git clone --depth 1 "$github" "$lib_path" fi else From 431ac53937ad13b388168b4dee58f27fdfc69bec Mon Sep 17 00:00:00 2001 From: Nitin Nair Date: Thu, 11 Sep 2025 16:09:23 -0400 Subject: [PATCH 19/19] fix: does not delete the FeatherWing checkout to allow for post run script to run --- .github/workflows/build-and-upload-binaries.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-upload-binaries.yml b/.github/workflows/build-and-upload-binaries.yml index 8ea7f2cd..3db237d3 100644 --- a/.github/workflows/build-and-upload-binaries.yml +++ b/.github/workflows/build-and-upload-binaries.yml @@ -55,4 +55,5 @@ jobs: if: always() run: | cd ${{ github.workspace }}/.. - rm -rf * + find . -maxdepth 1 -type d ! -name "." ! -name "EmotiBit_FeatherWing" -exec rm -rf {} + + find . -maxdepth 1 -type f -exec rm -f {} +