Subversion Repositories public

Rev

Rev 143 | Rev 232 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 143 Rev 149
Line 98... Line 98...
98
uint32              l_lap;
98
uint32              l_lap;
99
uint32              l_idx;
99
uint32              l_idx;
100
time_type           start;
100
time_type           start;
101
time_t              start_time;
101
time_t              start_time;
102
char                filename[BUFSIZ];
102
char                filename[BUFSIZ];
-
 
103
bool		    Serial;
103
struct tm *         tbuf;
104
struct tm *         tbuf;
104
 
105
 
105
	// Find the data path in config file
106
	// Find the data path in config file
106
	KSimpleConfig *cfg = new KSimpleConfig(QString("sportwatcher.rc"), true);
107
	KSimpleConfig *cfg = new KSimpleConfig(QString("sportwatcher.rc"), true);
107
	cfg->setGroup(QString("SportWatcher"));
108
	cfg->setGroup(QString("SportWatcher"));
108
	Data = cfg->readEntry("Data");
109
	Data = cfg->readEntry("Data");
109
	device = cfg->readEntry("Device");
110
	device = cfg->readEntry("Device");
-
 
111
	Serial = cfg->readBoolEntry("Serial");
110
	delete cfg;
112
	delete cfg;
111
 
113
 
112
	if (Data.isEmpty())
114
	if (Data.isEmpty())
113
	{
115
	{
114
	   KMessageBox::error(this, i18n("No data path was set in the settings!"));
116
	   KMessageBox::error(this, i18n("No data path was set in the settings!"));
Line 120... Line 122...
120
	   setShown(true);
122
	   setShown(true);
121
 
123
 
122
	barProgress->setTotalSteps(psteps);
124
	barProgress->setTotalSteps(psteps);
123
	step = 0;
125
	step = 0;
124
	garmin_set_device(device.ascii());
126
	garmin_set_device(device.ascii());
125
	garmin_set_method(0);		// Setting to 1 doesn't work!! (reading over garmin_gps kernel module)
127
	garmin_set_method((Serial) ? 1 : 0);		// Setting to 1 doesn't work!! (reading over garmin_gps kernel module)
126
	// Initialize a callback function to have a real progress bar
128
	// Initialize a callback function to have a real progress bar
127
	garmin_set_hook(&progressWidget::CallBack);
129
	garmin_set_hook(&progressWidget::CallBack);
128
	lblInfo->setText(i18n("Looking for a Garmin GPS device..."));
130
	lblInfo->setText(i18n("Looking for a Garmin GPS device..."));
129
 
131
 
130
	if (garmin_init(&garmin, 0) == 0)
132
	if (garmin_init(&garmin, 0) == 0)