mirror of
https://github.com/DualTachyon/uv-k5-firmware.git
synced 2024-11-27 08:59:52 +08:00
Fixed potential sign issues.
This commit is contained in:
parent
8e854d4c4b
commit
e9bf76c3cf
@ -1435,7 +1435,7 @@ void FUN_000075b0(void)
|
||||
g_20000464 = 0;
|
||||
}
|
||||
|
||||
void APP_ChangeStepDirectionMaybe(bool bFlag, uint8_t Direction)
|
||||
void APP_ChangeStepDirectionMaybe(bool bFlag, int8_t Direction)
|
||||
{
|
||||
RADIO_ConfigureTX();
|
||||
g_20000410 = gInfoCHAN_A->CHANNEL_SAVE;
|
||||
|
@ -10,7 +10,7 @@
|
||||
extern void APP_SwitchToFM(void);
|
||||
extern void FUN_0000773c(void);
|
||||
extern void APP_SetFrequencyByStep(VFO_Info_t *pInfo, int8_t Step);
|
||||
extern void APP_ChangeStepDirectionMaybe(bool bFlag, uint8_t Direction);
|
||||
extern void APP_ChangeStepDirectionMaybe(bool bFlag, int8_t Direction);
|
||||
extern void APP_CycleOutputPower(void);
|
||||
extern void APP_FlipVoxSwitch(void);
|
||||
|
||||
|
@ -72,7 +72,7 @@ static const VOICE_ID_t MenuVoices[] = {
|
||||
VOICE_ID_INVALID,
|
||||
};
|
||||
|
||||
static void FUN_000074f8(uint8_t Direction)
|
||||
static void FUN_000074f8(int8_t Direction)
|
||||
{
|
||||
g_20000381 = 1;
|
||||
gMenuScrollDirection = Direction;
|
||||
@ -988,7 +988,7 @@ void MENU_Key_STAR(bool bKeyPressed, bool bKeyHeld)
|
||||
if (gInfoCHAN_A->CHANNEL_SAVE < 207 && !gInfoCHAN_A->IsAM) {
|
||||
if (gMenuCursor == MENU_R_CTCS || gMenuCursor == MENU_R_DCS) {
|
||||
if (g_20000381 == 0) {
|
||||
FUN_000074f8(0x01);
|
||||
FUN_000074f8(1);
|
||||
gRequestDisplayScreen = DISPLAY_MENU;
|
||||
AUDIO_SetVoiceID(0,VOICE_ID_SCANNING_BEGIN);
|
||||
AUDIO_PlaySingleVoice(1);
|
||||
|
@ -113,12 +113,12 @@ uint32_t FREQUENCY_CalculateOutputPower(uint8_t TxpLow, uint8_t TxpMid, uint8_t
|
||||
return TxpMid + ((TxpHigh - TxpMid) * (Frequency - Middle)) / (UpperLimit - Middle);
|
||||
}
|
||||
|
||||
uint32_t FREQUENCY_FloorToStep(uint32_t Frequency, uint32_t Step, uint32_t Base)
|
||||
uint32_t FREQUENCY_FloorToStep(uint32_t Upper, int32_t Step, uint32_t Lower)
|
||||
{
|
||||
uint32_t Index;
|
||||
|
||||
Index = (Frequency - Base) / Step;
|
||||
return Base + (Step * Index);
|
||||
Index = (Upper - Lower) / Step;
|
||||
return Lower + (Step * Index);
|
||||
}
|
||||
|
||||
int FREQUENCY_Check(VFO_Info_t *pInfo)
|
||||
|
@ -40,7 +40,7 @@ extern const uint16_t StepFrequencyTable[6];
|
||||
|
||||
FREQUENCY_Band_t FREQUENCY_GetBand(uint32_t Frequency);
|
||||
uint32_t FREQUENCY_CalculateOutputPower(uint8_t TxpLow, uint8_t TxpMid, uint8_t TxpHigh, uint32_t LowerLimit, uint32_t Middle, uint32_t UpperLimit, uint32_t Frequency);
|
||||
uint32_t FREQUENCY_FloorToStep(uint32_t Frequency, uint32_t Step, uint32_t Base);
|
||||
uint32_t FREQUENCY_FloorToStep(uint32_t Upper, int32_t Step, uint32_t Lower);
|
||||
int FREQUENCY_Check(VFO_Info_t *pInfo);
|
||||
|
||||
#endif
|
||||
|
4
gui.c
4
gui.c
@ -170,7 +170,7 @@ static const char gSubMenu_F_LOCK[6][4] = {
|
||||
|
||||
GUI_DisplayType_t gScreenToDisplay;
|
||||
bool gIsInSubMenu;
|
||||
volatile uint8_t gStepDirection;
|
||||
volatile int8_t gStepDirection;
|
||||
GUI_DisplayType_t gRequestDisplayScreen;
|
||||
uint8_t g_200003BA;
|
||||
uint8_t g_200003BB;
|
||||
@ -181,7 +181,7 @@ bool gAskToSave;
|
||||
bool gAskToDelete;
|
||||
|
||||
uint8_t gMenuCursor;
|
||||
uint8_t gMenuScrollDirection;
|
||||
int8_t gMenuScrollDirection;
|
||||
uint32_t gSubMenuSelection;
|
||||
|
||||
void GUI_DisplayBatteryLevel(uint8_t BatteryLevel)
|
||||
|
4
gui.h
4
gui.h
@ -93,7 +93,7 @@ enum {
|
||||
|
||||
extern GUI_DisplayType_t gScreenToDisplay;
|
||||
extern bool gIsInSubMenu;
|
||||
extern volatile uint8_t gStepDirection;
|
||||
extern volatile int8_t gStepDirection;
|
||||
extern GUI_DisplayType_t gRequestDisplayScreen;
|
||||
extern uint8_t g_200003BA;
|
||||
extern uint8_t g_200003BB;
|
||||
@ -104,7 +104,7 @@ extern bool gAskToSave;
|
||||
extern bool gAskToDelete;
|
||||
|
||||
extern uint8_t gMenuCursor;
|
||||
extern uint8_t gMenuScrollDirection;
|
||||
extern int8_t gMenuScrollDirection;
|
||||
extern uint32_t gSubMenuSelection;
|
||||
|
||||
void GUI_DisplayBatteryLevel(uint8_t BatteryLevel);
|
||||
|
2
radio.c
2
radio.c
@ -81,7 +81,7 @@ bool RADIO_CheckValidChannel(uint8_t Channel, bool bCheckScanList, uint8_t VFO)
|
||||
return true;
|
||||
}
|
||||
|
||||
uint8_t RADIO_FindNextChannel(uint8_t Channel, uint8_t Direction, bool bCheckScanList, uint8_t VFO)
|
||||
uint8_t RADIO_FindNextChannel(uint8_t Channel, int8_t Direction, bool bCheckScanList, uint8_t VFO)
|
||||
{
|
||||
uint8_t i;
|
||||
|
||||
|
2
radio.h
2
radio.h
@ -93,7 +93,7 @@ extern DCS_CodeType_t gCopyOfCodeType;
|
||||
extern uint8_t gCode;
|
||||
|
||||
bool RADIO_CheckValidChannel(uint8_t ChNum, bool bCheckScanList, uint8_t RadioNum);
|
||||
uint8_t RADIO_FindNextChannel(uint8_t ChNum, uint8_t Direction, bool bCheckScanList, uint8_t RadioNum);
|
||||
uint8_t RADIO_FindNextChannel(uint8_t ChNum, int8_t Direction, bool bCheckScanList, uint8_t RadioNum);
|
||||
void RADIO_InitInfo(VFO_Info_t *pInfo, uint8_t ChannelSave, uint8_t ChIndex, uint32_t Frequency);
|
||||
void RADIO_ConfigureChannel(uint8_t RadioNum, uint32_t Arg);
|
||||
void RADIO_ConfigureSquelchAndOutputPower(VFO_Info_t *pInfo);
|
||||
|
Loading…
Reference in New Issue
Block a user