some changes gui and gps..

master
steffen 13 years ago
parent ce4b8e828a
commit f6a5fb5a83

@ -135,6 +135,12 @@ void config_init () {
#endif
config_load ();
config_save ();
if (cfg.gps_flags) SETFLAG(gpsflags, GPSF_LOG);
else DELFLAG(gpsflags, GPSF_LOG);
if (cfg.debug) SETFLAG(view_flags, DRAW_DEBUG);
else DELFLAG(view_flags, DRAW_DEBUG);
};

@ -742,6 +742,7 @@ void draw_map () {
default:
sprintf (text, "?");
c = &color[COLOR_red][3];
break;
}
gfx_draw_text (img_map, p1.x-4, p1.y-4, text, c);
gfx_draw_text (img_map, p1.x-strlen(cpoi->name)*2, p1.y+8, cpoi->name, c);

@ -688,6 +688,7 @@ struct gps_data *gps_loop () {
line[i] = 0;
/* write into logfile */
// d_printf ("gps line:'%s'", line);
if (i > 0) {
if (gpslasttype != GPS_T_FILE && gpsflags & GPSF_LOG) gps_save_log (logfile, line);
if (gps_convert_line (line, &gpspos) == 0) gpspos.valid = 0;

@ -37,7 +37,7 @@
#define GPS_DEVICELEN 256
#define GPS_ROUTEPOILEN 128
#define GPS_INBUFSIZE 128
#define GPS_INBUFSIZE 1024
#define GPS_LINELEN 100
#define GPS_MAXSAT 32

@ -47,7 +47,11 @@ GUIItem *label1 = NULL;
GUIItem *label2 = NULL;
char gpscfg_dev[8][LEN_FILENAME] = {
#ifdef ANDROID
"android:",
#else
"serial:/dev/rfcomm0",
#endif
"serial:com1,38400",
"serial:com1,4800",
"",
@ -125,10 +129,15 @@ void gui_config_close () {
void gui_config_checkbox_changed () {
cfg.debug = GUI_CHECKBOX_T(cb_debug)->checked;
if (cfg.debug = GUI_CHECKBOX_T(cb_debug)->checked) SETFLAG(view_flags, DRAW_DEBUG);
else DELFLAG(view_flags, DRAW_DEBUG);
cfg.softkeyboard = GUI_CHECKBOX_T(cb_softkeyb)->checked;
if (GUI_CHECKBOX_T(log_file)->checked) cfg.gps_flags |= GPSF_LOG;
else cfg.gps_flags &= (0x0FFFF-GPSF_LOG);
if (cfg.gps_flags) SETFLAG(gpsflags, GPSF_LOG);
else DELFLAG(gpsflags, GPSF_LOG);
};
void gui_config_gpslist (int nr) {

Loading…
Cancel
Save