Files
flyradar/src/location_presets.h
Eiswolf-BG 36afd4ae75 v2.7.4: Named location presets and tappable nearest-airport ticker
Location presets can now optionally be given a name (e.g. "Home"),
shown in the overview instead of the raw coordinates. The
nearest-airport ticker on the Location Presets screen is now
tappable (shown with a thin green border) and adds that airport
directly as a new preset with its name and coordinates, using the
existing local airport database on the SD card - no internet lookup
needed. AirportLookup::findNearest() now also returns the found
airport's own lat/lon for this purpose.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-10 14:42:10 +02:00

22 lines
584 B
C++

#pragma once
#include <Arduino.h>
namespace LocationPresets {
constexpr uint8_t MAX_PRESETS = 3;
void init();
uint8_t count();
void getLatLon(uint8_t index, double& lat, double& lon);
// Vom Nutzer vergebener Name (z.B. "Zuhause") - leerer String, wenn
// keiner gesetzt wurde (dann zeigt der Screen stattdessen die
// Koordinaten an).
String getName(uint8_t index);
bool addPreset(double lat, double lon, const String& name = String());
void removePreset(uint8_t index);
int8_t activeIndex();
void setActiveIndex(int8_t index);
}