mirror of
https://github.com/Dasemu/NavFrame.git
synced 2026-11-26 23:26:09 +00:00
Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0314a03333 | ||
|
|
bbe2eeb23c | ||
|
|
2382db66fa | ||
|
|
e819c09848 | ||
|
|
e6ca89784f | ||
|
|
694fefd98b | ||
|
|
e5f4cfd8bd | ||
|
|
6a04c38a77 | ||
|
|
a7f7198fd3 | ||
|
|
b14c625263 | ||
|
|
196b7da8ea | ||
|
|
0ee1f621cf |
No files matched your search
@@ -6,7 +6,7 @@ NavFrame is an experimental Android navigation app that renders its own 480×240
|
||||
|
||||
The owner has confirmed static and synthetic NavFrame frames on a Xiaomi 11 Lite 5G NE running Android 14 and a 2026 Yamaha MT-07, and the bundled Asturias map working offline on the phone. On 2026-10-12, the owner reported that the latest version displayed the map on the TFT for about 20 minutes, then showed `Mapa no disponible` in La Corredoria (Oviedo) for the rest of the trip while the phone map continued working. An offline map was installed. The exact installed build, diagnostic code and background state were not recorded; the cause is under investigation. This establishes a successful map display followed by a persistent failure, not sustained TFT reliability.
|
||||
|
||||
The current checkout is version 0.14.6. The 0.13 series adds voice/routing language selection for Spanish, English, German, French, and Italian, plus a system-language option; unsupported system locales resolve to English. Speech still depends on the Android TextToSpeech engine and its installed voice data. The app includes offline map and place data for Asturias, plus installable regional packages. Worldwide regions can be discovered and built on demand through the [regional package workflow](docs/GLOBAL_OFFLINE.md); this is not complete worldwide coverage. Installed packages currently provide map and local place/camera data. Offline route calculation, global camera completeness, and complete worldwide font coverage are not provided.
|
||||
The current checkout is version 0.14.8. The 0.13 series adds voice/routing language selection for Spanish, English, German, French, and Italian, plus a system-language option; unsupported system locales resolve to English. Speech still depends on the Android TextToSpeech engine and its installed voice data. The app includes offline map and place data for Asturias, plus installable regional packages. Worldwide regions can be discovered and built on demand through the [regional package workflow](docs/GLOBAL_OFFLINE.md); this is not complete worldwide coverage. Installed packages currently provide map and local place/camera data. Offline route calculation, global camera completeness, and complete worldwide font coverage are not provided.
|
||||
|
||||
Route calculation and address search use configurable online services. Spoken output uses the selected language when Android provides voice data; voice availability and offline behavior depend on the device's TextToSpeech engine. Physical validation of route guidance, voice playback, camera alerts, sustained TFT map rendering, and a 30-minute screen-off session remains pending unless a newer test report says otherwise.
|
||||
|
||||
@@ -41,7 +41,7 @@ GitHub Actions uploads a debug APK artifact for pushes to `development`. Pushes
|
||||
|
||||
## Imported routes
|
||||
|
||||
Choose **☰ → Cargar ruta GPX** to load a standard GPX route or track and start following it once precise GPS is available. Imported traces retain their geometry without online recalculation or invented turn announcements. See [GPX import](docs/IMPORTED_ROUTES.md).
|
||||
Choose **☰ → Cargar ruta GPX** to load a standard GPX route or track and start following it once precise GPS is available. Imported tracks retain their geometry without online recalculation or invented turn announcements. GPX route stop lists are automatically road-routed through the configured Valhalla service before navigation can start (Internet required). See [GPX import](docs/IMPORTED_ROUTES.md).
|
||||
|
||||
## Documentation
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ android {
|
||||
applicationId = "dev.navframe.app"
|
||||
minSdk = 26
|
||||
targetSdk = 35
|
||||
versionName = "0.14.6"
|
||||
versionCode = 23
|
||||
versionName = "0.14.8"
|
||||
versionCode = 25
|
||||
}
|
||||
if (hasReleaseSigning) {
|
||||
signingConfigs.create("production") {
|
||||
|
||||
@@ -23,6 +23,7 @@ open class MainActivity : Activity() {
|
||||
private var searchJob: Job? = null
|
||||
private var positionWait: Job? = null
|
||||
private var importJob: Job? = null
|
||||
private var lastImportedRoute: ImportedRoute? = null
|
||||
private var pendingImportUri: Uri? = null
|
||||
private var searchGeneration = 0L
|
||||
private var updatingDestination = false
|
||||
@@ -355,11 +356,13 @@ open class MainActivity : Activity() {
|
||||
ensureActive()
|
||||
val current = service ?: run { hint.text = "Servicio no disponible · vuelve a cargar el GPX"; return@launch }
|
||||
cancelSearch(); routeDialog?.dismiss()
|
||||
current.prepareImportedRoute(imported)
|
||||
if (imported.isTrack) current.prepareImportedRoute(imported)
|
||||
lastImportedRoute = imported
|
||||
destination = null; destinationName = ""
|
||||
hint.text = "Ruta GPX cargada"
|
||||
hint.text = if (imported.isTrack) "Traza GPX cargada" else "Calculando GPX sobre carreteras…"
|
||||
showImportedRouteSheet(imported.name)
|
||||
withPermissions(Action.IMPORT_ROUTE)
|
||||
if (imported.isTrack) withPermissions(Action.IMPORT_ROUTE)
|
||||
else current.calculateImportedStops(imported)
|
||||
} catch (cancelled: CancellationException) { throw cancelled }
|
||||
catch (error: Exception) {
|
||||
// Parser messages contain no coordinates, file paths or document contents.
|
||||
|
||||
@@ -586,6 +586,48 @@ class TftService : Service() {
|
||||
mutableRouteInfo.value = "GPX · %.1f km · %d puntos\nSigue el trazado: sin instrucciones de giro, ETA ni recálculo automático. Revisa el recorrido antes de iniciar.".format(java.util.Locale.ROOT, imported.route.distanceMeters / 1000.0, imported.route.geometry.size)
|
||||
if (!hasActiveGuidance()) showPreparedPreview()
|
||||
}
|
||||
/** Resolve GPX route stops against Valhalla; never alter a detailed imported track. */
|
||||
fun calculateImportedStops(imported: ImportedRoute) {
|
||||
if (imported.isTrack || imported.route.geometry.size !in 2..50) {
|
||||
mutableRouteInfo.value = "Solo se pueden calcular rutas GPX con entre 2 y 50 puntos de paso."
|
||||
return
|
||||
}
|
||||
val stops = imported.route.geometry
|
||||
invalidateRoutePlan() // Do not allow following the unsnapped straight-line waypoints.
|
||||
val generation = preparedGeneration
|
||||
val options = RouteOptions(profile = RouteProfile.AVOID_MOTORWAYS, avoidMotorways = true, avoidUnpaved = true)
|
||||
mutableRouteInfo.value = "Calculando sobre carreteras · evitando autopistas y pistas sin asfaltar…"
|
||||
routeJob?.cancel()
|
||||
routeJob = scope.launch {
|
||||
try {
|
||||
val engine = routingEngineFactory(routingEndpoint())
|
||||
val geometry = mutableListOf<GeoPoint>()
|
||||
var metres = 0L
|
||||
for (i in 0 until stops.lastIndex) {
|
||||
val part = engine.calculateRoute(stops[i], stops[i + 1], options)
|
||||
ensureActive()
|
||||
if (part.geometry.size < 2) throw java.io.IOException("Segmento sin geometría")
|
||||
geometry.addAll(if (i == 0) part.geometry else part.geometry.drop(1))
|
||||
metres += part.distanceMeters
|
||||
if (geometry.size > 10_000) throw IllegalArgumentException("La ruta supera 10000 puntos")
|
||||
if (generation != preparedGeneration) return@launch
|
||||
mutableRouteInfo.value = "Calculando carreteras · tramo ${i + 1}/${stops.lastIndex}"
|
||||
}
|
||||
ensureActive()
|
||||
if (generation != preparedGeneration) return@launch
|
||||
val result = RouteResult(geometry = geometry, maneuvers = emptyList(),
|
||||
distanceMeters = metres.coerceAtMost(Int.MAX_VALUE.toLong()).toInt(),
|
||||
durationSeconds = 0, destination = geometry.last(), imported = true)
|
||||
prepareImportedRoute(ImportedRoute(imported.name, result, isTrack = true))
|
||||
mutableRouteInfo.value = "GPX ajustado a carreteras · %.1f km · %d puntos\nComprueba que no haya autovías ni tramos inadecuados antes de salir. No hay avisos de giro ni recálculo.".format(java.util.Locale.ROOT, metres / 1000.0, geometry.size)
|
||||
} catch (cancelled: CancellationException) {
|
||||
throw cancelled
|
||||
} catch (error: Exception) {
|
||||
if (generation == preparedGeneration)
|
||||
mutableRouteInfo.value = "No se pudo calcular por carreteras. No se puede iniciar esta ruta; comprueba Internet y Valhalla y vuelve a importarla."
|
||||
}
|
||||
}
|
||||
}
|
||||
fun preparedRouteIsImported() = hasPreparedRoute() && routePlan?.route?.imported == true
|
||||
fun hasPreparedRoute() = !preparedDestinationDirty && routePlan != null
|
||||
fun routeUsesGps() = !preparedDestinationDirty && routePlan?.demo == false
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.xml.sax.SAXException
|
||||
import org.xml.sax.ext.DefaultHandler2
|
||||
import kotlin.math.*
|
||||
|
||||
data class ImportedRoute(val name: String?, val route: RouteResult)
|
||||
data class ImportedRoute(val name: String?, val route: RouteResult, val isTrack: Boolean = false)
|
||||
|
||||
/** Imports geometry only: GPX points do not establish road turns, speeds or travel time. */
|
||||
object GpxRouteImporter {
|
||||
@@ -52,7 +52,7 @@ object GpxRouteImporter {
|
||||
return ImportedRoute(handler.name?.trim()?.takeIf { it.isNotEmpty() }, RouteResult(
|
||||
geometry = points.toList(), maneuvers = emptyList(), distanceMeters = distance.roundToInt().coerceAtLeast(1),
|
||||
durationSeconds = 0, destination = points.last(), imported = true,
|
||||
))
|
||||
), handler.isTrack)
|
||||
}
|
||||
|
||||
private class Handler : DefaultHandler2() {
|
||||
@@ -61,6 +61,7 @@ object GpxRouteImporter {
|
||||
private var routeName: String? = null
|
||||
private var trackName: String? = null
|
||||
val points: List<GeoPoint> get() = if (tracks > 0) trackPoints else routePoints
|
||||
val isTrack: Boolean get() = tracks > 0
|
||||
val name: String? get() = if (tracks > 0) trackName else routeName
|
||||
private val path = mutableListOf<String>()
|
||||
private var rootNamespace = ""
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Importing a GPX route
|
||||
|
||||
Open **☰ → Cargar ruta GPX**, then choose a `.gpx` file using Android's document picker. The app displays the name, distance and point count and previews the trace when no other navigation session is active. After a valid file is selected, navigation starts automatically with real GPS as soon as location permission and a recent accurate fix are available. No destination search is needed. A pending import leaves existing navigation running until the new trace can start. The **Iniciar navegación** button retries after a timeout or permission denial.
|
||||
Open **☰ → Cargar ruta GPX**, then choose a `.gpx` file using Android's document picker. The app displays the name, distance and point count and previews the trace when no other navigation session is active. After a valid detailed track is selected, navigation starts automatically with real GPS as soon as location permission and a recent accurate fix are available. For route stop lists (`rte`), the app first calculates each leg along roads via the configured online Valhalla endpoint; start navigation after previewing the result. If road calculation fails, navigation remains unavailable rather than connecting route stops with straight lines. No destination search is needed. A pending import leaves existing navigation running until the new trace can start. The **Iniciar navegación** button retries after a timeout or permission denial.
|
||||
|
||||
Precise location permission is required to start navigation. If a recent fix with accuracy of 25 metres or better is unavailable, the app waits up to 60 seconds. Close the import panel or stop the route to cancel that wait. When the wait expires, enable location and tap **Iniciar navegación** to retry. Denying permission leaves the trace available for review.
|
||||
|
||||
|
||||
Reference in new issue
Block a user