mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
More Channel Rework
This commit is contained in:
parent
af617a15ca
commit
7dadad63c2
@ -105,8 +105,22 @@ void gLineChart::paint(gGraph & w,int left, int top, int width, int height)
|
||||
qWarning() << "gLineChart::Plot() NULL Session Record.. This should not happen";
|
||||
continue;
|
||||
}
|
||||
schema::Channel ch=schema::channel[m_code];
|
||||
bool fndbetter=false;
|
||||
for (QList<schema::Channel *>::iterator l=ch.m_links.begin();l!=ch.m_links.end();l++) {
|
||||
schema::Channel *c=*l;
|
||||
ci=(*m_day)[svi]->eventlist.find(c->name());
|
||||
if (ci!=(*m_day)[svi]->eventlist.end()) {
|
||||
fndbetter=true;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
if (!fndbetter) {
|
||||
ci=(*m_day)[svi]->eventlist.find(m_code);
|
||||
if (ci==(*m_day)[svi]->eventlist.end()) continue;
|
||||
}
|
||||
|
||||
|
||||
QVector<EventList *> & evec=ci.value();
|
||||
num_points=0;
|
||||
|
@ -575,13 +575,10 @@ bool ResmedLoader::LoadBRP(Session *sess,EDFParser &edf)
|
||||
es.gain*=60;
|
||||
es.physical_dimension="L/M";
|
||||
code=CPAP_FlowRate;
|
||||
sess->machine()->registerChannel(code);
|
||||
} else if (edf.edfsignals[s]->label.startsWith("Mask Pres")) {
|
||||
code=CPAP_MaskPressure;
|
||||
sess->machine()->registerChannel(code);
|
||||
code=CPAP_MaskPressureHi;
|
||||
} else if (es.label.startsWith("Resp Event")) {
|
||||
code=CPAP_RespEvent;
|
||||
sess->machine()->registerChannel(code);
|
||||
} else {
|
||||
qDebug() << "Unobserved ResMed BRP Signal " << edf.edfsignals[s]->label;
|
||||
continue;
|
||||
@ -593,7 +590,6 @@ bool ResmedLoader::LoadBRP(Session *sess,EDFParser &edf)
|
||||
a->AddWaveform(edf.startdate,es.data,recs,duration);
|
||||
sess->setMin(code,a->min());
|
||||
sess->setMax(code,a->max());
|
||||
//sess->eventlist[code].push_back(a);
|
||||
//delete edf.edfsignals[s]->data;
|
||||
//edf.edfsignals[s]->data=NULL; // so it doesn't get deleted when edf gets trashed.
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ bool ChannelList::Load(QString filename)
|
||||
continue;
|
||||
}
|
||||
scope=Scopes[scopestr];
|
||||
name=e.attribute("name","").toLower();
|
||||
name=e.attribute("name","");
|
||||
details=e.attribute("details","");
|
||||
label=e.attribute("label","");
|
||||
|
||||
@ -213,8 +213,9 @@ bool ChannelList::Load(QString filename)
|
||||
groups[group][name]=chan;
|
||||
if (linkid>0) {
|
||||
if (channels.contains(linkid)) {
|
||||
Channel *it=channels[id];
|
||||
chan->m_links.push_back(it);
|
||||
Channel *it=channels[linkid];
|
||||
it->m_links.push_back(chan);
|
||||
int i=0;
|
||||
} else {
|
||||
qWarning() << "Linked channel must be defined first in" << filename <<"line" << line;
|
||||
}
|
||||
|
@ -71,9 +71,8 @@ public:
|
||||
return EmptyChannel;
|
||||
}
|
||||
Channel & operator[](QString name) {
|
||||
QString tmp=name.toLower();
|
||||
if (names.contains(tmp))
|
||||
return *names[tmp];
|
||||
if (names.contains(name))
|
||||
return *names[name];
|
||||
else
|
||||
return EmptyChannel;
|
||||
}
|
||||
|
@ -24,9 +24,9 @@ One id code per item
|
||||
<channel id="0x1022" class="data" name="RampTime" details="Ramp Time" label="Ramp Time" color="black"/>
|
||||
<channel id="0x1023" class="data" name="RampPressure" details="Ramp Starting Pressure" label="Ramp Pr." color="black"/>
|
||||
|
||||
<channel id="0x1100" class="data" name="Flow" details="Flow Rate" label="Flow Rate" unit="L/min" color="black"/>
|
||||
<channel id="0x1101" class="data" name="MaskPres" details="Mask Pressure" label="Mask Pressure" unit="cmH20" color="blue"/>
|
||||
<channel id="0x1102" class="data" name="MaskPresHi" details="Mask Pressure" label="Mask Pressure" unit="cmH20" color="blue" link="0x1101"/>
|
||||
<channel id="0x1100" class="data" name="FlowRate" details="Flow Rate" label="Flow Rate" unit="L/min" color="black"/>
|
||||
<channel id="0x1101" class="data" name="MaskPressure" details="Mask Pressure" label="Mask Pressure" unit="cmH20" color="blue"/>
|
||||
<channel id="0x1102" class="data" name="MaskPressureHi" details="Mask Pressure" label="Mask Pressure" unit="cmH20" color="blue" link="0x1101"/>
|
||||
<channel id="0x1103" class="data" name="TidalVolume" details="Tidal Volume" label="Tidal Volume" unit="" color="magenta"/>
|
||||
<channel id="0x1104" class="data" name="Snore" details="Snore" label="Snore" unit="" color="grey"/>
|
||||
<channel id="0x1105" class="data" name="MinuteVent" details="Minute Ventilation" label="Minute Vent." unit="" color="dark cyan"/>
|
||||
|
@ -200,12 +200,12 @@ void MainWindow::Startup()
|
||||
if (overview) overview->ReloadGraphs();
|
||||
qprogress->hide();
|
||||
qstatus->setText("");
|
||||
schema::Channel & item=schema::channel["SysOneResistSet"];
|
||||
/*schema::Channel & item=schema::channel["SysOneResistSet"];
|
||||
if (!item.isNull()) {
|
||||
for (QHash<int,QString>::iterator i=item.m_options.begin();i!=item.m_options.end();i++) {
|
||||
qDebug() << i.key() << i.value();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
//qstatusbar->clearMessage();
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user