char typechr;
int typenr, subtype;
+ //fprintf(stderr, "mCI=%d CI=%d\n", cur_tmc_msg.CI, CI);
if (CI != cur_tmc_msg.CI || CI == -1) {
- //printf("GF evt=%d loc=%d ext=%d CI=%d dir=%d", event, location, extent, CI, direction);
- //printf("ev=%d ", event);
+#ifdef DEBUG
+ printf("GF evt=%d loc=%d ext=%d CI=%d dir=%d", event, location, extent, CI, direction);
+ printf("ev=%d ", event);
+#endif
snprintf(sql, 256, "select ROADNUMBER,FIRST_NAME,NEGATIVE_OFFSET,POSITIVE_OFFSET,LINEAR_REFERENCE,TYPE,SUBTYPE from lcl where LOCATIONCODE=%d", location);
sqlite3_prepare(lcl_db, sql, 256, &ppstmt, NULL);
if (sqlite3_step(ppstmt) != SQLITE_ROW) {
subtype = sqlite3_column_int(ppstmt, 6);
typechr = type_str1[0];
typenr = atoi(&type_str1[1]);
- // printf(" type=%c %d stype=%d\n", typechr, typenr, subtype);
+#ifdef DEBUG
+ printf(" type=%c %d stype=%d\n", typechr, typenr, subtype);
+#endif
snprintf(sql, 256, "select SNATDESC from lcl_supc where CLASS='%c' AND TCD=%d AND STCD=%d", typechr, typenr, subtype);
sqlite3_prepare(lcl_db, sql, 256, &ppstmt, NULL);
if (sqlite3_step(ppstmt) != SQLITE_ROW) {
if (location == 64777) {
tmc_msg_ptr += sprintf(tmc_msg_ptr, "%s\n", evt_str);
} else {
- if (extent)
+ if (extent) {
+#ifdef DEBUG
+ printf("dir=%d\n", direction);
+#endif
if (direction)
tmc_msg_ptr += sprintf(tmc_msg_ptr, "zwischen %s %s und %s %s\n%s\n", type_str1, fst_name, type_str2, last_name, evt_str);
else
tmc_msg_ptr += sprintf(tmc_msg_ptr, "zwischen %s %s und %s %s\n%s\n", type_str2, last_name, type_str1, fst_name, evt_str);
- else
+ } else
tmc_msg_ptr += sprintf(tmc_msg_ptr, "in Höhe %s %s\n%s\n", type_str1, fst_name, evt_str);
}
}
#endif
} else {
strncpy(evt_str, (char *)sqlite3_column_text(ppstmt, 0), 255);
+ // printf("(L)='%s'\n", evt_str);
if (strlen(lofrstr) != 0 && strstr(evt_str,"(L)")!=NULL) {
replace_str(evt_str, "(L)", lofrstr);
}
// printf(" 0x%04x 0x%04x\n", rdsgroup[2], rdsgroup[3]);
}
-enum TMCtype { TMC_GROUP=0, TMC_SINGLE, TMC_SYSTEM, TMC_TUNING };
+// enum TMCtype { TMC_GROUP=0, TMC_SINGLE, TMC_SYSTEM, TMC_TUNING };
void decode_tmc(unsigned short *rdsgroup)
{