Removed `updateLEDs()` function

This will help reduce the used code/space.
This commit is contained in:
Jake Goodwin 2024-10-06 12:20:05 -07:00
parent 508522a2b7
commit 2db3af1928
1 changed files with 0 additions and 14 deletions

View File

@ -253,20 +253,6 @@ void loop() {
updateDisplay();
}
// Function to update the LED ring based on heading direction
void updateLEDs(int heading) {
if (abs(heading - prevHeading) >= 10) { // Only update if the heading changes by 10 degrees or more
prevHeading = heading; // Save the current heading as the previous heading
int ledIndex = map(heading, 0, 360, 0, NUM_LEDS - 1); // Map the heading to an LED index (0-23)
// Update the LEDs in the ring
for (int i = 0; i < NUM_LEDS; i++) {
leds[i] = (i == ledIndex) ? CRGB(255, 0, 0) : CRGB::Black; // Turn on the correct LED for the heading
}
FastLED.show(); // Display the updated LED colors
}
}
// Updates the distance part of the display
void TFT_UpdateDistance(uint16_t meters) {
//Serial.println("TFT_UpdateDistance()");