F_Lock shift

This commit is contained in:
Armel FAUVEAU
2024-11-10 20:11:01 +01:00
parent 7edfb2331c
commit 47de0d6951
3 changed files with 28 additions and 15 deletions

View File

@@ -867,8 +867,9 @@ uint8_t Rssi2Y(uint16_t rssi)
return DrawingEndY - Rssi2PX(rssi, 0, DrawingEndY); return DrawingEndY - Rssi2PX(rssi, 0, DrawingEndY);
} }
static void DrawSpectrum() #ifdef ENABLE_FEAT_F4HWN_SPECTRUM
{ static void DrawSpectrum()
{
uint8_t ox = 0; uint8_t ox = 0;
for (uint8_t i = 0; i < 128; ++i) for (uint8_t i = 0; i < 128; ++i)
{ {
@@ -883,7 +884,20 @@ static void DrawSpectrum()
ox = x; ox = x;
} }
} }
} }
#else
static void DrawSpectrum()
{
for (uint8_t x = 0; x < 128; ++x)
{
uint16_t rssi = rssiHistory[x >> settings.stepsCount];
if (rssi != RSSI_MAX_VALUE)
{
DrawVLine(Rssi2Y(rssi), DrawingEndY, x, true);
}
}
}
#endif
static void DrawStatus() static void DrawStatus()
{ {

View File

@@ -39,7 +39,6 @@ voxless() {
ENABLE_FEAT_F4HWN_RESTORE_SCAN=0 \ ENABLE_FEAT_F4HWN_RESTORE_SCAN=0 \
ENABLE_FEAT_F4HWN_CHARGING_C=0 \ ENABLE_FEAT_F4HWN_CHARGING_C=0 \
ENABLE_FEAT_F4HWN_NARROWER=0 \ ENABLE_FEAT_F4HWN_NARROWER=0 \
ENABLE_FEAT_F4HWN_CONTRAST=0 \
TARGET=f4hwn.voxless \ TARGET=f4hwn.voxless \
&& cp f4hwn.voxless* compiled-firmware/" && cp f4hwn.voxless* compiled-firmware/"
} }

6
main.c
View File

@@ -139,12 +139,12 @@ void Main(void)
gEeprom.KEY_LOCK = 0; gEeprom.KEY_LOCK = 0;
SETTINGS_SaveSettings(); SETTINGS_SaveSettings();
#ifndef ENABLE_VOX #ifndef ENABLE_VOX
gMenuCursor = 64; // move to hidden section, fix me if change... !!! Remove VOX and Mic Bar gMenuCursor = 65; // move to hidden section, fix me if change... !!! Remove VOX and Mic Bar
#else #else
#ifdef ENABLE_FEAT_F4HWN_SLEEP #ifdef ENABLE_FEAT_F4HWN_SLEEP
gMenuCursor = 67; // move to hidden section, fix me if change... !!! gMenuCursor = 68; // move to hidden section, fix me if change... !!!
#else #else
gMenuCursor = 66; // move to hidden section, fix me if change... !!! gMenuCursor = 67; // move to hidden section, fix me if change... !!!
#endif #endif
#endif #endif
gSubMenuSelection = gSetting_F_LOCK; gSubMenuSelection = gSetting_F_LOCK;