Skip to content

Commit

Permalink
feat: broadcast SW AM step 5kHz; fix: reverse back filter switch freq
Browse files Browse the repository at this point in the history
  • Loading branch information
fagci committed Oct 8, 2023
1 parent a6fa821 commit a913e55
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion app/spectrum.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,7 @@ static void Blacklist() {
ResetPeak();
ToggleRX(false);
newScanStart = true;
redrawScreen = true;
}

// Draw things
Expand Down Expand Up @@ -1182,7 +1183,7 @@ bool HandleUserInput() {
SYSTEM_DelayMs(10);
}

if (kbd.counter == 4 || kbd.counter > 20) {
if (kbd.counter == 5 || kbd.counter > 20) {
switch (currentState) {
case SPECTRUM:
OnKeyDown(kbd.current);
Expand Down
8 changes: 4 additions & 4 deletions app/spectrum.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ typedef struct FreqPreset {
} FreqPreset;

static const FreqPreset freqPresets[] = {
{"16m Broadcast", 1748000, 1790000, STEPS_128, S_STEP_1_0kHz, MOD_AM, BK4819_FILTER_BW_NARROW },
{"16m Broadcast", 1748000, 1790000, STEPS_128, S_STEP_5_0kHz, MOD_AM, BK4819_FILTER_BW_NARROW },
{"17m Ham Band", 1806800, 1816800, STEPS_128, S_STEP_1_0kHz, MOD_USB, BK4819_FILTER_BW_NARROWER },
{"15m Broadcast", 1890000, 1902000, STEPS_128, S_STEP_1_0kHz, MOD_AM, BK4819_FILTER_BW_NARROW },
{"15m Broadcast", 1890000, 1902000, STEPS_128, S_STEP_5_0kHz, MOD_AM, BK4819_FILTER_BW_NARROW },
{"15m Ham Band", 2100000, 2145000, STEPS_128, S_STEP_1_0kHz, MOD_USB, BK4819_FILTER_BW_NARROWER },
{"13m Broadcast", 2145000, 2185000, STEPS_128, S_STEP_1_0kHz, MOD_AM, BK4819_FILTER_BW_NARROW },
{"13m Broadcast", 2145000, 2185000, STEPS_128, S_STEP_5_0kHz, MOD_AM, BK4819_FILTER_BW_NARROW },
{"12m Ham Band", 2489000, 2499000, STEPS_128, S_STEP_1_0kHz, MOD_USB, BK4819_FILTER_BW_NARROWER },
{"11m Broadcast", 2567000, 2610000, STEPS_128, S_STEP_1_0kHz, MOD_AM, BK4819_FILTER_BW_NARROW },
{"11m Broadcast", 2567000, 2610000, STEPS_128, S_STEP_5_0kHz, MOD_AM, BK4819_FILTER_BW_NARROW },
{"CB", 2697500, 2800000, STEPS_128, S_STEP_5_0kHz, MOD_FM, BK4819_FILTER_BW_NARROW},
{"10m Ham Band", 2800000, 2970000, STEPS_128, S_STEP_1_0kHz, MOD_USB, BK4819_FILTER_BW_NARROWER },
{"6m Ham Band", 5000000, 5400000, STEPS_128, S_STEP_1_0kHz, MOD_USB, BK4819_FILTER_BW_NARROWER },
Expand Down
4 changes: 2 additions & 2 deletions driver/bk4819.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ void BK4819_SetupPowerAmplifier(uint16_t Bias, uint32_t Frequency)
if (Bias > 255) {
Bias = 255;
}
if (Frequency < 32000000) {
if (Frequency < 28000000) {
// Gain 1 = 1
// Gain 2 = 0
Gain = 0x08U;
Expand Down Expand Up @@ -383,7 +383,7 @@ void BK4819_RX_TurnOn(void)

void BK4819_PickRXFilterPathBasedOnFrequency(uint32_t Frequency)
{
if (Frequency < 32000000) {
if (Frequency < 28000000) {
BK4819_ToggleGpioOut(BK4819_GPIO2_PIN30, true);
BK4819_ToggleGpioOut(BK4819_GPIO3_PIN31, false);
} else if (Frequency == 0xFFFFFFFF) {
Expand Down

0 comments on commit a913e55

Please sign in to comment.