Skip to content

Commit

Permalink
Minor improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilsss655 committed Dec 18, 2023
1 parent 389cafd commit 94929be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion am_fix.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ void AM_fix_10ms(const int vfo)
{ // sample the current RSSI level
// average it with the previous rssi (a bit of noise/spike immunity)
const int16_t new_rssi = BK4819_GetRSSI();
rssi = new_rssi;
rssi = (prev_rssi[vfo] > 0) ? (prev_rssi[vfo] + new_rssi) / 2 : new_rssi;
prev_rssi[vfo] = new_rssi;
}

Expand Down
3 changes: 2 additions & 1 deletion app/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,15 @@
#include "ui/menu.h"
#include "ui/status.h"
#include "ui/ui.h"
#include "driver/systick.h"

static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld);
static void FlashlightTimeSlice();

static void UpdateRSSI(const int vfo)
{
while ((BK4819_ReadRegister(0x63) & 0b11111111) >= 255) {
SYSTEM_DelayMs(1);
SYSTICK_DelayUs(100);
}
int16_t rssi = BK4819_GetRSSI();

Expand Down

0 comments on commit 94929be

Please sign in to comment.