Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion .github/workflows/build-all-on-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ jobs:
uses: actions/checkout@v4
- name: move fresh clone to OF_ROOT
run: cp -r ../$(echo ${{ github.repository }} | cut -d '/' -f 2) ${{ vars.ADDONS_DIR }}
- name: download addon dependencies
working-directory: ${{ vars.ADDONS_DIR }}
run: bash ofxEmotiBit/scripts/download-dependencies.sh ${{ vars.ADDONS_DIR }}
- name: record dependency commits
working-directory: ${{ vars.ADDONS_DIR }}
run: bash ofxEmotiBit/scripts/record-dependencies.sh ${{ vars.ADDONS_DIR }} macos
- name: upload dependencies report
uses: actions/upload-artifact@v4
with:
name: dependencies-report-macos
path: ${{ vars.OFXEMOTIBIT_DIR }}/dependencies-report-macos.txt
build-oscilloscope-macos:
needs: clone-macos
runs-on: [self-hosted, macOS]
Expand Down Expand Up @@ -54,8 +65,19 @@ jobs:
echo "current working directory" && pwd
cd EmotiBitFirmwareInstaller
xcodebuild -project EmotiBitFirmwareInstaller.xcodeproj -scheme Release
build-slideplayer-macos:
needs: clone-macos
runs-on: [self-hosted, macOS]
environment: RUNNER-MACOS
steps:
- name: build using xcode
working-directory: ${{ vars.OFXEMOTIBIT_DIR }}
run: |
echo "current working directory" && pwd
cd EmotiBitSlidePlayer
xcodebuild -project EmotiBitSlidePlayer.xcodeproj -scheme Release
upload-artifact-macos:
needs: [build-oscilloscope-macos, build-dataparser-macos, build-firmwareinstaller-macos]
needs: [build-oscilloscope-macos, build-dataparser-macos, build-firmwareinstaller-macos, build-slideplayer-macos]
if: github.ref == 'refs/heads/dev'
runs-on: [self-hosted, macOS]
environment: RUNNER-MACOS
Expand All @@ -76,6 +98,7 @@ jobs:
mv EmotiBitOscilloscope/bin/EmotiBitOscilloscope.app stageRelease/EmotiBitSoftware-macos-${{ steps.get_version.outputs.version }}
mv EmotiBitDataParser/bin/EmotiBitDataParser.app stageRelease/EmotiBitSoftware-macos-${{ steps.get_version.outputs.version }}
mv EmotiBitFirmwareInstaller/bin/EmotiBitFirmwareInstaller.app stageRelease/EmotiBitSoftware-macos-${{ steps.get_version.outputs.version }}
mv EmotiBitSlidePlayer/bin/EmotiBitSlidePlayer.app stageRelease/EmotiBitSoftware-macos-${{ steps.get_version.outputs.version }}
- name: copy SiLabs drivers
working-directory: ${{ vars.ADDONS_DIR }}
run: |
Expand All @@ -92,3 +115,11 @@ jobs:
with:
name: EmotiBitSoftware_v${{ steps.get_version.outputs.version }}-macOS
path: ${{ vars.OFXEMOTIBIT_DIR }}/stageRelease/EmotiBitSoftware-macos-${{ steps.get_version.outputs.version }}/
cleanup-dependencies-macos:
needs: [build-oscilloscope-macos, build-dataparser-macos, build-firmwareinstaller-macos, build-slideplayer-macos]
runs-on: [self-hosted, macOS]
environment: RUNNER-MACOS
steps:
- name: remove cloned dependencies
working-directory: ${{ vars.ADDONS_DIR }}
run: bash ofxEmotiBit/scripts/download-dependencies.sh --cleanup ${{ vars.ADDONS_DIR }}
38 changes: 36 additions & 2 deletions .github/workflows/build-all-on-win.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ jobs:
run: |
echo ${{ github.repository }} | cut -d '/' -f 2
cp -r ..\\$(echo ${{ github.repository }} | cut -d '/' -f 2) ${{ vars.ADDONS_DIR }}
- name: download addon dependencies
shell: bash
working-directory: ${{ vars.ADDONS_DIR }}
run: bash ofxEmotiBit/scripts/download-dependencies.sh "${{ vars.ADDONS_DIR }}"
- name: record dependency commits
shell: bash
working-directory: ${{ vars.ADDONS_DIR }}
run: bash ofxEmotiBit/scripts/record-dependencies.sh "${{ vars.ADDONS_DIR }}" windows
- name: upload dependencies report
uses: actions/upload-artifact@v4
with:
name: dependencies-report-windows
path: ${{ vars.OFXEMOTIBIT_DIR }}/dependencies-report-windows.txt
build-oscilloscope-windows:
needs: clone-windows
runs-on: [self-hosted, Windows]
Expand Down Expand Up @@ -61,8 +74,20 @@ jobs:
echo "current working directory" && pwd
cd EmotiBitFirmwareInstaller
MSBuild EmotiBitFirmwareInstaller.sln -t:Build -p:Configuration=Release
build-slideplayer-windows:
needs: clone-windows
runs-on: [self-hosted, Windows]
environment: RUNNER-WINDOWS
steps:
- name: build using MSBuild
shell: cmd
working-directory: ${{ vars.OFXEMOTIBIT_DIR }}
run: |
echo "current working directory" && pwd
cd EmotiBitSlidePlayer
MSBuild EmotiBitSlidePlayer.sln -t:Build -p:Configuration=Release
build-installer-windows:
needs: [build-oscilloscope-windows, build-dataparser-windows, build-firmwareinstaller-windows]
needs: [build-oscilloscope-windows, build-dataparser-windows, build-firmwareinstaller-windows, build-slideplayer-windows]
if: github.ref == 'refs/heads/dev'
runs-on: [self-hosted, Windows]
environment: RUNNER-WINDOWS
Expand Down Expand Up @@ -147,4 +172,13 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: EmotiBitSoftware_v${{ steps.get_version.outputs.version }}-Windows
path: ${{ vars.OFXEMOTIBIT_DIR }}\\stageRelease\\EmotiBitSoftware-Windows-${{ steps.get_version.outputs.version }}
path: ${{ vars.OFXEMOTIBIT_DIR }}\\stageRelease\\EmotiBitSoftware-Windows-${{ steps.get_version.outputs.version }}
cleanup-dependencies-windows:
needs: [build-oscilloscope-windows, build-dataparser-windows, build-firmwareinstaller-windows, build-slideplayer-windows]
runs-on: [self-hosted, Windows]
environment: RUNNER-WINDOWS
steps:
- name: remove cloned dependencies
shell: bash
working-directory: ${{ vars.ADDONS_DIR }}
run: bash ofxEmotiBit/scripts/download-dependencies.sh --cleanup "${{ vars.ADDONS_DIR }}"
61 changes: 52 additions & 9 deletions .github/workflows/create-draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ jobs:
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=v$VERSION" >> $GITHUB_OUTPUT

