[Companion] Refactoring - fixes the X9E=>X7 conversion segfault

This commit is contained in:
Bertrand Songis
2017-01-24 20:08:48 +01:00
parent 8f970fdbbf
commit 57aafeb062
19 changed files with 289 additions and 208 deletions
+2 -20
View File
@@ -1,6 +1,7 @@
#ifndef _RADIODATA_H_
#define _RADIODATA_H_
#include "boards.h"
#include "constants.h"
#include <QString>
#include <QComboBox>
@@ -289,7 +290,7 @@ class RawSwitch {
return index >= 0 ? (type * 256 + index) : -(type * 256 - index);
}
QString toString() const;
QString toString(BoardEnum board = BOARD_UNKNOWN) const;
bool operator== ( const RawSwitch& other) {
return (this->type == other.type) && (this->index == other.index);
@@ -1128,25 +1129,6 @@ class GeneralSettings {
BEEPER_ALL = 1
};
enum PotConfig {
POT_NONE,
POT_WITH_DETENT,
POT_MULTIPOS_SWITCH,
POT_WITHOUT_DETENT
};
enum SliderConfig {
SLIDER_NONE,
SLIDER_WITH_DETENT
};
enum SwitchConfig {
SWITCH_NONE,
SWITCH_TOGGLE,
SWITCH_2POS,
SWITCH_3POS
};
GeneralSettings();
void convert(BoardEnum before, BoardEnum after);