From 0e217602978a6090266c76e6a59e369d4ea80ff9 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sun, 24 Jul 2022 23:08:45 -0400 Subject: [PATCH] Update cubesatsim.h --- cubesatsim/cubesatsim.h | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/cubesatsim/cubesatsim.h b/cubesatsim/cubesatsim.h index 0152ae2d..d8a136e8 100644 --- a/cubesatsim/cubesatsim.h +++ b/cubesatsim/cubesatsim.h @@ -154,6 +154,7 @@ void client_print_string(char *string); bool check_for_wifi(); void check_for_browser(); void configure_wifi(); +void transmit_mili(int freq, float duration); #ifndef STASSID #define STASSID "Pico" @@ -299,6 +300,53 @@ bool TimerHandler0(struct repeating_timer *t); RPI_PICO_Timer ITimer0(0); RPI_PICO_Timer ITimer1(0); +int morse_table[36][5] = { // 0-9, A-Z only by (ASCII - 48) + { 1, 1, 1, 1, 1 }, // 0 + { 1, 3, 3, 3, 3 }, // 1 + { 1, 1, 3, 3, 3 }, // 2 + { 1, 1, 1, 3, 3 }, // 3 + { 1, 1, 1, 1, 3 }, // 4 + { 1, 1, 1, 1, 1 }, // 5 + { 3, 1, 1, 1, 1 }, // 6 + { 3, 3, 1, 1, 1 }, // 7 + { 3, 3, 3, 1, 1 }, // 8 + { 3, 3, 3, 3, 1 }, // 9 + { 0, 0, 0, 0, 0 }, // - + { 0, 0, 0, 0, 0 }, // - + { 0, 0, 0, 0, 0 }, // - + { 0, 0, 0, 0, 0 }, // - + { 0, 0, 0, 0, 0 }, // - + { 0, 0, 0, 0, 0 }, // - + { 0, 0, 0, 0, 0 }, // - + { 1, 3, 0, 0, 0 }, // A + { 3, 1, 1, 1, 0 }, // B + { 3, 1, 3, 1, 0 }, // C + { 3, 1, 1, 0, 0 }, // D + { 1, 0, 0, 0, 0 }, // E + { 1, 1, 3, 1, 0 }, // F + { 3, 3, 1, 0, 0 }, // G + { 1, 1, 1, 1, 0 }, // H + { 1, 1, 0, 0, 0 }, // I + { 1, 3, 3, 3, 0 }, // J + { 3, 1, 3, 0, 0 }, // K + { 1, 3, 1, 1, 0 }, // L + { 3, 3, 1, 0, 0 }, // M + { 3, 1, 0, 0, 0 }, // N + { 3, 3, 3, 0, 0 }, // O + { 1, 3, 3, 1, 0 }, // P + { 3, 3, 1, 3, 0 }, // Q + { 1, 3, 1, 0, 0 }, // R + { 1, 1, 1, 0, 0 }, // S + { 3, 0, 0, 0, 0 }, // T + { 1, 1, 3, 0, 0 }, // U + { 1, 1, 1, 3, 0 }, // V + { 1, 3, 3, 0, 0 }, // W + { 3, 1, 1, 3, 0 }, // X + { 3, 3, 1, 3, 0 }, // Y + { 3, 3, 1, 1, 0 } // Z +}; + + /* * TelemEncoding.h *