From b495e007ec7b085771bc9cac2d4fe4ea88408389 Mon Sep 17 00:00:00 2001 From: Paul Romkes Date: Sun, 1 Dec 2019 08:38:10 +0100 Subject: [PATCH] Small changes --- PlatformIO/deploy.sh | 1 + PlatformIO/src/MatrixVoiceAudioServer.cpp | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/PlatformIO/deploy.sh b/PlatformIO/deploy.sh index caa6c55..0cce5f7 100644 --- a/PlatformIO/deploy.sh +++ b/PlatformIO/deploy.sh @@ -21,6 +21,7 @@ else echo "" cp .pio/build/esp32dev/firmware.bin . cp .pio/build/esp32dev/partitions.bin . + cp ../OTABuilder/build/bootloader/bootloader.bin . echo "Loading firmware: $FIRMWARE" echo "" tar cf - *.bin | ssh pi@$1 'tar xf - -C /tmp;sudo voice_esp32_reset;voice_esptool --chip esp32 --port /dev/ttyS0 --baud 1500000 --before default_reset --after hard_reset write_flash -u --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 /tmp/bootloader.bin 0x10000 /tmp/firmware.bin 0x8000 /tmp/partitions.bin' diff --git a/PlatformIO/src/MatrixVoiceAudioServer.cpp b/PlatformIO/src/MatrixVoiceAudioServer.cpp index 770fcbb..2039dee 100644 --- a/PlatformIO/src/MatrixVoiceAudioServer.cpp +++ b/PlatformIO/src/MatrixVoiceAudioServer.cpp @@ -87,8 +87,6 @@ extern "C" { #include "speex_resampler.h" } -// User configuration in platformio.ini - /* ************************************************************************* * DEFINES AND GLOBALS * ************************************************************************ */ @@ -591,7 +589,7 @@ void Audiostream(void *p) { uint8_t voicemapped[CHUNK * WIDTH]; uint8_t payload[sizeof(header) + (CHUNK * WIDTH)]; - // Message count is the Mattix NumberOfSamples divided by the + // Message count is the Matrix NumberOfSamples divided by the // framerate of Snips. This defaults to 512 / 256 = 2. If you // lower the framerate, the AudioServer has to send more // wavefile because the NumOfSamples is a fixed number @@ -918,6 +916,9 @@ void AudioPlayTask(void *p) { SETUP * ************************************************************************ */ void setup() { + Serial.begin(115200); + Serial.println("Booting"); + // Implementation of Semaphore, otherwise the ESP will crash due to read of // the mics if (wbSemaphore == NULL) // Not yet been created? @@ -986,8 +987,6 @@ void setup() { xTaskCreatePinnedToCore(everloopTask, "everloopTask", 4096, NULL, 5, &everloopTaskHandle, 1); xEventGroupSetBits(everloopGroup, EVERLOOP); - Serial.begin(115200); - Serial.println("Booting"); WiFi.mode(WIFI_STA); WiFi.begin(WIFI_SSID, WIFI_PASS); while (WiFi.waitForConnectResult() != WL_CONNECTED) {