- name: Check release does not already exist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="${{ steps.get_version.outputs.tag }}"
if gh release view "$TAG" --repo "${{ github.repository }}" &>/dev/null; then
echo "ERROR: A release tagged '$TAG' already exists (draft, pre-release, or published)."
echo "Bump the version in src/ofxEmotiBitVersion.h before creating a new release."
exit 1
fi
echo "No existing release found for '$TAG'. Proceeding."

- name: Download Mac artifacts
uses: dawidd6/action-download-artifact@v6
with:
Expand All @@ -43,11 +55,37 @@ jobs:
skip_unpack: true
continue-on-error: true

- name: Download macOS dependencies report
uses: dawidd6/action-download-artifact@v6
with:
workflow: build-all-on-macos.yml
branch: dev
name: dependencies-report-macos
path: ./
continue-on-error: true

- name: Download Windows dependencies report
uses: dawidd6/action-download-artifact@v6
with:
workflow: build-all-on-win.yaml
branch: dev
name: dependencies-report-windows
path: ./
continue-on-error: true

- name: Download Linux dependencies report
uses: dawidd6/action-download-artifact@v6
with:
workflow: linux-workflows.yaml
branch: dev
name: dependencies-report-linux
path: ./
continue-on-error: true

- name: Generate release notes
id: generate-release-notes
run: |
VERSION="${{ steps.get_version.outputs.version }}"
RELEASE_NOTES=$(cat <<END_OF_NOTES
cat > release_notes.md << END_OF_NOTES
# New features and bug fixes

# Firmware Installed by FirmwareInstaller
Expand All @@ -73,12 +111,17 @@ jobs:
#### Linux
- Download the source code linked below. Follow the steps in the [ReadMe](https://github.com/EmotiBit/ofxEmotiBit#readme).


# Dependencies
See attached **dependencies-report.zip** for the full dependency report per platform.
END_OF_NOTES
)
echo "release_notes<<EOF" >> $GITHUB_OUTPUT
echo "$RELEASE_NOTES" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- name: Zip dependency reports
run: |
zip dependencies-report.zip \
dependencies-report-macos.txt \
dependencies-report-windows.txt \
dependencies-report-linux.txt \
2>/dev/null || true

- name: Create config.txt
id: create-config
Expand All @@ -98,16 +141,16 @@ jobs:
echo "Config file created successfully"

- name: Create Draft Release
id: create-release
uses: softprops/action-gh-release@v1
with:
draft: true
tag_name: ${{ steps.get_version.outputs.tag }}
name: Draft Release ${{ steps.get_version.outputs.tag }}
body: ${{ steps.generate-release-notes.outputs.release_notes }}
body_path: release_notes.md
files: |
EmotiBitSoftware_v${{ steps.get_version.outputs.version }}-macOS.zip
EmotiBitSoftware_v${{ steps.get_version.outputs.version }}-Windows.zip
config.txt
dependencies-report.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/linux-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ jobs:
uses: actions/checkout@v4
- name: move fresh clone to OF_ROOT
run: cp -r ../$(echo ${{ github.repository }} | cut -d '/' -f 2) ${{ vars.ADDONS_DIR }}
- name: download addon dependencies
working-directory: ${{ vars.ADDONS_DIR }}
run: bash ofxEmotiBit/scripts/download-dependencies.sh ${{ vars.ADDONS_DIR }}
- name: record dependency commits
working-directory: ${{ vars.ADDONS_DIR }}
run: bash ofxEmotiBit/scripts/record-dependencies.sh ${{ vars.ADDONS_DIR }} linux
- name: upload dependencies report
uses: actions/upload-artifact@v4
with:
name: dependencies-report-linux
path: ${{ vars.OFXEMOTIBIT_DIR }}/dependencies-report-linux.txt
build-oscilloscope-linux:
needs: clone-linux
uses: ./.github/workflows/reusable-workflow-build-oscilloscope-linux.yml
Expand All @@ -36,3 +47,12 @@ jobs:
test-dataparser-linux:
needs: build-dataparser-linux
uses: ./.github/workflows/reusable-workflow-test-dataParser-linux.yml

cleanup-dependencies-linux:
needs: [test-oscilloscope-linux, test-dataparser-linux]
runs-on: [self-hosted, Linux]
environment: RUNNER-LINUX
steps:
- name: remove cloned dependencies
working-directory: ${{ vars.ADDONS_DIR }}
run: bash ofxEmotiBit/scripts/download-dependencies.sh --cleanup ${{ vars.ADDONS_DIR }}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
*.a
*.lib

# build folders
**/build/

# docs
**/docs/

# Executables
*.exe
*.out
Expand Down Expand Up @@ -60,3 +66,6 @@ EmotiBitInstaller/redist/

# testing
tests/EmotiBitDataParser/sample_data/2025-06-27_09-56-59-929206*.csv

# macOS
**/.DS_Store
9 changes: 9 additions & 0 deletions EmotiBitInstaller/EmotiBitInstaller.iss
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ Source: "..\EmotiBitFirmwareInstaller\bin\data\esp32\*"; DestDir: "{app}\EmotiBi
Source: "..\EmotiBitFirmwareInstaller\bin\data\exec\win\*"; DestDir: "{app}\EmotiBit FirmwareInstaller\data\exec\win"
Source: "..\EmotiBitFirmwareInstaller\bin\data\instructions\*.jpg"; DestDir: "{app}\EmotiBit FirmwareInstaller\data\instructions"

; EmotiBit SlidePlayer
Source: "..\EmotiBitSlidePlayer\bin\EmotiBitSlidePlayer.exe"; DestDir: "{app}\EmotiBit SlidePlayer"
Source: "..\EmotiBitSlidePlayer\bin\*.dll"; DestDir: "{app}\EmotiBit SlidePlayer"
Source: "..\EmotiBitSlidePlayer\bin\data\emotibitSlidePlayerSettings.json"; DestDir: "{app}\EmotiBit SlidePlayer\data"
; Example slides
Source: "..\EmotiBitSlidePlayer\bin\data\example_slides\*"; DestDir: "{app}\EmotiBit SlidePlayer\data\example_slides"; Flags: recursesubdirs

; VC++ 2017 Redistributable
Source: "redist\vc_redist.x64.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall

Expand All @@ -68,6 +75,7 @@ Source: "..\EmotiBitIcons\icoFiles\EmotiBitLogo.ico"; DestDir: "{app}"
Name: "{group}\EmotiBit Oscilloscope"; Filename: "{app}\EmotiBit Oscilloscope\EmotiBitOscilloscope.exe"; WorkingDir: "{app}\EmotiBit Oscilloscope"
Name: "{group}\EmotiBit DataParser"; Filename: "{app}\EmotiBit DataParser\EmotiBitDataParser.exe"; WorkingDir: "{app}\EmotiBit DataParser"
Name: "{group}\EmotiBit FirmwareInstaller"; Filename: "{app}\EmotiBit FirmwareInstaller\EmotiBitFirmwareInstaller.exe"; WorkingDir: "{app}\EmotiBit FirmwareInstaller"
Name: "{group}\EmotiBit SlidePlayer"; Filename: "{app}\EmotiBit SlidePlayer\EmotiBitSlidePlayer.exe"; WorkingDir: "{app}\EmotiBit SlidePlayer"

[Run]
; Install VC++ 2017 Redistributable if not already installed
Expand All @@ -79,6 +87,7 @@ Filename: "{tmp}\vc_redist.x64.exe"; Parameters: "/passive /norestart"; StatusMs
Type: filesandordirs; Name: "{app}\EmotiBit Oscilloscope"
Type: filesandordirs; Name: "{app}\EmotiBit DataParser"
Type: filesandordirs; Name: "{app}\EmotiBit FirmwareInstaller"
Type: filesandordirs; Name: "{app}\EmotiBit SlidePlayer"
; Delete the parent EmotiBit folder if empty after above deletions
Type: dirifempty; Name: "{app}"

Expand Down
5 changes: 5 additions & 0 deletions EmotiBitOscilloscope/bin/data/ofxOscilloscopeSettings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<window>
<width>1500</width>
<height>900</height>
<backgroundImagePath></backgroundImagePath>
</window>
<multiScope>
<x>0.000000000</x>
<y>55.000000000</y>
Expand Down
25 changes: 25 additions & 0 deletions EmotiBitOscilloscope/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ void ofApp::setup() {
emotiBitWiFi.begin(); // Startup WiFi connectivity
emotiBitWiFi.attachAppQ(&auxCtrlQ); // pass the main application instruction q to the wifi controller
timeWindowOnSetup = 10; // set timeWindow for setup (in seconds)
loadWindowSettings();
setupGui();
setupOscilloscopes();

Expand Down Expand Up @@ -220,6 +221,11 @@ void ofApp::removeDataStream(std::string typetag)

//--------------------------------------------------------------
void ofApp::draw() {
if (background_image_.isAllocated())
{
ofSetColor(255);
background_image_.draw(0, 0, ofGetWindowWidth(), ofGetWindowHeight());
}
drawOscilloscopes();
drawConsole();
}
Expand Down Expand Up @@ -1125,6 +1131,25 @@ void ofApp::processSlowResponseMessage(vector<string> splitPacket)
}
}

