mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
PRS1 Error list for later, cleaned up Events browser
This commit is contained in:
parent
e27232423e
commit
672b111339
@ -359,8 +359,13 @@ gGraphView::gGraphView(QWidget *parent, gGraphView *shared)
|
||||
plots_menu = context_menu->addMenu(tr("Plots"));
|
||||
connect(plots_menu, SIGNAL(triggered(QAction*)), this, SLOT(onPlotsClicked(QAction*)));
|
||||
|
||||
overlay_menu = context_menu->addMenu(tr("Overlays"));
|
||||
connect(overlay_menu, SIGNAL(triggered(QAction*)), this, SLOT(onOverlaysClicked(QAction*)));
|
||||
overlay_menu = context_menu->addMenu("Overlays");
|
||||
|
||||
cpap_menu = overlay_menu->addMenu(tr("CPAP"));
|
||||
connect(cpap_menu, SIGNAL(triggered(QAction*)), this, SLOT(onOverlaysClicked(QAction*)));
|
||||
|
||||
oximeter_menu = overlay_menu->addMenu(tr("Oximeter"));
|
||||
connect(oximeter_menu, SIGNAL(triggered(QAction*)), this, SLOT(onOverlaysClicked(QAction*)));
|
||||
|
||||
lines_menu = context_menu->addMenu(tr("Dotted Lines"));
|
||||
connect(lines_menu, SIGNAL(triggered(QAction*)), this, SLOT(onLinesClicked(QAction*)));
|
||||
@ -1663,33 +1668,53 @@ void gGraphView::populateMenu(gGraph * graph)
|
||||
plots_menu->menuAction()->setVisible(true);
|
||||
}
|
||||
|
||||
|
||||
overlay_menu->clear();
|
||||
oximeter_menu->clear();
|
||||
|
||||
using namespace schema;
|
||||
ChanType flags = ChanType (SPAN | MINOR_FLAG | FLAG);
|
||||
QList<ChannelID> chans = lc->m_day->getSortedMachineChannels(flags);
|
||||
QList<ChannelID> chans = lc->m_day->getSortedMachineChannels(MT_OXIMETER, flags);
|
||||
|
||||
for (int i=0; i < chans.size() ; ++i) {
|
||||
ChannelID code = chans.at(i);
|
||||
QAction * action = overlay_menu->addAction(schema::channel[code].fullname());
|
||||
QAction * action = oximeter_menu->addAction(schema::channel[code].fullname());
|
||||
action->setToolTip(schema::channel[code].description());
|
||||
action->setData(QString("%1|%2").arg(graph->name()).arg(code));
|
||||
action->setCheckable(true);
|
||||
action->setChecked(schema::channel[code].enabled());
|
||||
}
|
||||
|
||||
if (overlay_menu->actions().size() > 0) {
|
||||
if (oximeter_menu->actions().size() > 0) {
|
||||
oximeter_menu->menuAction()->setVisible(true);
|
||||
overlay_menu->menuAction()->setVisible(true);
|
||||
}
|
||||
|
||||
cpap_menu->clear();
|
||||
|
||||
chans = lc->m_day->getSortedMachineChannels(MT_CPAP, flags);
|
||||
|
||||
for (int i=0; i < chans.size() ; ++i) {
|
||||
ChannelID code = chans.at(i);
|
||||
QAction * action = cpap_menu->addAction(schema::channel[code].fullname());
|
||||
action->setToolTip(schema::channel[code].description());
|
||||
action->setData(QString("%1|%2").arg(graph->name()).arg(code));
|
||||
action->setCheckable(true);
|
||||
action->setChecked(schema::channel[code].enabled());
|
||||
}
|
||||
|
||||
if (cpap_menu->actions().size() > 0) {
|
||||
cpap_menu->menuAction()->setVisible(true);
|
||||
overlay_menu->menuAction()->setVisible(true);
|
||||
}
|
||||
|
||||
} else {
|
||||
lines_menu->clear();
|
||||
lines_menu->menuAction()->setVisible(false);
|
||||
plots_menu->clear();
|
||||
plots_menu->menuAction()->setVisible(false);
|
||||
overlay_menu->clear();
|
||||
oximeter_menu->clear();
|
||||
oximeter_menu->menuAction()->setVisible(false);
|
||||
cpap_menu->clear();
|
||||
cpap_menu->menuAction()->setVisible(false);
|
||||
overlay_menu->menuAction()->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
@ -434,7 +434,10 @@ class gGraphView
|
||||
void populateMenu(gGraph *);
|
||||
QMenu * lines_menu;
|
||||
QMenu * plots_menu;
|
||||
|
||||
QMenu * overlay_menu;
|
||||
QMenu * oximeter_menu;
|
||||
QMenu * cpap_menu;
|
||||
|
||||
|
||||
inline void setCurrentTime(double time) {
|
||||
|
@ -1068,6 +1068,33 @@ void Day::CloseEvents()
|
||||
}
|
||||
}
|
||||
|
||||
QList<ChannelID> Day::getSortedMachineChannels(MachineType type, quint32 chantype)
|
||||
{
|
||||
QList<ChannelID> available;
|
||||
QHash<MachineType, Machine *>::iterator mi_end = machines.end();
|
||||
for (QHash<MachineType, Machine *>::iterator mi = machines.begin(); mi != mi_end; mi++) {
|
||||
if (mi.key() != type) continue;
|
||||
available.append(mi.value()->availableChannels(chantype));
|
||||
}
|
||||
|
||||
QMultiMap<int, ChannelID> order;
|
||||
|
||||
for (int i=0; i < available.size(); ++i) {
|
||||
ChannelID code = available.at(i);
|
||||
order.insert(schema::channel[code].order(), code);
|
||||
}
|
||||
|
||||
QMultiMap<int, ChannelID>::iterator it;
|
||||
|
||||
QList<ChannelID> channels;
|
||||
for (it = order.begin(); it != order.end(); ++it) {
|
||||
ChannelID code = it.value();
|
||||
channels.append(code);
|
||||
}
|
||||
return channels;
|
||||
}
|
||||
|
||||
|
||||
QList<ChannelID> Day::getSortedMachineChannels(quint32 chantype)
|
||||
{
|
||||
QList<ChannelID> available;
|
||||
|
@ -197,6 +197,9 @@ class Day
|
||||
//! \brief Returns a list of channels of supplied types, according to channel orders
|
||||
QList<ChannelID> getSortedMachineChannels(quint32 chantype);
|
||||
|
||||
//! \brief Returns a list of machine specific channels of supplied types, according to channel orders
|
||||
QList<ChannelID> getSortedMachineChannels(MachineType type, quint32 chantype);
|
||||
|
||||
// Some ugly CPAP specific stuff
|
||||
QString getCPAPMode();
|
||||
QString getPressureRelief();
|
||||
|
@ -2306,6 +2306,109 @@ void PRS1Loader::Register()
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Thanks SleepyCPAP :)
|
||||
CODE ERROR DESCRIPTION ERROR TYPE ERROR CATEGORY
|
||||
1 SOFTWARE STOP STOP General Errors
|
||||
2 Not Used General Errors
|
||||
3 INT RAM REBOOT General Errors
|
||||
4 NULL PTR REBOOT General Errors
|
||||
5 DATA REBOOT General Errors
|
||||
6 STATE MACHINE REBOOT General Errors
|
||||
7 SOFTWARE REBOOT General Errors
|
||||
8-9 Not Used General Errors
|
||||
10 WDOG TEST RAM REBOOT Watchdog & Timer Errors
|
||||
11 WDOG TEST REBOOT Watchdog & Timer Errors
|
||||
12 BACKGROUND WDOG NO CARD REBOOT Watchdog & Timer Errors
|
||||
13 BACKGROUND WDOG SD CARD REBOOT Watchdog & Timer Errors
|
||||
14 WDOG LOWRES TIMER REBOOT Watchdog & Timer Errors
|
||||
15 CYCLE HANDLER OVERRUN REBOOT Watchdog & Timer Errors
|
||||
16 RASP RESTORE TIMEOUT CONTINUE Watchdog & Timer Errors
|
||||
17 ONEMS HANDLER OVERRUN REBOOT Watchdog & Timer Errors
|
||||
18 Not Used Watchdog & Timer Errors
|
||||
19 WDOG TIMEOUT REBOOT Watchdog & Timer Errors
|
||||
20 MOTOR SPINUP FLUX LOW REBOOT Motor/Blower Errors
|
||||
21 MOTOR VBUS HIGH STOP Motor/Blower Errors
|
||||
22 MOTOR FLUX MAGNITUDE REBOOT Motor/Blower Errors
|
||||
23 MOTOR OVERSPEED REBOOT Motor/Blower Errors
|
||||
24 MOTOR SPEED REVERSE REBOOT Motor/Blower Errors
|
||||
25 MOTOR THERMISTOR OPEN CONTINUE Motor/Blower Errors
|
||||
26 MOTOR THERMISTOR SHORTED CONTINUE Motor/Blower Errors
|
||||
27 MOTOR RL NOCONVERGE STOP Motor/Blower Errors
|
||||
28 NEGATIVE QUADRATURE VOLTAGE VECTOR REBOOT Motor/Blower Errors
|
||||
29 VBUS GAIN ZERO: REBOOT Motor/Blower Errors
|
||||
30 MOTOR SPINUP FLUX HIGH REBOOT Motor/Blower Errors
|
||||
31 (incorrect power supply - 60series) Motor/Blower Errors
|
||||
32-39 Not Used Motor/Blower Errors
|
||||
40 NVRAM REBOOT NVRAM Low Level Errors
|
||||
41 STORAGE UNIT RAM REBOOT NVRAM Low Level Errors
|
||||
42 UNABLE TO OBTAIN BUS REBOOT NVRAM Low Level Errors
|
||||
43 NVRAM NO CALLBACK OCCURRED REBOOT NVRAM Low Level Errors
|
||||
44 NV BUFFER NULL REBOOT NVRAM Low Level Errors
|
||||
45 NV CALLBACK NULL REBOOT NVRAM Low Level Errors
|
||||
46 NV ZERO LENGTH REBOOT NVRAM Low Level Errors
|
||||
47 NVRAM INVALID BYTES XFRRED REBOOT NVRAM Low Level Errors
|
||||
48-49 Not Used NVRAM Low Level Errors
|
||||
50 DAILY VALUES CORRUPT LOG ONLY NVRAM Unit Related Errors
|
||||
51 CORRUPT COMPLIANCE LOG CONTINUE NVRAM Unit Related Errors
|
||||
52 CORRUPT COMPLIANCE CB CONTINUE NVRAM Unit Related Errors
|
||||
53 COMP LOG SEM TIMEOUT CONTINUE NVRAM Unit Related Errors
|
||||
54 COMPLOG REQS OVERFLOW REBOOT NVRAM Unit Related Errors
|
||||
55 THERAPY QUEUE FULL CONTINUE NVRAM Unit Related Errors
|
||||
56 COMPLOG PACKET STATUS REBOOT NVRAM Unit Related Errors
|
||||
57 SESS OBS QUEUE OVF REBOOT NVRAM Unit Related Errors
|
||||
58 SESS OBS NO CALLBACK REBOOT NVRAM Unit Related Errors
|
||||
59 Not Used NVRAM Unit Related Errors
|
||||
60 UNSUPPORTED HARDWARE REBOOT General Hardware Errors
|
||||
61 PLL UNLOCKED REBOOT General Hardware Errors
|
||||
62 STUCK RAMP KEY CONTINUE General Hardware Errors
|
||||
63 STUCK KNOB KEY CONTINUE General Hardware Errors
|
||||
64 DSP OVERTIME PWM REBOOT General Hardware Errors
|
||||
65 STUCK ENCODER A CONTINUE General Hardware Errors
|
||||
66 STUCK ENCODER B CONTINUE General Hardware Errors
|
||||
67-69 Not Used General Hardware Errors
|
||||
70 PRESSURE SENSOR ABSENT STOP Pressure Sensor Errors
|
||||
71 Not Used Pressure Sensor Errors
|
||||
72 PSENS UNABLE TO OBTAIN BUS REBOOT Pressure Sensor Errors
|
||||
73 SENSOR PRESS OFFSET STOP STOP Pressure Sensor Errors
|
||||
74-79 Not Used Pressure Sensor Errors
|
||||
80 UNABLE TO INIT FLOW SENSOR REBOOT Flow Sensor Errors
|
||||
81 FLOW SENSOR TABLE CONTINUE Flow Sensor Errors
|
||||
82 FLOW SENSOR OFFSET CONTINUE Flow Sensor Errors
|
||||
83 FSENS UNABLE TO OBTAIN BUS REBOOT / 2nd failure=STOP Flow Sensor Errors
|
||||
84 FLOW SENSOR STOP STOP Flow Sensor Errors
|
||||
85 FLOW SENSOR OCCLUDED CONTINUE Flow Sensor Errors
|
||||
86 FLOW SENSOR ABSENT CONTINUE Flow Sensor Errors
|
||||
87 FLOW SENSOR BUS CONTINUE Flow Sensor Errors
|
||||
88-89 Not Used Flow Sensor Errors
|
||||
90 OTP NOT CONFIGURED STOP OTP & RTC Errors
|
||||
91 OTP INCORRECTLY CONFIGURED STOP OTP & RTC Errors
|
||||
92 Not Used OTP & RTC Errors
|
||||
93 RTC VALUE CONTINUE OTP & RTC Errors
|
||||
94 RTC STOPPED CONTINUE OTP & RTC Errors
|
||||
95-99 Not Used OTP & RTC Errors
|
||||
100 HUMID NO HEAT CONTINUE Humidifier Errors
|
||||
101 HUMID TEMP MAX STOP Humidifier Errors
|
||||
102 THERMISTOR HIGH CONTINUE Humidifier Errors
|
||||
103 THERMISTOR LOW CONTINUE Humidifier Errors
|
||||
104 HUMID AMBIENT OFF CONTINUE Humidifier Errors
|
||||
105 HUMID AMBIENT COMM CONTINUE Humidifier Errors
|
||||
106-109 Not Used Humidifier Errors
|
||||
110 STACK REBOOT Stack & Exception Handler Errors
|
||||
111 EXCEPTION STACK OVERFLOW REBOOT Stack & Exception Handler Errors
|
||||
112 EXCEPTION STACK RESERVE LOG ONLY Stack & Exception Handler Errors
|
||||
113 EXCEPTION STACK UNDERFLOW REBOOT Stack & Exception Handler Errors
|
||||
114 FIQ STACK OVERFLOW REBOOT Stack & Exception Handler Errors
|
||||
115 FIQ STACK RESERVE LOG ONLY Stack & Exception Handler Errors
|
||||
116 FIQ STACK UNDERFLOW REBOOT Stack & Exception Handler Errors
|
||||
117 IRQ STACK OVERFLOW REBOOT Stack & Exception Handler Errors
|
||||
118 IRQ STACK RESERVE LOG ONLY Stack & Exception Handler Errors
|
||||
119 IRQ STACK UNDERFLOW REBOOT Stack & Exception Handler Errors
|
||||
120 SVC STACK OVERFLOW REBOOT Stack & Exception Handler Errors
|
||||
121 SVC STACK RESERVE LOG ONLY Stack & Exception Handler Errors
|
||||
122 SVC STACK UNDERFLOW REBOOT Stack & Exception Handler Errors
|
||||
123 DATA ABORT EXCEPTION REBOOT Stack & Exception Handler Errors
|
||||
124 PREFETCH EXCEPTION REBOOT Stack & Exception Handler Errors
|
||||
125 ILLEGAL INSTRUCTION EXCEPTION REBOOT Stack & Exception Handler Errors
|
||||
126 SWI ABORT EXCEPTION REBOOT Stack & Exception Handler Errors
|
||||
*/
|
||||
|
||||
|
@ -657,35 +657,22 @@ void Daily::UpdateEventsTree(QTreeWidget *tree,Day *day)
|
||||
bool userflags=p_profile->cpap->userEventFlagging();
|
||||
|
||||
qint64 drift=0, clockdrift=p_profile->cpap->clockDrift()*1000L;
|
||||
|
||||
quint32 chantype = schema::FLAG | schema::SPAN | schema::MINOR_FLAG;
|
||||
if (p_profile->general->showUnknownFlags()) chantype |= schema::UNKNOWN;
|
||||
QList<ChannelID> chans = day->getSortedMachineChannels(chantype);
|
||||
|
||||
for (QList<Session *>::iterator s=day->begin();s!=day->end();++s) {
|
||||
if (!(*s)->enabled()) continue;
|
||||
Session * sess = *s;
|
||||
if (!sess->enabled()) continue;
|
||||
|
||||
QHash<ChannelID,QVector<EventList *> >::iterator m;
|
||||
for (int c=0; c < chans.size(); ++c) {
|
||||
ChannelID code = chans.at(c);
|
||||
m = sess->eventlist.find(code);
|
||||
if (m == sess->eventlist.end()) continue;
|
||||
|
||||
for (m=(*s)->eventlist.begin();m!=(*s)->eventlist.end();m++) {
|
||||
ChannelID code=m.key();
|
||||
if ((code!=CPAP_Obstructive)
|
||||
&& (code!=CPAP_Hypopnea)
|
||||
&& (code!=CPAP_Apnea)
|
||||
&& (code!=PRS1_0B)
|
||||
&& (code!=CPAP_ClearAirway)
|
||||
&& (code!=CPAP_CSR)
|
||||
&& (code!=CPAP_RERA)
|
||||
&& (code!=CPAP_UserFlag1)
|
||||
&& (code!=CPAP_UserFlag2)
|
||||
&& (code!=CPAP_UserFlag3)
|
||||
&& (code!=CPAP_NRI)
|
||||
&& (code!=CPAP_LeakFlag)
|
||||
&& (code!=CPAP_LargeLeak)
|
||||
&& (code!=CPAP_ExP)
|
||||
&& (code!=CPAP_FlowLimit)
|
||||
&& (code!=CPAP_SensAwake)
|
||||
&& (code!=CPAP_PressurePulse)
|
||||
&& (code!=CPAP_VSnore2)
|
||||
&& (code!=CPAP_VSnore)) continue;
|
||||
|
||||
if (!userflags && ((code==CPAP_UserFlag1) || (code==CPAP_UserFlag2) || (code==CPAP_UserFlag3))) continue;
|
||||
drift=((*s)->machine()->type() == MT_CPAP) ? clockdrift : 0;
|
||||
drift=(sess->machine()->type() == MT_CPAP) ? clockdrift : 0;
|
||||
|
||||
QTreeWidgetItem *mcr;
|
||||
if (mcroot.find(code)==mcroot.end()) {
|
||||
|
@ -842,7 +842,7 @@ QToolButton:pressed {
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="movable">
|
||||
<bool>true</bool>
|
||||
@ -875,9 +875,12 @@ QToolButton:pressed {
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="animated">
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="animated">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="headerVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
|
Loading…
Reference in New Issue
Block a user