VC doesn't like binary constants

This commit is contained in:
Andre Bernet
2014-02-01 19:42:57 +01:00
committed by Bertrand Songis
parent 670bb0a0c5
commit 0b77d9921d
3 changed files with 5 additions and 3 deletions
@@ -467,7 +467,7 @@ class PhaseField: public TransformedField {
for (int i=0; i<NUM_STICKS; i++) { for (int i=0; i<NUM_STICKS; i++) {
if (board == BOARD_TARANIS && version >= 216) { if (board == BOARD_TARANIS && version >= 216) {
if (phase.trimMode[i] < 0) if (phase.trimMode[i] < 0)
trimMode[i] = 0b11111; trimMode[i] = TRIM_MODE_NONE;
else else
trimMode[i] = 2*phase.trimRef[i] + phase.trimMode[i]; trimMode[i] = 2*phase.trimRef[i] + phase.trimMode[i];
} }
@@ -494,7 +494,7 @@ class PhaseField: public TransformedField {
{ {
for (int i=0; i<NUM_STICKS; i++) { for (int i=0; i<NUM_STICKS; i++) {
if (board == BOARD_TARANIS && version >= 216) { if (board == BOARD_TARANIS && version >= 216) {
if (trimMode[i] == 0b11111) { if (trimMode[i] == TRIM_MODE_NONE) {
phase.trimMode[i] = -1; phase.trimMode[i] = -1;
} }
else { else {
+2
View File
@@ -23,6 +23,8 @@
#define TRIM_OFF 1 #define TRIM_OFF 1
#define TRIM_OFFSET 2 #define TRIM_OFFSET 2
#define TRIM_MODE_NONE 0x1F // 0b11111
void populateGvSourceCB(QComboBox *b, int value); void populateGvSourceCB(QComboBox *b, int value);
void populateVoiceLangCB(QComboBox *b, QString language); void populateVoiceLangCB(QComboBox *b, QString language);
void populateTTraceCB(QComboBox *b, int value); void populateTTraceCB(QComboBox *b, int value);
+1 -1
View File
@@ -1077,7 +1077,7 @@ PACK(typedef struct t_SwashRingData { // Swash Ring data
int16_t value:11; int16_t value:11;
uint16_t mode:5; uint16_t mode:5;
}) trim_t; }) trim_t;
#define TRIM_MODE_NONE 0b11111 #define TRIM_MODE_NONE 0x1F // 0b11111
#else #else
#define trim_t int16_t #define trim_t int16_t
#endif #endif