void ofApp::loadWindowSettings()
{
ofxXmlSettings xml;
if (xml.loadFile(ofToDataPath("ofxOscilloscopeSettings.xml")))
{
xml.pushTag("window");
int w = xml.getValue("width", 1500);
int h = xml.getValue("height", 900);
ofSetWindowShape(w, h);

string bgPath = xml.getValue("backgroundImagePath", "");
if (!bgPath.empty())
{
background_image_.load(ofToDataPath(bgPath));
}
xml.popTag();
}
}

void ofApp::setupGui()
{
ofSetWindowTitle("EmotiBit Oscilloscope (v" + ofxEmotiBitVersion + ")");
Expand Down
2 changes: 2 additions & 0 deletions EmotiBitOscilloscope/src/ofApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class ofApp : public ofBaseApp {


// ToDo: This function is marked to be removed when we complete our move to xmlFileSettings.
void loadWindowSettings();
void updatePlotAttributeLists(std::string settingsFile = "ofxOscilloscopeSettings.xml");
void updateTypeTagList();
string loadTextFile(string filePath);
Expand Down Expand Up @@ -159,6 +160,7 @@ class ofApp : public ofBaseApp {
EmotiBitPacket::TypeTag::SKIN_CONDUCTANCE_RESPONSE_RISE_TIME,
0)
};
ofImage background_image_;
vector<ofxMultiScope> scopeWins;
unordered_map<int, vector<size_t>> plotIdIndexes;
vector<vector<vector<string>>> typeTags;
Expand Down
8 changes: 8 additions & 0 deletions EmotiBitSlidePlayer/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
BasedOnStyle: Google
BreakBeforeBraces: Allman
IndentWidth: 4
UseTab: Never
AllowShortFunctionsOnASingleLine: None
AllowShortBlocksOnASingleLine: Never
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
Loading
Loading