And now? Issue #2378

This commit is contained in:
bsongis
2015-06-28 18:22:12 +02:00
parent e4b14233b5
commit 2009c00dd0
@@ -60,7 +60,6 @@ class SwitchesConversionTable: public ConversionTable {
for (int i=1; i<=MAX_SWITCHES_POSITION(board, version); i++) { for (int i=1; i<=MAX_SWITCHES_POSITION(board, version); i++) {
int s = switchIndex(i, board, version); int s = switchIndex(i, board, version);
addConversion(RawSwitch(SWITCH_TYPE_SWITCH, s), val);
if (IS_TARANIS(board) && version < 217) { if (IS_TARANIS(board) && version < 217) {
// SF positions 16 and 17 => 16 and 18 // SF positions 16 and 17 => 16 and 18
// SH positions 21 and 22 => 22 and 24 // SH positions 21 and 22 => 22 and 24
@@ -68,12 +67,14 @@ class SwitchesConversionTable: public ConversionTable {
continue; continue;
} }
if (s >= 22) { if (s >= 22) {
addConversion(RawSwitch(SWITCH_TYPE_SWITCH, s), val);
addImportConversion(RawSwitch(SWITCH_TYPE_SWITCH, 21+22-s), -val+offset); addImportConversion(RawSwitch(SWITCH_TYPE_SWITCH, 21+22-s), -val+offset);
addExportConversion(RawSwitch(SWITCH_TYPE_SWITCH, -s), -val+offset); addExportConversion(RawSwitch(SWITCH_TYPE_SWITCH, -s), -val+offset);
val++; val++;
continue; continue;
} }
} }
addConversion(RawSwitch(SWITCH_TYPE_SWITCH, s), val);
addConversion(RawSwitch(SWITCH_TYPE_SWITCH, -s), -val+offset); addConversion(RawSwitch(SWITCH_TYPE_SWITCH, -s), -val+offset);
val++; val++;
} }