mirror of
https://github.com/armel/uv-k1-k5v3-firmware-custom.git
synced 2026-10-02 03:15:37 +00:00
Update Spectrum Analyzer RenderStill values
This commit is contained in:
1 parent
5899766b75
commit
7761729a41
2 files changed
+32
-2
No files matched your search
+29
-2
@@ -103,11 +103,18 @@ RegisterSpec registerSpecs[] = {
|
||||
{},
|
||||
{"LNAs", BK4819_REG_13, 8, 0b11, 1},
|
||||
{"LNA", BK4819_REG_13, 5, 0b111, 1},
|
||||
{"PGA", BK4819_REG_13, 0, 0b111, 1},
|
||||
{"IF", BK4819_REG_3D, 0, 0xFFFF, 0x2aaa},
|
||||
{"VGA", BK4819_REG_13, 0, 0b111, 1},
|
||||
{"BPF", BK4819_REG_3D, 0, 0xFFFF, 0x2aaa},
|
||||
// {"MIX", 0x13, 3, 0b11, 1}, // TODO: hidden
|
||||
};
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_SPECTRUM
|
||||
const int8_t LNAsOptions[] = {-19, -16, -11, 0};
|
||||
const int8_t LNAOptions[] = {-24, -19, -14, -9, -6, -4, -2, 0};
|
||||
const int8_t VGAOptions[] = {-33, -27, -21, -15, -9, -6, -3, 0};
|
||||
const char *BPFOptions[] = {"8.46", "7.25", "6.35", "5.64", "5.08", "4.62", "4.23"};
|
||||
#endif
|
||||
|
||||
uint16_t statuslineUpdateTimer = 0;
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_SPECTRUM
|
||||
@@ -1387,7 +1394,27 @@ static void RenderStill()
|
||||
sprintf(String, "%s", registerSpecs[idx].name);
|
||||
GUI_DisplaySmallest(String, offset + 2, row * 8 + 2, false,
|
||||
menuState != idx);
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN_SPECTRUM
|
||||
if(idx == 1)
|
||||
{
|
||||
sprintf(String, "%ddB", LNAsOptions[GetRegMenuValue(idx)]);
|
||||
}
|
||||
else if(idx == 2)
|
||||
{
|
||||
sprintf(String, "%ddB", LNAOptions[GetRegMenuValue(idx)]);
|
||||
}
|
||||
else if(idx == 3)
|
||||
{
|
||||
sprintf(String, "%ddB", VGAOptions[GetRegMenuValue(idx)]);
|
||||
}
|
||||
else if(idx == 4)
|
||||
{
|
||||
sprintf(String, "%skHz", BPFOptions[(GetRegMenuValue(idx) / 0x2aaa)]);
|
||||
}
|
||||
#else
|
||||
sprintf(String, "%u", GetRegMenuValue(idx));
|
||||
#endif
|
||||
GUI_DisplaySmallest(String, offset + 2, (row + 1) * 8 + 1, false,
|
||||
menuState != idx);
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ bandscope() {
|
||||
docker run --rm -v "${PWD}/compiled-firmware/:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "rm ./compiled-firmware/*; cd /app && make -s \
|
||||
ENABLE_SPECTRUM=1 \
|
||||
ENABLE_FMRADIO=0 \
|
||||
ENABLE_VOX=0 \
|
||||
ENABLE_AIRCOPY=1 \
|
||||
ENABLE_FEAT_F4HWN_PMR=1 \
|
||||
ENABLE_FEAT_F4HWN_GMRS_FRS_MURS=1 \
|
||||
@@ -50,6 +51,7 @@ broadcast() {
|
||||
docker run --rm -v "${PWD}/compiled-firmware:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "cd /app && make -s \
|
||||
ENABLE_SPECTRUM=0 \
|
||||
ENABLE_FMRADIO=1 \
|
||||
ENABLE_VOX=1 \
|
||||
ENABLE_AIRCOPY=1 \
|
||||
ENABLE_FEAT_F4HWN_PMR=1 \
|
||||
ENABLE_FEAT_F4HWN_GMRS_FRS_MURS=1 \
|
||||
@@ -88,6 +90,7 @@ rescueops() {
|
||||
docker run --rm -v "${PWD}/compiled-firmware:/app/compiled-firmware" $IMAGE_NAME /bin/bash -c "cd /app && make -s \
|
||||
ENABLE_SPECTRUM=0 \
|
||||
ENABLE_FMRADIO=0 \
|
||||
ENABLE_VOX=1 \
|
||||
ENABLE_AIRCOPY=1 \
|
||||
ENABLE_FEAT_F4HWN_PMR=1 \
|
||||
ENABLE_FEAT_F4HWN_GMRS_FRS_MURS=1 \
|
||||
|
||||
Reference in new issue
Block a user