1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-16 04:45:17 +03:00

[Taranis] 6Pos switch support is now ok. Calibration is automatic. More

tests needed
This commit is contained in:
Bertrand Songis 2014-01-12 12:57:14 +01:00
parent 1dff05dc02
commit a292fabb02
6 changed files with 94 additions and 46 deletions

View file

@ -120,9 +120,9 @@
void drawPotsBars()
{
// Optimization by Mike Blandford
uint8_t x, y, len ; // declare temporary variables
for (x=LCD_W/2-5, y=NUM_STICKS; y<NUM_STICKS+NUM_POTS; x+=5, y++) {
len = ((calibratedStick[y]+RESX)*BAR_HEIGHT/(RESX*2))+1l; // calculate once per loop
uint8_t x, i, len ; // declare temporary variables
for (x=LCD_W/2-5, i=NUM_STICKS; i<NUM_STICKS+NUM_POTS; x+=5, i++) {
len = ((calibratedStick[i]+RESX)*BAR_HEIGHT/(RESX*2))+1l; // calculate once per loop
V_BAR(x, LCD_H-8, len)
}
}