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

Desktop port refactor #120

Draft
wants to merge 28 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
bd4f887
Extract platform independent code from firmware
Barabas5532 Feb 4, 2024
7a6eb3e
Update test
Barabas5532 Feb 4, 2024
d5e7177
Remove some support components
Barabas5532 Feb 4, 2024
20f9153
remove freertos dependencies
Barabas5532 Feb 5, 2024
d4409f9
remove left over file
Barabas5532 Feb 5, 2024
e5e2323
Update plugin build
Barabas5532 Feb 5, 2024
33c7c8b
WIP integrate main thread with plugin
Barabas5532 Feb 5, 2024
e9193d5
WIP desktop implementation
Barabas5532 Feb 6, 2024
12e8351
firmware working again
Barabas5532 Feb 7, 2024
f32fa0d
template audio parameters implementation
Barabas5532 Feb 7, 2024
e0ecc83
WIP
Barabas5532 Feb 7, 2024
f3ffb65
WIP
Barabas5532 Feb 29, 2024
128945f
Merge remote-tracking branch 'origin/master' into desktop-port-refactor
Barabas5532 Jul 30, 2024
e22d268
fix build errors
Barabas5532 Jul 30, 2024
12c8e4f
Add hello world server
Barabas5532 Aug 1, 2024
8ea7842
Update URI
Barabas5532 Aug 1, 2024
f54c7ea
receive API messages over websockets
Barabas5532 Aug 1, 2024
00b95e7
Update debug printing
Barabas5532 Aug 1, 2024
99ba17c
connect server to main thread
Barabas5532 Aug 3, 2024
757b51f
hook up server
Barabas5532 Aug 3, 2024
bf99872
fix firmware build
Barabas5532 Aug 3, 2024
e209099
WIP
Barabas5532 Aug 8, 2024
ef54138
refactor event types
Barabas5532 Aug 8, 2024
ebbbcff
fix MIDI in firmware
Barabas5532 Aug 8, 2024
0b5133e
Integrate changes with plugin
Barabas5532 Aug 10, 2024
97a79e6
WIP abstracting out parameters
Barabas5532 Oct 6, 2024
93821e7
remove idea folders
Barabas5532 Oct 6, 2024
00659f2
start fixing tests
Barabas5532 Oct 7, 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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@
[submodule "thirdparty/esp-idf-components/embedded_cli/EmbeddedCLI"]
path = thirdparty/esp-idf-components/embedded_cli/EmbeddedCLI
url = https://github.com/AndreRenaud/EmbeddedCLI.git
[submodule "thirdparty/uWebSockets/uWebSockets"]
path = thirdparty/uWebSockets/uWebSockets
url = https://github.com/uNetworking/uWebSockets.git
5 changes: 5 additions & 0 deletions effects/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
add_subdirectory(abstract_dsp)
add_subdirectory(chorus)
add_subdirectory(gate)
add_subdirectory(valvestate)
add_subdirectory(wah)
8 changes: 0 additions & 8 deletions firmware/.idea/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion firmware/.idea/.name

This file was deleted.

15 changes: 0 additions & 15 deletions firmware/.idea/codeStyles/Project.xml

This file was deleted.

5 changes: 0 additions & 5 deletions firmware/.idea/codeStyles/codeStyleConfig.xml

This file was deleted.

7 changes: 0 additions & 7 deletions firmware/.idea/discord.xml

This file was deleted.

2 changes: 0 additions & 2 deletions firmware/.idea/firmware.iml

This file was deleted.

12 changes: 0 additions & 12 deletions firmware/.idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions firmware/.idea/modules.xml

This file was deleted.

12 changes: 0 additions & 12 deletions firmware/.idea/protoeditor.xml

This file was deleted.

8 changes: 0 additions & 8 deletions firmware/.idea/vcs.xml

This file was deleted.

83 changes: 30 additions & 53 deletions firmware/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,58 +1,35 @@
if(ESP_PLATFORM)
cmake_minimum_required(VERSION 3.13)
cmake_minimum_required(VERSION 3.13)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 20)

option(SHRAPNEL_RESET_WIFI_CREDENTIALS
"Remove the provisioned Wi-Fi credentials at power up"
OFF
)
option(SHRAPNEL_RESET_WIFI_CREDENTIALS
"Remove the provisioned Wi-Fi credentials at power up"
OFF
)

if(SHRAPNEL_RESET_WIFI_CREDENTIALS)
add_compile_definitions(SHRAPNEL_RESET_WIFI_CREDENTIALS=1)
endif()

list(APPEND EXTRA_COMPONENT_DIRS ../thirdparty/esp-idf-components/esp-dsp)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp32-dsp)

