From f26fe96ef3579ad5fa3378baf74e4b09b89a6315 Mon Sep 17 00:00:00 2001 From: Brian Whitman Date: Sun, 9 Jun 2024 08:38:30 -0400 Subject: [PATCH] working juno6 (at least 6 poly) on alles --- alles.py | 11 +++++------ main/alles_desktop.c | 4 ++-- main/alles_esp32.c | 8 ++++---- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/alles.py b/alles.py index 59d02c8..88601cd 100644 --- a/alles.py +++ b/alles.py @@ -28,20 +28,19 @@ def flush(retries=1): transmit(send_buffer) send_buffer = "" -def send(retries=1, **kwargs): +def alles_send(message, retries=1): global send_buffer - m = message(**kwargs) if(buffer_size > 0): - if(len(send_buffer + m) > buffer_size): + if(len(send_buffer + message) > buffer_size): transmit(send_buffer, retries=retries) - send_buffer = m + send_buffer = message else: send_buffer = send_buffer + m else: - transmit(m,retries=retries) + transmit(message,retries=retries) # We override AMY's send function to send out to the mesh instead of locally -amy.override_send = send +amy.override_send = alles_send diff --git a/main/alles_desktop.c b/main/alles_desktop.c index 1e5ee3b..7cba580 100644 --- a/main/alles_desktop.c +++ b/main/alles_desktop.c @@ -10,7 +10,7 @@ uint8_t status = RUNNING; uint8_t debug_on = 0; // AMY synth states -extern struct state global; +extern struct state amy_global; extern uint32_t event_counter; extern uint32_t message_counter; extern int16_t amy_device_id; @@ -29,7 +29,7 @@ int main(int argc, char ** argv) { sync_init(); amy_start(); amy_reset_oscs(); - global.latency_ms = ALLES_LATENCY_MS; + amy_global.latency_ms = ALLES_LATENCY_MS; // For now, indicate ip address via commandline local_ip = (char*)malloc(sizeof(char)*1025); diff --git a/main/alles_esp32.c b/main/alles_esp32.c index cfc773e..46dd287 100644 --- a/main/alles_esp32.c +++ b/main/alles_esp32.c @@ -99,7 +99,7 @@ TaskHandle_t idle_1_handle; #define ALLES_RENDER_TASK_NAME "alles_r_task" #define ALLES_FILL_BUFFER_TASK_NAME "alles_fb_task" #define ALLES_TASK_STACK_SIZE (4 * 1024) -#define ALLES_PARSE_TASK_STACK_SIZE (4 * 1024) +#define ALLES_PARSE_TASK_STACK_SIZE (8 * 1024) #define ALLES_RECEIVE_TASK_STACK_SIZE (4 * 1024) #define ALLES_RENDER_TASK_STACK_SIZE (8 * 1024) #define ALLES_FILL_BUFFER_TASK_STACK_SIZE (8 * 1024) @@ -473,15 +473,15 @@ void app_main() { create_multicast_ipv4_socket(); // Create the task that waits for UDP messages, parses them and puts them on the sequencer queue (core 1) - xTaskCreatePinnedToCore(&esp_parse_task, "parse_task", 4096, NULL, (ESP_TASK_PRIO_MIN +2), &parseTask, 0); + xTaskCreatePinnedToCore(&esp_parse_task, ALLES_PARSE_TASK_NAME, ALLES_PARSE_TASK_STACK_SIZE, NULL, ALLES_PARSE_TASK_PRIORITY, &parseTask, ALLES_PARSE_TASK_COREID); // Create the task that listens fro new incoming UDP messages (core 2) - xTaskCreatePinnedToCore(&mcast_listen_task, "mcast_task", 4096, NULL, (ESP_TASK_PRIO_MIN + 3), &mcastTask, 1); + xTaskCreatePinnedToCore(&mcast_listen_task, ALLES_RECEIVE_TASK_NAME, ALLES_RECEIVE_TASK_STACK_SIZE, NULL, ALLES_RECEIVE_TASK_PRIORITY, &mcastTask, ALLES_RECEIVE_TASK_COREID); // Schedule a "turning on" sound bleep(); // Print free RAm - //heap_caps_print_heap_info(MALLOC_CAP_INTERNAL); + heap_caps_print_heap_info(MALLOC_CAP_INTERNAL); // Spin this core until the power off button is pressed, parsing events and making sounds while(status & RUNNING) {