mirror of
https://github.com/FizzyApple12/Waccon.git
synced 2026-09-22 23:08:05 +03:00
added actions scripts to automatically build the protocol translator and touch panel firmware on push
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
name: Build Protocol Translator
|
||||
on: [push]
|
||||
jobs:
|
||||
Build-Protocol-Translator:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download Required Packages
|
||||
run: sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
|
||||
- name: Move to Protocol Translator Code
|
||||
run: cd $GITHUB_WORKSPACE/WaccaProtocolTranslator
|
||||
- name: Run Autobuild
|
||||
run: sudo sh autobuild.sh
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Protocol Translator Firmware
|
||||
path: $GITHUB_WORKSPACE/WaccaProtocolTranslator/artifacts/
|
||||
@@ -0,0 +1,16 @@
|
||||
name: Build Touch Panel
|
||||
on: [push]
|
||||
jobs:
|
||||
Build-Touch-Panel:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download Required Packages
|
||||
run: sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
|
||||
- name: Move to Protocol Translator Code
|
||||
run: cd $GITHUB_WORKSPACE/WaccaTouchPanel
|
||||
- name: Run Autobuild
|
||||
run: sudo sh autobuild.sh
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Touch Panel Firmware
|
||||
path: $GITHUB_WORKSPACE/WaccaTouchPanel/artifacts/
|
||||
@@ -1,8 +1,10 @@
|
||||
WaccaProtocolTranslator/build/
|
||||
WaccaProtocolTranslator/artifacts/
|
||||
|
||||
WaccaProtocolTranslator/.vscode/
|
||||
|
||||
WaccaTouchPanel/build/
|
||||
WaccaTouchPanel/artifacts/
|
||||
|
||||
WaccaTouchPanel/.vscode/
|
||||
|
||||
|
||||
@@ -3,3 +3,9 @@
|
||||
This repo is right now still a work in progress, nothing has been finalized and things will probably be broken, stay tuned as things are finalized though!
|
||||
|
||||

