Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verification 1 #3

Draft
wants to merge 43 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
31284b2
Add recomendations from ka2qfx
KenwoodFox Mar 31, 2023
1caea26
Bump to kicad7
KenwoodFox Apr 4, 2023
1e09488
fixup! Bump to kicad7
KenwoodFox Apr 5, 2023
83276a1
Add USBC 3d Model back in
KenwoodFox Apr 5, 2023
0bf7825
Confirm encoder
KenwoodFox Apr 5, 2023
a8b14b8
Clean brd
KenwoodFox Apr 6, 2023
e130c64
Redo segment
KenwoodFox Apr 14, 2023
f47cf97
Add stencil dimensions
KenwoodFox Jun 13, 2023
1784c78
Create bridge component
KenwoodFox Jun 27, 2023
b64a9fd
Add mounting holes into bridge
KenwoodFox Jun 29, 2023
b4d872b
Bump bridge again
KenwoodFox Jun 29, 2023
2f72936
Bump pcb design
KenwoodFox Aug 28, 2023
4d1367f
Add stencil
KenwoodFox Oct 10, 2023
b8d2c18
Include docs from upstream
KenwoodFox Oct 10, 2023
6afb37a
add workflows from upstream template
KenwoodFox Oct 10, 2023
89f8733
Bump all images
KenwoodFox Oct 10, 2023
4272198
Add simulator
KenwoodFox Oct 12, 2023
8774183
Create cross-compile algorithm
KenwoodFox Oct 12, 2023
0c4184b
Algorithm can mark and show data
KenwoodFox Oct 12, 2023
0fd2aae
Code runs but does not score on maze.
KenwoodFox Oct 12, 2023
e864a8e
Make code portable
KenwoodFox Oct 12, 2023
3a80237
tidy some more and consider methods for more efficent data storage
KenwoodFox Oct 12, 2023
9045d43
Alg can record number of steps (precusor to flood fill/anti-step
KenwoodFox Oct 12, 2023
1f45fe2
Boilerplate target system
KenwoodFox Oct 12, 2023
b58a4b2
Closeup
KenwoodFox Oct 12, 2023
383a174
Mouse now relies on upstream lib
KenwoodFox Oct 16, 2023
d86db92
Bump PCB and BOM
KenwoodFox Oct 19, 2023
46295e6
Clean up battery trace width
KenwoodFox Oct 19, 2023
9e6561a
Add BOM
KenwoodFox Oct 23, 2023
0db1240
Ignore binary files
KenwoodFox Nov 2, 2023
ae627b6
Add methods to update absolute wall positions
KenwoodFox Nov 2, 2023
29a9180
Rotate method allows bot to convert relative readings into map readings
KenwoodFox Nov 2, 2023
68db28c
Seperate env (and make space for future ports)
KenwoodFox Nov 2, 2023
44cfcda
Add LCSC part number
KenwoodFox Nov 5, 2023
277da44
Include changes from upstream
KenwoodFox Nov 6, 2023
0d41d2a
add intended direction solvoing
KenwoodFox Nov 14, 2023
f0cb450
fix pins and blinkers
KenwoodFox Nov 23, 2023
9ded09e
Bump to new k8 format for config
KenwoodFox Sep 23, 2024
55823dd
Bump upload actions to v4
KenwoodFox Sep 23, 2024
997a3b3
Fix ERC
KenwoodFox Sep 23, 2024
b7b4ebd
Bump outdated
KenwoodFox Sep 23, 2024
410178e
Update from https://github.com/KenwoodFox/Project-Template.git
KenwoodFox Sep 23, 2024
876695c
Fix DRC Errors
KenwoodFox Oct 3, 2024
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
72 changes: 72 additions & 0 deletions .github/workflows/docs_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Docs

permissions:
contents: write

on:
push:
branches:
- "main"
tags:
- "*"
pull_request:
paths:
- "Docs/**"
- ".github/workflows/**"

#
jobs:
make_docs:
runs-on: ubuntu-latest
name: Build Docs
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
architecture: x64

- uses: actions/checkout@v4
with:
fetch-depth: 0

- run: sudo apt update && sudo apt install texlive-latex-recommended texlive-latex-extra texlive-pictures pandoc rename latexmk

- name: Install docs requirements
run: pip install -r Docs/requirements.txt

- name: Build pdf
run: cd Docs && make

#
- run: mv Docs/_build/latex/*.pdf Docs/_build/latex/MegaMouse.pdf

- uses: actions/upload-artifact@v4
with:
name: ProjectDocs
path: Docs/_build/latex/MegaMouse.pdf
#

publish_docs:
# Only run on tags
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
name: Publish Docs
needs: [make_docs]

steps:
- uses: actions/download-artifact@v2
with:
name: ProjectDocs

- name: Upload Docs to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "*.pdf"
tag: ${{ github.ref }}
overwrite: true
prerelease: true
#
body: "SNHU Robotics, Automated with github ci/cd."
file_glob: true
45 changes: 14 additions & 31 deletions .github/workflows/firmware_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Firmware Workflow
name: Firmware

on:
push:
Expand All @@ -9,28 +9,30 @@ on:
pull_request:
paths:
- "Firmware/**"
- ".github/workflows/**"

#
jobs:
make_firmware:
runs-on: ubuntu-latest
name: Firmware Builder

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
Expand All @@ -39,55 +41,36 @@ jobs:
- name: Run PlatformIO
run: cd Firmware && make

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: Binaries
name: Display_Binaries
path: Firmware/.pio/build/ATmega328P/firmware.*

delint:
runs-on: ubuntu-latest
name: Delinter

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio

- name: Run Delinter
run: cd Firmware && pio check

# dev-publish:
# # publish only to devs
# runs-on: ubuntu-latest
# name: Dev-Publish
# needs: [make_firmware]

# steps:
# # Download artifacts
# - uses: actions/download-artifact@v2
# with:
# name: Binaries

# - name: send custom message with args
# uses: appleboy/discord-action@master
# with:
# webhook_id: ${{ secrets.WEBHOOK_ID }}
# webhook_token: ${{ secrets.WEBHOOK_TOKEN }}
# file: "firmware.hex"
# args: "New firmware for MegaMouse board!"
#
50 changes: 23 additions & 27 deletions .github/workflows/hardware_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: Hardware Workflow
name: Hardware

permissions:
contents: write
actions: read
checks: write

on:
push:
Expand All @@ -9,64 +14,57 @@ on:
pull_request:
paths:
- "Hardware/**"
- "Docs/**"

permissions: write-all
- ".github/workflows/**"

#
jobs:
KiCad_Hardware:
runs-on: ubuntu-latest
name: KiCad Hardware

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- uses: INTI-CMNB/KiBot@v2_k6
- uses: INTI-CMNB/KiBot@v2_k8
with:
# Config file
config: Hardware/config.kibot.yaml
# Prefix for output in config file.
dir: _hardwareOutput

# Hardware Files
#
schema: "Hardware/MegaMouse/MegaMouse.kicad_sch"
board: "Hardware/MegaMouse/MegaMouse.kicad_pcb"
#

- name: upload results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Board-Hardware
path: _hardwareOutput

- name: Discord notification if failed
if: ${{ failure() }}
uses: appleboy/discord-action@master
with:
webhook_id: ${{ secrets.WEBHOOK_ID }}
webhook_token: ${{ secrets.WEBHOOK_TOKEN }}
args: "Building new board failed, most likely a DRC check."

dev-publish:
# publish only to devs
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
name: Dev-Publish
needs: [KiCad_Hardware]

steps:
# Download artifacts
- uses: actions/download-artifact@v2
with:
name: Board-Hardware

- name: send custom message with args
uses: appleboy/discord-action@master
- name: Upload KiCAD Artifacts
uses: edunad/[email protected]
with:
webhook_id: ${{ secrets.WEBHOOK_ID }}
webhook_token: ${{ secrets.WEBHOOK_TOKEN }}
file: "MegaMouse-3D_top.png"
path: "*-3D_top.png"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
title: "PCB"

publish:
# Only run on tags
Expand All @@ -77,32 +75,30 @@ jobs:

steps:
# Be in our repo
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

# Download artifacts
- uses: actions/download-artifact@v2
with:
name: Board-Hardware

- run: mkdir -p _staging/

- run: cp *.pdf _staging/

- run: cp *.step _staging/

# Copy gerbers
- run: cp PCBWay/*.zip _staging/Board-$(git rev-parse --short HEAD)-PCBWay.zip
- run: cp JLCPCB/*.zip _staging/Board-$(git rev-parse --short HEAD)-JLCPCB.zip

- name: Upload Docs to release
- name: Upload artifacts to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "_staging/*"
tag: ${{ github.ref }}
overwrite: true
prerelease: true
body: "Kitsune Scientific, Automated with github ci/cd."
#
body: "SNHU Robotics, Automated with github ci/cd."
file_glob: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ _*/
*-backups
*.kicad_prl
*.sch-bak
*.lck
*~
_autosave-*
*.tmp
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "Hardware/MegaMouse/Libraries/Panelization.pretty"]
path = Hardware/MegaMouse/Libraries/Panelization.pretty
url = https://github.com/madworm/Panelization.pretty
[submodule "Firmware/sim/lib/mms-cpp"]
path = Firmware/sim/lib/mms-cpp
url = https://github.com/mackorone/mms-cpp.git
Binary file added CAD/Components/Bridge.FCStd
Binary file not shown.
Binary file added CAD/Stencil.FCStd
Binary file not shown.
5 changes: 5 additions & 0 deletions Docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Dev
Pipfile*

# Build
_build
17 changes: 17 additions & 0 deletions Docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Refactored from minimal makefile

all: latexpdf

clean:
git clean -fdX

latexpdf: Makefile
@$(SPHINXBUILD) -M latexpdf "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

html: Makefile
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21 changes: 21 additions & 0 deletions Docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Building the Docs

To get started, you'll need a few things, you should have `pipenv`
(or your favorite python container tool). And some familiarly with RST.

To begin, install the requirements into your python environment

```
pipenv install -r requirements.txt
pipenv shell
```

To make things easier, this project uses a build tool called make

To use it just run

```
make
```

Thats it! Make some edits, and then run `make html`
Loading
Loading