Ticket #610: navit_3471_ticket_610.patch
File navit_3471_ticket_610.patch, 4.9 KB (added by mvglasow (2), 13 years ago) |
---|
-
navit/vehicle.c
388 388 } 389 389 } 390 390 391 /** 392 * Writes to an NMEA log. 393 * 394 * @param this_ Pointer to the vehicle structure of the data source 395 * @param log Pointer to a log structure for the log file 396 */ 391 397 static void 392 398 vehicle_log_nmea(struct vehicle *this_, struct log *log) 393 399 { … … 432 438 g_free(end); 433 439 } 434 440 441 /** 442 * Writes to a GPX log. 443 * 444 * @param this_ Pointer to the vehicle structure of the data source 445 * @param log Pointer to a log structure for the log file 446 */ 435 447 static void 436 448 vehicle_log_gpx(struct vehicle *this_, struct log *log) 437 449 { … … 447 459 else 448 460 attr_types=NULL; 449 461 if (this_->meth.position_attr_get(this_->priv, attr_position_fix_type, &fix_attr)) { 450 if ( fix_attr.u.num != 2 && fix_attr.u.num != 3)462 if (!fix_attr.u.num) 451 463 return; 452 464 } 453 465 if (!this_->meth.position_attr_get(this_->priv, attr_position_coord_geo, &attr)) … … 488 500 g_free(logstr); 489 501 } 490 502 503 /** 504 * Writes to a text log. 505 * 506 * @param this_ Pointer to the vehicle structure of the data source 507 * @param log Pointer to a log structure for the log file 508 */ 491 509 static void 492 510 vehicle_log_textfile(struct vehicle *this_, struct log *log) 493 511 { … … 496 514 if (!this_->meth.position_attr_get) 497 515 return; 498 516 if (this_->meth.position_attr_get(this_->priv, attr_position_fix_type, &fix_attr)) { 499 if ( fix_attr.u.num != 2 && fix_attr.u.num != 3)517 if (!fix_attr.u.num) 500 518 return; 501 519 } 502 520 if (!this_->meth.position_attr_get(this_->priv, attr_position_coord_geo, &pos_attr)) … … 506 524 log_write(log, logstr, strlen(logstr), 0); 507 525 } 508 526 527 /** 528 * Writes to a binary log. 529 * 530 * @param this_ Pointer to the vehicle structure of the data source 531 * @param log Pointer to a log structure for the log file 532 */ 509 533 static void 510 534 vehicle_log_binfile(struct vehicle *this_, struct log *log) 511 535 { … … 519 543 if (!this_->meth.position_attr_get) 520 544 return; 521 545 if (this_->meth.position_attr_get(this_->priv, attr_position_fix_type, &fix_attr)) { 522 if ( fix_attr.u.num != 2 && fix_attr.u.num != 3)546 if (!fix_attr.u.num) 523 547 return; 524 548 } 525 549 if (!this_->meth.position_attr_get(this_->priv, attr_position_coord_geo, &pos_attr)) … … 560 584 } 561 585 } 562 586 587 /** 588 * Register a new log to receive data. 589 * 590 * @param this_ Pointer to the vehicle structure of the data source 591 * @param log Pointer to a log structure for the log file 592 */ 563 593 static int 564 594 vehicle_add_log(struct vehicle *this_, struct log *log) 565 595 { -
navit/vehicle/android/vehicle_android.c
59 59 /** 60 60 * @brief Free the android_vehicle 61 61 * 62 * @param priv 62 * @param priv pointer to a vehicle_priv structure for the vehicle 63 63 * @returns nothing 64 64 */ 65 65 static void … … 70 70 } 71 71 72 72 /** 73 * @brief Provide the outside with information74 * 75 * @param priv 76 * @param type TODO: What can this be?77 * @param attr 78 * @returns true /false73 * @brief Retrieves a vehicle attribute. 74 * 75 * @param priv pointer to a vehicle_priv structure for the vehicle 76 * @param type an attr_type specifying the attribute to retrieve 77 * @param attr pointer to an attr structure that will receive the attribute data 78 * @returns true for success, false for failure 79 79 */ 80 80 static int 81 81 vehicle_android_position_attr_get(struct vehicle_priv *priv, -
navit/vehicle/wince/vehicle_wince.c
578 578 } 579 579 580 580 581 /** 582 * @brief Free the wince_vehicle 583 * 584 * @param priv pointer to a vehicle_priv structure for the vehicle 585 * @returns nothing 586 */ 581 587 static void 582 588 vehicle_wince_destroy(struct vehicle_priv *priv) 583 589 { … … 589 595 g_free(priv); 590 596 } 591 597 598 /** 599 * @brief Retrieves a vehicle attribute. 600 * 601 * @param priv pointer to a vehicle_priv structure for the vehicle 602 * @param type an attr_type specifying the attribute to retrieve 603 * @param attr pointer to an attr structure that will receive the attribute data 604 * @returns true for success, false for failure 605 */ 592 606 static int 593 607 vehicle_wince_position_attr_get(struct vehicle_priv *priv, 594 608 enum attr_type type, struct attr *attr) … … 658 672 vehicle_wince_position_attr_get, 659 673 }; 660 674 675 /** 676 * @brief Create wince_vehicle 677 * 678 * @param meth 679 * @param cbl 680 * @param attrs 681 * @returns vehicle_priv 682 */ 661 683 static struct vehicle_priv * 662 684 vehicle_wince_new(struct vehicle_methods 663 685 *meth, struct callback_list … … 720 742 return NULL; 721 743 } 722 744 745 /** 746 * @brief register vehicle_wince 747 * 748 * @returns nothing 749 */ 723 750 void 724 751 plugin_init(void) 725 752 {