feat: add inverted sources (#4722)

Co-authored-by: elecpower <neilh713@tpg.com.au>
This commit is contained in:
Neil Horne
2024-05-25 09:25:15 +10:00
committed by GitHub
co-authored by elecpower
parent ca50d4ee04
commit 80659c3e3f
87 changed files with 798 additions and 496 deletions
+5 -3
View File
@@ -175,11 +175,13 @@ void drawFunction(FnFuncP fn, uint8_t offset)
void drawCursor(FnFuncP fn, uint8_t offset)
{
int16_t src = abs(s_currSrcRaw);
int x512 = getValue(s_currSrcRaw);
if (s_currSrcRaw >= MIXSRC_FIRST_TELEM) {
if (src >= MIXSRC_FIRST_TELEM) {
if (s_currScale > 0)
x512 = (x512 * 1024) / convertTelemValue(s_currSrcRaw - MIXSRC_FIRST_TELEM + 1, s_currScale);
drawSensorCustomValue(LCD_W - FW - offset, 6 * FH, (s_currSrcRaw - MIXSRC_FIRST_TELEM) / 3, x512, 0);
x512 = (x512 * 1024) / convertTelemValue(src - MIXSRC_FIRST_TELEM + 1, s_currScale);
drawSensorCustomValue(LCD_W - FW - offset, 6 * FH, (src - MIXSRC_FIRST_TELEM) / 3, x512, 0);
}
else {
lcdDrawNumber(LCD_W - FW - offset, 6*FH, calcRESXto1000(x512), RIGHT | PREC1);