[Gpredict-svn] SF.net SVN: gpredict:[253] trunk/src
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
|
From: <cs...@us...> - 2009-04-12 18:32:15
|
Revision: 253
http://gpredict.svn.sourceforge.net/gpredict/?rev=253&view=rev
Author: csete
Date: 2009-04-12 18:32:11 +0000 (Sun, 12 Apr 2009)
Log Message:
-----------
Added mode string.
Modified Paths:
--------------
trunk/src/trsp-conf.c
trunk/src/trsp-conf.h
Modified: trunk/src/trsp-conf.c
===================================================================
--- trunk/src/trsp-conf.c 2009-04-12 16:27:13 UTC (rev 252)
+++ trunk/src/trsp-conf.c 2009-04-12 18:32:11 UTC (rev 253)
@@ -39,6 +39,7 @@
#define KEY_DOWN_LOW "DOWN_LOW"
#define KEY_DOWN_HIGH "DOWN_HIGH"
#define KEY_INVERT "INVERT"
+#define KEY_MODE "MODE"
/** \brief Read transponder data file.
* \param catnum The catalog number of the satellite to read transponders for.
@@ -138,6 +139,14 @@
g_clear_error (&error);
trsp->invert = FALSE;
}
+
+ trsp->mode = g_key_file_get_string (cfg, groups[i], KEY_MODE, &error);
+ if (error != NULL) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Error reading %s:%s from %s"),
+ __FUNCTION__, groups[i], KEY_MODE, name);
+ g_clear_error (&error);
+ }
/* add transponder to list */
trsplist = g_slist_append (trsplist, trsp);
@@ -182,6 +191,8 @@
trsp = (trsp_t *) g_slist_nth_data (trsplist, i);
g_free (trsp->name);
g_free (trsp);
+ if (trsp->mode)
+ g_free (trsp->mode);
}
g_slist_free (trsplist);
trsplist = NULL;
Modified: trunk/src/trsp-conf.h
===================================================================
--- trunk/src/trsp-conf.h 2009-04-12 16:27:13 UTC (rev 252)
+++ trunk/src/trsp-conf.h 2009-04-12 18:32:11 UTC (rev 253)
@@ -40,6 +40,7 @@
gdouble downlow; /*!< Lower limit of downlink. */
gdouble downhigh; /*!< Upper limit of donlink. */
gboolean invert; /*!< Flag indicating whether transponder is inverting. */
+ gchar *mode; /*!< Mode descriptor. */
} trsp_t;
/* The actual data would then be a singly linked list with pointers to transponder_t structures */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|