Craploads of temporary but annoying debug messages

This commit is contained in:
Mark Watkins 2011-07-21 22:03:06 +10:00
parent 537f42953a
commit 02887507c7
4 changed files with 15 additions and 30 deletions

View File

@ -980,7 +980,6 @@ bool PRS1Loader::OpenWaveforms(Session *session,QString filename)
if (diff || corrupt) {
qDebug() << "Timestamp restarts" << diff << corrupt << duration;
for (int i=0;i<num_signals;i++) {
wf[i]=new SampleFormat [wlength[i]];
for (int j=0;j<wlength[i];j++) {
@ -1034,33 +1033,6 @@ bool PRS1Loader::OpenWaveforms(Session *session,QString filename)
Waveform *w=new Waveform(qint64(start)*1000L,wc[i],wf[i],wlength[i],qint64(wdur[i])*1000L,-128,128); //FlowRate
session->AddWaveform(w);
}
int froog=3;
/* file.read(headerbytes,sizeof(PRS1Header));
file.read(waveheaderbytes,sizeof(PRS1Header));
int ns=waveheader.num_signals;
WaveHeaderList ws[ns];
char * wsc=&ws[0];
file.read(wsc,waveheader.num_signals*3);
chksum8=0;
for (int i=0;i<15;i++) chksum8+=headerbytes[i];
for (int i=0;i<5;i++) chksum8+=waveheaderbytes[i];
for (int i=0;i<waveheader.num_signals*3;i++) {
char *a=wsc;
chksum8+=a[i];
}
file.read((char *)&t8,1);
if (t8!=chksum8) {
qDebug() << "Mr T says \"Checksum doesn't match fool!\"";
}
qDebug() << "Reading Waveform " << header.sequence << header.extension << ":" << waveheader.duration << "seconds";
for (int i=0;i<ns;i++) {
qDebug() << ns << "signals" << "interleave=" << ws[i].interleave << ws[i].sample_format;
}
//file.read(m_buffer,
} while (!file.atEnd()); */
return true;
}
/*bool PRS1Loader::OldOpenWaveforms(Session *session,QString filename)

View File

@ -432,11 +432,14 @@ bool Machine::Save()
for (d=day.begin();d!=day.end();d++) {
qDebug() << "Day Save Commenced";
for (s=d->second->begin(); s!=d->second->end(); s++) {
cnt++;
if (qprogress) qprogress->setValue(66.0+(float(cnt)/float(size)*33.0));
if ((*s)->IsChanged()) (*s)->Store(path);
}
qDebug() << "Day Save Completed";
}
return true;
}

View File

@ -247,7 +247,9 @@ bool Session::OpenEvents() {
if(s_events_loaded)
return true;
bool b;
qDebug() << "Open Events() Start";
b=LoadEvents(s_eventfile);
qDebug() << "Open Events() Done";
if (!b) {
qWarning() << "Error Unkpacking Events" << s_eventfile;
}
@ -259,7 +261,9 @@ bool Session::OpenWaveforms() {
if (s_waves_loaded)
return true;
bool b;
qDebug() << "OpenWaveforms() Start";
b=LoadWaveforms(s_wavefile);
qDebug() << "OpenWaveforms() Done";
if (!b) {
qWarning() << "Error Unkpacking Wavefile" << s_wavefile;
}
@ -274,7 +278,6 @@ bool Session::Store(QString path)
// Storing Session Data in our format
// {DataDir}/{MachineID}/{SessionID}.{ext}
{
QDir dir(path);
if (!dir.exists(path))
dir.mkpath(path);
@ -282,11 +285,14 @@ bool Session::Store(QString path)
QString base;
base.sprintf("%08lx",s_session);
base=path+"/"+base;
//qDebug(("Storing Session: "+base).toLatin1());
qDebug() << "Storing Session: " << base;
bool a,b,c;
a=StoreSummary(base+".000"); // if actually has events
qDebug() << " Summary done";
if (events.size()>0) b=StoreEvents(base+".001");
qDebug() << " Events done";
if (waveforms.size()>0) c=StoreWaveforms(base+".002");
qDebug() << " Waveform done";
if (a) {
s_changed=false;
}

View File

@ -162,13 +162,17 @@ void MainWindow::on_action_Import_Data_triggered()
}
c+=d;
}
qDebug() << "Finished Importing data" << c;
if (c) {
profile->Save();
qDebug() << " profile->Save();";
if (daily) daily->ReloadGraphs();
qDebug() << " daily->ReloadGraphs();";
if (overview) {
overview->ReloadGraphs();
overview->UpdateGraphs();
}
qDebug() << "overview->ReloadGraphs();";
}
qstatus->setText(tr("Ready"));
qprogress->hide();