mirror of
https://github.com/armel/uv-k1-k5v3-firmware-custom.git
synced 2026-10-02 03:15:37 +00:00
better var names + comment
This commit is contained in:
1 parent
911200d0a0
commit
be7d229b3d
1 file changed
+3
-3
+3
-3
@@ -871,15 +871,15 @@ uint8_t Rssi2Y(uint16_t rssi)
|
||||
static void DrawSpectrum()
|
||||
{
|
||||
uint16_t steps = GetStepsCount();
|
||||
uint16_t scale = (steps > 128) ? 128 : steps;
|
||||
uint16_t shift = 64 / steps + 1;
|
||||
uint16_t bars = (steps > 128) ? 128 : steps;
|
||||
uint16_t shift_graph = 64 / steps + 1; // to center bar on freq marker
|
||||
uint8_t ox = 0;
|
||||
for (uint8_t i = 0; i < 128; ++i)
|
||||
{
|
||||
uint16_t rssi = rssiHistory[i >> settings.stepsCount];
|
||||
if (rssi != RSSI_MAX_VALUE)
|
||||
{
|
||||
uint8_t x = i * 128 / scale + shift;
|
||||
uint8_t x = i * 128 / bars + shift_graph;
|
||||
for (uint8_t xx = ox; xx < x; xx++)
|
||||
{
|
||||
DrawVLine(Rssi2Y(rssi), DrawingEndY, xx, true);
|
||||
|
||||
Reference in new issue
Block a user