summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormvglasow <michael -at- vonglasow.com>2016-01-25 10:21:31 +0100
committermvglasow <michael -at- vonglasow.com>2016-01-25 10:21:31 +0100
commit02bcdb2d4dd6fcdedf211604a3dd81e193ab4e86 (patch)
treeda67547ca8480175217cbb13871e344426c4716b
parent9346694445e49afc07049c8c28015098b2223e23 (diff)
downloadnavit-02bcdb2d4dd6fcdedf211604a3dd81e193ab4e86.tar.gz
Refactor:core:Document navit_get_cursor_pnt()R6552
Signed-off-by: mvglasow <michael -at- vonglasow.com>
-rw-r--r--navit/navit.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/navit/navit.c b/navit/navit.c
index 27426fe17..9500570ff 100644
--- a/navit/navit.c
+++ b/navit/navit.c
@@ -2314,6 +2314,18 @@ navit_set_cursors(struct navit *this_)
return;
}
+
+/**
+ * @brief Calculates the position of the cursor on the screen.
+ *
+ * @param this_ The navit object
+ * @param p Receives the screen coordinates for the cursor
+ * @param keep_orientation Whether to maintain the current map orientation. If false, the map will be
+ * rotated so that the bearing of the vehicle is up.
+ * @param dir Receives the new map orientation as requested by `screen_orientation` (can be `NULL`)
+ *
+ * @return Always 1
+ */
static int
navit_get_cursor_pnt(struct navit *this_, struct point *p, int keep_orientation, int *dir)
{
@@ -2325,7 +2337,7 @@ navit_get_cursor_pnt(struct navit *this_, struct point *p, int keep_orientation,
float min_offset = 0.; // Percent offset at min_offset_speed.
float max_offset = 30.; // Percent offset at max_offset_speed.
int min_offset_speed = 2; // Speed in km/h
- int max_offset_speed = 50; // Speed ini km/h
+ int max_offset_speed = 50; // Speed in km/h
// Calculate cursor offset from the center of the screen, upon speed.
if (nv->speed <= min_offset_speed) {
offset = min_offset;