Update TFT_eSPI to v2.5.43
This commit is contained in:
@@ -49,7 +49,7 @@ void setup(void) {
|
||||
|
||||
void loop() {
|
||||
if (updateTime <= millis()) {
|
||||
updateTime = millis() + 35; // Update emter every 35 milliseconds
|
||||
updateTime = millis() + 35; // Update meter every 35 milliseconds
|
||||
|
||||
// Create a Sine wave for testing
|
||||
d += 4; if (d >= 360) d = 0;
|
||||
@@ -77,7 +77,7 @@ void analogMeter()
|
||||
// Long scale tick length
|
||||
int tl = 15;
|
||||
|
||||
// Coodinates of tick to draw
|
||||
// Coordinates of tick to draw
|
||||
float sx = cos((i - 90) * 0.0174532925);
|
||||
float sy = sin((i - 90) * 0.0174532925);
|
||||
uint16_t x0 = sx * (M_SIZE*100 + tl) + M_SIZE*120;
|
||||
@@ -177,7 +177,7 @@ void plotNeedle(int value, byte ms_delay)
|
||||
if (ms_delay == 0) old_analog = value; // Update immediately if delay is 0
|
||||
|
||||
float sdeg = map(old_analog, -10, 110, -150, -30); // Map value to angle
|
||||
// Calcualte tip of needle coords
|
||||
// Calculate tip of needle coords
|
||||
float sx = cos(sdeg * 0.0174532925);
|
||||
float sy = sin(sdeg * 0.0174532925);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user