[Gpredict-svn] SF.net SVN: gpredict:[208] trunk
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
From: <cs...@us...> - 2009-03-21 12:51:25
|
Revision: 208 http://gpredict.svn.sourceforge.net/gpredict/?rev=208&view=rev Author: csete Date: 2009-03-21 12:51:22 +0000 (Sat, 21 Mar 2009) Log Message: ----------- Make LO values optional. Modified Paths: -------------- trunk/ChangeLog trunk/src/radio-conf.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-03-21 11:47:36 UTC (rev 207) +++ trunk/ChangeLog 2009-03-21 12:51:22 UTC (rev 208) @@ -1,7 +1,7 @@ 2009-03-21 Alexandru Csete <oz...@gm...> * src/radio-conf.[ch]: - Added config field for uplink transverter LO. + Added config field for uplink transverter LO. LO values are now optional. 2009-03-21 Stephane Fillod <fi...@us...> Modified: trunk/src/radio-conf.c =================================================================== --- trunk/src/radio-conf.c 2009-03-21 11:47:36 UTC (rev 207) +++ trunk/src/radio-conf.c 2009-03-21 12:51:22 UTC (rev 208) @@ -110,25 +110,37 @@ return FALSE; } - conf->lo = g_key_file_get_double (cfg, GROUP, KEY_LO, &error); - if (error != NULL) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Error reading radio conf from %s (%s)."), - __FUNCTION__, conf->name, error->message); - g_clear_error (&error); - g_key_file_free (cfg); - return FALSE; + /* KEY_LO is optional */ + if (g_key_file_has_key (cfg, GROUP, KEY_LO, NULL)) { + conf->lo = g_key_file_get_double (cfg, GROUP, KEY_LO, &error); + if (error != NULL) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Error reading radio conf from %s (%s)."), + __FUNCTION__, conf->name, error->message); + g_clear_error (&error); + g_key_file_free (cfg); + return FALSE; + } } + else { + conf->lo = 0.0; + } - conf->loup = g_key_file_get_double (cfg, GROUP, KEY_LOUP, &error); - if (error != NULL) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Error reading radio conf from %s (%s)."), - __FUNCTION__, conf->name, error->message); - g_clear_error (&error); - g_key_file_free (cfg); - return FALSE; + /* KEY_LOUP is optional */ + if (g_key_file_has_key (cfg, GROUP, KEY_LOUP, NULL)) { + conf->loup = g_key_file_get_double (cfg, GROUP, KEY_LOUP, &error); + if (error != NULL) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Error reading radio conf from %s (%s)."), + __FUNCTION__, conf->name, error->message); + g_clear_error (&error); + g_key_file_free (cfg); + return FALSE; + } } + else { + conf->loup = 0.0; + } conf->type = g_key_file_get_integer (cfg, GROUP, KEY_TYPE, &error); if (error != NULL) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |