0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 06:39:49 +03:00

Live DTMF decoder update

This commit is contained in:
OneOfEleven
2023-09-16 23:08:57 +01:00
parent 3c1a70a11f
commit 079236f4aa
11 changed files with 64 additions and 17 deletions

View File

@ -402,11 +402,11 @@ void UI_DisplayMain(void)
}
#ifdef ENABLE_DTMF_DECODER
if (gCurrentFunction == FUNCTION_RECEIVE && gDTMF_WriteIndex > 0)
if (gDTMF_WriteIndexSaved > 0)
{ // show the incoming DTMF live on-screen
const unsigned int len = (gDTMF_WriteIndex < (ARRAY_SIZE(String) - 1)) ? gDTMF_WriteIndex : ARRAY_SIZE(String) - 1;
const unsigned int len = (gDTMF_WriteIndexSaved < ARRAY_SIZE(String)) ? gDTMF_WriteIndexSaved : ARRAY_SIZE(String) - 1;
memset(String, 0, sizeof(String));
memcpy(String, gDTMF_Received, len);
memcpy(String, gDTMF_ReceivedSaved, len);
UI_PrintStringSmall("D:", 2, 0, 3);
UI_PrintStringSmall(String, 2 + (7 * 2), 0, 3);
}