Skip to content

Commit

Permalink
workflow-updates3
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr022 committed Jul 4, 2023
1 parent 06de47e commit 855276b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/rssi_sbar/rssi_sbar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,22 @@ class CRssiPrinter
if(u8ChartPosition < ChartStartX || u8ChartPosition >= TUV_K5Display::SizeX)
u8ChartPosition = ChartStartX;

unsigned char u8Sub = (u8Rssi * 7) >> 7;
unsigned char u8PrintShift = (u8Sub > 7 ? 7 : u8Sub);
// unsigned char u8Sub = (u8Rssi * 7) >> 7;
// unsigned char u8PrintShift = (u8Sub > 7 ? 7 : u8Sub);
// Turn the proper pixel on, and the ones below it on as well
// The code to turn just the correct pixel on is: U8ScreenHistory[u8ChartPosition - ChartStartX] = (1 << u8PrintShift) & 0xFF;
U8ScreenHistory[u8ChartPosition - ChartStartX] = ~(0xFF >> (7 - u8PrintShift));
// U8ScreenHistory[u8ChartPosition - ChartStartX] = ~(0xFF >> (7 - u8PrintShift));

if(u8ChartPosition + 4 < DisplayBuff.SizeX)
{
for(unsigned char i = 0; i < 4; i++)
{
U8ScreenHistory[u8ChartPosition - ChartStartX + i + 1] = 0;
// U8ScreenHistory[u8ChartPosition - ChartStartX + i + 1] = 0;
}
}

auto* pDData = (unsigned char*)DisplayBuff.GetCoursorData(DisplayBuff.GetCoursorPosition(3, 0) + ChartStartX);
memcpy(pDData, U8ScreenHistory, sizeof(U8ScreenHistory));
// auto* pDData = (unsigned char*)DisplayBuff.GetCoursorData(DisplayBuff.GetCoursorPosition(3, 0) + ChartStartX);
// memcpy(pDData, U8ScreenHistory, sizeof(U8ScreenHistory));

u8ChartPosition++;
Fw.FlushFramebufferToScreen();
Expand Down

0 comments on commit 855276b

Please sign in to comment.