mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 03:30:44 +00:00
Merge branch 'master' into prs1-fixes
This commit is contained in:
commit
52fd3a46d3
@ -3117,8 +3117,8 @@ void ResmedLoader::initChannels()
|
|||||||
QObject::tr("Climate Control"),
|
QObject::tr("Climate Control"),
|
||||||
"", LOOKUP, Qt::black));
|
"", LOOKUP, Qt::black));
|
||||||
|
|
||||||
chan->addOption(0, QObject::tr("Manual"));
|
chan->addOption(0, QObject::tr("Auto"));
|
||||||
chan->addOption(1, QObject::tr("Auto"));
|
chan->addOption(1, QObject::tr("Manual"));
|
||||||
|
|
||||||
channel.add(GRP_CPAP, chan = new Channel(RMS9_Mask= 0xe20C, SETTING, MT_CPAP, SESSION,
|
channel.add(GRP_CPAP, chan = new Channel(RMS9_Mask= 0xe20C, SETTING, MT_CPAP, SESSION,
|
||||||
"RMS9_Mask", QObject::tr("Mask"),
|
"RMS9_Mask", QObject::tr("Mask"),
|
||||||
|
@ -1011,13 +1011,14 @@ QString Statistics::GenerateHTML()
|
|||||||
// Compute number of monthly periods for a monthly rather than standard time distribution
|
// Compute number of monthly periods for a monthly rather than standard time distribution
|
||||||
int number_periods = 0;
|
int number_periods = 0;
|
||||||
if (p_profile->general->statReportMode() == STAT_MODE_MONTHLY) {
|
if (p_profile->general->statReportMode() == STAT_MODE_MONTHLY) {
|
||||||
QDate beginDate = qMax(firstcpap, lastcpap.addYears(-1));
|
int firstMonth = firstcpap.month();
|
||||||
int beginMonth = beginDate.month();
|
|
||||||
int lastMonth = lastcpap.month();
|
int lastMonth = lastcpap.month();
|
||||||
if (lastMonth < beginMonth) lastMonth += 12; // handle time extending to next year
|
if (lastMonth <= firstMonth && firstcpap.year() != lastcpap.year())
|
||||||
number_periods = lastMonth - beginMonth + 1;
|
lastMonth += 12; // handle time extending to next year
|
||||||
|
number_periods = lastMonth - firstMonth + 1;
|
||||||
|
|
||||||
if (number_periods < 1) {
|
if (number_periods < 1) {
|
||||||
qDebug() << "*** Begin" << beginDate << "beginMonth" << beginMonth << "lastMonth" << lastMonth << "periods" << number_periods;
|
qDebug() << "*** Begin" << firstcpap << "beginMonth" << firstMonth << "lastMonth" << lastMonth << "periods" << number_periods;
|
||||||
number_periods = 1;
|
number_periods = 1;
|
||||||
}
|
}
|
||||||
// But not more than one year
|
// But not more than one year
|
||||||
|
Loading…
Reference in New Issue
Block a user