gpredict-svn Mailing List for Gpredict (Page 9)
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
You can subscribe to this list here.
2008 |
Jan
(24) |
Feb
|
Mar
(6) |
Apr
(14) |
May
(9) |
Jun
|
Jul
|
Aug
(25) |
Sep
(60) |
Oct
(26) |
Nov
|
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
|
Feb
(2) |
Mar
(22) |
Apr
(61) |
May
(57) |
Jun
|
Jul
(3) |
Aug
(83) |
Sep
(35) |
Oct
(50) |
Nov
(28) |
Dec
(34) |
2010 |
Jan
(29) |
Feb
(15) |
Mar
(2) |
Apr
|
May
(6) |
Jun
(2) |
Jul
(24) |
Aug
(2) |
Sep
(9) |
Oct
(43) |
Nov
(22) |
Dec
(6) |
2011 |
Jan
(24) |
Feb
(22) |
Mar
(31) |
Apr
(13) |
May
(10) |
Jun
(10) |
Jul
(43) |
Aug
(12) |
Sep
(18) |
Oct
(33) |
Nov
(18) |
Dec
(4) |
From: <aa...@us...> - 2011-02-16 12:31:48
|
Revision: 766 http://gpredict.svn.sourceforge.net/gpredict/?rev=766&view=rev Author: aa1vs Date: 2011-02-16 12:31:41 +0000 (Wed, 16 Feb 2011) Log Message: ----------- Remove Hamlib error checking from rotator to allow ST-1 to work Modified Paths: -------------- trunk/src/gtk-rot-ctrl.c Modified: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c 2011-02-15 02:57:39 UTC (rev 765) +++ trunk/src/gtk-rot-ctrl.c 2011-02-16 12:31:41 UTC (rev 766) @@ -1114,7 +1114,8 @@ /* try to read answer */ if (retcode) { if (strncmp(buffback,"RPRT",4)==0){ - retcode=FALSE; + //retcode=FALSE; + g_strstrip (buffback); sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%d: rotctld returned error (%s)"), __FILE__, __LINE__,buffback); @@ -1125,10 +1126,11 @@ *az = g_strtod (vbuff[0], NULL); *el = g_strtod (vbuff[1], NULL); } else { + g_strstrip (buffback); sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%d: rotctld returned bad response (%s)"), __FILE__, __LINE__,buffback); - retcode=FALSE; + //retcode=FALSE; } g_strfreev (vbuff); @@ -1177,56 +1179,14 @@ case 0: /*no error case*/ break; - case -1: - /*RIG_EINVAL error*/ - /* - Returned by gs232 (-m 601) driver when value sent to - rotator outside configured range. - Based on author's experiment. - */ - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%d: rotctld returned error %d (%s). Check the limits in your configuration."), - __FILE__, __LINE__, retval, buffback); - - - retcode=FALSE; - break; - - case -5: - /*RIG_ETIMEOUT error*/ - /* - Returned by ea4tx interface when stuck - Based on comments on hamlib-discussion list. - */ - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%d: rotctld returned error %d (%s)."), - __FILE__, __LINE__, retval, buffback); - - - retcode=FALSE; - break; - - - case -8: - /*RIG_EPROTO error*/ - /* - Returned by gs232 (-m 601) driver when interface is turned off - Based on author's experiment. - */ - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%d: rotctld returned error %d (%s). Check that interface power on."), - __FILE__, __LINE__, retval, buffback); - - - retcode=FALSE; - break; - default: /*any other case*/ /*not sure what is a hard error or soft error*/ + /*over time a database of this is needed*/ + g_strstrip (buffback); sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%d: rotctld returned error %d (%s)"), - __FILE__, __LINE__, retval, buffback); + _("%s:%d: rotctld returned error %d with az %f el %f(%s)"), + __FILE__, __LINE__, retval, az, el, buffback); //retcode=FALSE; break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-02-15 02:57:45
|
Revision: 765 http://gpredict.svn.sourceforge.net/gpredict/?rev=765&view=rev Author: aa1vs Date: 2011-02-15 02:57:39 +0000 (Tue, 15 Feb 2011) Log Message: ----------- Remove reference to defaults.h. Modified Paths: -------------- trunk/src/Makefile.am Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2011-02-15 02:49:53 UTC (rev 764) +++ trunk/src/Makefile.am 2011-02-15 02:57:39 UTC (rev 765) @@ -29,7 +29,6 @@ sgpsdp/solar.c \ about.c about.h \ compat.c compat.h config-keys.h \ - defaults.h \ first-time.c first-time.h \ gpredict-help.c gpredict-help.h \ gpredict-url-hook.c gpredict-url-hook.h \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-02-15 02:49:59
|
Revision: 764 http://gpredict.svn.sourceforge.net/gpredict/?rev=764&view=rev Author: aa1vs Date: 2011-02-15 02:49:53 +0000 (Tue, 15 Feb 2011) Log Message: ----------- Prevent potential buffer overflow in track_toggled by limiting ttidx. Modified Paths: -------------- trunk/src/gtk-polar-view-popup.c Modified: trunk/src/gtk-polar-view-popup.c =================================================================== --- trunk/src/gtk-polar-view-popup.c 2011-02-15 02:02:42 UTC (rev 763) +++ trunk/src/gtk-polar-view-popup.c 2011-02-15 02:49:53 UTC (rev 764) @@ -240,7 +240,8 @@ if (!(i % tres)) { /* create a time tick */ - obj->trtick[ttidx] = create_time_tick (pv, detail->time, x, y); + if (ttidx<TRACK_TICK_NUM) + obj->trtick[ttidx] = create_time_tick (pv, detail->time, x, y); ttidx++; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-02-15 02:02:49
|
Revision: 763 http://gpredict.svn.sourceforge.net/gpredict/?rev=763&view=rev Author: aa1vs Date: 2011-02-15 02:02:42 +0000 (Tue, 15 Feb 2011) Log Message: ----------- List a satellite under the available column or the selected column but not both. Modified Paths: -------------- trunk/ChangeLog trunk/NEWS trunk/src/gtk-sat-selector.c trunk/src/gtk-sat-selector.h trunk/src/mod-cfg.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-02-13 14:50:46 UTC (rev 762) +++ trunk/ChangeLog 2011-02-15 02:02:42 UTC (rev 763) @@ -1,3 +1,10 @@ +2011-02-14 Charles Suprin <hamaa1vs at gmail.com> + + * src/gtk-sat-selector.c + * src/gtk-sat-selector.h + * src/mod-cfg.c + List a satellite under the available column or the selected column but not both. + 2011-02-08 Charles Suprin <hamaa1vs at gmail.com> * src/gtk-sat-selector.c Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2011-02-13 14:50:46 UTC (rev 762) +++ trunk/NEWS 2011-02-15 02:02:42 UTC (rev 763) @@ -4,6 +4,7 @@ - Feature Request 3022617: Malaysia's location. - Automatically refresh the Sky at a glance view every minute. - Added more checks with hamlib communications. +- List satellite as available or selected when configuring module. - Fixed bug 2116691: Leave network connection open. - Fixed bug 3099314: Rotator Thrashing. - Fixed bug 2167508: problems in rotator controller. Modified: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c 2011-02-13 14:50:46 UTC (rev 762) +++ trunk/src/gtk-sat-selector.c 2011-02-15 02:02:42 UTC (rev 763) @@ -29,7 +29,10 @@ /** \brief Satellite selector. * */ -#include "string.h" + +/*needed _gnu_source to have strcasestr defined*/ +#define _GNU_SOURCE +#include <string.h> #include <gtk/gtk.h> #include <glib/gi18n.h> #ifdef HAVE_CONFIG_H @@ -73,6 +76,7 @@ gpointer column); static gint cat_file_compare (const gchar *a, const gchar *b); +static void gtk_sat_selector_mark_engine(GtkSatSelector *selector, gint catnr,gboolean val); static GtkVBoxClass *parent_class = NULL; @@ -444,6 +448,7 @@ GTK_SAT_SELECTOR_COL_NAME, sat.nickname, GTK_SAT_SELECTOR_COL_CATNUM, catnum, GTK_SAT_SELECTOR_COL_EPOCH, sat.jul_epoch, + GTK_SAT_SELECTOR_COL_SELECTED, FALSE, -1); g_free (sat.name); @@ -559,6 +564,7 @@ GTK_SAT_SELECTOR_COL_NAME, sat.nickname, GTK_SAT_SELECTOR_COL_CATNUM, catnum, GTK_SAT_SELECTOR_COL_EPOCH, sat.jul_epoch, + GTK_SAT_SELECTOR_COL_SELECTED, FALSE, -1); g_free (sat.name); g_free (sat.nickname); @@ -915,7 +921,7 @@ return( FALSE ); } -/** \brief Selects satellites whose name contains the substring in entry. +/** \brief Selects unselected satellites whose name contains the substring in entry. **/ static gboolean sat_filter_func( GtkTreeModel *model, GtkTreeIter *iter, @@ -931,9 +937,55 @@ /*if it is already selected then remove it from the available list*/ if (selected) return( FALSE); - if( strcasestr( satname, searchstring ) != NULL ) + if( strcasestr( satname, searchstring ) != (char *)NULL ) return( TRUE ); else return( FALSE ); } +/** \brief Searches through all the models for the given satellite and sets its selected value. + \param *selector is the selector that contains the models + \param catnr is the catalog numer of satellite. + \param val is true or false depending on whether that satellite is selected or not. + **/ +static void gtk_sat_selector_mark_engine(GtkSatSelector *selector, gint catnr,gboolean val){ + gint n, k; + gint nummodels, numiters; + gint catnumscratch; + GtkTreeModel *model; + GtkTreeIter iter; + + nummodels = g_slist_length(selector->models); + + for (n = 0; n<nummodels; n++) { + model = GTK_TREE_MODEL(g_slist_nth_data (selector->models,n)); + numiters = gtk_tree_model_iter_n_children(model,NULL); + for (k = 0; k<numiters; k++){ + if (G_LIKELY(gtk_tree_model_iter_nth_child(model, &iter,NULL,k))){ + gtk_tree_model_get (model, &iter, GTK_SAT_SELECTOR_COL_CATNUM, &catnumscratch,-1); + if (catnumscratch == catnr) { + gtk_list_store_set(GTK_LIST_STORE(model),&iter,GTK_SAT_SELECTOR_COL_SELECTED,val,-1); + } + } + + } + + } +} + + +/** \brief Searches the models for the satellite and sets SELECTED to TRUE. + \param *selector is the selector that contains the models + \param catnr is the catalog numer of satellite. +**/ +void gtk_sat_selector_mark_selected(GtkSatSelector *selector, gint catnr){ + gtk_sat_selector_mark_engine ( selector, catnr, TRUE); +} + +/** \brief Searches the models for the satellite and sets SELECTED to FALSE. + \param *selector is the selector that contains the models + \param catnr is the catalog numer of satellite. +**/ +void gtk_sat_selector_mark_unselected(GtkSatSelector *selector, gint catnr){ + gtk_sat_selector_mark_engine ( selector, catnr, FALSE); +} Modified: trunk/src/gtk-sat-selector.h =================================================================== --- trunk/src/gtk-sat-selector.h 2011-02-13 14:50:46 UTC (rev 762) +++ trunk/src/gtk-sat-selector.h 2011-02-15 02:02:42 UTC (rev 763) @@ -2,7 +2,7 @@ /* Gpredict: Real-time satellite tracking and orbit prediction program - Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC. + Copyright (C) 2001-2011 Alexandru Csete, OZ9AEC. Authors: Alexandru Csete <oz...@gm...> @@ -85,8 +85,6 @@ GtkWidget *tree; /*!< The tree. */ GtkWidget *swin; /*!< Scrolled window. */ guint flags; /*!< Column visibility flags. */ - GSList *selection; /*!< List of selected satellites. FIXME: remove */ - gulong handler_id; /*!< Toggle signale handler ID (FIXME): remove. */ GtkWidget *groups; /*!< Combo box for selecting satellite group. */ GtkWidget *search; /*!< Text entry for searching. */ @@ -106,6 +104,8 @@ guint32 gtk_sat_selector_get_flags (GtkSatSelector *selector); void gtk_sat_selector_get_selected (GtkSatSelector *selector, gint *catnum, gchar **satname, gdouble *epoch); gdouble gtk_sat_selector_get_latest_epoch (GtkSatSelector *selector); +void gtk_sat_selector_mark_selected (GtkSatSelector *selector, gint catnum); +void gtk_sat_selector_mark_unselected (GtkSatSelector *selector, gint catnum); #ifdef __cplusplus } Modified: trunk/src/mod-cfg.c =================================================================== --- trunk/src/mod-cfg.c 2011-02-13 14:50:46 UTC (rev 762) +++ trunk/src/mod-cfg.c 2011-02-15 02:02:42 UTC (rev 763) @@ -2,7 +2,7 @@ /* Gpredict: Real-time satellite tracking and orbit prediction program - Copyright (C) 2001-2010 Alexandru Csete, OZ9AEC. + Copyright (C) 2001-2011 Alexandru Csete, OZ9AEC. Authors: Alexandru Csete <oz...@gm...> @@ -64,7 +64,7 @@ static void edit_advanced_settings (GtkDialog *parent, GKeyFile *cfgdata); -static GtkWidget *create_selected_sats_list (GKeyFile *cfgdata, gboolean new); +static GtkWidget *create_selected_sats_list (GKeyFile *cfgdata, gboolean new, GtkSatSelector *selector); static void add_selected_sat (GtkListStore *store, gint catnum); static void sat_activated_cb (GtkSatSelector *selector, gint catnr, gpointer data); @@ -555,7 +555,7 @@ G_CALLBACK (sat_activated_cb), NULL); /* list of selected satellites */ - satlist = create_selected_sats_list (cfgdata, new); + satlist = create_selected_sats_list (cfgdata, new, GTK_SAT_SELECTOR(selector)); swin = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_container_add (GTK_CONTAINER (swin), satlist); @@ -566,7 +566,7 @@ g_signal_connect (addbut, "clicked", G_CALLBACK (addbut_clicked_cb), selector); delbut = gpredict_hstock_button (GTK_STOCK_GO_BACK, NULL, _("Remove satellite from the list of selected satellites.")); - g_signal_connect (delbut, "clicked", G_CALLBACK (delbut_clicked_cb), NULL); + g_signal_connect (delbut, "clicked", G_CALLBACK (delbut_clicked_cb), selector); /* quick sat selecotr tutorial label */ label = gtk_label_new (NULL); @@ -599,7 +599,7 @@ * \returns A newly created GtkTreeView widget. * */ -static GtkWidget *create_selected_sats_list (GKeyFile *cfgdata, gboolean new) +static GtkWidget *create_selected_sats_list (GKeyFile *cfgdata, gboolean new, GtkSatSelector *selector) { GtkWidget *satlist; GtkCellRenderer *renderer; @@ -637,7 +637,7 @@ /* "row-activated" signal is used to catch double click events, which means a satellite has been selected. This will cause the satellite to be deleted */ g_signal_connect (GTK_TREE_VIEW (satlist), "row-activated", - G_CALLBACK(row_activated_cb), NULL); + G_CALLBACK(row_activated_cb), selector); /* create the model */ store = gtk_list_store_new (GTK_SAT_SELECTOR_COL_NUM, @@ -686,6 +686,7 @@ else { for (i = 0; i < length; i++) { add_selected_sat (store, sats[i]); + gtk_sat_selector_mark_selected(selector, sats[i]); } g_free (sats); } @@ -1136,7 +1137,8 @@ /* Add satellite to selected list */ store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (satlist))); add_selected_sat (store, catnr); - + /*tell the sat_selector it can hide that satellite */ + gtk_sat_selector_mark_selected (selector, catnr); } @@ -1187,13 +1189,17 @@ GtkTreeModel *model; GtkTreeIter iter; gboolean haveselection = FALSE; /* this flag is set to TRUE if there is a selection */ + gint catnr; + GtkSatSelector *selector = GTK_SAT_SELECTOR(data); - /* get the selected row in the treeview */ selection = gtk_tree_view_get_selection (view); haveselection = gtk_tree_selection_get_selected (selection, &model, &iter); if (haveselection) { + gtk_tree_model_get (model, &iter, GTK_SAT_SELECTOR_COL_CATNUM, &catnr, -1); + /*tell the sat_selector it can show that satellite again*/ + gtk_sat_selector_mark_unselected ( selector, catnr); gtk_list_store_remove (GTK_LIST_STORE(model), &iter); } } @@ -1218,6 +1224,8 @@ /* Add satellite to selected list */ store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (satlist))); add_selected_sat (store, catnum); + /*tell the sat_selector to hide that satellite */ + gtk_sat_selector_mark_selected (selector,catnum); } } @@ -1233,6 +1241,7 @@ GtkTreeModel *model; GtkTreeIter iter; gboolean haveselection = FALSE; /* this flag is set to TRUE if there is a selection */ + gint catnr; /* get the selected row in the treeview */ @@ -1240,6 +1249,9 @@ haveselection = gtk_tree_selection_get_selected (selection, &model, &iter); if (haveselection) { + gtk_tree_model_get (model, &iter, GTK_SAT_SELECTOR_COL_CATNUM, &catnr, -1); + /*tell the sat_selector it can show that satellite again*/ + gtk_sat_selector_mark_unselected ( selector, catnr); gtk_list_store_remove (GTK_LIST_STORE(model), &iter); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-02-13 14:50:52
|
Revision: 762 http://gpredict.svn.sourceforge.net/gpredict/?rev=762&view=rev Author: aa1vs Date: 2011-02-13 14:50:46 +0000 (Sun, 13 Feb 2011) Log Message: ----------- Add additional field to satellite selection list stores Modified Paths: -------------- trunk/src/gtk-sat-selector.c trunk/src/gtk-sat-selector.h trunk/src/mod-cfg.c Modified: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c 2011-02-09 01:22:01 UTC (rev 761) +++ trunk/src/gtk-sat-selector.c 2011-02-13 14:50:46 UTC (rev 762) @@ -2,9 +2,10 @@ /* Gpredict: Real-time satellite tracking and orbit prediction program - Copyright (C) 2001-2010 Alexandru Csete, OZ9AEC. + Copyright (C) 2001-2011 Alexandru Csete, OZ9AEC. Authors: Alexandru Csete <oz...@gm...> + Charles Suprin <ham...@gm...> Comments, questions and bugreports should be submitted via http://sourceforge.net/projects/gpredict/ @@ -402,7 +403,8 @@ store = gtk_list_store_new (GTK_SAT_SELECTOR_COL_NUM, G_TYPE_STRING, // name G_TYPE_INT, // catnum - G_TYPE_DOUBLE // epoch + G_TYPE_DOUBLE, // epoch + G_TYPE_BOOLEAN // selected ); selector->models = g_slist_append (selector->models, store); gtk_combo_box_append_text (GTK_COMBO_BOX (selector->groups), _("All satellites")); @@ -525,7 +527,8 @@ store = gtk_list_store_new (GTK_SAT_SELECTOR_COL_NUM, G_TYPE_STRING, // name G_TYPE_INT, // catnum - G_TYPE_DOUBLE // epoch + G_TYPE_DOUBLE, // epoch + G_TYPE_BOOLEAN // selected ); selector->models = g_slist_append (selector->models, store); @@ -920,10 +923,14 @@ { const gchar *searchstring; gchar *satname; + gboolean selected; gtk_tree_model_get( model, iter, GTK_SAT_SELECTOR_COL_NAME, &satname, -1 ); + gtk_tree_model_get( model, iter, GTK_SAT_SELECTOR_COL_SELECTED, &selected, -1 ); searchstring = gtk_entry_get_text( entry ); - + /*if it is already selected then remove it from the available list*/ + if (selected) + return( FALSE); if( strcasestr( satname, searchstring ) != NULL ) return( TRUE ); else Modified: trunk/src/gtk-sat-selector.h =================================================================== --- trunk/src/gtk-sat-selector.h 2011-02-09 01:22:01 UTC (rev 761) +++ trunk/src/gtk-sat-selector.h 2011-02-13 14:50:46 UTC (rev 762) @@ -42,6 +42,7 @@ GTK_SAT_SELECTOR_COL_NAME = 0, /*!< Satellite name. */ GTK_SAT_SELECTOR_COL_CATNUM, /*!< Catalogue Number. */ GTK_SAT_SELECTOR_COL_EPOCH, /*!< Element set epoch. */ + GTK_SAT_SELECTOR_COL_SELECTED, /*!< Track whether element is selected. */ GTK_SAT_SELECTOR_COL_NUM /*!< The number of columns. */ } gtk_sat_selector_col_t; @@ -51,6 +52,7 @@ GTK_SAT_SELECTOR_FLAG_NAME = 1 << GTK_SAT_SELECTOR_COL_NAME, /*!< Satellite name. */ GTK_SAT_SELECTOR_FLAG_CATNUM = 1 << GTK_SAT_SELECTOR_COL_CATNUM, /*!< Catalogue Number. */ GTK_SAT_SELECTOR_FLAG_EPOCH = 1 << GTK_SAT_SELECTOR_COL_EPOCH, /*!< Element set epoch. */ + GTK_SAT_SELECTOR_FLAG_SELECTED = 1 << GTK_SAT_SELECTOR_COL_SELECTED, /*!< Item selected or not. */ } gtk_sat_selector_flag_t; Modified: trunk/src/mod-cfg.c =================================================================== --- trunk/src/mod-cfg.c 2011-02-09 01:22:01 UTC (rev 761) +++ trunk/src/mod-cfg.c 2011-02-13 14:50:46 UTC (rev 762) @@ -643,7 +643,8 @@ store = gtk_list_store_new (GTK_SAT_SELECTOR_COL_NUM, G_TYPE_STRING, // name G_TYPE_INT, // catnum - G_TYPE_DOUBLE // epoch + G_TYPE_DOUBLE, // epoch + G_TYPE_BOOLEAN // selected ); /* sort the list by name */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-02-09 01:22:09
|
Revision: 761 http://gpredict.svn.sourceforge.net/gpredict/?rev=761&view=rev Author: aa1vs Date: 2011-02-09 01:22:01 +0000 (Wed, 09 Feb 2011) Log Message: ----------- Update copyrights in about.c Modified Paths: -------------- trunk/ChangeLog trunk/src/about.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-02-08 20:55:11 UTC (rev 760) +++ trunk/ChangeLog 2011-02-09 01:22:01 UTC (rev 761) @@ -9,6 +9,9 @@ Change gpredict.desktop to reference this new copy. Resolves part of Bug 3113190. + * src/about.c + Update copyright dates to 2011 from 2009. + 2011-02-02 Charles Suprin <hamaa1vs at gmail.com> * src/mod-cfg.c Modified: trunk/src/about.c =================================================================== --- trunk/src/about.c 2011-02-08 20:55:11 UTC (rev 760) +++ trunk/src/about.c 2011-02-09 01:22:01 UTC (rev 761) @@ -2,7 +2,7 @@ /* Gpredict: Real-time satellite tracking and orbit prediction program - Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC. + Copyright (C) 2001-2011 Alexandru Csete, OZ9AEC. Authors: Alexandru Csete <oz...@gm...> @@ -62,7 +62,7 @@ }; -const gchar license[] = N_("Copyright (C) 2001-2009 Alexandru Csete OZ9AEC and contributors.\n"\ +const gchar license[] = N_("Copyright (C) 2001-2011 Alexandru Csete OZ9AEC and contributors.\n"\ "Contact: oz9aec at googlemail.com\n\n"\ "Gpredict is free software; you can redistribute it and "\ "mofdify it under the terms of the GNU General Public License "\ @@ -97,7 +97,7 @@ gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (dialog), _("GPREDICT")); gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (dialog), VERSION); gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (dialog), - _("Copyright (C) 2001-2009 Alexandru Csete OZ9AEC\n\n"\ + _("Copyright (C) 2001-2011 Alexandru Csete OZ9AEC\n\n"\ "Gpredict is available free of charge from:")); gtk_about_dialog_set_url_hook (gpredict_url_hook_cb, NULL, NULL); gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (dialog), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-02-08 20:55:19
|
Revision: 760 http://gpredict.svn.sourceforge.net/gpredict/?rev=760&view=rev Author: aa1vs Date: 2011-02-08 20:55:11 +0000 (Tue, 08 Feb 2011) Log Message: ----------- Adjust icons and .desktop file to help with bug 3113190. Modified Paths: -------------- trunk/ChangeLog trunk/data/desktop/gpredict.desktop.in trunk/pixmaps/icons/Makefile.am Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-02-08 16:17:50 UTC (rev 759) +++ trunk/ChangeLog 2011-02-08 20:55:11 UTC (rev 760) @@ -3,6 +3,12 @@ * src/gtk-sat-selector.c Replace search capability with filter capability in gtk-sat-selector. + * data/desktop/gpredict.desktop.in + * pixmaps/icons/Makefile.am + Install a copy of gpredict-icon.png to pixmaps directory. + Change gpredict.desktop to reference this new copy. + Resolves part of Bug 3113190. + 2011-02-02 Charles Suprin <hamaa1vs at gmail.com> * src/mod-cfg.c Modified: trunk/data/desktop/gpredict.desktop.in =================================================================== --- trunk/data/desktop/gpredict.desktop.in 2011-02-08 16:17:50 UTC (rev 759) +++ trunk/data/desktop/gpredict.desktop.in 2011-02-08 20:55:11 UTC (rev 760) @@ -2,7 +2,7 @@ Name=Gredict Comment=Satellite tracker Exec=gpredict -Icon=$(datadir)/pixmaps/gpredict/icons/gpredict-icon.png +Icon=gpredict-icon Terminal=false Type=Application Categories=HamRadio; Modified: trunk/pixmaps/icons/Makefile.am =================================================================== --- trunk/pixmaps/icons/Makefile.am 2011-02-08 16:17:50 UTC (rev 759) +++ trunk/pixmaps/icons/Makefile.am 2011-02-08 20:55:11 UTC (rev 760) @@ -1,5 +1,8 @@ gpredict_iconsdir = $(datadir)/pixmaps/gpredict/icons +gpredict_icons2dir = $(datadir)/pixmaps/ +gpredict_icons2_DATA = gpredict-icon.png + gpredict_icons_DATA = \ gpredict-antenna.png \ gpredict-antenna-small.png \ @@ -36,5 +39,5 @@ gpredict-shuttle.png \ gpredict-shuttle-small.png -EXTRA_DIST = $(gpredict_icons_DATA) +EXTRA_DIST = $(gpredict_icons_DATA) $(gpredict_icons2_DATA) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-02-08 16:17:56
|
Revision: 759 http://gpredict.svn.sourceforge.net/gpredict/?rev=759&view=rev Author: aa1vs Date: 2011-02-08 16:17:50 +0000 (Tue, 08 Feb 2011) Log Message: ----------- Replace search capability with filter capability in gtk-sat-selector. Modified Paths: -------------- trunk/ChangeLog trunk/NEWS trunk/src/gtk-sat-selector.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-02-02 20:10:06 UTC (rev 758) +++ trunk/ChangeLog 2011-02-08 16:17:50 UTC (rev 759) @@ -1,3 +1,8 @@ +2011-02-08 Charles Suprin <hamaa1vs at gmail.com> + + * src/gtk-sat-selector.c + Replace search capability with filter capability in gtk-sat-selector. + 2011-02-02 Charles Suprin <hamaa1vs at gmail.com> * src/mod-cfg.c Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2011-02-02 20:10:06 UTC (rev 758) +++ trunk/NEWS 2011-02-08 16:17:50 UTC (rev 759) @@ -8,6 +8,7 @@ - Fixed bug 3099314: Rotator Thrashing. - Fixed bug 2167508: problems in rotator controller. - Fixed bug from Ubuntu #706452:Update from local files won't work with files in UPPER case +- Fixed bug 3171615: Searching for satellites in the satellite selector Changes in version 1.2 (12 Oct 2010) Modified: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c 2011-02-02 20:10:06 UTC (rev 758) +++ trunk/src/gtk-sat-selector.c 2011-02-08 16:17:50 UTC (rev 759) @@ -55,10 +55,14 @@ GtkTreeViewColumn *column, gpointer data); +static gboolean cb_entry_changed( GtkEditable *entry, GtkTreeView *treeview ); static gint compare_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer userdata); +static gboolean sat_filter_func( GtkTreeModel *model, + GtkTreeIter *iter, + GtkEntry *entry ); static void epoch_cell_data_function (GtkTreeViewColumn *col, @@ -218,8 +222,8 @@ GtkTreeViewColumn *column; GtkWidget *table; GtkWidget *frame; + GtkTreeModel *filter; - if (!flags) flags = GTK_SAT_SELECTOR_DEFAULT_FLAGS; @@ -236,14 +240,12 @@ /* combo box signal handler will be connected at the end after it has been populated to avoid false triggering */ + /*create search widget early so it can be used for callback*/ + GTK_SAT_SELECTOR (widget)->search = gtk_entry_new (); /* create list and model */ - selector->tree = gtk_tree_view_new (); - gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (selector->tree), TRUE); create_and_fill_models (selector); model = GTK_TREE_MODEL (g_slist_nth_data (selector->models, 0)); - gtk_tree_view_set_model (GTK_TREE_VIEW (selector->tree), model); - g_object_unref (model); /* sort the tree by name */ gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (model), @@ -255,6 +257,21 @@ GTK_SAT_SELECTOR_COL_NAME, GTK_SORT_ASCENDING); + /*create a filtering tree*/ + filter = gtk_tree_model_filter_new(model,NULL); + gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(filter), + (GtkTreeModelFilterVisibleFunc) sat_filter_func,GTK_SAT_SELECTOR(widget)->search,NULL); + + selector->tree = gtk_tree_view_new_with_model(filter); + gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (selector->tree), TRUE); + + g_signal_connect( G_OBJECT(GTK_SAT_SELECTOR(widget)->search), "changed", + G_CALLBACK(cb_entry_changed), + GTK_TREE_VIEW( selector->tree)); + + g_object_unref (model); + + /* we can now connect combobox signal handler */ g_signal_connect (GTK_SAT_SELECTOR (widget)->groups, "changed", G_CALLBACK(group_selected_cb), widget); @@ -310,21 +327,14 @@ table = gtk_table_new (7, 4, TRUE); - /* Search */ + /* Search */ + /* Finish setting up the search entry*/ gtk_table_attach (GTK_TABLE (table), gtk_label_new (_("Search")), 0, 1, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0); - GTK_SAT_SELECTOR (widget)->search = gtk_entry_new (); gtk_widget_set_tooltip_text (GTK_SAT_SELECTOR (widget)->search, _("Start typing in this field to search for a satellite"\ " in the selected group.")); - /* this enables automatic search */ - gtk_tree_view_set_search_entry (GTK_TREE_VIEW (GTK_SAT_SELECTOR (widget)->tree), - GTK_ENTRY (GTK_SAT_SELECTOR (widget)->search)); - gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW (GTK_SAT_SELECTOR (widget)->tree), - gtk_sat_selector_search_equal_func, - NULL, - NULL); gtk_table_attach (GTK_TABLE (table), GTK_SAT_SELECTOR (widget)->search, 1, 4, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0); @@ -619,6 +629,7 @@ GtkSatSelector *selector = GTK_SAT_SELECTOR (data); GtkTreeModel *newmodel; GtkTreeModel *oldmodel; + GtkTreeModel *filter; gint sel; sel = gtk_combo_box_get_active (combobox); @@ -632,15 +643,27 @@ /* now replace oldmodel with newmodel */ newmodel = GTK_TREE_MODEL (g_slist_nth_data (selector->models, sel)); - gtk_tree_view_set_model (GTK_TREE_VIEW (selector->tree), newmodel); - g_object_unref (newmodel); /* We changed the GtkTreeModel so we need to reset the sort column ID */ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (newmodel), GTK_SAT_SELECTOR_COL_NAME, GTK_SORT_ASCENDING); + /*build a filter around the new model*/ + filter = gtk_tree_model_filter_new(newmodel,NULL); + gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(filter), + (GtkTreeModelFilterVisibleFunc) sat_filter_func,GTK_SAT_SELECTOR(selector)->search,NULL); + /*install the filter tree and hookup callbacks*/ + gtk_tree_view_set_model (GTK_TREE_VIEW (selector->tree), filter); + g_signal_connect( G_OBJECT(GTK_SAT_SELECTOR(selector)->search), "changed", + G_CALLBACK(cb_entry_changed), + GTK_TREE_VIEW( selector->tree)); + g_object_unref (newmodel); + g_object_unref (filter); + + + } @@ -874,3 +897,36 @@ return (temp); } + +/** \brief Make the tree refilter after something entered in the search box + **/ + +static gboolean cb_entry_changed( GtkEditable *entry, + GtkTreeView *treeview ) +{ + GtkTreeModelFilter *filter; + + filter = GTK_TREE_MODEL_FILTER( gtk_tree_view_get_model( treeview ) ); + gtk_tree_model_filter_refilter( filter ); + + return( FALSE ); +} + +/** \brief Selects satellites whose name contains the substring in entry. + **/ +static gboolean sat_filter_func( GtkTreeModel *model, + GtkTreeIter *iter, + GtkEntry *entry ) +{ + const gchar *searchstring; + gchar *satname; + + gtk_tree_model_get( model, iter, GTK_SAT_SELECTOR_COL_NAME, &satname, -1 ); + searchstring = gtk_entry_get_text( entry ); + + if( strcasestr( satname, searchstring ) != NULL ) + return( TRUE ); + else + return( FALSE ); +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-02-02 20:10:12
|
Revision: 758 http://gpredict.svn.sourceforge.net/gpredict/?rev=758&view=rev Author: aa1vs Date: 2011-02-02 20:10:06 +0000 (Wed, 02 Feb 2011) Log Message: ----------- Updated ChangeLog Modified Paths: -------------- trunk/ChangeLog Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-02-02 18:38:40 UTC (rev 757) +++ trunk/ChangeLog 2011-02-02 20:10:06 UTC (rev 758) @@ -6,6 +6,9 @@ * src/gtk-sat-selector.c Sort Satellites Groups alphabetically in combo box. + * src/gtk-single-sat.c + List satellites in single sat view alphabetically instead of hash order. + 2011-02-01 Alexandru Csete <oz9aec at gmail.com> * src/gtk-rig-ctrl.c: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-02-02 18:38:46
|
Revision: 757 http://gpredict.svn.sourceforge.net/gpredict/?rev=757&view=rev Author: aa1vs Date: 2011-02-02 18:38:40 +0000 (Wed, 02 Feb 2011) Log Message: ----------- List satellites in single sat view alphabetically instead of hash order. Modified Paths: -------------- trunk/src/gtk-sat-selector.c trunk/src/gtk-single-sat.c Modified: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c 2011-02-02 17:54:48 UTC (rev 756) +++ trunk/src/gtk-sat-selector.c 2011-02-02 18:38:40 UTC (rev 757) @@ -866,11 +866,11 @@ gchar *cat_a, *cat_b; gint temp; - cat_a=load_cat_file_cat(a); - cat_b=load_cat_file_cat(b); - temp = g_ascii_strcasecmp(cat_a,cat_b); + cat_a = load_cat_file_cat (a); + cat_b = load_cat_file_cat (b); + temp = g_ascii_strcasecmp (cat_a,cat_b); g_free (cat_a); g_free (cat_b); - return(temp); + return (temp); } Modified: trunk/src/gtk-single-sat.c =================================================================== --- trunk/src/gtk-single-sat.c 2011-02-02 17:54:48 UTC (rev 756) +++ trunk/src/gtk-single-sat.c 2011-02-02 18:38:40 UTC (rev 757) @@ -118,8 +118,8 @@ static void select_satellite (GtkWidget *menuitem, gpointer data); static void show_next_pass_cb (GtkWidget *menuitem, gpointer data); static void show_next_passes_cb (GtkWidget *menuitem, gpointer data); +static gint sat_name_compare (sat_t *a,sat_t *b); - static GtkVBoxClass *parent_class = NULL; @@ -724,7 +724,7 @@ GtkSingleSat *single_sat = GTK_SINGLE_SAT (user_data); sat_t *sat = SAT (value); - single_sat->sats = g_slist_append (single_sat->sats, sat); + single_sat->sats = g_slist_insert_sorted (single_sat->sats,sat, sat_name_compare); } @@ -1145,3 +1145,7 @@ } } + +static gint sat_name_compare (sat_t *a,sat_t *b) { + return g_ascii_strcasecmp(a->nickname,b->nickname); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-02-02 17:54:54
|
Revision: 756 http://gpredict.svn.sourceforge.net/gpredict/?rev=756&view=rev Author: aa1vs Date: 2011-02-02 17:54:48 +0000 (Wed, 02 Feb 2011) Log Message: ----------- Sort Satellites Groups alphabetically in combo box. Modified Paths: -------------- trunk/ChangeLog trunk/src/gtk-sat-selector.c trunk/src/mod-cfg.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-02-02 17:06:24 UTC (rev 755) +++ trunk/ChangeLog 2011-02-02 17:54:48 UTC (rev 756) @@ -3,6 +3,9 @@ * src/mod-cfg.c Sort QTH list alphabetically when configuring module. + * src/gtk-sat-selector.c + Sort Satellites Groups alphabetically in combo box. + 2011-02-01 Alexandru Csete <oz9aec at gmail.com> * src/gtk-rig-ctrl.c: Modified: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c 2011-02-02 17:06:24 UTC (rev 755) +++ trunk/src/gtk-sat-selector.c 2011-02-02 17:54:48 UTC (rev 756) @@ -67,6 +67,7 @@ GtkTreeIter *iter, gpointer column); +static gint cat_file_compare (const gchar *a, const gchar *b); static GtkVBoxClass *parent_class = NULL; @@ -379,12 +380,14 @@ gchar **buffv; const gchar *fname; + gchar *nfname; guint num = 0; + gint i,n; + GSList *cats = NULL; - /* load all satellites into selector->models[0] */ store = gtk_list_store_new (GTK_SAT_SELECTOR_COL_NUM, G_TYPE_STRING, // name @@ -447,11 +450,20 @@ g_dir_rewind (dir); while ((fname = g_dir_read_name (dir))) { if (g_str_has_suffix (fname, ".cat")) { + cats = g_slist_insert_sorted(cats,g_strdup(fname),(GCompareFunc)cat_file_compare); + } + } - load_cat_file (selector, fname); - + /*now load them into the combo box*/ + n = g_slist_length (cats); + for (i = 0; i < n; i++) { + nfname = g_slist_nth_data (cats, i); + if (nfname) { + load_cat_file (selector, nfname); } + g_free(nfname); } + g_slist_free (cats); g_dir_close (dir); g_free (dirname); @@ -806,3 +818,59 @@ return epoch; } + + +/** \brief Load category name from a .cat file + * \param fname The name of the .cat file (name only, no path) + * This function is a stripped down version of load_cat_file. It + * is needed to load the category name to created a sorted list + * of category names. With the existing user base already having + * .cat files in their directories, use of the file name directly + * for sorting will have problems. + */ +static gchar *load_cat_file_cat (const gchar *fname) +{ + GIOChannel *catfile; + GError *error = NULL; + + gchar *path; + gchar *buff; + + /* .cat files contains clear text category name in the first line + then one satellite catalog number per line */ + path = sat_file_name (fname); + catfile = g_io_channel_new_file (path, "r", &error); + if (error != NULL) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%s: Failed to open %s: %s"), + __FILE__, __FUNCTION__, fname, error->message); + g_clear_error (&error); + } + else { + /* read first line => category name */ + + if (g_io_channel_read_line (catfile, &buff, NULL, NULL, NULL) == G_IO_STATUS_NORMAL) { + g_strstrip (buff); /* removes trailing newline */ + } + } + + g_free (path); + g_io_channel_shutdown (catfile, TRUE, NULL); + return buff; +} + +/* this is a quick function that loads the category name from two cat + files and compares them. +*/ +gint cat_file_compare (const gchar *a,const gchar *b){ + gchar *cat_a, *cat_b; + gint temp; + + cat_a=load_cat_file_cat(a); + cat_b=load_cat_file_cat(b); + temp = g_ascii_strcasecmp(cat_a,cat_b); + g_free (cat_a); + g_free (cat_b); + return(temp); + +} Modified: trunk/src/mod-cfg.c =================================================================== --- trunk/src/mod-cfg.c 2011-02-02 17:06:24 UTC (rev 755) +++ trunk/src/mod-cfg.c 2011-02-02 17:54:48 UTC (rev 756) @@ -876,7 +876,7 @@ if (g_str_has_suffix (filename, ".qth")) { buffv = g_strsplit (filename, ".qth", 0); - qths=g_slist_insert_sorted(qths,g_strdup(buffv[0]),(GCompareFunc) qth_name_compare); + qths = g_slist_insert_sorted(qths,g_strdup(buffv[0]),(GCompareFunc) qth_name_compare); g_strfreev (buffv); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-02-02 17:06:30
|
Revision: 755 http://gpredict.svn.sourceforge.net/gpredict/?rev=755&view=rev Author: aa1vs Date: 2011-02-02 17:06:24 +0000 (Wed, 02 Feb 2011) Log Message: ----------- Sort QTH list alphabetically when configuring module. Modified Paths: -------------- trunk/ChangeLog trunk/src/mod-cfg.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-02-01 16:05:11 UTC (rev 754) +++ trunk/ChangeLog 2011-02-02 17:06:24 UTC (rev 755) @@ -1,3 +1,8 @@ +2011-02-02 Charles Suprin <hamaa1vs at gmail.com> + + * src/mod-cfg.c + Sort QTH list alphabetically when configuring module. + 2011-02-01 Alexandru Csete <oz9aec at gmail.com> * src/gtk-rig-ctrl.c: Modified: trunk/src/mod-cfg.c =================================================================== --- trunk/src/mod-cfg.c 2011-02-01 16:05:11 UTC (rev 754) +++ trunk/src/mod-cfg.c 2011-02-02 17:06:24 UTC (rev 755) @@ -80,6 +80,7 @@ static void addbut_clicked_cb (GtkButton *button, GtkSatSelector *selector); static void delbut_clicked_cb (GtkButton *button, GtkSatSelector *selector); +static gint qth_name_compare (const gchar *a, const gchar *b); /** \brief Create a new module. * @@ -829,11 +830,14 @@ gchar *dirname; const gchar *filename; gchar *defqth = NULL; + gchar *defqthshort = NULL; gchar **buffv; gint idx = -1; gint count = 0; + GSList *qths=NULL; + gchar *qthname; + gint i,n; - combo = gtk_combo_box_new_text (); /* get qth file name from cfgdata; if cfg data has no QTH @@ -845,6 +849,10 @@ MOD_CFG_GLOBAL_SECTION, MOD_CFG_QTH_FILE_KEY, &error); + buffv = g_strsplit (defqth, ".qth", 0); + defqthshort = g_strdup(buffv[0]); + + g_strfreev(buffv); } else { sat_log_log (SAT_LOG_LEVEL_MSG, @@ -852,6 +860,7 @@ __FUNCTION__); defqth = g_strdup (_("** DEFAULT **")); + defqthshort = g_strdup(defqth); } @@ -863,23 +872,33 @@ if (dir) { while ((filename = g_dir_read_name (dir))) { - + /*create a sorted list then use it to load the combo box*/ if (g_str_has_suffix (filename, ".qth")) { buffv = g_strsplit (filename, ".qth", 0); - gtk_combo_box_append_text (GTK_COMBO_BOX (combo), buffv[0]); + qths=g_slist_insert_sorted(qths,g_strdup(buffv[0]),(GCompareFunc) qth_name_compare); g_strfreev (buffv); + } + + } + n = g_slist_length (qths); + for (i = 0; i < n; i++) { + qthname = g_slist_nth_data (qths, i); + if (qthname) { + gtk_combo_box_append_text (GTK_COMBO_BOX (combo), qthname); + /* is this the QTH for this module? */ - if (!g_ascii_strcasecmp (defqth, filename)) { + /* comparison uses short name full filename*/ + if (!g_ascii_strcasecmp (defqthshort, qthname)) { idx = count; } - + g_free(qthname); count++; } - } - + g_slist_free(qths); + } else { sat_log_log (SAT_LOG_LEVEL_ERROR, @@ -907,6 +926,7 @@ } g_free (defqth); + g_free (defqthshort); g_free (dirname); g_dir_close (dir); @@ -1224,3 +1244,7 @@ } + +static gint qth_name_compare (const gchar* a,const gchar *b){ + return (g_ascii_strcasecmp(a,b)); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2011-02-01 16:05:18
|
Revision: 754 http://gpredict.svn.sourceforge.net/gpredict/?rev=754&view=rev Author: csete Date: 2011-02-01 16:05:11 +0000 (Tue, 01 Feb 2011) Log Message: ----------- Deleted obsolete file. Modified Paths: -------------- trunk/ChangeLog Removed Paths: ------------- trunk/src/defaults.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-02-01 15:31:48 UTC (rev 753) +++ trunk/ChangeLog 2011-02-01 16:05:11 UTC (rev 754) @@ -3,7 +3,10 @@ * src/gtk-rig-ctrl.c: Manage keyboard PTT event only if rig is RIG_TYPE_TOGGLE_MAN. + * src/defaults.h: + Deleted obsolete file. + 2011-01-24 Charles Suprin <hamaa1vs at gmail.com> * src/tle-update.c Deleted: trunk/src/defaults.h =================================================================== --- trunk/src/defaults.h 2011-02-01 15:31:48 UTC (rev 753) +++ trunk/src/defaults.h 2011-02-01 16:05:11 UTC (rev 754) @@ -1,38 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - Gpredict: Real-time satellite tracking and orbit prediction program - - Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC. - - Authors: Alexandru Csete <oz...@gm...> - - Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/gpredict/ - More details can be found at the project home page: - - http://gpredict.oz9aec.net/ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, visit http://www.fsf.org/ -*/ -#ifndef DEFAULTS_H -#define DEFAULTS_H 1 - -#warning "**** defaults.h is deprecated. ****" - -#define DEFAULT_TIME_FORMAT "%Y/%m/%d %H:%M:%S" - -#define GTK_SAT_MODULE_DEFAULT_TIMEOUT 1000 -#define GTK_SAT_MODULE_DEFAULT_WARP 1 - -#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2011-02-01 15:31:54
|
Revision: 753 http://gpredict.svn.sourceforge.net/gpredict/?rev=753&view=rev Author: csete Date: 2011-02-01 15:31:48 +0000 (Tue, 01 Feb 2011) Log Message: ----------- Manage keyboard PTT event only if rig is RIG_TYPE_TOGGLE_MAN. Modified Paths: -------------- trunk/ChangeLog trunk/src/gtk-rig-ctrl.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-01-29 00:27:20 UTC (rev 752) +++ trunk/ChangeLog 2011-02-01 15:31:48 UTC (rev 753) @@ -1,30 +1,41 @@ -2010-01-24 Charles Suprin <hamaa1vs at gmail.com> +2011-02-01 Alexandru Csete <oz9aec at gmail.com> + * src/gtk-rig-ctrl.c: + Manage keyboard PTT event only if rig is RIG_TYPE_TOGGLE_MAN. + + +2011-01-24 Charles Suprin <hamaa1vs at gmail.com> + * src/tle-update.c Fix bug where tle file suffix compare is case dependent. <https://bugs.launchpad.net/bugs/706452> + 2010-12-26 Charles Suprin <hamaa1vs at gmail.com> * src/gtk-rot-ctrl.c Make rotator lead satellite on update. Restructure error handling for cleaner code. + 2010-12-26 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sat-map.c: Removed dead code in coordinate conversion (it was nonsense anyway). + 2010-12-10 Charles Suprin <hamaa1vs at gmail.com> * data/locations.dat Add entries to locations.dat and add state to Mexican locations. + 2010-11-25 Charles Suprin <hamaa1vs at gmail.com> * src/gtk-rot-ctrl.c Move rotor to end of pass if below horizon and after current pass + 2010-11-24 Alexandru Csete <oz9aec at gmail.com> * src/Makefile.am: @@ -37,11 +48,13 @@ * src/gtk-rig-ctrl.c Close socket in gtk-rig/rot-ctrl when window closes if applicable. + 2010-11-11 Charles Suprin <hamaa1vs at gmail.com> * src/gtk-rot-ctrl.c Change error checking in set_pos + 2010-11-07 Charles Suprin <hamaa1vs at gmail.com> * src/gtk-rot-ctrl.c @@ -52,6 +65,7 @@ Added locations in Malaysia, Indonesia, the Philippines, and Kiribati from US/NOAA Metar database. Addresses Feature Request 3022617: Malaysia's location. + 2010-11-07 Alexandru Csete <oz9aec at gmail.com> * configure.ac: @@ -67,6 +81,7 @@ get_current_pass now works on copy of sat_t structure to address bug 3099314 + 2010-11-05 Charles Suprin <hamaa1vs at gmail.com> * src/predict-tools.c @@ -76,6 +91,7 @@ * src/gtk-rot-ctrl.c Update is_flipped_pass to handle pass with no details + 2010-11-01 Charles Suprin <hamaa1vs at gmail.com> * src/orbit-tools.c @@ -84,6 +100,7 @@ * src/gtk-rig-ctrl.c Add checks to g_strsplit calls in gtk-rig-ctrl.c + 2010-10-31 Charles Suprin <hamaa1vs at gmail.com> * src/about.[ch] @@ -179,23 +196,27 @@ * src/gtk-polar-view-popup.c Catch if pass has no points before making polar view/polar view popup + 2010-10-30 Charles Suprin <hamaa1vs at gmail.com> * src/gtk-rot-ctrl.[ch] * src/gtk-rig-ctrl.[ch] Change tab to spaces and change emacs indent-tabs-mode. + 2010-10-28 Charles Suprin <hamaa1vs at gmail.com> * src/predict-tools.c Explicitly compute pass LOS_AZ. + 2010-10-27 Charles Suprin <hamaa1vs at gmail.com> * src/gtk-rot-ctrl.[ch] Added support for flipped passes. Remove return from void function. + 2010-10-17 Charles Suprin <hamaa1vs at gmail.com> * src/gtk-rot-ctrl.[ch] @@ -208,6 +229,7 @@ * src/gtk-polar-plot.c Make rotator show when on horizon as with other items. + 2010-10-16 Alexandru Csete <oz9aec at gmail.com> * src/time-tools.[ch]: @@ -222,6 +244,7 @@ Allow only one GtkSkyGlance widget per module (consistent with GtkRigCtrl and GtkRotCtrl). + 2010-10-15 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sky-glance.[ch]: Modified: trunk/src/gtk-rig-ctrl.c =================================================================== --- trunk/src/gtk-rig-ctrl.c 2011-01-29 00:27:20 UTC (rev 752) +++ trunk/src/gtk-rig-ctrl.c 2011-02-01 15:31:48 UTC (rev 753) @@ -2592,9 +2592,11 @@ _("%s: Detected SPACEBAR pressed event"), __FUNCTION__); - /* manage PTT event */ - manage_ptt_event (ctrl); - event_managed = TRUE; + /* manage PTT event but only if rig is of type TOGGLE_MAN */ + if (ctrl->conf->type == RIG_TYPE_TOGGLE_MAN) { + manage_ptt_event (ctrl); + event_managed = TRUE; + } break; @@ -2611,11 +2613,12 @@ } -/** \brief Maange PTT events - * \param ctrl Pointer to the radio controller data +/** \brief Manage PTT events. + * \param ctrl Pointer to the radio controller data. * * This function is used to manage PTT events, e.g. the user presses - * the spacebar. It is only useful for RIG_TYPE_TOGGLE_MAN. + * the spacebar. It is only useful for RIG_TYPE_TOGGLE_MAN and possibly for + * RIG_TYPE_TOGGLE_AUTO. * * First, the function will try to lock the controller. If the lock is acquired * the function checks the current PTT status. @@ -2623,7 +2626,7 @@ * If PTT status is TRUE (on) it will simply set the PTT to FALSE (off). * * \warning This function assumes that the radio supprot set/get PTT, otherwise - * ot makes no sense to use it! + * it makes no sense to use it! */ static void manage_ptt_event (GtkRigCtrl *ctrl) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-01-29 00:27:26
|
Revision: 752 http://gpredict.svn.sourceforge.net/gpredict/?rev=752&view=rev Author: aa1vs Date: 2011-01-29 00:27:20 +0000 (Sat, 29 Jan 2011) Log Message: ----------- Required pass to compute time in future Modified Paths: -------------- branches/gpsd_testing/src/gtk-rot-ctrl.c Modified: branches/gpsd_testing/src/gtk-rot-ctrl.c =================================================================== --- branches/gpsd_testing/src/gtk-rot-ctrl.c 2011-01-28 16:06:03 UTC (rev 751) +++ branches/gpsd_testing/src/gtk-rot-ctrl.c 2011-01-29 00:27:20 UTC (rev 752) @@ -990,9 +990,11 @@ /* otherwise look 20 minutes into the future*/ time_delta=1.0/72.0; } - - step_size = time_delta / 2.0; + step_size = time_delta / 2.0; + if (step_size<ctrl->delay/1000.0/(secday)){ + step_size=ctrl->delay/1000.0/(secday); + } /* find a time when satellite is above horizon and at the edge of tolerance. the final step size needs to be smaller @@ -1032,19 +1034,7 @@ setaz = sat->az; } } - /*need to do this here in case the step size is too small*/ - if ((ctrl->flipped) && (ctrl->conf->maxel >= 180.0)){ - setel = 180.0-setel; - if (setaz > 180.0) - setaz -= 180.0; - else - setaz += 180.0; - } - if ((ctrl->conf->aztype == ROT_AZ_TYPE_180) && (setaz > 180.0)) { - setaz = setaz - 360.0; - } - /* send controller values to rotator device */ /* this is the newly computed value which should be ahead of the current position */ if (!set_pos (ctrl, setaz, setel)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-01-28 16:06:09
|
Revision: 751 http://gpredict.svn.sourceforge.net/gpredict/?rev=751&view=rev Author: aa1vs Date: 2011-01-28 16:06:03 +0000 (Fri, 28 Jan 2011) Log Message: ----------- Updated editor for GPSD Modified Paths: -------------- branches/gpsd_testing/src/qth-editor.c Modified: branches/gpsd_testing/src/qth-editor.c =================================================================== --- branches/gpsd_testing/src/qth-editor.c 2011-01-27 17:21:11 UTC (rev 750) +++ branches/gpsd_testing/src/qth-editor.c 2011-01-28 16:06:03 UTC (rev 751) @@ -73,6 +73,9 @@ static GtkWidget *location; /* QTH location */ static GtkWidget *desc; /* QTH description */ static GtkWidget *lat,*lon,*alt; /* LAT, LON and ALT */ +static GtkWidget *type; /* GPSD type */ +static GtkWidget *server; /* GPSD Server */ +static GtkWidget *port; /* GPSD Port */ static GtkWidget *ns,*ew; static GtkWidget *qra; /* QRA locator */ @@ -373,7 +376,45 @@ GUINT_TO_POINTER (SELECTION_MODE_WX)); gtk_table_attach_defaults (GTK_TABLE (table), wxbut, 3, 4, 7, 8); + /* GPSD enabled*/ + label = gtk_label_new (_("QTHtype")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 10, 11); + type = gtk_spin_button_new_with_range (0, 1, 1); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON (type), 1, 1); + gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (type), TRUE); + gtk_tooltips_set_tip (tooltips, type, + _("zero for old, 1 for gpsd"), + NULL); + gtk_table_attach_defaults (GTK_TABLE (table), type, 1, 2, 10, 11); + /* GPSD Server */ + label = gtk_label_new (_("GPSD Server")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 8, 9); + + server = gtk_entry_new (); + gtk_entry_set_max_length (GTK_ENTRY (server), 6000); + tooltips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tooltips, server, + _("GPSD Server."), + NULL); + gtk_table_attach_defaults (GTK_TABLE (table), server, 1, 2, 8, 9); + + /* GPSD Port*/ + label = gtk_label_new (_("GPSD Port")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 9, 10); + + port = gtk_spin_button_new_with_range (0, 32768, 1); + gtk_spin_button_set_increments (GTK_SPIN_BUTTON (port), 1, 100); + gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (port), TRUE); + gtk_tooltips_set_tip (tooltips, port, + _("Set the port for GPSD to use"), + NULL); + gtk_table_attach_defaults (GTK_TABLE (table), port, 1, 2, 9, 10); + + if (qth->name != NULL) update_widgets (qth); @@ -463,6 +504,9 @@ const gchar *qthdesc = NULL; const gchar *qthwx = NULL; const gchar *qthqra= NULL; + const gchar *gpsdserver= NULL; + guint gpsdport; + guint gpsdenabled; gdouble qthlat; gdouble qthlon; guint qthalt; @@ -486,7 +530,10 @@ qthalt = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (alt)); qthqra = gtk_entry_get_text (GTK_ENTRY (qra)); - + + gpsdenabled = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (type)); + gpsdserver = gtk_entry_get_text (GTK_ENTRY (server)); + gpsdport = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (port)); /* clear qth struct if not empty */ /* if (qth->name != NULL) */ /* g_free (qth->name); */ @@ -521,9 +568,14 @@ if (qthqra != NULL) qth->qra = g_strdup (qthqra); + if (gpsdserver != NULL) + qth->gpsd_server = g_strdup (gpsdserver); + qth->lat = qthlat; qth->lon = qthlon; qth->alt = qthalt; + qth->type = gpsdenabled; + qth->gpsd_port = gpsdport; /* store values */ confdir = get_user_conf_dir (); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-01-27 17:21:17
|
Revision: 750 http://gpredict.svn.sourceforge.net/gpredict/?rev=750&view=rev Author: aa1vs Date: 2011-01-27 17:21:11 +0000 (Thu, 27 Jan 2011) Log Message: ----------- Cleanup code. Ensure satellite position refined. Modified Paths: -------------- trunk/src/gtk-rot-ctrl.c Modified: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c 2011-01-27 02:50:50 UTC (rev 749) +++ trunk/src/gtk-rot-ctrl.c 2011-01-27 17:21:11 UTC (rev 750) @@ -867,10 +867,9 @@ { GtkRotCtrl *ctrl = GTK_ROT_CTRL (data); gdouble rotaz=0.0, rotel=0.0; - gdouble setaz=0.0, setel=0.0; + gdouble setaz=0.0, setel=45.0; gchar *text; gboolean error = FALSE; - gboolean update_flag=FALSE; sat_t sat_working, *sat; /*parameters for path predictions*/ gdouble time_delta; @@ -894,18 +893,15 @@ if (ctrl->t < ctrl->pass->aos) { setaz=ctrl->pass->aos_az; setel=0; - update_flag=TRUE; } else if (ctrl->t > ctrl->pass->los) { setaz=ctrl->pass->los_az; setel=0; - update_flag=TRUE; } } } else { setaz=ctrl->target->az; setel=ctrl->target->el; - update_flag=TRUE; } /* if this is a flipped pass and the rotor supports it*/ if ((ctrl->flipped)&&(ctrl->conf->maxel>=180.0)){ @@ -981,7 +977,12 @@ /* otherwise look 20 minutes into the future*/ time_delta=1.0/72.0; } - + /* have a minimum time delta*/ + if (time_delta<(ctrl->delay/1000.0/secday)){ + time_delta=ctrl->delay/1000.0/secday; + } + + step_size = time_delta / 2.0; /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-01-27 02:50:56
|
Revision: 749 http://gpredict.svn.sourceforge.net/gpredict/?rev=749&view=rev Author: aa1vs Date: 2011-01-27 02:50:50 +0000 (Thu, 27 Jan 2011) Log Message: ----------- Ensure the trtick buffer is not overflowed. Modified Paths: -------------- trunk/src/gtk-polar-view.c Modified: trunk/src/gtk-polar-view.c =================================================================== --- trunk/src/gtk-polar-view.c 2011-01-27 02:33:23 UTC (rev 748) +++ trunk/src/gtk-polar-view.c 2011-01-27 02:50:50 UTC (rev 749) @@ -1036,9 +1036,10 @@ if (!(i % tres)) { /* update time tick */ - g_object_set (obj->trtick[ttidx], - "x", (gdouble) x, "y", (gdouble) y, - NULL); + if (ttidx<TRACK_TICK_NUM) + g_object_set (obj->trtick[ttidx], + "x", (gdouble) x, "y", (gdouble) y, + NULL); ttidx++; } } @@ -1183,7 +1184,8 @@ if (!(i % tres)) { /* create a time tick */ - obj->trtick[ttidx] = create_time_tick (pv, detail->time, x, y); + if (ttidx<TRACK_TICK_NUM) + obj->trtick[ttidx] = create_time_tick (pv, detail->time, x, y); ttidx++; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-01-27 02:33:30
|
Revision: 748 http://gpredict.svn.sourceforge.net/gpredict/?rev=748&view=rev Author: aa1vs Date: 2011-01-27 02:33:23 +0000 (Thu, 27 Jan 2011) Log Message: ----------- Merging trunk into branch. Property Changed: ---------------- branches/gpsd_testing/data/satdata/scripts/convert.py branches/gpsd_testing/data/trsp/20439.trsp branches/gpsd_testing/data/trsp/20442.trsp branches/gpsd_testing/data/trsp/22825.trsp branches/gpsd_testing/data/trsp/22826.trsp branches/gpsd_testing/data/trsp/23439.trsp branches/gpsd_testing/data/trsp/24278.trsp branches/gpsd_testing/data/trsp/24786.trsp branches/gpsd_testing/data/trsp/25338.trsp branches/gpsd_testing/data/trsp/25397.trsp branches/gpsd_testing/data/trsp/25544.trsp branches/gpsd_testing/data/trsp/26352.trsp branches/gpsd_testing/data/trsp/26536.trsp branches/gpsd_testing/data/trsp/26871.trsp branches/gpsd_testing/data/trsp/26931.trsp branches/gpsd_testing/data/trsp/27453.trsp branches/gpsd_testing/data/trsp/27607.trsp branches/gpsd_testing/data/trsp/27844.trsp branches/gpsd_testing/data/trsp/27848.trsp branches/gpsd_testing/data/trsp/27939.trsp branches/gpsd_testing/data/trsp/28375.trsp branches/gpsd_testing/data/trsp/28650.trsp branches/gpsd_testing/data/trsp/28654.trsp branches/gpsd_testing/data/trsp/28895.trsp branches/gpsd_testing/data/trsp/32785.trsp branches/gpsd_testing/data/trsp/32787.trsp branches/gpsd_testing/data/trsp/32789.trsp branches/gpsd_testing/data/trsp/32791.trsp branches/gpsd_testing/data/trsp/33493.trsp branches/gpsd_testing/data/trsp/33498.trsp branches/gpsd_testing/data/trsp/33499.trsp branches/gpsd_testing/data/trsp/7530.trsp Property changes on: branches/gpsd_testing/data/satdata/scripts/convert.py ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/20439.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/20442.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/22825.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/22826.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/23439.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/24278.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/24786.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/25338.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/25397.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/25544.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/26352.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/26536.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/26871.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/26931.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/27453.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/27607.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/27844.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/27848.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/27939.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/28375.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/28650.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/28654.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/28895.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/32785.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/32787.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/32789.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/32791.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/33493.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/33498.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/33499.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - Property changes on: branches/gpsd_testing/data/trsp/7530.trsp ___________________________________________________________________ Deleted: svn:mergeinfo - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-01-27 01:49:34
|
Revision: 747 http://gpredict.svn.sourceforge.net/gpredict/?rev=747&view=rev Author: aa1vs Date: 2011-01-27 01:49:27 +0000 (Thu, 27 Jan 2011) Log Message: ----------- Merged trunk changes into branch Fixed segfault when pass recomputed on position returns a null. Modified Paths: -------------- branches/gpsd_testing/src/gtk-polar-plot.c branches/gpsd_testing/src/gtk-rot-ctrl.c branches/gpsd_testing/src/tle-update.c Property Changed: ---------------- branches/gpsd_testing/src/gtk-rig-ctrl.c branches/gpsd_testing/src/gtk-rig-ctrl.h branches/gpsd_testing/src/gtk-rot-ctrl.c branches/gpsd_testing/src/gtk-rot-ctrl.h Modified: branches/gpsd_testing/src/gtk-polar-plot.c =================================================================== --- branches/gpsd_testing/src/gtk-polar-plot.c 2011-01-27 00:36:02 UTC (rev 746) +++ branches/gpsd_testing/src/gtk-polar-plot.c 2011-01-27 01:49:27 UTC (rev 747) @@ -937,8 +937,9 @@ points->coords[2*i+1] = (double) y; if (!(i % tres)) { - /* create a time tick */ - pv->trtick[ttidx] = create_time_tick (pv, detail->time, x, y); + if (ttidx<TRACK_TICK_NUM) + /* create a time tick */ + pv->trtick[ttidx] = create_time_tick (pv, detail->time, x, y); ttidx++; } } @@ -1054,9 +1055,11 @@ x += 5; } /* update time tick */ - g_object_set (pv->trtick[ttidx], - "x", (gdouble) x, "y", (gdouble) y, - NULL); + if (ttidx<TRACK_TICK_NUM){ + g_object_set (pv->trtick[ttidx], + "x", (gdouble) x, "y", (gdouble) y, + NULL); + } ttidx++; } } Property changes on: branches/gpsd_testing/src/gtk-rig-ctrl.c ___________________________________________________________________ Modified: svn:mergeinfo - /branches/continuous_network/src/gtk-rig-ctrl.c:655-689 + /branches/continuous_network/src/gtk-rig-ctrl.c:655-689 /trunk/src/gtk-rig-ctrl.c:728-746 Property changes on: branches/gpsd_testing/src/gtk-rig-ctrl.h ___________________________________________________________________ Modified: svn:mergeinfo - /branches/continuous_network/src/gtk-rig-ctrl.h:655-689 + /branches/continuous_network/src/gtk-rig-ctrl.h:655-689 /trunk/src/gtk-rig-ctrl.h:728-746 Modified: branches/gpsd_testing/src/gtk-rot-ctrl.c =================================================================== --- branches/gpsd_testing/src/gtk-rot-ctrl.c 2011-01-27 00:36:02 UTC (rev 746) +++ branches/gpsd_testing/src/gtk-rot-ctrl.c 2011-01-27 01:49:27 UTC (rev 747) @@ -304,19 +304,22 @@ g_free (buff); update_count_down (ctrl, t); - - - /* update next pass if necessary */ - if (ctrl->pass != NULL) { - /*if the current pass is too far away*/ + + /*if the current pass is too far away*/ + if ((ctrl->pass!=NULL)&& (ctrl->qth!=NULL)) if (qth_small_dist(ctrl->qth,ctrl->pass->qth_comp)>1.0){ free_pass (ctrl->pass); ctrl->pass=NULL; ctrl->pass = get_pass (ctrl->target, ctrl->qth, t, 3.0); - set_flipped_pass(ctrl); - /* update polar plot */ - gtk_polar_plot_set_pass (GTK_POLAR_PLOT (ctrl->plot), ctrl->pass); + if (ctrl->pass) { + set_flipped_pass(ctrl); + /* update polar plot */ + gtk_polar_plot_set_pass (GTK_POLAR_PLOT (ctrl->plot), ctrl->pass); + } } + + /* update next pass if necessary */ + if (ctrl->pass != NULL) { /*if we are not in the current pass*/ if ((ctrl->pass->aos>t)||(ctrl->pass->los<t)){ /* the pass may not have met the minimum @@ -880,7 +883,6 @@ gdouble setaz=0.0, setel=0.0; gchar *text; gboolean error = FALSE; - gboolean update_flag=FALSE; sat_t sat_working, *sat; /*parameters for path predictions*/ gdouble time_delta; @@ -904,18 +906,15 @@ if (ctrl->t < ctrl->pass->aos) { setaz=ctrl->pass->aos_az; setel=0; - update_flag=TRUE; } else if (ctrl->t > ctrl->pass->los) { setaz=ctrl->pass->los_az; setel=0; - update_flag=TRUE; } } } else { setaz=ctrl->target->az; setel=ctrl->target->el; - update_flag=TRUE; } /* if this is a flipped pass and the rotor supports it*/ if ((ctrl->flipped)&&(ctrl->conf->maxel>=180.0)){ @@ -1011,7 +1010,7 @@ else sat->az += 180.0; } - if ((ctrl->conf->aztype == ROT_AZ_TYPE_180) && (setaz > 180.0)) { + if ((ctrl->conf->aztype == ROT_AZ_TYPE_180) && (sat->az > 180.0)) { sat->az = sat->az - 360.0; } if ((sat->el < 0.0)||(sat->el > 180.0)|| @@ -1033,6 +1032,19 @@ setaz = sat->az; } } + /*need to do this here in case the step size is too small*/ + if ((ctrl->flipped) && (ctrl->conf->maxel >= 180.0)){ + setel = 180.0-setel; + if (setaz > 180.0) + setaz -= 180.0; + else + setaz += 180.0; + } + + if ((ctrl->conf->aztype == ROT_AZ_TYPE_180) && (setaz > 180.0)) { + setaz = setaz - 360.0; + } + /* send controller values to rotator device */ /* this is the newly computed value which should be ahead of the current position */ if (!set_pos (ctrl, setaz, setel)) { Property changes on: branches/gpsd_testing/src/gtk-rot-ctrl.c ___________________________________________________________________ Modified: svn:mergeinfo - /branches/continuous_network/src/gtk-rot-ctrl.c:655-689 + /branches/continuous_network/src/gtk-rot-ctrl.c:655-689 /trunk/src/gtk-rot-ctrl.c:728-746 Property changes on: branches/gpsd_testing/src/gtk-rot-ctrl.h ___________________________________________________________________ Modified: svn:mergeinfo - /branches/continuous_network/src/gtk-rot-ctrl.h:655-689 + /branches/continuous_network/src/gtk-rot-ctrl.h:655-689 /trunk/src/gtk-rot-ctrl.h:728-746 Modified: branches/gpsd_testing/src/tle-update.c =================================================================== --- branches/gpsd_testing/src/tle-update.c 2011-01-27 00:36:02 UTC (rev 746) +++ branches/gpsd_testing/src/tle-update.c 2011-01-27 01:49:27 UTC (rev 747) @@ -730,17 +730,18 @@ static gboolean is_tle_file (const gchar *dir, const gchar *fnam) { gchar *path; + gchar *fname_lower; gboolean fileIsOk = FALSE; - path = g_strconcat (dir, G_DIR_SEPARATOR_S, fnam, NULL); + fname_lower=g_ascii_strdown(fnam,-1); if (g_file_test (path, G_FILE_TEST_IS_REGULAR) && - (g_str_has_suffix(fnam, ".tle") || g_str_has_suffix(fnam, ".txt"))) + (g_str_has_suffix(fname_lower, ".tle") || g_str_has_suffix(fname_lower, ".txt"))) { fileIsOk = TRUE; } - + g_free (fname_lower); g_free (path); return fileIsOk; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-01-27 00:36:10
|
Revision: 746 http://gpredict.svn.sourceforge.net/gpredict/?rev=746&view=rev Author: aa1vs Date: 2011-01-27 00:36:02 +0000 (Thu, 27 Jan 2011) Log Message: ----------- Fixed typo bug in rot controller. Modified Paths: -------------- trunk/src/gtk-rot-ctrl.c Modified: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c 2011-01-26 23:16:18 UTC (rev 745) +++ trunk/src/gtk-rot-ctrl.c 2011-01-27 00:36:02 UTC (rev 746) @@ -1001,7 +1001,7 @@ else sat->az += 180.0; } - if ((ctrl->conf->aztype == ROT_AZ_TYPE_180) && (setaz > 180.0)) { + if ((ctrl->conf->aztype == ROT_AZ_TYPE_180) && (sat->az > 180.0)) { sat->az = sat->az - 360.0; } if ((sat->el < 0.0)||(sat->el > 180.0)|| This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-01-26 23:16:24
|
Revision: 745 http://gpredict.svn.sourceforge.net/gpredict/?rev=745&view=rev Author: aa1vs Date: 2011-01-26 23:16:18 +0000 (Wed, 26 Jan 2011) Log Message: ----------- Eliminate buffer overflow in update_track and create_track. Modified Paths: -------------- trunk/src/gtk-polar-plot.c Modified: trunk/src/gtk-polar-plot.c =================================================================== --- trunk/src/gtk-polar-plot.c 2011-01-26 22:45:43 UTC (rev 744) +++ trunk/src/gtk-polar-plot.c 2011-01-26 23:16:18 UTC (rev 745) @@ -937,8 +937,9 @@ points->coords[2*i+1] = (double) y; if (!(i % tres)) { - /* create a time tick */ - pv->trtick[ttidx] = create_time_tick (pv, detail->time, x, y); + if (ttidx<TRACK_TICK_NUM) + /* create a time tick */ + pv->trtick[ttidx] = create_time_tick (pv, detail->time, x, y); ttidx++; } } @@ -1054,9 +1055,11 @@ x += 5; } /* update time tick */ - g_object_set (pv->trtick[ttidx], - "x", (gdouble) x, "y", (gdouble) y, - NULL); + if (ttidx<TRACK_TICK_NUM){ + g_object_set (pv->trtick[ttidx], + "x", (gdouble) x, "y", (gdouble) y, + NULL); + } ttidx++; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-01-26 22:45:50
|
Revision: 744 http://gpredict.svn.sourceforge.net/gpredict/?rev=744&view=rev Author: aa1vs Date: 2011-01-26 22:45:43 +0000 (Wed, 26 Jan 2011) Log Message: ----------- Code cleanup Modified Paths: -------------- branches/gpsd_testing/src/gtk-sat-module.c branches/gpsd_testing/src/qth-data.c Modified: branches/gpsd_testing/src/gtk-sat-module.c =================================================================== --- branches/gpsd_testing/src/gtk-sat-module.c 2011-01-25 23:17:43 UTC (rev 743) +++ branches/gpsd_testing/src/gtk-sat-module.c 2011-01-26 22:45:43 UTC (rev 744) @@ -802,7 +802,7 @@ /* time to update header? */ mod->head_count++; - if (mod->head_count == mod->head_timeout) { + if (mod->head_count >= mod->head_timeout) { /* reset counter */ mod->head_count = 0; @@ -818,17 +818,15 @@ */ mod->event_count = 0; } - /*only trigger an update if adequate movement has occurred*/ - /*FIXME position threshhold should be configurable*/ - if (qth_small_dist(mod->qth,mod->qth_event)>1.0) { - /* reset counter, this will make gtk_sat_module_update_sat - recalculate events - */ - mod->event_count = 0; - } - - - + /*only trigger an update if adequate movement has occurred*/ + /*FIXME position threshhold should be configurable*/ + if (qth_small_dist(mod->qth,mod->qth_event)>1.0) { + /* reset counter, this will make gtk_sat_module_update_sat + recalculate events + */ + mod->event_count = 0; + } + /*if the events are going to be recalculated store the position*/ if (mod->event_count == 0){ qth_small_save(mod->qth,&(mod->qth_event)); Modified: branches/gpsd_testing/src/qth-data.c =================================================================== --- branches/gpsd_testing/src/qth-data.c 2011-01-25 23:17:43 UTC (rev 743) +++ branches/gpsd_testing/src/qth-data.c 2011-01-26 22:45:43 UTC (rev 744) @@ -728,6 +728,8 @@ qth->loc=NULL; qth->gpsd_port=0; qth->gpsd_server=NULL; + qth->gpsd_update=0.0; + qth->gpsd_connected=0.0; } /** \brief Load safe values into the qth_t data structure This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-01-25 23:17:49
|
Revision: 743 http://gpredict.svn.sourceforge.net/gpredict/?rev=743&view=rev Author: aa1vs Date: 2011-01-25 23:17:43 +0000 (Tue, 25 Jan 2011) Log Message: ----------- Separated gps updates from gps connect attempts. Added watchdog around gps_read/gps_poll code to address gpsd behavior. Modified Paths: -------------- branches/gpsd_testing/src/qth-data.c branches/gpsd_testing/src/qth-data.h Modified: branches/gpsd_testing/src/qth-data.c =================================================================== --- branches/gpsd_testing/src/qth-data.c 2011-01-24 17:02:05 UTC (rev 742) +++ branches/gpsd_testing/src/qth-data.c 2011-01-25 23:17:43 UTC (rev 743) @@ -484,17 +484,36 @@ */ gboolean qth_data_update(qth_t * qth, gdouble t) { gboolean retval = FALSE; + guint num_loops=0; switch (qth->type) { case QTH_STATIC_TYPE: /*never changes*/ break; case QTH_GPSD_TYPE: + if (((t-qth->gpsd_update)>30.0/86400.0)&&(t-qth->gpsd_connected>30.0/86400.0)){ + /*if needed restart the gpsd interface*/ + qth_data_update_stop(qth); + qth_data_update_init(qth); + qth->gpsd_connected=t; + + } + if (qth->gps_data!=NULL) { #if HAS_LIBGPS switch (GPSD_API_MAJOR_VERSION){ case 4: #if GPSD_API_MAJOR_VERSION==4 - if(gps_waiting(qth->gps_data) == 1) { + while(gps_waiting(qth->gps_data) == TRUE) { + /* this is a watchdog in case there is a problem with the gpsd code.*/ + /* if the server was up and has failed then gps_waiting in 2.92 confirmed */ + /* will return 1 (supposedly fixed in later versions.)*/ + /* if we do not do this as a while loop, the gpsd packets can backup */ + /* and no longer be in sync with the gps receiver*/ + num_loops++; + if (num_loops>10000){ + retval=FALSE; + break; + } if(gps_poll(qth->gps_data) == 0){ /*handling packet_set inline with http://gpsd.berlios.de/client-howto.html @@ -529,7 +548,12 @@ break; case 5: #if GPSD_API_MAJOR_VERSION==5 - if(gps_waiting(qth->gps_data) == 1) { + while(gps_waiting(qth->gps_data) == 1) { + num_loops++; + if (num_loops>10000){ + retval=FALSE; + break; + } if(gps_read(qth->gps_data) == 0){ /*handling packet_set inline with http://gpsd.berlios.de/client-howto.html Modified: branches/gpsd_testing/src/qth-data.h =================================================================== --- branches/gpsd_testing/src/qth-data.h 2011-01-24 17:02:05 UTC (rev 742) +++ branches/gpsd_testing/src/qth-data.h 2011-01-25 23:17:43 UTC (rev 743) @@ -48,6 +48,7 @@ gchar *gpsd_server; /*!< GPSD Server name. */ gint gpsd_port; /*!< GPSD Server port. */ gdouble gpsd_update; /*!< Time last GPSD update was received. */ + gdouble gpsd_connected; /*!< Time last GPSD update was last attempted to connect. */ struct gps_data_t *gps_data; /*!< gpsd data structure. */ GKeyFile *data; /*!< Raw data from cfg file. */ } qth_t; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-01-24 17:02:11
|
Revision: 742 http://gpredict.svn.sourceforge.net/gpredict/?rev=742&view=rev Author: aa1vs Date: 2011-01-24 17:02:05 +0000 (Mon, 24 Jan 2011) Log Message: ----------- Cleanup code and comments Update ChangeLog Modified Paths: -------------- branches/gpsd_testing/ChangeLog branches/gpsd_testing/src/gtk-polar-view.c branches/gpsd_testing/src/gtk-sat-map.c branches/gpsd_testing/src/gtk-sat-module.c Modified: branches/gpsd_testing/ChangeLog =================================================================== --- branches/gpsd_testing/ChangeLog 2011-01-24 16:22:46 UTC (rev 741) +++ branches/gpsd_testing/ChangeLog 2011-01-24 17:02:05 UTC (rev 742) @@ -1,3 +1,114 @@ +2011-01-24 Charles Suprin <hamaa1vs at gmail.com> + + * ChangeLog + * src/gtk-sat-map.c + * src/gtk-sat-module.c + * src/gtk-polar-view.c + Code cleanup and comments. + Update Changelog + +2011-01-21 Charles Suprin <hamaa1vs at gmail.com> + + * src/predict-tools.c + Eliminate segfault if pass being returned is NULL in get_pass routines. + +2011-01-20 Charles Suprin <hamaa1vs at gmail.com> + + * src/gtk-sat-module.c + Convert gps update time to seconds. + +2011-01-19 Charles Suprin <hamaa1vs at gmail.com> + + * src/gtk-sat-module.c + * src/qth-data.c + * src/qth-data.h + * src/sat-pref-qth-editor.c + * src/sat-pref-qth.c + Added initial GPSD API version 5 support. + Added engineering gui support for GPSD. + +2011-01-16 Charles Suprin <hamaa1vs at gmail.com> + + * src/qth-data.c + Added more QTH validation + +2011-01-14 Charles Suprin <hamaa1vs at gmail.com> + + * NEWS + * src/config-keys.h + * src/gtk-polar-view.c + * src/gtk-rot-ctrl.c + * src/gtk-sat-map.c + * src/gtk-sat-module.c + * src/gtk-sat-module.h + * src/mod-mgr.c + * src/predict-tools.c + * src/predict-tools.h + * src/qth-data.c + * src/qth-data.h + * src/sat-pref-qth-data.h + * src/sat-pref-qth.c + Updated copyright information. + Added handling for new QTH fields into saving and loading routines. + Updated qth preference guis. (Still not complete) + Conditioned gpsd calls on GPSD_API_MAJOR_VERSION as requested in libgps man page. + Update NEWS and Changelog in anticipation of merge with trunk. + Corrected minor typos in comments. + +2011-01-11 Charles Suprin <hamaa1vs at gmail.com> + + * src/gtk-rot-ctrl.c + Add support for changing qth to gtk-rot-ctrl.c to update pass in polar view + +2011-01-09 Charles Suprin <hamaa1vs at gmail.com> + + * src/gtk-polar-view.c + * src/gtk-sat-module.c + * src/gtk-sat-module.h + Add position based updates for sky-at-a-glance. + Move qth updates so they occur all the time. + +2011-01-08 Charles Suprin <hamaa1vs at gmail.com> + + * src/gtk-polar-view.c + * src/predict-tools.c + * src/predict-tools.h + * src/qth-data.c + * src/gtk-sat-map.c + * src/gtk-sat-module.c + * src/gtk-sat-module.h + * src/qth-data.h + Make gpsd code safer for multiple modules. + Add position comparison for event updates. + Fix segfault when gpsd not connected. + Make gtk-polar-view update pass if qth has moved significantly. + Add qth_small_t element to pass to check if pass data is old. + +2011-01-05 Charles Suprin <hamaa1vs at gmail.com> + + * src/gtk-sat-module.c + * src/qth-data.c + * src/qth-data.h + Update AOS information when qth changes and make distinction between qth_data and qth_data_update in function names + + 2011-01-02 Charles Suprin <hamaa1vs at gmail.com> + * configure.ac + * src/config-keys.h + * src/gtk-sat-module.c + * src/gtk-sat-module.h + * src/qth-data.c + * src/qth-data.h + * src/sat-pref-qth-editor.c + Second version of qpsd qth moved things into qth-data.c and started working on the qth editing gui to support these new interfaces + +2010-12-30 Charles Suprin <hamaa1vs at gmail.com> + + * configure.ac + * src/gtk-sat-map.c + * src/gtk-sat-module.c + * src/gtk-sat-module.h + Initial GPSD hack. + 2010-12-26 Charles Suprin <hamaa1vs at gmail.com> * src/gtk-rot-ctrl.c Modified: branches/gpsd_testing/src/gtk-polar-view.c =================================================================== --- branches/gpsd_testing/src/gtk-polar-view.c 2011-01-24 16:22:46 UTC (rev 741) +++ branches/gpsd_testing/src/gtk-polar-view.c 2011-01-24 17:02:05 UTC (rev 742) @@ -686,6 +686,7 @@ } /* check refresh rate and refresh sats if time */ + /* FIXME need to add location based update*/ if (polv->counter < polv->refresh) { polv->counter++; } Modified: branches/gpsd_testing/src/gtk-sat-map.c =================================================================== --- branches/gpsd_testing/src/gtk-sat-map.c 2011-01-24 16:22:46 UTC (rev 741) +++ branches/gpsd_testing/src/gtk-sat-map.c 2011-01-24 17:02:05 UTC (rev 742) @@ -643,9 +643,11 @@ "x", (gdouble) satmap->x0 + 2, "y", (gdouble) satmap->y0 + 1, NULL); + satmap->counter=satmap->refresh; } /* check refresh rate and refresh sats/qth if time */ + /* FIXME add location check*/ if (satmap->counter < satmap->refresh) { satmap->counter++; } Modified: branches/gpsd_testing/src/gtk-sat-module.c =================================================================== --- branches/gpsd_testing/src/gtk-sat-module.c 2011-01-24 16:22:46 UTC (rev 741) +++ branches/gpsd_testing/src/gtk-sat-module.c 2011-01-24 17:02:05 UTC (rev 742) @@ -750,10 +750,9 @@ GdkWindowState state; gdouble delta; guint i; - /*update the qth position*/ - if(qth_data_update(mod->qth,mod->tmgCdnum)) { + /*update the qth position*/ + qth_data_update(mod->qth,mod->tmgCdnum); - } /* in docked state, update only if tab is visible */ switch (mod->state) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |