Merge branch 'master' into translations

This commit is contained in:
ArieKlerk 2020-03-23 20:23:02 +01:00
commit 350406b44f
8 changed files with 38 additions and 17 deletions

View File

@ -24,13 +24,14 @@ Setting aside the religious wars that can arise over any development methodology
0. Create your own fork of the repo and configure it to stay up-to-date with the upstream repo. 0. Create your own fork of the repo and configure it to stay up-to-date with the upstream repo.
* Go to https://gitlab.com/pholy/OSCAR-code and click on **Fork** in the top right of the project page. * Go to https://gitlab.com/pholy/OSCAR-code and click on **Fork** in the top right of the project page.
* In your fork's sidebar, go to **Settings > Repository** then click on **Expand** for "Mirroring repositories". * In your fork's sidebar, go to **Settings > Repository** then click on **Expand** for "Mirroring repositories".
* Enter "https://gitlab.com/pholy/OSCAR-code" for the repository **URL**, make sure the mirror is set to **Pull** and then click **Mirror repository**. * Enter "https://gitlab.com/pholy/OSCAR-code.git" for the repository **URL**, make sure the mirror is set to **Pull** and then click **Mirror repository**.
1. Create a branch to work on your feature or bugfix: 1. Create a branch to work on your feature or bugfix:
git clone https://gitlab.com/my-repo/OSCAR-code.git git clone https://gitlab.com/my-repo/OSCAR-code.git
cd OSCAR-code cd OSCAR-code
git checkout -b my-branch git checkout -b my-branch
**Note:** Because OSCAR includes the branch name in its [version string](https://semver.org/spec/v2.0.0.html), **the branch name must contain only alphanumeric characters or "-"** ([0-9a-zA-Z-]).
2. Write your code, committing to your branch as you go, using `git add` and `git commit -a`. 2. Write your code, committing to your branch as you go, using `git add` and `git commit -a`.

View File

@ -23,6 +23,17 @@
static QSet<QString> s_unexpectedMessages; static QSet<QString> s_unexpectedMessages;
DreemLoader::DreemLoader()
{
m_type = MT_SLEEPSTAGE;
csv = nullptr;
}
DreemLoader::~DreemLoader()
{
closeCSV();
}
bool bool
DreemLoader::Detect(const QString & path) DreemLoader::Detect(const QString & path)
{ {

View File

@ -20,8 +20,8 @@ const int dreem_data_version = 2;
class DreemLoader : public MachineLoader class DreemLoader : public MachineLoader
{ {
public: public:
DreemLoader() { m_type = MT_SLEEPSTAGE; } DreemLoader();
virtual ~DreemLoader() { } virtual ~DreemLoader();
virtual bool Detect(const QString & path); virtual bool Detect(const QString & path);

View File

@ -15,7 +15,7 @@
#include "SleepLib/profiles.h" #include "SleepLib/profiles.h"
#include "SleepLib/loader_plugins/edfparser.h" #include "SleepLib/loader_plugins/edfparser.h"
enum EDFType { EDF_UNKNOWN, EDF_BRP, EDF_PLD, EDF_SAD, EDF_EVE, EDF_CSL }; enum EDFType { EDF_UNKNOWN, EDF_BRP, EDF_PLD, EDF_SAD, EDF_EVE, EDF_CSL, EDF_AEV };
EDFType lookupEDFType(const QString & filename); EDFType lookupEDFType(const QString & filename);

View File

@ -331,8 +331,8 @@ int ResmedLoader::Open(const QString & dirpath)
if ( ! parseIdentTGT(path, & info, idmap) ) if ( ! parseIdentTGT(path, & info, idmap) )
return -1; return -1;
#ifdef DEBUG_IDENT
qDebug() << "Info:" << info.series << info.model << info.modelnumber << info.serial; qDebug() << "Info:" << info.series << info.model << info.modelnumber << info.serial;
#ifdef DEBUG_IDENT
qDebug() << "IdMap size:" << idmap.size(); qDebug() << "IdMap size:" << idmap.size();
foreach ( QString st , idmap.keys() ) { foreach ( QString st , idmap.keys() ) {
qDebug() << "Key" << st << "Value" << idmap[st]; qDebug() << "Key" << st << "Value" << idmap[st];
@ -1559,22 +1559,23 @@ QHash<QString, QString> parseIdentLine( const QString line, MachineInfo * info)
} else if (key == "PNA") { // Product Name } else if (key == "PNA") { // Product Name
value.replace("_"," "); value.replace("_"," ");
// if (value.contains(STR_ResMed_S9)) {
// value.replace(STR_ResMed_S9, "");
// info->series = STR_ResMed_S9;
// } else if (value.contains(STR_ResMed_AirSense10)) {
if (value.contains(STR_ResMed_AirSense10)) { if (value.contains(STR_ResMed_AirSense10)) {
value.replace(STR_ResMed_AirSense10, ""); // value.replace(STR_ResMed_AirSense10, "");
info->series = STR_ResMed_AirSense10; info->series = STR_ResMed_AirSense10;
} else if (value.contains(STR_ResMed_AirCurve10)) { } else if (value.contains(STR_ResMed_AirCurve10)) {
value.replace(STR_ResMed_AirCurve10, ""); // value.replace(STR_ResMed_AirCurve10, "");
info->series = STR_ResMed_AirCurve10; info->series = STR_ResMed_AirCurve10;
} else { } else { // it will be a Series 9, and might not contain (STR_ResMed_S9))
value.replace(STR_ResMed_S9, ""); value.replace("("," "); // might sometimes have a double space...
value.replace(")","");
if ( ! value.startsWith(STR_ResMed_S9)) {
value.replace(STR_ResMed_S9, "");
value.insert(0, " "); // There's proablely a better way than this
value.insert(0, STR_ResMed_S9); // two step way to put "S9 " at the start
}
info->series = STR_ResMed_S9; info->series = STR_ResMed_S9;
// value.replace(STR_ResMed_S9, "");
} }
// value.replace("(","");
// value.replace(")","");
// if (value.contains("Adapt", Qt::CaseInsensitive)) { // if (value.contains("Adapt", Qt::CaseInsensitive)) {
// if (!value.contains("VPAP")) { // if (!value.contains("VPAP")) {
// value.replace("Adapt", QObject::tr("VPAP Adapt")); // value.replace("Adapt", QObject::tr("VPAP Adapt"));
@ -1603,6 +1604,8 @@ EDFType lookupEDFType(const QString & filename)
return EDF_SAD; return EDF_SAD;
} else if (text == "CSL") { } else if (text == "CSL") {
return EDF_CSL; return EDF_CSL;
} else if (text == "AEV") {
return EDF_AEV;
} else return EDF_UNKNOWN; } else return EDF_UNKNOWN;
} }
@ -2107,6 +2110,7 @@ void ResDayTask::run()
break; break;
case EDF_EVE: case EDF_EVE:
case EDF_CSL: case EDF_CSL:
case EDF_AEV: // this is in the 36039 - must figure out what to do with it
break; break;
default: default:
qWarning() << "Unrecognized file type for" << filename; qWarning() << "Unrecognized file type for" << filename;
@ -2720,7 +2724,10 @@ bool ResmedLoader::LoadPLD(Session *sess, const QString & path)
a = sess->AddEventList(code, EVL_Waveform, es.gain, es.offset, 0, 0, rate); a = sess->AddEventList(code, EVL_Waveform, es.gain, es.offset, 0, 0, rate);
a->AddWaveform(edf.startdate, es.dataArray, recs, duration); a->AddWaveform(edf.startdate, es.dataArray, recs, duration);
// a = ToTimeDelta(sess,edf,es, code,recs,duration,0,0); // a = ToTimeDelta(sess,edf,es, code,recs,duration,0,0);
} else if (es.label == "Va") { // Signal used in 36039... What to do with it???
a = nullptr; // We'll skip it for now
} else if (es.label == "") { // What the hell resmed?? } else if (es.label == "") { // What the hell resmed??
// these empty lables should be changed in resmed_EDFInfo to something unique
if (emptycnt == 0) { if (emptycnt == 0) {
code = RMS9_E01; code = RMS9_E01;
// ToTimeDelta(sess, edf, es, code, recs, duration); // ToTimeDelta(sess, edf, es, code, recs, duration);

View File

@ -23,6 +23,7 @@
ZEOLoader::ZEOLoader() ZEOLoader::ZEOLoader()
{ {
m_type = MT_SLEEPSTAGE; m_type = MT_SLEEPSTAGE;
csv = nullptr;
} }
ZEOLoader::~ZEOLoader() ZEOLoader::~ZEOLoader()
@ -85,6 +86,7 @@ int ZEOLoader::Open(const QString & dirpath)
int ZEOLoader::OpenFile(const QString & filename) int ZEOLoader::OpenFile(const QString & filename)
{ {
if (!openCSV(filename)) { if (!openCSV(filename)) {
closeCSV();
return -1; return -1;
} }
int count = 0; int count = 0;

View File

@ -1,4 +1,4 @@
// Update the string below to set OSCAR's version and release status. // Update the string below to set OSCAR's version and release status.
// See https://semver.org/spec/v2.0.0.html for details on format. // See https://semver.org/spec/v2.0.0.html for details on format.
#define VERSION "1.1.0-beta-2" #define VERSION "1.1.0-beta-2.1"

View File

@ -12,7 +12,7 @@ git rev-parse --git-dir >nul 2>&1
if errorlevel 1 goto GitFail if errorlevel 1 goto GitFail
for /f %%i in ('git rev-parse --abbrev-ref HEAD') do set GIT_BRANCH=%%i for /f %%i in ('git rev-parse --abbrev-ref HEAD') do set GIT_BRANCH=%%i
if "%GIT_BRANCH%"=="HEAD" set GIT_BRANCH="" if "%GIT_BRANCH%"=="HEAD" set GIT_BRANCH=
for /f %%i in ('git rev-parse --short HEAD') do set GIT_REVISION=%%i for /f %%i in ('git rev-parse --short HEAD') do set GIT_REVISION=%%i
git diff-index --quiet HEAD -- git diff-index --quiet HEAD --