add_subdirectory(../effects/abstract_dsp abstract_dsp)
add_subdirectory(../effects/chorus chorus)
add_subdirectory(../effects/gate gate)
add_subdirectory(../effects/valvestate valvestate)
add_subdirectory(../effects/wah wah)
add_subdirectory(../thirdparty/esp-idf-components/cppcodec cppcodec)
add_subdirectory(../thirdparty/esp-idf-components/embedded_cli embedded_cli)
add_subdirectory(../thirdparty/esp-idf-components/esp32-fft esp32-fft)
add_subdirectory(../thirdparty/esp-idf-components/etl etl)
add_subdirectory(../thirdparty/esp-idf-components/nanopb nanopb)
add_subdirectory(components/api)
add_subdirectory(components/audio)
add_subdirectory(components/audio_events)
add_subdirectory(components/audio_param)
add_subdirectory(components/cmd_handling)
add_subdirectory(components/compiler_warning_flags)
add_subdirectory(components/esp_persistence)
add_subdirectory(components/float_convert)
add_subdirectory(components/hardware)
add_subdirectory(components/heap_tracing)
add_subdirectory(components/i2c)
add_subdirectory(components/i2s)
add_subdirectory(components/messages)
add_subdirectory(components/midi_handling)
add_subdirectory(components/midi_mapping)
add_subdirectory(components/midi_protocol)
add_subdirectory(components/os)
add_subdirectory(components/pcm3060)
add_subdirectory(components/persistence)
add_subdirectory(components/presets)
add_subdirectory(components/server)
add_subdirectory(components/shrapnel_console)
add_subdirectory(components/wifi)

return()
if(SHRAPNEL_RESET_WIFI_CREDENTIALS)
add_compile_definitions(SHRAPNEL_RESET_WIFI_CREDENTIALS=1)
endif()

add_subdirectory(main)
add_subdirectory(components)
list(APPEND EXTRA_COMPONENT_DIRS ../thirdparty/esp-idf-components/esp-dsp)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp32-dsp)

add_subdirectory(../effects effects)
add_subdirectory(../shrapnel shrapnel)
add_subdirectory(../thirdparty/esp-idf-components/cppcodec cppcodec)
add_subdirectory(../thirdparty/esp-idf-components/embedded_cli embedded_cli)
add_subdirectory(../thirdparty/esp-idf-components/esp32-fft esp32-fft)
add_subdirectory(../thirdparty/esp-idf-components/etl etl)
add_subdirectory(../thirdparty/esp-idf-components/nanopb nanopb)
add_subdirectory(components/esp_midi_uart)
add_subdirectory(components/esp_persistence)
add_subdirectory(components/hardware)
add_subdirectory(components/heap_tracing)
add_subdirectory(components/i2c)
add_subdirectory(components/i2s)
add_subdirectory(components/pcm3060)
add_subdirectory(components/server)
add_subdirectory(components/shrapnel_console)
add_subdirectory(components/wifi)
18 changes: 0 additions & 18 deletions firmware/components/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +0,0 @@
if(ESP_PLATFORM)
return()
endif()
add_subdirectory(api)
add_subdirectory(audio_events)
add_subdirectory(audio_param)
add_subdirectory(cmd_handling)
add_subdirectory(compiler_warning_flags)
add_subdirectory(float_convert)
add_subdirectory(hardware)
add_subdirectory(heap_tracing)
add_subdirectory(messages)
add_subdirectory(midi_handling)
add_subdirectory(midi_mapping)
add_subdirectory(midi_protocol)
add_subdirectory(os)
add_subdirectory(persistence)
add_subdirectory(presets)
121 changes: 0 additions & 121 deletions firmware/components/cmd_handling/include/cmd_handling.h

This file was deleted.

12 changes: 12 additions & 0 deletions firmware/components/esp_midi_uart/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
add_library(shrapnel_esp_midi_uart STATIC)
add_library(shrapnel::esp_midi_uart ALIAS shrapnel_esp_midi_uart)

target_sources(shrapnel_esp_midi_uart PRIVATE src/esp_midi_uart.cpp)

target_include_directories(shrapnel_esp_midi_uart PUBLIC include)

target_link_libraries(shrapnel_esp_midi_uart PUBLIC
shrapnel::midi_protocol
idf::freertos
idf::driver
)
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,13 @@
#pragma once

#include "freertos/FreeRTOS.h"
#include <cstdint>
#include "midi_uart.h"
#include <driver/gpio.h>
#include <driver/uart.h>
#include <memory>
#include <optional>

namespace shrapnel {
namespace midi {
namespace shrapnel::midi {

class MidiUartBase
{
public:
virtual std::optional<uint8_t> get_byte(TickType_t timeout) = 0;
};

class EspMidiUart final : public MidiUartBase
class EspMidiUart final : public MidiUartBase<TickType_t>
{
public:
EspMidiUart(uart_port_t uart, gpio_num_t rx_io);
Expand All @@ -46,5 +37,4 @@ class EspMidiUart final : public MidiUartBase
uart_port_t uart;
};

} // namespace midi
} // namespace shrapnel
} // namespace shrapnel::midi
Loading
Loading