Skip to content

Commit

Permalink
Various renames/cleanups.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dual Tachyon authored and Dual Tachyon committed Sep 3, 2023
1 parent c353774 commit 6bef8d4
Show file tree
Hide file tree
Showing 24 changed files with 353 additions and 338 deletions.
22 changes: 11 additions & 11 deletions app/action.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ static void ACTION_FlashLight(void)

void ACTION_Power(void)
{
if (++gTxInfo->OUTPUT_POWER > OUTPUT_POWER_HIGH) {
gTxInfo->OUTPUT_POWER = OUTPUT_POWER_LOW;
if (++gTxVfo->OUTPUT_POWER > OUTPUT_POWER_HIGH) {
gTxVfo->OUTPUT_POWER = OUTPUT_POWER_LOW;
}

gRequestSaveChannel = 1;
Expand All @@ -60,9 +60,9 @@ void ACTION_Power(void)
static void ACTION_Monitor(void)
{
if (gCurrentFunction != FUNCTION_MONITOR) {
RADIO_ConfigureTX();
if (gRxInfo->CHANNEL_SAVE >= NOAA_CHANNEL_FIRST && gIsNoaaMode) {
gNoaaChannel = gRxInfo->CHANNEL_SAVE - NOAA_CHANNEL_FIRST;
RADIO_SelectVfos();
if (gRxVfo->CHANNEL_SAVE >= NOAA_CHANNEL_FIRST && gIsNoaaMode) {
gNoaaChannel = gRxVfo->CHANNEL_SAVE - NOAA_CHANNEL_FIRST;
}
RADIO_SetupRegisters(true);
APP_StartListening(FUNCTION_MONITOR);
Expand Down Expand Up @@ -114,8 +114,8 @@ void ACTION_Scan(bool bFlag)
return;
}
} else if (gScreenToDisplay != DISPLAY_SCANNER) {
RADIO_ConfigureTX();
if (IS_NOT_NOAA_CHANNEL(gRxInfo->CHANNEL_SAVE)) {
RADIO_SelectVfos();
if (IS_NOT_NOAA_CHANNEL(gRxVfo->CHANNEL_SAVE)) {
GUI_SelectNextDisplay(DISPLAY_MAIN);
if (gStepDirection) {
FUN_0000773c();
Expand All @@ -133,7 +133,7 @@ void ACTION_Vox(void)
{
gEeprom.VOX_SWITCH = !gEeprom.VOX_SWITCH;
gRequestSaveSettings = true;
g_20000398 = 1;
g_20000398 = true;
gAnotherVoiceID = VOICE_ID_VOX;
gUpdateStatus = true;
}
Expand All @@ -157,12 +157,12 @@ void ACTION_FM(void)
if (gFmRadioMode) {
FM_TurnOff();
gInputBoxIndex = 0;
g_200003B6 = 0x50;
g_20000398 = 1;
g_200003B6 = 80;
g_20000398 = true;
gRequestDisplayScreen = DISPLAY_MAIN;
return;
}
RADIO_ConfigureTX();
RADIO_SelectVfos();
RADIO_SetupRegisters(true);
FM_Start();
gInputBoxIndex = 0;
Expand Down
14 changes: 7 additions & 7 deletions app/aircopy.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void AIRCOPY_SendMessage(void)
if (++gAirCopyBlockNumber >= 0x78) {
gAircopyState = AIRCOPY_COMPLETE;
}
RADIO_PrepareTransmit();
RADIO_SetTxParameters();
BK4819_SendFSKData(g_FSK_Buffer);
BK4819_SetupPowerAmplifier(0, 0);
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1, false);
Expand Down Expand Up @@ -117,13 +117,13 @@ 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]) {
gAnotherVoiceID = (VOICE_ID_t)Key;
gRxInfo->Band = i;
gRxVfo->Band = i;
Frequency += 75;
Frequency = FREQUENCY_FloorToStep(Frequency, gRxInfo->StepFrequency, 0);
gRxInfo->ConfigRX.Frequency = Frequency;
gRxInfo->ConfigTX.Frequency = Frequency;
RADIO_ConfigureSquelchAndOutputPower(gRxInfo);
gCrossTxRadioInfo = gRxInfo;
Frequency = FREQUENCY_FloorToStep(Frequency, gRxVfo->StepFrequency, 0);
gRxVfo->ConfigRX.Frequency = Frequency;
gRxVfo->ConfigTX.Frequency = Frequency;
RADIO_ConfigureSquelchAndOutputPower(gRxVfo);
gCurrentVfo = gRxVfo;
RADIO_SetupRegisters(true);
BK4819_SetupAircopy();
BK4819_ResetFSK();
Expand Down
Loading

0 comments on commit 6bef8d4

Please sign in to comment.