mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-19 14:48:03 +03:00
Removed floating point stuff
This commit is contained in:
@ -136,7 +136,7 @@ static void AIRCOPY_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
|
||||
for (i = 0; i < 7; i++)
|
||||
{
|
||||
if (Frequency >= gLowerLimitFrequencyBandTable[i] && Frequency <= gUpperLimitFrequencyBandTable[i])
|
||||
if (Frequency >= LowerLimitFrequencyBandTable[i] && Frequency <= UpperLimitFrequencyBandTable[i])
|
||||
{
|
||||
#ifndef DISABLE_VOICE
|
||||
gAnotherVoiceID = (VOICE_ID_t)Key;
|
||||
|
@ -440,11 +440,11 @@ void APP_SetFrequencyByStep(VFO_Info_t *pInfo, int8_t Step)
|
||||
{
|
||||
uint32_t Frequency = pInfo->ConfigRX.Frequency + (Step * pInfo->StepFrequency);
|
||||
|
||||
if (Frequency < gLowerLimitFrequencyBandTable[pInfo->Band])
|
||||
Frequency = FREQUENCY_FloorToStep(gUpperLimitFrequencyBandTable[pInfo->Band], pInfo->StepFrequency, gLowerLimitFrequencyBandTable[pInfo->Band]);
|
||||
if (Frequency < LowerLimitFrequencyBandTable[pInfo->Band])
|
||||
Frequency = FREQUENCY_FloorToStep(UpperLimitFrequencyBandTable[pInfo->Band], pInfo->StepFrequency, LowerLimitFrequencyBandTable[pInfo->Band]);
|
||||
else
|
||||
if (Frequency > gUpperLimitFrequencyBandTable[pInfo->Band])
|
||||
Frequency = gLowerLimitFrequencyBandTable[pInfo->Band];
|
||||
if (Frequency > UpperLimitFrequencyBandTable[pInfo->Band])
|
||||
Frequency = LowerLimitFrequencyBandTable[pInfo->Band];
|
||||
|
||||
pInfo->ConfigRX.Frequency = Frequency;
|
||||
}
|
||||
|
@ -14,6 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "app/app.h"
|
||||
#include "app/fm.h"
|
||||
#include "app/generic.h"
|
||||
@ -174,7 +176,7 @@ void GENERIC_Key_PTT(bool bKeyPressed)
|
||||
else
|
||||
gDTMF_CallMode = DTMF_CALL_MODE_DTMF;
|
||||
|
||||
sprintf(gDTMF_String, "%s", gDTMF_InputBox);
|
||||
strcpy(gDTMF_String, gDTMF_InputBox);
|
||||
|
||||
gDTMF_PreviousIndex = gDTMF_InputIndex;
|
||||
gDTMF_ReplyState = DTMF_REPLY_ANI;
|
||||
|
@ -104,7 +104,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
unsigned int i;
|
||||
for (i = 0; i < 7; i++)
|
||||
{
|
||||
if (Frequency >= gLowerLimitFrequencyBandTable[i] && Frequency <= gUpperLimitFrequencyBandTable[i])
|
||||
if (Frequency >= LowerLimitFrequencyBandTable[i] && Frequency <= UpperLimitFrequencyBandTable[i])
|
||||
{
|
||||
#ifndef DISABLE_VOICE
|
||||
gAnotherVoiceID = (VOICE_ID_t)Key;
|
||||
@ -123,7 +123,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
|
||||
Frequency += 75;
|
||||
|
||||
gTxVfo->ConfigRX.Frequency = FREQUENCY_FloorToStep(Frequency, gTxVfo->StepFrequency, gLowerLimitFrequencyBandTable[gTxVfo->Band]);
|
||||
gTxVfo->ConfigRX.Frequency = FREQUENCY_FloorToStep(Frequency, gTxVfo->StepFrequency, LowerLimitFrequencyBandTable[gTxVfo->Band]);
|
||||
|
||||
gRequestSaveChannel = 1;
|
||||
return;
|
||||
|
Reference in New Issue
Block a user