#include "ui-common.h"
#include "db.h"
#include "osm-db.h"
+#include "poi.h"
#include "cb.h"
#include "speak.h"
#include "gpx.h"
MAPPER_INIT_MISC,
MAPPER_INIT_CONFIG,
MAPPER_INIT_GPS,
- MAPPER_INIT_VOICE,
MAPPER_INIT_DB,
+ MAPPER_INIT_POI,
+ MAPPER_INIT_OSM,
+ MAPPER_INIT_VOICE,
MAPPER_INIT_UI,
MAPPER_INIT_GOTO,
MAPPER_INIT_DONE
mis=MAPPER_INIT_DB;
break;
case MAPPER_INIT_DB:
- osm_init();
+ if (db_connect(&_db, _mapper_db)) {
+ mis=MAPPER_INIT_POI;
+ } else {
+ mis=MAPPER_INIT_VOICE;
+ }
+ break;
+ case MAPPER_INIT_POI:
+ poi_init(&_db);
+ mis=MAPPER_INIT_OSM;
+ break;
+ case MAPPER_INIT_OSM:
+ osm_init(&_db);
mis=MAPPER_INIT_VOICE;
break;
case MAPPER_INIT_VOICE: