kopia lustrzana https://github.com/piotr022/UV_K5_playground
Reduce resolution while changing settings for smoother user experience (#31)
* Adding capitalization and numbers to T9 library * Reduce resolution while changing settings for smoother user experience --------- Co-authored-by: Andrej Antunovikj <andrej@case.edu>views release-39
rodzic
efb9865fa4
commit
aa7df02742
|
@ -85,10 +85,12 @@ public:
|
|||
break;
|
||||
|
||||
case 2: // bw up
|
||||
bChangingSettings = true;
|
||||
u32ScanRange += BWStep;
|
||||
break;
|
||||
|
||||
case 8: // bw down
|
||||
bChangingSettings = true;
|
||||
u32ScanRange -= u32ScanRange > BWStep ? BWStep : 0;
|
||||
break;
|
||||
|
||||
|
@ -100,6 +102,10 @@ public:
|
|||
if (u8ResolutionDiv)
|
||||
u8ResolutionDiv--;
|
||||
break;
|
||||
|
||||
default:
|
||||
bChangingSettings = false;
|
||||
break;
|
||||
}
|
||||
|
||||
ClearDrawings();
|
||||
|
@ -116,7 +122,7 @@ public:
|
|||
}
|
||||
|
||||
auto const FreqOffset = (u8Pos * u32ScanRange) >> 7;
|
||||
if (!u8Pos || (u8Pos & u8ResolutionDiv) == u8ResolutionDiv)
|
||||
if (!u8Pos || (u8Pos & (bChangingSettings ? 2 : u8ResolutionDiv)) == (bChangingSettings ? 2 : u8ResolutionDiv))
|
||||
{
|
||||
Rssi = GetRssi(u32OldFreq - (u32ScanRange >> 1) + FreqOffset);
|
||||
}
|
||||
|
@ -194,7 +200,7 @@ private:
|
|||
{
|
||||
bEnabled = false;
|
||||
}
|
||||
|
||||
|
||||
return bEnabled;
|
||||
}
|
||||
|
||||
|
@ -207,6 +213,7 @@ private:
|
|||
const TUV_K5SmallNumbers FontSmallNr;
|
||||
CDisplay<const TUV_K5Display> Display;
|
||||
bool bDisplayCleared;
|
||||
bool bChangingSettings = false;
|
||||
|
||||
unsigned int u32ScanRange;
|
||||
unsigned int u32OldFreq;
|
||||
|
|
Ładowanie…
Reference in New Issue