diff --git a/Makefile b/Makefile index 255563a..49270e5 100644 --- a/Makefile +++ b/Makefile @@ -211,6 +211,7 @@ endif # catch any and all warnings CFLAGS += -Wextra +#CFLAGS += -Wpedantic CFLAGS += -DPRINTF_INCLUDE_CONFIG_H CFLAGS += -DGIT_HASH=\"$(GIT_HASH)\" diff --git a/app/generic.c b/app/generic.c index 30f4f55..39937f3 100644 --- a/app/generic.c +++ b/app/generic.c @@ -212,12 +212,12 @@ void GENERIC_Key_PTT(bool bKeyPressed) if (gDTMF_InputBox_Index < sizeof(gDTMF_InputBox)) gDTMF_InputBox[gDTMF_InputBox_Index] = 0; // NULL term the string - // append our DTMF ID to the inputted DTMF code - - // IF the user inputted code is exactly 3 digits long and D-DCD is enabled - if (gDTMF_InputBox_Index == 3 && gTxVfo->DTMF_DECODING_ENABLE > 0) - gDTMF_CallMode = DTMF_CheckGroupCall(gDTMF_InputBox, 3); - else - gDTMF_CallMode = DTMF_CALL_MODE_DTMF; + // append our DTMF ID to the inputted DTMF code - + // IF the user inputted code is exactly 3 digits long and D-DCD is enabled + if (gDTMF_InputBox_Index == 3 && gTxVfo->DTMF_DECODING_ENABLE > 0) + gDTMF_CallMode = DTMF_CheckGroupCall(gDTMF_InputBox, 3); + else + gDTMF_CallMode = DTMF_CALL_MODE_DTMF; // remember the DTMF string gDTMF_PreviousIndex = gDTMF_InputBox_Index; diff --git a/app/spectrum.c b/app/spectrum.c index bfde154..fc08667 100644 --- a/app/spectrum.c +++ b/app/spectrum.c @@ -206,23 +206,23 @@ static void ToggleAFBit(bool on) { } static void BackupRegisters() { - R30 = BK4819_ReadRegister(0x30); - R37 = BK4819_ReadRegister(0x37); + R30 = BK4819_ReadRegister(BK4819_REG_30); + R37 = BK4819_ReadRegister(BK4819_REG_37); R3D = BK4819_ReadRegister(0x3D); - R43 = BK4819_ReadRegister(0x43); - R47 = BK4819_ReadRegister(0x47); - R48 = BK4819_ReadRegister(0x48); - R7E = BK4819_ReadRegister(0x7E); + R43 = BK4819_ReadRegister(BK4819_REG_43); + R47 = BK4819_ReadRegister(BK4819_REG_47); + R48 = BK4819_ReadRegister(BK4819_REG_48); + R7E = BK4819_ReadRegister(BK4819_REG_7E); } static void RestoreRegisters() { - BK4819_WriteRegister(0x30, R30); - BK4819_WriteRegister(0x37, R37); + BK4819_WriteRegister(BK4819_REG_30, R30); + BK4819_WriteRegister(BK4819_REG_37, R37); BK4819_WriteRegister(0x3D, R3D); - BK4819_WriteRegister(0x43, R43); - BK4819_WriteRegister(0x47, R47); - BK4819_WriteRegister(0x48, R48); - BK4819_WriteRegister(0x7E, R7E); + BK4819_WriteRegister(BK4819_REG_43, R43); + BK4819_WriteRegister(BK4819_REG_47, R47); + BK4819_WriteRegister(BK4819_REG_48, R48); + BK4819_WriteRegister(BK4819_REG_7E, R7E); } static void SetModulation(ModulationType type) { @@ -233,7 +233,7 @@ static void SetModulation(ModulationType type) { if (type == MOD_USB) { BK4819_WriteRegister(0x3D, 0b0010101101000101); BK4819_WriteRegister(BK4819_REG_37, 0x160F); - BK4819_WriteRegister(0x48, 0b0000001110101000); + BK4819_WriteRegister(BK4819_REG_48, 0b0000001110101000); } }