|
||||
|
||||
If you'd like to test out the current firmware on your own hardware, there are 2 github actions scripts for the Touch Panel firmware and the Protocol Translator firmware
|
||||
|
||||
The 6 Touch Panel firmware builds correspond to which position you want the Touch Panel to be in (1 being top, 6 being bottom)
|
||||
|
||||
The 4 Protocol Translator firmware builds correspond to if the translator is controlling the left or right and if you want to mirror Touch Panel 1's inputs to all 6 Touch Panels
|
||||
|
||||
@@ -8,6 +8,8 @@ project(WaccaTouchPanel)
|
||||
|
||||
pico_sdk_init()
|
||||
|
||||
add_definitions($ENV{CUSTOM_CFLAGS})
|
||||
|
||||
add_executable(wacca_protocol_translator
|
||||
main.c
|
||||
serial.c
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
if not exist "build" mkdir build
|
||||
if not exist "artifacts" mkdir artifacts
|
||||
cd build
|
||||
|
||||
set CUSTOM_CFLAGS=-DOPT_PRESETPANELS
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_protocol_translator
|
||||
move /y wacca_protocol_translator.uf2 ../artifacts/wacca_protocol_translator_left.uf2
|
||||
|
||||
set CUSTOM_CFLAGS=-DOPT_PRESETPANELS -DOPT_RIGHT
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_protocol_translator
|
||||
move /y wacca_protocol_translator.uf2 ../artifacts/wacca_protocol_translator_right.uf2
|
||||
|
||||
set CUSTOM_CFLAGS=-DOPT_PRESETPANELS -DOPT_SINGLE_TOUCH
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_protocol_translator
|
||||
move /y wacca_protocol_translator.uf2 ../artifacts/wacca_protocol_translator_single_touch_left.uf2
|
||||
|
||||
set CUSTOM_CFLAGS=-DOPT_PRESETPANELS -DOPT_SINGLE_TOUCH -DOPT_RIGHT
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_protocol_translator
|
||||
move /y wacca_protocol_translator.uf2 ../artifacts/wacca_protocol_translator_single_touch_right.uf2
|
||||
|
||||
cd ..
|
||||
@@ -0,0 +1,25 @@
|
||||
mkdir -p build
|
||||
mkdir -p artifacts
|
||||
cd build
|
||||
|
||||
export CUSTOM_CFLAGS="-DOPT_PRESETPANELS"
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_protocol_translator
|
||||
mv wacca_protocol_translator.uf2 ../artifacts/wacca_protocol_translator_left.uf2
|
||||
|
||||
export CUSTOM_CFLAGS="-DOPT_PRESETPANELS -DOPT_RIGHT"
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_protocol_translator
|
||||
mv wacca_protocol_translator.uf2 ../artifacts/wacca_protocol_translator_right.uf2
|
||||
|
||||
export CUSTOM_CFLAGS="-DOPT_PRESETPANELS -DOPT_SINGLE_TOUCH"
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_protocol_translator
|
||||
mv wacca_protocol_translator.uf2 ../artifacts/wacca_protocol_translator_single_touch_left.uf2
|
||||
|
||||
export CUSTOM_CFLAGS="-DOPT_PRESETPANELS -DOPT_SINGLE_TOUCH -DOPT_RIGHT"
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_protocol_translator
|
||||
mv wacca_protocol_translator.uf2 ../artifacts/wacca_protocol_translator_single_touch_right.uf2
|
||||
|
||||
cd ..
|
||||
@@ -3,15 +3,35 @@
|
||||
#include "hardware/i2c.h"
|
||||
#include "waccaserial.h"
|
||||
|
||||
#ifdef OPT_PRESETPANELS // for autocompile
|
||||
#if OPT_SINGLE_TOUCH
|
||||
#define TOUCH_PANEL_0_ADDR 0x10
|
||||
#define TOUCH_PANEL_1_ADDR 0x10
|
||||
#define TOUCH_PANEL_2_ADDR 0x10
|
||||
#define TOUCH_PANEL_3_ADDR 0x10
|
||||
#define TOUCH_PANEL_4_ADDR 0x10
|
||||
#define TOUCH_PANEL_5_ADDR 0x10
|
||||
#else
|
||||
#define TOUCH_PANEL_0_ADDR 0x10
|
||||
#define TOUCH_PANEL_1_ADDR 0x11
|
||||
#define TOUCH_PANEL_2_ADDR 0x12
|
||||
#define TOUCH_PANEL_3_ADDR 0x13
|
||||
#define TOUCH_PANEL_4_ADDR 0x14
|
||||
#define TOUCH_PANEL_5_ADDR 0x15
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define TOUCH_I2C_PORT i2c0
|
||||
#define TOUCH_I2C_SDA 4
|
||||
#define TOUCH_I2C_SCL 5
|
||||
#ifndef OPT_PRESETPANELS
|
||||
#define TOUCH_PANEL_0_ADDR 0x10
|
||||
#define TOUCH_PANEL_1_ADDR 0x10 //0x11
|
||||
#define TOUCH_PANEL_2_ADDR 0x10 //0x12
|
||||
#define TOUCH_PANEL_3_ADDR 0x10 //0x13
|
||||
#define TOUCH_PANEL_4_ADDR 0x10 //0x14
|
||||
#define TOUCH_PANEL_5_ADDR 0x10 //0x15
|
||||
#endif
|
||||
#define TOUCH_I2C_FREQ 100000
|
||||
|
||||
uint32_t touchPanel0Data = 0;
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
|
||||
//#define RIGHT //uncomment to enable righty flip on interface and sync board data swap
|
||||
|
||||
#if OPT_RIGHT // used for automatic compilation
|
||||
#ifndef RIGHT
|
||||
#define RIGHT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define CMD_GET_SYNC_BOARD_VER 0xa0
|
||||
#define CMD_NEXT_READ 0x72
|
||||
#define CMD_GET_UNIT_BOARD_VER 0xa8
|
||||
|
||||
@@ -8,6 +8,8 @@ project(WaccaTouchPanel)
|
||||
|
||||
pico_sdk_init()
|
||||
|
||||
add_definitions($ENV{CUSTOM_CFLAGS})
|
||||
|
||||
add_executable(wacca_touch_panel
|
||||
main.c
|
||||
mpr121.h
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
if not exist "build" mkdir build
|
||||
if not exist "artifacts" mkdir artifacts
|
||||
cd build
|
||||
|
||||
set CUSTOM_CFLAGS=-DOPT_PANEL1
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_touch_panel
|
||||
move /y wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_1.uf2
|
||||
|
||||
set CUSTOM_CFLAGS=-DOPT_PANEL2
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_touch_panel
|
||||
move /y wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_2.uf2
|
||||
|
||||
set CUSTOM_CFLAGS=-DOPT_PANEL3
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_touch_panel
|
||||
move /y wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_3.uf2
|
||||
|
||||
set CUSTOM_CFLAGS=-DOPT_PANEL4
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_touch_panel
|
||||
move /y wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_4.uf2
|
||||
|
||||
set CUSTOM_CFLAGS=-DOPT_PANEL5
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_touch_panel
|
||||
move /y wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_5.uf2
|
||||
|
||||
set CUSTOM_CFLAGS=-DOPT_PANEL6
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_touch_panel
|
||||
move /y wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_6.uf2
|
||||
|
||||
cd ..
|
||||
@@ -0,0 +1,35 @@
|
||||
mkdir -p build
|
||||
mkdir -p artifacts
|
||||
cd build
|
||||
|
||||
export CUSTOM_CFLAGS="-DOPT_PANEL1"
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_touch_panel
|
||||
mv wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_1.uf2
|
||||
|
||||
export CUSTOM_CFLAGS="-DOPT_PANEL2"
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_touch_panel
|
||||
mv wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_2.uf2
|
||||
|
||||
export CUSTOM_CFLAGS="-DOPT_PANEL3"
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_touch_panel
|
||||
mv wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_3.uf2
|
||||
|
||||
export CUSTOM_CFLAGS="-DOPT_PANEL4"
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_touch_panel
|
||||
mv wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_4.uf2
|
||||
|
||||
export CUSTOM_CFLAGS="-DOPT_PANEL5"
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_touch_panel
|
||||
mv wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_5.uf2
|
||||
|
||||
export CUSTOM_CFLAGS="-DOPT_PANEL6"
|
||||
cmake -G "Unix Makefiles" ..
|
||||
make wacca_touch_panel
|
||||
mv wacca_touch_panel.uf2 ../artifacts/wacca_touch_panel_6.uf2
|
||||
|
||||
cd ..
|
||||
+17
-1
@@ -7,9 +7,25 @@
|
||||
|
||||
//#define DEBUG_MODE // uncomment for debug messages (note: this will slow things down!)
|
||||
|
||||
#if OPT_PANEL1 // used for automatic compilation
|
||||
#define MOTHERBOARD_I2C_HWID 0x10
|
||||
#elif OPT_PANEL2
|
||||
#define MOTHERBOARD_I2C_HWID 0x11
|
||||
#elif OPT_PANEL3
|
||||
#define MOTHERBOARD_I2C_HWID 0x12
|
||||
#elif OPT_PANEL4
|
||||
#define MOTHERBOARD_I2C_HWID 0x13
|
||||
#elif OPT_PANEL5
|
||||
#define MOTHERBOARD_I2C_HWID 0x14
|
||||
#elif OPT_PANEL6
|
||||
#define MOTHERBOARD_I2C_HWID 0x15
|
||||
#endif
|
||||
|
||||
#define MOTHERBOARD_I2C_PORT i2c1
|
||||
#define MOTHERBOARD_I2C_IRQ I2C1_IRQ
|
||||
#define MOTHERBOARD_I2C_HWID 0x10 // 0x1[0-5 depending on which position it's in bottom to top]
|
||||
#ifndef MOTHERBOARD_I2C_HWID
|
||||
#define MOTHERBOARD_I2C_HWID 0x10 // 0x1[0-5 depending on which position it's in bottom to top]
|
||||
#endif
|
||||
#define MOTHERBOARD_I2C_SDA 2
|
||||
#define MOTHERBOARD_I2C_SCL 3
|
||||
#define MOTHERBOARD_I2C_FREQ 100000
|
||||
|
||||
Reference in New Issue
Block a user