diff --git a/.bonsai/Bonsai.config b/.bonsai/Bonsai.config
new file mode 100644
index 0000000..a2b4cf3
--- /dev/null
+++ b/.bonsai/Bonsai.config
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.bonsai/NuGet.config b/.bonsai/NuGet.config
new file mode 100644
index 0000000..8f58394
--- /dev/null
+++ b/.bonsai/NuGet.config
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index ac75f2c..b28d5b5 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -2,6 +2,13 @@
"version": 1,
"isRoot": true,
"tools": {
+ "docfx": {
+ "version": "2.78.5",
+ "commands": [
+ "docfx"
+ ],
+ "rollForward": false
+ },
"harp.toolkit": {
"version": "0.2.2",
"commands": [
diff --git a/.editorconfig b/.editorconfig
index 514c50b..c9a9d0d 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,27 +1,46 @@
-# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
-###############################
-# Core EditorConfig Options #
-###############################
-# All files
+root = true
+
[*]
indent_style = space
-# XML project files
-[*.{csproj,vcxproj,vcxproj.filters,proj,projitems,shproj,bonsai}]
+#--------------------------------------------------------------------------------------------------
+# XML, JSON, and web files
+#--------------------------------------------------------------------------------------------------
+[*.{xml,csproj,vcxproj,vcxproj.filters,shproj,props,targets,config,nuspec,resx,vsixmanifest,wxs,vstemplate,slnx}]
indent_size = 2
-# XML config files
-[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
+[*.json]
indent_size = 2
-# Code files
-[*.{cs,csx}]
+[*.{html,css}]
+indent_size = 2
+
+#--------------------------------------------------------------------------------------------------
+# C++
+#--------------------------------------------------------------------------------------------------
+[*.{c,cpp,h,hpp,ixx}]
indent_size = 4
+charset = utf-8-bom
+trim_trailing_whitespace = true
insert_final_newline = true
+
+#--------------------------------------------------------------------------------------------------
+# C#
+#--------------------------------------------------------------------------------------------------
+[*.{cs,csx}]
+indent_size = 4
charset = utf-8-bom
-###############################
-# .NET Coding Conventions #
-###############################
-[*.{cs}]
-# Organize usings
-dotnet_sort_system_directives_first = true
\ No newline at end of file
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+# Language keyword vs full type name
+# Predefined for members, etc does not create a message because the explicitly sized types are conveient in interop scenarios where the bit size matters.
+dotnet_style_predefined_type_for_locals_parameters_members = true:none
+dotnet_style_predefined_type_for_member_access = true:suggestion
+
+# Instantiate argument exceptions correctly
+dotnet_diagnostic.CA2208.severity = warning
+
+# Don't complain about not using modern collection syntax
+dotnet_style_prefer_collection_expression = never
+csharp_style_prefer_range_operator = false
diff --git a/.gitattributes b/.gitattributes
index cc4d38c..dd82528 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,3 +1,44 @@
+# Auto detect text files and normalize line endings
* text=auto
-*.cs text
+
+# Scripts
+*.cmd text eol=crlf
+*.sh text eol=lf
+*.ps1 text
+
+# Config
+*.gitignore text
+*.gitattributes text
+*.gitmodules text eol=lf
+*.editorconfig text
+*.git-blame-ignore-revs text
+*.sln text
+*.proj text
+*.props text
+*.targets text
*.csproj text
+*.wixproj text
+*.config text
+*.json text
+*.xml text
+*.yml text
+
+# Code
+*.manifest text
+*.vsixmanifest text
+*.vstemplate text
+*.resx text
+*.cs text
+*.bonsai text
+*.wxs text
+
+# Documents
+LICENSE text
+*.md text diff=markdown
+*.rtf diff=astextplain
+
+# Graphics
+*.png binary
+*.ico binary
+*.gif binary
+*.svg text
diff --git a/.github/workflows/Harp.Behavior.yml b/.github/workflows/Harp.Behavior.yml
index 6ec6f5d..783ff49 100644
--- a/.github/workflows/Harp.Behavior.yml
+++ b/.github/workflows/Harp.Behavior.yml
@@ -1,3 +1,17 @@
+# =======================================================================================================================================================================
+# Harp.Behavior CI/CD
+# =======================================================================================================================================================================
+# Index:
+# * Build firmware
+# * Build interface
+# * Build documentation
+# * Render workflow images
+# * Publish packages to GitHub
+# * Publish packages to NuGet.org
+# * Publish documentation
+# =======================================================================================================================================================================
+# Note that this is a generic workflow meant for all Harp devices. Minor local modifications are fine, see https://github.com/bonsai-rx/prefect for more information.
+# =======================================================================================================================================================================
name: Harp.Behavior
on:
push:
@@ -7,6 +21,10 @@ on:
release:
types: [published]
workflow_dispatch:
+ inputs:
+ publish-documentation:
+ description: "Publish documentation to GitHub Pages?"
+ default: "false"
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
@@ -14,6 +32,13 @@ env:
ContinuousIntegrationBuild: true
AVR_TOOLCHAIN_URL: https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/SoftwareTools/avr8-gnu-toolchain-3.6.2.1778-win32.any.x86.zip
jobs:
+ # =====================================================================================================================================================================
+ # Build firmware
+ # ___ _ _ _ __ _
+ # | _ )_ _(_) |__| | / _(_)_ _ _ ____ __ ____ _ _ _ ___
+ # | _ \ || | | / _` | | _| | '_| ' \ V V / _` | '_/ -_)
+ # |___/\_,_|_|_\__,_| |_| |_|_| |_|_|_\_/\_/\__,_|_| \___|
+ # =====================================================================================================================================================================
build-firmware:
strategy:
fail-fast: false
@@ -40,7 +65,7 @@ jobs:
# ----------------------------------------------------------------------- Build firmware
- name: Build firmware
- working-directory: Firmware/Behavior
+ working-directory: firmware/Behavior
id: build
shell: bash
run: make all FIRMWARE_VERSION=${{env.CiBuildVersion}} HARDWARE_VERSION=${{matrix.hardware-target}} PREVIEW_VERSION=${{env.CiFirmwarePreviewVersion}}
@@ -52,25 +77,41 @@ jobs:
with:
name: Firmware-hw${{matrix.hardware-target}}
if-no-files-found: error
- path: Firmware/Behavior/bin/*.hex
+ path: firmware/Behavior/bin/*.hex
# ----------------------------------------------------------------------- Upload release assets
- name: Upload release assets
if: github.event_name == 'release'
- run: gh release upload --repo ${{github.repository}} ${{github.event.release.tag_name}} Firmware/Behavior/bin/*.hex --clobber
+ run: gh release upload --repo ${{github.repository}} ${{github.event.release.tag_name}} firmware/Behavior/bin/*.hex --clobber
env:
GH_TOKEN: ${{github.token}}
+ # =====================================================================================================================================================================
+ # Build interface
+ # ___ _ _ _ _ _ __
+ # | _ )_ _(_) |__| | (_)_ _| |_ ___ _ _ / _|__ _ __ ___
+ # | _ \ || | | / _` | | | ' \ _/ -_) '_| _/ _` / _/ -_)
+ # |___/\_,_|_|_\__,_| |_|_||_\__\___|_| |_| \__,_\__\___|
+ # =====================================================================================================================================================================
build-interface:
strategy:
fail-fast: false
matrix:
- configuration: ['Release']
+ platform:
+ - name: Windows x64
+ os: windows-latest
+ - name: Linux x64
+ os: ubuntu-latest
+ - name: macOS x64
+ os: macos-latest
+ configuration: ['debug', 'release']
include:
- - configuration: Release
+ - platform:
+ os: windows-latest
+ configuration: release
collect-packages: true
- name: Build Interface
- runs-on: windows-latest
+ name: Build Interface (${{ matrix.platform.name }} ${{ matrix.configuration }})
+ runs-on: ${{ matrix.platform.os }}
steps:
# ----------------------------------------------------------------------- Checkout
- name: Checkout
@@ -92,7 +133,7 @@ jobs:
# ----------------------------------------------------------------------- Regenerate
- name: Run generators
- run: dotnet harp.toolkit generate interface -o Interface/${{github.workflow}}
+ run: dotnet harp.toolkit generate interface -o software/${{github.workflow}}
- name: Verify pre-generated code was up-to-date
id: verify-dist
@@ -102,14 +143,14 @@ jobs:
# ----------------------------------------------------------------------- Build interface package
- name: Restore interface
- run: dotnet restore Interface
+ run: dotnet restore software
- name: Build interface
- run: dotnet build Interface --no-restore --configuration ${{matrix.configuration}}
+ run: dotnet build software --no-restore --configuration ${{matrix.configuration}}
- name: Pack interface
id: pack
- run: dotnet pack Interface --no-restore --no-build --configuration ${{matrix.configuration}}
+ run: dotnet pack software --no-restore --no-build --configuration ${{matrix.configuration}}
# ----------------------------------------------------------------------- Collect artifacts
- name: Collect NuGet packages
@@ -118,21 +159,182 @@ jobs:
with:
name: Packages
if-no-files-found: error
- path: Interface/bin/${{matrix.configuration}}/**
+ path: artifacts/package/${{matrix.configuration}}/**
# ----------------------------------------------------------------------- Upload release assets
- name: Upload release assets
- if: github.event_name == 'release' && matrix.configuration == 'Release'
- run: gh release upload --repo ${{github.repository}} ${{github.event.release.tag_name}} Interface/bin/${{matrix.configuration}}/** --clobber
+ if: matrix.collect-packages && steps.pack.outcome == 'success' && github.event_name == 'release'
+ run: gh release upload --repo ${{github.repository}} ${{github.event.release.tag_name}} artifacts/package/${{matrix.configuration}}/** --clobber
env:
GH_TOKEN: ${{github.token}}
- publish-packages-nuget-org:
- name: Publish packages to NuGet.org
+ # =====================================================================================================================================================================
+ # Build documentation
+ # ___ _ _ _ _ _ _ _
+ # | _ )_ _(_) |__| | __| |___ __ _ _ _ __ ___ _ _| |_ __ _| |_(_)___ _ _
+ # | _ \ || | | / _` | / _` / _ \/ _| || | ' \/ -_) ' \ _/ _` | _| / _ \ ' \
+ # |___/\_,_|_|_\__,_| \__,_\___/\__|\_,_|_|_|_\___|_||_\__\__,_|\__|_\___/_||_|
+ # =====================================================================================================================================================================
+ build-documentation:
+ name: Build documentation
runs-on: ubuntu-latest
+ steps:
+ # ----------------------------------------------------------------------- Checkout
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ # ----------------------------------------------------------------------- Set up tools
+ - name: Set up .NET
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 8.x
+
+ - name: Set up .NET tools
+ run: dotnet tool restore
+
+ # ----------------------------------------------------------------------- Configure build
+ - name: Configure build
+ id: configure-build
+ uses: bonsai-rx/configure-build@v1
+
+ # ----------------------------------------------------------------------- Restore
+ - name: Restore
+ run: dotnet restore software
+
+ # ----------------------------------------------------------------------- Build metadata
+ - name: Build metadata
+ id: build-metadata
+ run: dotnet docfx metadata docs/docfx.json --noRestore
+
+ # ----------------------------------------------------------------------- Build documentation
+ - name: Build documentation
+ id: build-documentation
+ run: dotnet docfx build docs/docfx.json
+
+ # ----------------------------------------------------------------------- Collect artifacts
+ - name: Collect documentation metadata
+ uses: actions/upload-artifact@v4
+ if: steps.build-metadata.outcome == 'success' && always()
+ with:
+ name: DocumentationMetadata
+ if-no-files-found: error
+ path: artifacts/docs/api/
+
+ - name: Collect documentation artifact
+ uses: actions/upload-artifact@v4
+ if: steps.build-documentation.outcome == 'success' && always()
+ with:
+ name: DocumentationWebsite
+ if-no-files-found: error
+ path: artifacts/docs/site/
+
+ # =====================================================================================================================================================================
+ # Render workflow images
+ # ___ _ _ __ _ _
+ # | _ \___ _ _ __| |___ _ _ __ __ _____ _ _| |__/ _| |_____ __ __ (_)_ __ __ _ __ _ ___ ___
+ # | / -_) ' \/ _` / -_) '_| \ V V / _ \ '_| / / _| / _ \ V V / | | ' \/ _` / _` / -_|_-<
+ # |_|_\___|_||_\__,_\___|_| \_/\_/\___/_| |_\_\_| |_\___/\_/\_/ |_|_|_|_\__,_\__, \___/__/
+ # |___/
+ # =====================================================================================================================================================================
+ workflow-images:
+ name: Render workflow images
+ runs-on: windows-latest
+ needs: build-interface
+ if: needs.build.outputs.need-workflow-image-render == 'true'
+ steps:
+ # ----------------------------------------------------------------------- Checkout
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ # ----------------------------------------------------------------------- Download built packages
+ - name: Download packages for rendering
+ uses: actions/download-artifact@v4
+ with:
+ name: Packages
+ path: artifacts/packages/
+
+ # ----------------------------------------------------------------------- Set up Bonsai environments
+ - name: Set up Bonsai environments
+ uses: bonsai-rx/setup-bonsai@v1
+ with:
+ environment-paths: '**/.bonsai/'
+ inject-packages: artifacts/packages/*.nupkg
+
+ # ----------------------------------------------------------------------- Render
+ - name: Render images
+ id: render
+ run: pwsh ./docs/export-images.ps1 -OutputFolder artifacts/docs/site/ -Verbose
+
+ # ----------------------------------------------------------------------- Collect artifacts
+ - name: Collect images
+ uses: actions/upload-artifact@v4
+ if: steps.render.outcome == 'success' && always()
+ with:
+ name: DocumentationWorkflowImages
+ if-no-files-found: error
+ path: artifacts/docs/site/
+
+ # =====================================================================================================================================================================
+ # Publish packages to GitHub
+ # ___ _ _ _ _ _ _ ___ _ _ _ _ _
+ # | _ \_ _| |__| (_)__| |_ _ __ __ _ __| |____ _ __ _ ___ ___ | |_ ___ / __(_) |_| || |_ _| |__
+ # | _/ || | '_ \ | (_-< ' \ | '_ \/ _` / _| / / _` / _` / -_|_-< | _/ _ \ | (_ | | _| __ | || | '_ \
+ # |_| \_,_|_.__/_|_/__/_||_| | .__/\__,_\__|_\_\__,_\__, \___/__/ \__\___/ \___|_|\__|_||_|\_,_|_.__/
+ # |_| |___/
+ # =====================================================================================================================================================================
+ publish-github:
+ name: Publish packages to GitHub
+ runs-on: ubuntu-latest
+ needs: build-interface
permissions:
# Needed to attach files to releases
contents: write
+ # Needed to upload to GitHub Packages
+ packages: write
+ if: github.event_name == 'push' || github.event_name == 'release'
+ steps:
+ # ----------------------------------------------------------------------- Set up .NET
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 8.x
+
+ # ----------------------------------------------------------------------- Download built packages
+ - name: Download built packages
+ uses: actions/download-artifact@v4
+ with:
+ name: Packages
+ path: artifacts/packages/
+
+ # ----------------------------------------------------------------------- Upload release assets
+ - name: Upload release assets
+ if: github.event_name == 'release'
+ run: gh release upload --repo ${{github.repository}} ${{github.event.release.tag_name}} artifacts/packages/* --clobber
+ env:
+ GH_TOKEN: ${{github.token}}
+
+ # ----------------------------------------------------------------------- Push to GitHub Packages
+ - name: Push to GitHub Packages
+ run: dotnet nuget push "artifacts/packages/*.nupkg" --skip-duplicate --no-symbols --api-key ${{secrets.GITHUB_TOKEN}} --source https://nuget.pkg.github.com/${{github.repository_owner}}
+ env:
+ # This is a workaround for https://github.com/NuGet/Home/issues/9775
+ DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER: 0
+
+ # =====================================================================================================================================================================
+ # Publish packages to NuGet.org
+ # ___ _ _ _ _ _ _ _ _ ___ _
+ # | _ \_ _| |__| (_)__| |_ _ __ __ _ __| |____ _ __ _ ___ ___ | |_ ___ | \| |_ _ / __|___| |_ ___ _ _ __ _
+ # | _/ || | '_ \ | (_-< ' \ | '_ \/ _` / _| / / _` / _` / -_|_-< | _/ _ \ | .` | || | (_ / -_) _|_/ _ \ '_/ _` |
+ # |_| \_,_|_.__/_|_/__/_||_| | .__/\__,_\__|_\_\__,_\__, \___/__/ \__\___/ |_|\_|\_,_|\___\___|\__(_)___/_| \__, |
+ # |_| |___/ |___/
+ # =====================================================================================================================================================================
+ publish-packages-nuget-org:
+ name: Publish packages to NuGet.org
+ runs-on: ubuntu-latest
environment: public-release
needs: [build-firmware, build-interface]
if: github.event_name == 'release'
@@ -156,3 +358,57 @@ jobs:
env:
# This is a workaround for https://github.com/NuGet/Home/issues/9775
DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER: 0
+
+
+ # =====================================================================================================================================================================
+ # Publish documentation
+ # ___ _ _ _ _ _ _ _ _
+ # | _ \_ _| |__| (_)__| |_ __| |___ __ _ _ _ __ ___ _ _| |_ __ _| |_(_)___ _ _
+ # | _/ || | '_ \ | (_-< ' \ / _` / _ \/ _| || | ' \/ -_) ' \ _/ _` | _| / _ \ ' \
+ # |_| \_,_|_.__/_|_/__/_||_| \__,_\___/\__|\_,_|_|_|_\___|_||_\__\__,_|\__|_\___/_||_|
+ # =====================================================================================================================================================================
+ publish-documentation:
+ name: Publish documentation
+ runs-on: ubuntu-latest
+ # Publishing is not strictly necessary here, but if we're going to do a public release we want to wait to publish the docs until it goes out
+ needs: [build-documentation, workflow-images, publish-packages-nuget-org]
+ permissions:
+ # Both required by actions/deploy-pages
+ pages: write
+ id-token: write
+ environment:
+ # Intentionally not using the "default" github-pages environment as it's not compatible with this workflow
+ name: documentation-website
+ url: ${{steps.publish.outputs.page_url}}
+ # Only run if the workflow isn't dying and build-documentation was successful and either A) we're releasing or B) we have continuous deployment enabled
+ if: |
+ !cancelled() && !failure() && needs.build-documentation.result == 'success'
+ && (github.event_name == 'release'
+ || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-documentation == 'true')
+ || (vars.CONTINUOUS_DOCUMENTATION && github.event_name != 'pull_request')
+ )
+ steps:
+ # ----------------------------------------------------------------------- Download documentation website components
+ # It is intentional that we use two independent download steps here as it ensures that workflow images are permitted
+ # to overwrite any conflicts in the docfx output but not the other way around.
+ - name: Download documentation website
+ uses: actions/download-artifact@v4
+ with:
+ name: DocumentationWebsite
+
+ - name: Download workflow images
+ if: ${{needs.workflow-images.result == 'success'}}
+ uses: actions/download-artifact@v4
+ with:
+ name: DocumentationWorkflowImages
+
+ # ----------------------------------------------------------------------- Collect artifacts
+ - name: Upload final documentation website artifact
+ uses: actions/upload-pages-artifact@v3
+ with:
+ path: '.'
+
+ # ----------------------------------------------------------------------- Publish to GitHub Pages
+ - name: Publish to GitHub Pages
+ id: publish
+ uses: actions/deploy-pages@v4
diff --git a/.gitignore b/.gitignore
index 00cb6ad..373ef07 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,13 +1,5 @@
-
-desktop.ini
-
-# Visual studio files
-.vs
-.suo
-.nuget
-bin
-obj
-Debug
-Release
-packages
-*.componentinfo.xml
\ No newline at end of file
+.bonsai/Bonsai.exe*
+.bonsai/Packages/
+.bonsai/Settings/
+.vs/
+/artifacts/
\ No newline at end of file
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..61eb2dc
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "docs/harp-docfx"]
+ path = docs/harp-docfx
+ url = https://github.com/harp-tech/docfx-tools
diff --git a/Assets/README.md b/Assets/README.md
deleted file mode 100644
index 71cd2cc..0000000
--- a/Assets/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-### Licensing
-Copyright Filipe Carvalho 2020
-
-
This work is licensed under a Creative Commons Attribution 4.0 International License.
-
-#### You are free to:
-*Share* — copy and redistribute the material in any medium or format.
-
-*Adapt* — remix, transform, and build upon the material for any purpose, even commercially.
-
-#### Under the following terms:
-*Attribution* — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
\ No newline at end of file
diff --git a/Interface/Directory.Build.props b/Interface/Directory.Build.props
deleted file mode 100644
index 7510aaf..0000000
--- a/Interface/Directory.Build.props
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
- enable
- 11.2.6
-
-
-
- $(WarningsAsErrors);CS7035
- $(NoWarn);CS1591
-
-
- 0
- 42.42.42-dev$(DevVersion)
- $(CiBuildVersion)
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Interface/Harp.Behavior.nsi b/Interface/Harp.Behavior.nsi
deleted file mode 100644
index 9202852..0000000
--- a/Interface/Harp.Behavior.nsi
+++ /dev/null
@@ -1,156 +0,0 @@
-!define MUI_VERBOSE 1
-!include "FileFunc.nsh"
-
-!define CompanyName "harp-tech"
-!define DeviceName "Harp.Behavior"
-!define AppName "${DeviceName}.App"
-!define AppNameNoSpaces "${DeviceName}.App"
-
-; --- If a PRERELEASE is passed with -DPRERELEASE=..., include it in display/file names.
-!ifdef PRERELEASE
- !define APP_PRERELEASE_TEXT "-${PRERELEASE}"
-!else
- !define APP_PRERELEASE_TEXT ""
-!endif
-
-!define AppVersion "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUILD}${APP_PRERELEASE_TEXT}"
-!define APP_NUMERIC_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUILD}"
-!define /date YEAR "%Y"
-!define OUT_FILE_NAME "${AppNameNoSpaces}.v${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUILD}${APP_PRERELEASE_TEXT}-win-${ARCHITECTURE}"
-
-; NSIS input defaults to artifacts publish layout (CI/build_app.sh pass NSIS_INPUT_DIR explicitly)
-!ifndef NSIS_INPUT_DIR
- !define NSIS_INPUT_DIR ".\artifacts\publish\win-${ARCHITECTURE}"
-!endif
-
-Unicode true
-Name "${AppName} v${AppVersion}"
-Icon "${DeviceName}.Design\Assets\logo.ico"
-
-;--------------------------------
-;Include Modern UI
- !include "MUI2.nsh"
-;--------------------------------
-
-OutFile ".\artifacts\${OUT_FILE_NAME}.exe"
-InstallDir "$LOCALAPPDATA\${CompanyName}\${AppName}"
-RequestExecutionLevel user
-
-;--------------------------------
-;Version information
- VIProductVersion "${APP_NUMERIC_VERSION}.0"
- VIAddVersionKey "ProductName" "${AppName}"
- VIAddVersionKey "CompanyName" "${CompanyName}"
- VIAddVersionKey "FileDescription" "${AppName}"
- VIAddVersionKey "FileVersion" "${APP_NUMERIC_VERSION}"
- VIAddVersionKey "ProductVersion" "${APP_NUMERIC_VERSION}"
- VIAddVersionKey "LegalCopyright" "© ${YEAR} ${CompanyName}"
- VIAddVersionKey "LegalTrademarks" "${CompanyName}"
- VIAddVersionKey "OriginalFilename" "${OUT_FILE_NAME}"
-
-;--------------------------------
-;Variables
- Var StartMenuFolder
-;--------------------------------
-;Interface Settings
- !define MUI_ABORTWARNING
- !define MUI_HEADERIMAGE
- !define MUI_HEADERIMAGE_BITMAP "${DeviceName}.Design\Assets\logo.png"
- !define MUI_HEADERIMAGE_RIGHT
-;--------------------------------
-;Pages
-
- !insertmacro MUI_PAGE_WELCOME
- ;!insertmacro MUI_PAGE_LICENSE "${NSISDIR}/Contrib/Modern UI 2/Pages/License.nsh"
- !insertmacro MUI_PAGE_COMPONENTS
- ;!insertmacro MUI_PAGE_DIRECTORY
-
- ;Start Menu Folder Page Configuration
- !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
- !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${CompanyName}\${AppName}"
- !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
-
- !define MUI_STARTMENUPAGE_DEFAULTFOLDER "${CompanyName}\${AppName}"
-
- !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
-
- !insertmacro MUI_PAGE_INSTFILES
-
- !insertmacro MUI_UNPAGE_CONFIRM
- !insertmacro MUI_UNPAGE_INSTFILES
-
-;--------------------------------
-;Languages
- !insertmacro MUI_LANGUAGE "English"
-;--------------------------------
-
-;Installer Sections
-Section "${AppName} v${AppVersion}" FirstSection
- !define ARP "Software\Microsoft\Windows\CurrentVersion\Uninstall\${AppName}"
- SetOutPath "$INSTDIR"
-
- ; Include everything from the output folder
- File /r `${NSIS_INPUT_DIR}\*.*`
-
- ; Get estimated size installed
- ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
- IntFmt $0 "0x%08X" $0
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${CompanyName} ${AppName}" "EstimatedSize" "$0"
-
- # Registry information for add/remove programs
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${CompanyName} ${AppName}" "DisplayName" "${CompanyName} - ${AppName}"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${CompanyName} ${AppName}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${CompanyName} ${AppName}" "InstallLocation" "$\"$INSTDIR$\""
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${CompanyName} ${AppName}" "DisplayIcon" "$\"$INSTDIR\logo.ico$\""
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${CompanyName} ${AppName}" "Publisher" "${CompanyName}"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${CompanyName} ${AppName}" "DisplayVersion" "${AppVersion}"
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${CompanyName} ${AppName}" "VersionMajor" ${VERSION_MAJOR}
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${CompanyName} ${AppName}" "VersionMinor" ${VERSION_MINOR}
- # There is no option for modifying or repairing the install
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${CompanyName} ${AppName}" "NoModify" 1
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${CompanyName} ${AppName}" "NoRepair" 1
-
- ;Store installation folder
- WriteRegStr HKCU "Software\${CompanyName}\${AppName}" "" $INSTDIR
-
- ;Create uninstaller
- WriteUninstaller "$INSTDIR\Uninstall.exe"
-
- !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
-
- ;Create shortcuts
- CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
- CreateShortcut "$SMPROGRAMS\$StartMenuFolder\${AppName}.lnk" "$INSTDIR\${AppName}.exe" "" "$INSTDIR\${AppName}.exe" 0
- CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
-
- !insertmacro MUI_STARTMENU_WRITE_END
-
-SectionEnd
-
-;--------------------------------
-;Uninstaller Section
-
-Section "Uninstall"
-
- Delete "$INSTDIR\Uninstall.exe"
-
- Delete "$INSTDIR\*.*"
-
- RMDir /r "$INSTDIR"
-
- !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
-
- Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
- Delete "$SMPROGRAMS\$StartMenuFolder\${AppName}.lnk"
- RMDir "$SMPROGRAMS\$StartMenuFolder"
-
- DeleteRegKey /ifempty HKCU "Software\${CompanyName}\${AppName}"
- DeleteRegKey /ifempty HKCU "Software\${CompanyName}"
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${CompanyName} ${AppName}"
-
-
-SectionEnd
-
-; !insertmacro SECTION_BEGIN
-; File /r `./bin/Release/net10.0/win-${ARCHITECTURE}/publish/*.*`
-; !insertmacro SECTION_END
diff --git a/Interface/Harp.Behavior/Harp.Behavior.csproj b/Interface/Harp.Behavior/Harp.Behavior.csproj
deleted file mode 100644
index 89a92cb..0000000
--- a/Interface/Harp.Behavior/Harp.Behavior.csproj
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
- harp-tech
- Copyright © harp-tech and Contributors
- true
- snupkg
- Bonsai Library containing interfaces for data acquisition and control of Harp Behavior devices.
- true
- Dependency;BonsaiLibrary
- Harp Behavior Bonsai Rx
- https://harp-tech.org
- true
- icon.png
- LICENSE
- README.md
- ..\bin\$(Configuration)
- net472;net8.0
- true
- 9.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Assets/LICENSE b/docs/LICENSE
similarity index 100%
rename from Assets/LICENSE
rename to docs/LICENSE
diff --git a/README.md b/docs/README.md
similarity index 97%
rename from README.md
rename to docs/README.md
index 9125f63..9bb07b8 100644
--- a/README.md
+++ b/docs/README.md
@@ -1,7 +1,7 @@
## Harp Behavior
This is a multi-purpose device tailored to behavioral experiments. It allows control of pokes, RGB LEDs, LEDs, cameras, servo motors and a quadrature counter.
-
+
### Key Features ###
diff --git a/docs/articles/toc.yml b/docs/articles/toc.yml
new file mode 100644
index 0000000..ebe36f8
--- /dev/null
+++ b/docs/articles/toc.yml
@@ -0,0 +1,2 @@
+- name: Introduction
+ href: ../index.md
\ No newline at end of file
diff --git a/docs/build.ps1 b/docs/build.ps1
new file mode 100644
index 0000000..01ad8f5
--- /dev/null
+++ b/docs/build.ps1
@@ -0,0 +1,19 @@
+[CmdletBinding()] param (
+ [string[]]$docfxArgs
+)
+Set-StrictMode -Version 3.0
+$ErrorActionPreference = 'Stop'
+$PSNativeCommandUseErrorActionPreference = $true
+
+Push-Location $PSScriptRoot
+try {
+ $libPaths = @()
+ $libPaths += Get-ChildItem "..\artifacts\bin\*\release_net4*" -Directory | Select-Object -Expand FullName
+ $libPaths += "..\artifacts\package\release"
+
+ ./export-images.ps1 $libPaths
+ dotnet docfx metadata
+ dotnet docfx build $docfxArgs
+} finally {
+ Pop-Location
+}
diff --git a/docs/docfx.json b/docs/docfx.json
new file mode 100644
index 0000000..ab4cfc8
--- /dev/null
+++ b/docs/docfx.json
@@ -0,0 +1,79 @@
+{
+ "$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json",
+ "metadata": [
+ {
+ "src": [
+ {
+ "src": "../software/",
+ "files": "**/*.csproj",
+ "exclude": "**/*.App.csproj"
+ }
+ ],
+ "output": "../artifacts/docs/api/",
+ "enumSortOrder": "declaringOrder",
+ "memberLayout": "separatePages",
+ "filter": "filter.yml"
+ }
+ ],
+ "build": {
+ "content": [
+ {
+ "files": [
+ "*.md",
+ "toc.yml",
+ "{articles,tutorials,examples}/**/*.md",
+ "{articles,tutorials,examples}/**/toc.yml"
+ ],
+ "exclude": "README.md"
+ },
+ {
+ "src": "../artifacts/docs/api/",
+ "dest": "api",
+ "files": "**/*.yml"
+ }
+ ],
+ "resource": [
+ {
+ "files": [
+ "images/**",
+ "workflows/**/*.{bonsai,svg}",
+ "{articles,tutorials,examples}/**/*.{bonsai,svg}"
+ ]
+ }
+ ],
+ "overwrite": [
+ "apidoc/**/*.md"
+ ],
+ "output": "../artifacts/docs/site/",
+ "template": [
+ "default",
+ "modern",
+ "harp-docfx/template",
+ "template"
+ ],
+ "sitemap": {
+ "baseUrl": "https://harp-tech.org/device.behavior"
+ },
+ "globalMetadata": {
+ "_appName": "Behavior",
+ "_appTitle": "Harp.Behavior",
+ "_appFooter": "© harp-tech and Contributors. Made with docfx",
+ "_enableNewTab": true,
+ "_enableSearch": true,
+ "_gitContribute": {
+ "apiSpecFolder": "docs/apidoc"
+ }
+ },
+ "markdownEngineProperties": {
+ "markdigExtensions": [
+ "attributes",
+ "customcontainers"
+ ]
+ },
+ "xref": [
+ "https://harp-tech.org/xrefmap.yml",
+ "https://bonsai-rx.org/docs/xrefmap.yml",
+ "https://horizongir.github.io/reactive/xrefmap.yml"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/docs/export-images.ps1 b/docs/export-images.ps1
new file mode 100644
index 0000000..862a179
--- /dev/null
+++ b/docs/export-images.ps1
@@ -0,0 +1,44 @@
+[CmdletBinding()] param (
+ [string[]]$LibrarySources,
+ [bool]$UseGalleryForWorkflowsDirectory=$false,
+ [bool]$UseGalleryForExamplesDirectory=$true,
+ [string]$OutputFolder=$null
+)
+Set-StrictMode -Version 3.0
+$ErrorActionPreference = 'Stop'
+$PSNativeCommandUseErrorActionPreference = $true
+
+if ($OutputFolder) {
+ $OutputFolder = Join-Path (Get-Location) $OutputFolder
+}
+
+function Process-Workflow-Collection([bool]$useGallery, [string]$workflowPath, [string]$environmentPath) {
+ $libPath = $LibrarySources
+
+ if ($useGallery) {
+ $libPath = @()
+ $galleryPath = Join-Path $environmentPath 'Gallery'
+ $null = New-Item -ItemType Directory -Path $galleryPath -Force
+ foreach ($librarySource in $LibrarySources) {
+ Get-ChildItem -Path $librarySource -Filter *.nupkg | Copy-Item -Destination $galleryPath
+ }
+ }
+
+ $bootstrapperPath = (Join-Path $environmentPath 'Bonsai.exe')
+ .\harp-docfx\modules\Export-Image.ps1 -libPath $libPath -workflowPath $workflowPath -bootstrapperPath $bootstrapperPath -outputFolder $OutputFolder -documentationRoot $PSScriptRoot
+}
+
+Push-Location $PSScriptRoot
+try {
+ if (Test-Path -Path 'workflows/') {
+ Process-Workflow-Collection $UseGalleryForWorkflowsDirectory './workflows' '../.bonsai/'
+ }
+
+ if (Test-Path -Path 'examples/') {
+ foreach ($environment in (Get-ChildItem -Path 'examples/' -Filter '.bonsai' -Recurse -FollowSymlink -Directory)) {
+ Process-Workflow-Collection $UseGalleryForExamplesDirectory ($environment.Parent.FullName) ($environment.FullName)
+ }
+ }
+} finally {
+ Pop-Location
+}
diff --git a/docs/filter.yml b/docs/filter.yml
new file mode 100644
index 0000000..472eb43
--- /dev/null
+++ b/docs/filter.yml
@@ -0,0 +1,4 @@
+apiRules:
+- exclude:
+ hasAttribute:
+ uid: System.ObsoleteAttribute
diff --git a/docs/harp-docfx b/docs/harp-docfx
new file mode 160000
index 0000000..035d4e6
--- /dev/null
+++ b/docs/harp-docfx
@@ -0,0 +1 @@
+Subproject commit 035d4e69d875d9bc02e87372c9549e4483164654
diff --git a/Assets/pcb.png b/docs/images/pcb.png
similarity index 100%
rename from Assets/pcb.png
rename to docs/images/pcb.png
diff --git a/docs/index.md b/docs/index.md
new file mode 100644
index 0000000..78c0d6e
--- /dev/null
+++ b/docs/index.md
@@ -0,0 +1 @@
+[!INCLUDE [](README.md)]
\ No newline at end of file
diff --git a/docs/template/public/main.css b/docs/template/public/main.css
new file mode 100644
index 0000000..fdb72e4
--- /dev/null
+++ b/docs/template/public/main.css
@@ -0,0 +1 @@
+@import "bonsai.css";
diff --git a/docs/template/public/main.js b/docs/template/public/main.js
new file mode 100644
index 0000000..6ebede4
--- /dev/null
+++ b/docs/template/public/main.js
@@ -0,0 +1,13 @@
+import WorkflowContainer from "./workflow.js"
+
+export default {
+ defaultTheme: 'light',
+ iconLinks: [{
+ icon: 'github',
+ href: 'https://github.com/harp-tech/device.behavior',
+ title: 'GitHub'
+ }],
+ start: () => {
+ WorkflowContainer.init();
+ }
+}
diff --git a/docs/toc.yml b/docs/toc.yml
new file mode 100644
index 0000000..3c4ae30
--- /dev/null
+++ b/docs/toc.yml
@@ -0,0 +1,4 @@
+- name: Documentation
+ href: articles/
+- name: API
+ href: ../artifacts/docs/api/
\ No newline at end of file
diff --git a/docs/workflows/.gitignore b/docs/workflows/.gitignore
new file mode 100644
index 0000000..e2beea4
--- /dev/null
+++ b/docs/workflows/.gitignore
@@ -0,0 +1,2 @@
+*.layout
+*.svg
diff --git a/Firmware/.gitignore b/firmware/.gitignore
similarity index 100%
rename from Firmware/.gitignore
rename to firmware/.gitignore
diff --git a/Firmware/Behavior.atsln b/firmware/Behavior.atsln
similarity index 100%
rename from Firmware/Behavior.atsln
rename to firmware/Behavior.atsln
diff --git a/Firmware/Behavior/Behavior.cproj b/firmware/Behavior/Behavior.cproj
similarity index 100%
rename from Firmware/Behavior/Behavior.cproj
rename to firmware/Behavior/Behavior.cproj
diff --git a/Firmware/Behavior/Makefile b/firmware/Behavior/Makefile
similarity index 100%
rename from Firmware/Behavior/Makefile
rename to firmware/Behavior/Makefile
diff --git a/Firmware/Behavior/WS2812S.c b/firmware/Behavior/WS2812S.c
similarity index 100%
rename from Firmware/Behavior/WS2812S.c
rename to firmware/Behavior/WS2812S.c
diff --git a/Firmware/Behavior/WS2812S.h b/firmware/Behavior/WS2812S.h
similarity index 100%
rename from Firmware/Behavior/WS2812S.h
rename to firmware/Behavior/WS2812S.h
diff --git a/Firmware/Behavior/app.c b/firmware/Behavior/app.c
similarity index 100%
rename from Firmware/Behavior/app.c
rename to firmware/Behavior/app.c
diff --git a/Firmware/Behavior/app.h b/firmware/Behavior/app.h
similarity index 100%
rename from Firmware/Behavior/app.h
rename to firmware/Behavior/app.h
diff --git a/Firmware/Behavior/app_funcs.c b/firmware/Behavior/app_funcs.c
similarity index 100%
rename from Firmware/Behavior/app_funcs.c
rename to firmware/Behavior/app_funcs.c
diff --git a/Firmware/Behavior/app_funcs.h b/firmware/Behavior/app_funcs.h
similarity index 100%
rename from Firmware/Behavior/app_funcs.h
rename to firmware/Behavior/app_funcs.h
diff --git a/Firmware/Behavior/app_ios_and_regs.c b/firmware/Behavior/app_ios_and_regs.c
similarity index 100%
rename from Firmware/Behavior/app_ios_and_regs.c
rename to firmware/Behavior/app_ios_and_regs.c
diff --git a/Firmware/Behavior/app_ios_and_regs.h b/firmware/Behavior/app_ios_and_regs.h
similarity index 100%
rename from Firmware/Behavior/app_ios_and_regs.h
rename to firmware/Behavior/app_ios_and_regs.h
diff --git a/Firmware/Behavior/cpu.h b/firmware/Behavior/cpu.h
similarity index 100%
rename from Firmware/Behavior/cpu.h
rename to firmware/Behavior/cpu.h
diff --git a/Firmware/Behavior/hwbp_core.h b/firmware/Behavior/hwbp_core.h
similarity index 100%
rename from Firmware/Behavior/hwbp_core.h
rename to firmware/Behavior/hwbp_core.h
diff --git a/Firmware/Behavior/hwbp_core_com.h b/firmware/Behavior/hwbp_core_com.h
similarity index 100%
rename from Firmware/Behavior/hwbp_core_com.h
rename to firmware/Behavior/hwbp_core_com.h
diff --git a/Firmware/Behavior/hwbp_core_regs.h b/firmware/Behavior/hwbp_core_regs.h
similarity index 100%
rename from Firmware/Behavior/hwbp_core_regs.h
rename to firmware/Behavior/hwbp_core_regs.h
diff --git a/Firmware/Behavior/hwbp_core_types.h b/firmware/Behavior/hwbp_core_types.h
similarity index 100%
rename from Firmware/Behavior/hwbp_core_types.h
rename to firmware/Behavior/hwbp_core_types.h
diff --git a/Firmware/Behavior/hwbp_sync.h b/firmware/Behavior/hwbp_sync.h
similarity index 100%
rename from Firmware/Behavior/hwbp_sync.h
rename to firmware/Behavior/hwbp_sync.h
diff --git a/Firmware/Behavior/interrupts.c b/firmware/Behavior/interrupts.c
similarity index 100%
rename from Firmware/Behavior/interrupts.c
rename to firmware/Behavior/interrupts.c
diff --git a/Firmware/Behavior/ios.yml b/firmware/Behavior/ios.yml
similarity index 100%
rename from Firmware/Behavior/ios.yml
rename to firmware/Behavior/ios.yml
diff --git a/Firmware/Behavior/libATxmega128A1U-1.15.a b/firmware/Behavior/libATxmega128A1U-1.15.a
similarity index 100%
rename from Firmware/Behavior/libATxmega128A1U-1.15.a
rename to firmware/Behavior/libATxmega128A1U-1.15.a
diff --git a/Firmware/Behavior/main.c b/firmware/Behavior/main.c
similarity index 100%
rename from Firmware/Behavior/main.c
rename to firmware/Behavior/main.c
diff --git a/Firmware/Behavior/registers.xls b/firmware/Behavior/registers.xls
similarity index 100%
rename from Firmware/Behavior/registers.xls
rename to firmware/Behavior/registers.xls
diff --git a/Firmware/Behavior/structs.h b/firmware/Behavior/structs.h
similarity index 100%
rename from Firmware/Behavior/structs.h
rename to firmware/Behavior/structs.h
diff --git a/Firmware/LICENSE b/firmware/LICENSE
similarity index 100%
rename from Firmware/LICENSE
rename to firmware/LICENSE
diff --git a/Hardware/.gitignore b/hardware/.gitignore
similarity index 100%
rename from Hardware/.gitignore
rename to hardware/.gitignore
diff --git a/Hardware/Mechanical/LICENSE b/hardware/Mechanical/LICENSE
similarity index 100%
rename from Hardware/Mechanical/LICENSE
rename to hardware/Mechanical/LICENSE
diff --git a/Hardware/Mechanical/README.md b/hardware/Mechanical/README.md
similarity index 100%
rename from Hardware/Mechanical/README.md
rename to hardware/Mechanical/README.md
diff --git a/Hardware/Mechanical/case_v1.1_v1.2/Behavior_Box_LR.pdf b/hardware/Mechanical/case_v1.1_v1.2/Behavior_Box_LR.pdf
similarity index 100%
rename from Hardware/Mechanical/case_v1.1_v1.2/Behavior_Box_LR.pdf
rename to hardware/Mechanical/case_v1.1_v1.2/Behavior_Box_LR.pdf
diff --git a/Hardware/Mechanical/case_v1.1_v1.2/Behavior_Box_LR.svg b/hardware/Mechanical/case_v1.1_v1.2/Behavior_Box_LR.svg
similarity index 100%
rename from Hardware/Mechanical/case_v1.1_v1.2/Behavior_Box_LR.svg
rename to hardware/Mechanical/case_v1.1_v1.2/Behavior_Box_LR.svg
diff --git a/Hardware/Mechanical/case_v1.1_v1.2/Behavior_Box_LR_Color_GB.pdf b/hardware/Mechanical/case_v1.1_v1.2/Behavior_Box_LR_Color_GB.pdf
similarity index 100%
rename from Hardware/Mechanical/case_v1.1_v1.2/Behavior_Box_LR_Color_GB.pdf
rename to hardware/Mechanical/case_v1.1_v1.2/Behavior_Box_LR_Color_GB.pdf
diff --git a/Hardware/Mechanical/case_v2.0/Behavior_Box_V2_0_LR.pdf b/hardware/Mechanical/case_v2.0/Behavior_Box_V2_0_LR.pdf
similarity index 100%
rename from Hardware/Mechanical/case_v2.0/Behavior_Box_V2_0_LR.pdf
rename to hardware/Mechanical/case_v2.0/Behavior_Box_V2_0_LR.pdf
diff --git a/Hardware/PCB/CONTRIB b/hardware/PCB/CONTRIB
similarity index 100%
rename from Hardware/PCB/CONTRIB
rename to hardware/PCB/CONTRIB
diff --git a/Hardware/PCB/LICENSE b/hardware/PCB/LICENSE
similarity index 100%
rename from Hardware/PCB/LICENSE
rename to hardware/PCB/LICENSE
diff --git a/Hardware/PCB/README b/hardware/PCB/README
similarity index 100%
rename from Hardware/PCB/README
rename to hardware/PCB/README
diff --git a/Hardware/PCB/harp behavior.brd b/hardware/PCB/harp behavior.brd
similarity index 100%
rename from Hardware/PCB/harp behavior.brd
rename to hardware/PCB/harp behavior.brd
diff --git a/Hardware/PCB/harp behavior.pdf b/hardware/PCB/harp behavior.pdf
similarity index 100%
rename from Hardware/PCB/harp behavior.pdf
rename to hardware/PCB/harp behavior.pdf
diff --git a/Hardware/PCB/harp behavior.sch b/hardware/PCB/harp behavior.sch
similarity index 100%
rename from Hardware/PCB/harp behavior.sch
rename to hardware/PCB/harp behavior.sch
diff --git a/Hardware/PCB/harp behavior_BOM.xlsx b/hardware/PCB/harp behavior_BOM.xlsx
similarity index 100%
rename from Hardware/PCB/harp behavior_BOM.xlsx
rename to hardware/PCB/harp behavior_BOM.xlsx
diff --git a/Hardware/PCB/harp behavior_centroid.csv b/hardware/PCB/harp behavior_centroid.csv
similarity index 100%
rename from Hardware/PCB/harp behavior_centroid.csv
rename to hardware/PCB/harp behavior_centroid.csv
diff --git a/Hardware/PCB/harp behavior_gerbers.zip b/hardware/PCB/harp behavior_gerbers.zip
similarity index 100%
rename from Hardware/PCB/harp behavior_gerbers.zip
rename to hardware/PCB/harp behavior_gerbers.zip
diff --git a/Interface/.editorconfig b/software/.editorconfig
similarity index 100%
rename from Interface/.editorconfig
rename to software/.editorconfig
diff --git a/Interface/.gitignore b/software/.gitignore
similarity index 100%
rename from Interface/.gitignore
rename to software/.gitignore
diff --git a/software/Directory.Build.props b/software/Directory.Build.props
new file mode 100644
index 0000000..c8f3a92
--- /dev/null
+++ b/software/Directory.Build.props
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/software/Directory.Build.targets b/software/Directory.Build.targets
new file mode 100644
index 0000000..b7ac253
--- /dev/null
+++ b/software/Directory.Build.targets
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/Interface/Harp.Behavior.App/Harp.Behavior.App.csproj b/software/Harp.Behavior.App/Harp.Behavior.App.csproj
similarity index 65%
rename from Interface/Harp.Behavior.App/Harp.Behavior.App.csproj
rename to software/Harp.Behavior.App/Harp.Behavior.App.csproj
index 846b3f1..f300e27 100644
--- a/Interface/Harp.Behavior.App/Harp.Behavior.App.csproj
+++ b/software/Harp.Behavior.App/Harp.Behavior.App.csproj
@@ -1,40 +1,36 @@
+ Visual tool for configuring Harp Behavior devices.
+ $(PackageTags) App
+ net8.0
WinExe
-
- net8.0
- enable
+ true
+ harp.behavior
true
app.manifest
- ..\bin\$(Configuration)
..\Harp.Behavior.Design\Assets\logo.ico
- Harp.Behavior.App
- Harp.Behavior.App
- Harp.Behavior.App
+ $(MSBuildProjectName)
+ $(MSBuildProjectName)
org.harp-tech
- $(Version)
- $(Version)
+ $(CiBuildVersion)
+ $(CiBuildVersion)
AAPL
.
- Harp.Behavior.App
+ $(MSBuildProjectName)
logo.icns
NSApplication
true
- harp-tech
..\Harp.Behavior.Design\Assets\logo.ico
- git
- ..\bin\$(Configuration)
-
-
-
-
+
+
+
+
diff --git a/Interface/Harp.Behavior.Design/Adapters/RgbRegisterAdapter.cs b/software/Harp.Behavior.Design/Adapters/RgbRegisterAdapter.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/Adapters/RgbRegisterAdapter.cs
rename to software/Harp.Behavior.Design/Adapters/RgbRegisterAdapter.cs
diff --git a/Interface/Harp.Behavior.Design/App.axaml b/software/Harp.Behavior.Design/App.axaml
similarity index 100%
rename from Interface/Harp.Behavior.Design/App.axaml
rename to software/Harp.Behavior.Design/App.axaml
diff --git a/Interface/Harp.Behavior.Design/App.axaml.cs b/software/Harp.Behavior.Design/App.axaml.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/App.axaml.cs
rename to software/Harp.Behavior.Design/App.axaml.cs
diff --git a/Interface/Harp.Behavior.Design/Assets/logo.icns b/software/Harp.Behavior.Design/Assets/logo.icns
similarity index 100%
rename from Interface/Harp.Behavior.Design/Assets/logo.icns
rename to software/Harp.Behavior.Design/Assets/logo.icns
diff --git a/Interface/Harp.Behavior.Design/Assets/logo.ico b/software/Harp.Behavior.Design/Assets/logo.ico
similarity index 100%
rename from Interface/Harp.Behavior.Design/Assets/logo.ico
rename to software/Harp.Behavior.Design/Assets/logo.ico
diff --git a/Interface/Harp.Behavior.Design/Assets/logo.png b/software/Harp.Behavior.Design/Assets/logo.png
similarity index 100%
rename from Interface/Harp.Behavior.Design/Assets/logo.png
rename to software/Harp.Behavior.Design/Assets/logo.png
diff --git a/Interface/Harp.Behavior.Design/Assets/logo.svg b/software/Harp.Behavior.Design/Assets/logo.svg
similarity index 100%
rename from Interface/Harp.Behavior.Design/Assets/logo.svg
rename to software/Harp.Behavior.Design/Assets/logo.svg
diff --git a/Interface/Harp.Behavior.Design/Assets/logo_about.png b/software/Harp.Behavior.Design/Assets/logo_about.png
similarity index 100%
rename from Interface/Harp.Behavior.Design/Assets/logo_about.png
rename to software/Harp.Behavior.Design/Assets/logo_about.png
diff --git a/Interface/Harp.Behavior.Design/Controls/ExtendedColorPicker.cs b/software/Harp.Behavior.Design/Controls/ExtendedColorPicker.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/Controls/ExtendedColorPicker.cs
rename to software/Harp.Behavior.Design/Controls/ExtendedColorPicker.cs
diff --git a/Interface/Harp.Behavior.Design/Controls/RgbRegisterControl.axaml b/software/Harp.Behavior.Design/Controls/RgbRegisterControl.axaml
similarity index 100%
rename from Interface/Harp.Behavior.Design/Controls/RgbRegisterControl.axaml
rename to software/Harp.Behavior.Design/Controls/RgbRegisterControl.axaml
diff --git a/Interface/Harp.Behavior.Design/Controls/RgbRegisterControl.axaml.cs b/software/Harp.Behavior.Design/Controls/RgbRegisterControl.axaml.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/Controls/RgbRegisterControl.axaml.cs
rename to software/Harp.Behavior.Design/Controls/RgbRegisterControl.axaml.cs
diff --git a/Interface/Harp.Behavior.Design/Controls/VisualStatus.axaml b/software/Harp.Behavior.Design/Controls/VisualStatus.axaml
similarity index 100%
rename from Interface/Harp.Behavior.Design/Controls/VisualStatus.axaml
rename to software/Harp.Behavior.Design/Controls/VisualStatus.axaml
diff --git a/Interface/Harp.Behavior.Design/Controls/VisualStatus.axaml.cs b/software/Harp.Behavior.Design/Controls/VisualStatus.axaml.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/Controls/VisualStatus.axaml.cs
rename to software/Harp.Behavior.Design/Controls/VisualStatus.axaml.cs
diff --git a/Interface/Harp.Behavior.Design/Controls/WriteMessagesControl.axaml b/software/Harp.Behavior.Design/Controls/WriteMessagesControl.axaml
similarity index 100%
rename from Interface/Harp.Behavior.Design/Controls/WriteMessagesControl.axaml
rename to software/Harp.Behavior.Design/Controls/WriteMessagesControl.axaml
diff --git a/Interface/Harp.Behavior.Design/Controls/WriteMessagesControl.axaml.cs b/software/Harp.Behavior.Design/Controls/WriteMessagesControl.axaml.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/Controls/WriteMessagesControl.axaml.cs
rename to software/Harp.Behavior.Design/Controls/WriteMessagesControl.axaml.cs
diff --git a/Interface/Harp.Behavior.Design/Converters/BooleanConverter.cs b/software/Harp.Behavior.Design/Converters/BooleanConverter.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/Converters/BooleanConverter.cs
rename to software/Harp.Behavior.Design/Converters/BooleanConverter.cs
diff --git a/Interface/Harp.Behavior.Design/Converters/EnableFlagConverter.cs b/software/Harp.Behavior.Design/Converters/EnableFlagConverter.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/Converters/EnableFlagConverter.cs
rename to software/Harp.Behavior.Design/Converters/EnableFlagConverter.cs
diff --git a/Interface/Harp.Behavior.Design/Converters/EnumDisplayConverter.cs b/software/Harp.Behavior.Design/Converters/EnumDisplayConverter.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/Converters/EnumDisplayConverter.cs
rename to software/Harp.Behavior.Design/Converters/EnumDisplayConverter.cs
diff --git a/Interface/Harp.Behavior.Design/Converters/PayloadFieldConverter.cs b/software/Harp.Behavior.Design/Converters/PayloadFieldConverter.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/Converters/PayloadFieldConverter.cs
rename to software/Harp.Behavior.Design/Converters/PayloadFieldConverter.cs
diff --git a/Interface/Harp.Behavior.Design/Converters/TypeDescriptionConverter.cs b/software/Harp.Behavior.Design/Converters/TypeDescriptionConverter.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/Converters/TypeDescriptionConverter.cs
rename to software/Harp.Behavior.Design/Converters/TypeDescriptionConverter.cs
diff --git a/Interface/Harp.Behavior.Design/Converters/VisualStatusColorConverter.cs b/software/Harp.Behavior.Design/Converters/VisualStatusColorConverter.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/Converters/VisualStatusColorConverter.cs
rename to software/Harp.Behavior.Design/Converters/VisualStatusColorConverter.cs
diff --git a/Interface/Harp.Behavior.Design/FodyWeavers.xml b/software/Harp.Behavior.Design/FodyWeavers.xml
similarity index 100%
rename from Interface/Harp.Behavior.Design/FodyWeavers.xml
rename to software/Harp.Behavior.Design/FodyWeavers.xml
diff --git a/Interface/Harp.Behavior.Design/Harp.Behavior.Design.csproj b/software/Harp.Behavior.Design/Harp.Behavior.Design.csproj
similarity index 88%
rename from Interface/Harp.Behavior.Design/Harp.Behavior.Design.csproj
rename to software/Harp.Behavior.Design/Harp.Behavior.Design.csproj
index a7155e9..042aa35 100644
--- a/Interface/Harp.Behavior.Design/Harp.Behavior.Design.csproj
+++ b/software/Harp.Behavior.Design/Harp.Behavior.Design.csproj
@@ -1,9 +1,8 @@
- enable
- latest
+ Design Library containing UI components for configuring Harp Behavior devices.
true
- ..\bin\$(Configuration)
+ $(PackageTags) Design Bonsai Rx
net8.0
diff --git a/Interface/Harp.Behavior.Design/Styles/DefaultStyles.axaml b/software/Harp.Behavior.Design/Styles/DefaultStyles.axaml
similarity index 100%
rename from Interface/Harp.Behavior.Design/Styles/DefaultStyles.axaml
rename to software/Harp.Behavior.Design/Styles/DefaultStyles.axaml
diff --git a/Interface/Harp.Behavior.Design/ViewModels/AboutViewModel.cs b/software/Harp.Behavior.Design/ViewModels/AboutViewModel.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/ViewModels/AboutViewModel.cs
rename to software/Harp.Behavior.Design/ViewModels/AboutViewModel.cs
diff --git a/Interface/Harp.Behavior.Design/ViewModels/BehaviorViewModel.cs b/software/Harp.Behavior.Design/ViewModels/BehaviorViewModel.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/ViewModels/BehaviorViewModel.cs
rename to software/Harp.Behavior.Design/ViewModels/BehaviorViewModel.cs
diff --git a/Interface/Harp.Behavior.Design/ViewModels/ViewModelBase.cs b/software/Harp.Behavior.Design/ViewModels/ViewModelBase.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/ViewModels/ViewModelBase.cs
rename to software/Harp.Behavior.Design/ViewModels/ViewModelBase.cs
diff --git a/Interface/Harp.Behavior.Design/Views/About.axaml b/software/Harp.Behavior.Design/Views/About.axaml
similarity index 100%
rename from Interface/Harp.Behavior.Design/Views/About.axaml
rename to software/Harp.Behavior.Design/Views/About.axaml
diff --git a/Interface/Harp.Behavior.Design/Views/About.axaml.cs b/software/Harp.Behavior.Design/Views/About.axaml.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/Views/About.axaml.cs
rename to software/Harp.Behavior.Design/Views/About.axaml.cs
diff --git a/Interface/Harp.Behavior.Design/Views/BehaviorView.axaml b/software/Harp.Behavior.Design/Views/BehaviorView.axaml
similarity index 100%
rename from Interface/Harp.Behavior.Design/Views/BehaviorView.axaml
rename to software/Harp.Behavior.Design/Views/BehaviorView.axaml
diff --git a/Interface/Harp.Behavior.Design/Views/BehaviorView.axaml.cs b/software/Harp.Behavior.Design/Views/BehaviorView.axaml.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/Views/BehaviorView.axaml.cs
rename to software/Harp.Behavior.Design/Views/BehaviorView.axaml.cs
diff --git a/Interface/Harp.Behavior.Design/Views/MainWindow.axaml b/software/Harp.Behavior.Design/Views/MainWindow.axaml
similarity index 100%
rename from Interface/Harp.Behavior.Design/Views/MainWindow.axaml
rename to software/Harp.Behavior.Design/Views/MainWindow.axaml
diff --git a/Interface/Harp.Behavior.Design/Views/MainWindow.axaml.cs b/software/Harp.Behavior.Design/Views/MainWindow.axaml.cs
similarity index 100%
rename from Interface/Harp.Behavior.Design/Views/MainWindow.axaml.cs
rename to software/Harp.Behavior.Design/Views/MainWindow.axaml.cs
diff --git a/Interface/Harp.Behavior.sln b/software/Harp.Behavior.sln
similarity index 87%
rename from Interface/Harp.Behavior.sln
rename to software/Harp.Behavior.sln
index 4ac5e07..5e12e6a 100644
--- a/Interface/Harp.Behavior.sln
+++ b/software/Harp.Behavior.sln
@@ -9,12 +9,6 @@ Project("{D6F1C6E5-7507-425D-A697-29DAB58ED458}") = "Harp.Behavior.App", "Harp.B
EndProject
Project("{D6F1C6E5-7507-425D-A697-29DAB58ED458}") = "Harp.Behavior.Design", "Harp.Behavior.Design\Harp.Behavior.Design.csproj", "{FCB73743-9ECF-4D3E-A235-F0493BC10629}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{10D72C30-D95E-452C-910F-F39FC6BAF129}"
- ProjectSection(SolutionItems) = preProject
- .editorconfig = .editorconfig
- Harp.Behavior.nsi = Harp.Behavior.nsi
- EndProjectSection
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
diff --git a/Interface/Harp.Behavior/AsyncDevice.Generated.cs b/software/Harp.Behavior/AsyncDevice.Generated.cs
similarity index 100%
rename from Interface/Harp.Behavior/AsyncDevice.Generated.cs
rename to software/Harp.Behavior/AsyncDevice.Generated.cs
diff --git a/Interface/Harp.Behavior/Device.Generated.cs b/software/Harp.Behavior/Device.Generated.cs
similarity index 100%
rename from Interface/Harp.Behavior/Device.Generated.cs
rename to software/Harp.Behavior/Device.Generated.cs
diff --git a/software/Harp.Behavior/Harp.Behavior.csproj b/software/Harp.Behavior/Harp.Behavior.csproj
new file mode 100644
index 0000000..7be6d10
--- /dev/null
+++ b/software/Harp.Behavior/Harp.Behavior.csproj
@@ -0,0 +1,17 @@
+
+
+
+ Bonsai Library containing interfaces for data acquisition and control of Harp Behavior devices.
+ $(PackageTags) Bonsai Rx
+ net472;net8.0
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Interface/Harp.Behavior/Properties/AssemblyInfo.cs b/software/Harp.Behavior/Properties/AssemblyInfo.cs
similarity index 100%
rename from Interface/Harp.Behavior/Properties/AssemblyInfo.cs
rename to software/Harp.Behavior/Properties/AssemblyInfo.cs
diff --git a/Interface/Harp.Behavior/Properties/launchSettings.json b/software/Harp.Behavior/Properties/launchSettings.json
similarity index 100%
rename from Interface/Harp.Behavior/Properties/launchSettings.json
rename to software/Harp.Behavior/Properties/launchSettings.json
diff --git a/Interface/Harp.Behavior/README.md b/software/Harp.Behavior/README.md
similarity index 100%
rename from Interface/Harp.Behavior/README.md
rename to software/Harp.Behavior/README.md
diff --git a/Interface/LICENSE b/software/LICENSE
similarity index 100%
rename from Interface/LICENSE
rename to software/LICENSE
diff --git a/software/build/Common.Tests.csproj.props b/software/build/Common.Tests.csproj.props
new file mode 100644
index 0000000..c42b25f
--- /dev/null
+++ b/software/build/Common.Tests.csproj.props
@@ -0,0 +1,6 @@
+
+
+ false
+ false
+
+
\ No newline at end of file
diff --git a/software/build/Common.csproj.props b/software/build/Common.csproj.props
new file mode 100644
index 0000000..f96fce7
--- /dev/null
+++ b/software/build/Common.csproj.props
@@ -0,0 +1,69 @@
+
+
+
+
+ Debug
+ AnyCPU
+
+
+
+
+ 12.0
+ true
+ strict
+ enable
+ true
+ true
+ $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)../../artifacts'))
+
+
+
+
+ true
+ Dependency;BonsaiLibrary
+
+ icon.png
+ $(MSBuildThisFileDirectory)icon.png
+
+ LICENSE
+ $(MSBuildThisFileDirectory)../LICENSE
+
+ README.md
+ $(MSBuildThisFileDirectory)../../docs/README.md
+ $(MSBuildThisFileDirectory)README.nuget.md
+ $(MSBuildProjectDirectory)\README.md
+ $(MSBuildProjectDirectory)\README.nuget.md
+
+
+ false
+ true
+ snupkg
+
+
+ false
+ true
+
+
+
+
+ $(WarningsAsErrors);NU1701;CS7035
+
+
+ true
+
+
+ true
+
+
+
+
+
+
\ No newline at end of file
diff --git a/software/build/Common.csproj.targets b/software/build/Common.csproj.targets
new file mode 100644
index 0000000..07f4916
--- /dev/null
+++ b/software/build/Common.csproj.targets
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+ $(TargetName.ToLowerInvariant())
+ DotnetTool
+
+
+ 1591,1573
+
+
+
+
+
+
+
+ 0
+ 42.42.42-dev$(DevVersion)
+
+ $(CiBuildVersion)
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/software/build/Package.props b/software/build/Package.props
new file mode 100644
index 0000000..cecc3ab
--- /dev/null
+++ b/software/build/Package.props
@@ -0,0 +1,9 @@
+
+
+ Harp Behavior
+ https://harp-tech.org/device.behavior
+
+ harp-tech
+ Copyright © harp-tech and Contributors
+
+
\ No newline at end of file
diff --git a/software/build/Project.csproj.props b/software/build/Project.csproj.props
new file mode 100644
index 0000000..276e93b
--- /dev/null
+++ b/software/build/Project.csproj.props
@@ -0,0 +1,5 @@
+
+
+ 11.2.6
+
+
\ No newline at end of file
diff --git a/Interface/icon.png b/software/build/icon.png
similarity index 100%
rename from Interface/icon.png
rename to software/build/icon.png