From 0a836ceceaa7a0d7bc4b27e34b769a2691b9dea6 Mon Sep 17 00:00:00 2001 From: Christian Chapman <1360262+enthdegree@users.noreply.github.com> Date: Sun, 16 Apr 2023 10:01:03 -0400 Subject: Morsecalc refactor (#229) * Added Morse code based RPN calculator * added manual and memory register * fixed morsecalc negative indicator, edited header comment * adjusted stack display controls * Fixed warnings. Added calculator token aliasing ability. Added binary shorthand for numeral entry. Extended morse code binary tree. * ui tweaks * Update movement_config.h * silence warning * Reorganized codebase and simplified morse code reading routines. * added 'quit if submission is empty' behavior * reverted rules.mk change for merge into main * corrected timeout behavior * consolidated morsecode lib into one file; deleted old mc.c mc.h * consolidated morsecode lib into one file; deleted old mc.c mc.h * removed specious null in morsecode bintree string --------- Co-authored-by: Christian Chapman Co-authored-by: joeycastillo --- movement/lib/morsecalc/calc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'movement/lib/morsecalc/calc.c') diff --git a/movement/lib/morsecalc/calc.c b/movement/lib/morsecalc/calc.c index 49b19a00..ed7eb25b 100644 --- a/movement/lib/morsecalc/calc.c +++ b/movement/lib/morsecalc/calc.c @@ -24,6 +24,7 @@ #include #include +#include #include "calc.h" #include "calc_fns.h" @@ -41,12 +42,11 @@ int calc_init(calc_state_t *cs) { } /* calc_input_function - * Try to execut the token as a calculator function - * TODO: Maybe replace this loop with binary search for token in a sorted calc_dict + * Try to execute the token as a calculator function */ int calc_input_function(calc_state_t *cs, char *token) { for(uint8_t idx=0; idx