Fix for oximetry event stuff I just broke

This commit is contained in:
Mark Watkins 2011-12-03 20:08:40 +10:00
parent 07b142c448
commit 22333f6294
5 changed files with 11 additions and 14 deletions

View File

@ -174,9 +174,6 @@ bool ChannelList::Load(QString filename)
name=e.attribute("name",""); name=e.attribute("name","");
details=e.attribute("details",""); details=e.attribute("details","");
label=e.attribute("label",""); label=e.attribute("label","");
if (name=="Pulse") {
int i=5;
}
if (name.isEmpty() || details.isEmpty() || label.isEmpty()) { if (name.isEmpty() || details.isEmpty() || label.isEmpty()) {
qWarning() << "Missing name,details or label attribute in" << filename << "line" << line; qWarning() << "Missing name,details or label attribute in" << filename << "line" << line;

View File

@ -412,7 +412,7 @@ void Daily::UpdateEventsTree(QTreeWidget *tree,Day *day)
if (mcroot.find(code)==mcroot.end()) { if (mcroot.find(code)==mcroot.end()) {
int cnt=day->count(code); int cnt=day->count(code);
total_events+=cnt; total_events+=cnt;
QString st=schema::channel[m.key()].description(); QString st=schema::channel[code].description();
if (st.isEmpty()) { if (st.isEmpty()) {
st="Fixme "+code; st="Fixme "+code;
} }

View File

@ -14,12 +14,12 @@ One id code per item
<channel id="0x1003" class="data" name="Hypopnea" details="Hypopnea" label="H" unit="events/hour" color="blue"/> <channel id="0x1003" class="data" name="Hypopnea" details="Hypopnea" label="H" unit="events/hour" color="blue"/>
<channel id="0x1004" class="data" name="Apnea" details="Unspecified Apnea" label="UA" unit="events/hour" color="dark green"/> <channel id="0x1004" class="data" name="Apnea" details="Unspecified Apnea" label="UA" unit="events/hour" color="dark green"/>
<channel id="0x1005" class="data" name="FlowLimit" details="Flow Limitation" label="FL" unit="events/hour" color="dark grey"/> <channel id="0x1005" class="data" name="FlowLimit" details="Flow Limitation" label="FL" unit="events/hour" color="dark grey"/>
<channel id="0x1006" class="data" name="RERA" details="Respiratory Effort Related Arousal" unit="events/hour" label="RERA" color="gold"/> <channel id="0x1006" class="data" name="RERA" details="Resp. Effort Related Arousal" unit="events/hour" label="RERA" color="gold"/>
<channel id="0x1007" class="data" name="VSnore" details="Vibratory Snore" label="VS" unit="events/hour" color="red"/> <channel id="0x1007" class="data" name="VSnore" details="Vibratory Snore" label="VS" unit="events/hour" color="red"/>
<channel id="0x1008" class="data" name="VSnore2" details="Vibratory Snore 2" label="VS2" unit="events/hour" color="orange"/> <channel id="0x1008" class="data" name="VSnore2" details="Vibratory Snore 2" label="VS2" unit="events/hour" color="orange"/>
<channel id="0x1009" class="data" name="PressurePulse" details="Pressure Pulse" unit="events/hour" color="dark red"/> <channel id="0x1009" class="data" name="PressurePulse" details="Pressure Pulse" label="PP" unit="events/hour" color="dark red"/>
<channel id="0x100a" class="data" name="LeakFlag" details="Leak Event" label="L" unit="events/hour" color="dark blue"/> <channel id="0x100a" class="data" name="LeakFlag" details="Leak Event" label="L" unit="events/hour" color="dark blue"/>
<channel id="0x100b" class="data" name="NRI" details="Non-Responding Event" unit="events/hour" color="orange"/> <channel id="0x100b" class="data" name="NRI" details="Non-Responding Event" label="NRI" unit="events/hour" color="orange"/>
<channel id="0x100c" class="data" name="EP" details="Exhale Puff" label="EP" unit="events/hour" color="dark magenta"/> <channel id="0x100c" class="data" name="EP" details="Exhale Puff" label="EP" unit="events/hour" color="dark magenta"/>
<channel id="0x1020" class="data" name="PressureMin" details="Min Therapy Pressure" label="PMin" color="black"/> <channel id="0x1020" class="data" name="PressureMin" details="Min Therapy Pressure" label="PMin" color="black"/>

View File

@ -78,8 +78,8 @@ bool SerialOximeter::Open(QextSerialPort::QueryMode mode)
if (m_port->open(QIODevice::ReadWrite) == true) { if (m_port->open(QIODevice::ReadWrite) == true) {
// if (m_mode==QextSerialPort::EventDriven) // if (m_mode==QextSerialPort::EventDriven)
connect(m_port, SIGNAL(readyRead()), this, SLOT(onReadyRead())); connect(m_port, SIGNAL(readyRead()), this, SLOT(ReadyRead()));
//connect(port, SIGNAL(dsrChanged(bool)), this, SLOT(onDsrChanged(bool))); //connect(port, SIGNAL(dsrChanged(bool)), this, SLOT(DsrChanged(bool)));
if (!(m_port->lineStatus() & LS_DSR)) if (!(m_port->lineStatus() & LS_DSR))
qDebug() << "check device is turned on"; qDebug() << "check device is turned on";
qDebug() << "listening for data on" << m_port->portName(); qDebug() << "listening for data on" << m_port->portName();
@ -97,7 +97,7 @@ void SerialOximeter::Close()
if (m_port) m_port->close(); if (m_port) m_port->close();
if (m_portmode==QextSerialPort::EventDriven) if (m_portmode==QextSerialPort::EventDriven)
disconnect(m_port, SIGNAL(readyRead()), this, SLOT(onReadyRead())); disconnect(m_port, SIGNAL(readyRead()), this, SLOT(ReadyRead()));
m_mode=SO_OFF; m_mode=SO_OFF;
m_opened=false; m_opened=false;
} }
@ -789,7 +789,7 @@ void Oximetry::on_SerialPortsCombo_activated(const QString &arg1)
oximeter->setPortName(arg1); oximeter->setPortName(arg1);
} }
void Oximetry::RunButton_toggled(bool checked) void Oximetry::on_RunButton_toggled(bool checked)
{ {
if (!checked) { if (!checked) {
oximeter->stopLive(); oximeter->stopLive();

View File

@ -163,11 +163,11 @@ public:
private slots: private slots:
void on_RefreshPortsButton_clicked(); void on_RefreshPortsButton_clicked();
void RunButton_toggled(bool checked); void on_RunButton_toggled(bool checked);
void on_SerialPortsCombo_activated(const QString &arg1); void on_SerialPortsCombo_activated(const QString &arg1);
//void onReadyRead(); //void ReadyRead();
//void onDsrChanged(bool status); //void DsrChanged(bool status);
void on_ImportButton_clicked(); void on_ImportButton_clicked();