-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add integration test * Change provisioning stop timeout to 5 seconds The frontend polls with a 1 second period, and the deafult 1 second timeout would sometimes cause the provisioning to stop before the frontend receives a response. * Add test for midi mapping, fix bugs in proto conversion * Test all midi mapping types * Add console component * Integrate UART logging with test * Skip firmware flashing if already done * Add wifi config console command to firmware * Update API test setup
- Loading branch information
1 parent
d0204b5
commit 3b568bb
Showing
36 changed files
with
1,350 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
add_library(shrapnel_console STATIC) | ||
add_library(shrapnel::console ALIAS shrapnel_console) | ||
|
||
target_sources(shrapnel_console | ||
PRIVATE | ||
src/shrapnel_console.cpp) | ||
|
||
target_include_directories(shrapnel_console | ||
PUBLIC | ||
include) | ||
|
||
target_link_libraries(shrapnel_console | ||
PUBLIC | ||
idf::esp_common | ||
idf::log | ||
shrapnel::embedded_cli | ||
shrapnel::etl | ||
shrapnel::midi_mapping | ||
PRIVATE | ||
idf::console | ||
cppcodec | ||
shrapnel::compiler_warning_flags) |
55 changes: 55 additions & 0 deletions
55
firmware/components/shrapnel_console/include/shrapnel_console.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright 2022 Barabas Raffai | ||
* | ||
* This file is part of ShrapnelDSP. | ||
* | ||
* ShrapnelDSP is free software: you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License as published by the Free | ||
* Software Foundation, either version 3 of the License, or (at your option) | ||
* any later version. | ||
* | ||
* ShrapnelDSP is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* ShrapnelDSP. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
||
extern "C" { | ||
#include "embedded_cli.h" | ||
} | ||
|
||
#include "midi_protocol.h" | ||
#include <cstddef> | ||
#include <etl/delegate.h> | ||
|
||
namespace shrapnel { | ||
|
||
using MidiMessageSendCallback = etl::delegate<void(const midi::Message &)>; | ||
using WifiSetupCallback = | ||
etl::delegate<void(const char *ssid, const char *password)>; | ||
|
||
class Console | ||
{ | ||
public: | ||
Console(MidiMessageSendCallback a_midi_message_callback, | ||
WifiSetupCallback a_wifi_setup_callback); | ||
|
||
void handle_character(char c); | ||
|
||
private: | ||
friend int handle_midi(int argc, char *argv[]); | ||
friend int handle_wifi(int argc, char *argv[]); | ||
|
||
static void putch(void *, char c, bool); | ||
|
||
MidiMessageSendCallback midi_message_callback; | ||
WifiSetupCallback wifi_setup_callback; | ||
|
||
struct embedded_cli cli; | ||
}; | ||
} // namespace shrapnel |
Oops, something went wrong.