1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-26 01:35:21 +03:00

Fix multi chanel order string

This commit is contained in:
3djc 2019-11-16 20:22:46 +01:00
parent 59275f20e5
commit 70a9e5312a

View file

@ -568,24 +568,14 @@ void MultiModuleStatus::getStatusString(char * statusText) const
else if (ch_order != 0xFF) { else if (ch_order != 0xFF) {
uint8_t temp = ch_order; uint8_t temp = ch_order;
*tmp++ = ' '; *tmp++ = ' ';
for (uint8_t i = 0; i < 4; i++) { *(tmp + (temp & 0x03)) = 'A';
switch (temp & 0x03) { temp >>= 2;
case 0: *(tmp + (temp & 0x03)) = 'E';
*tmp++ = 'A'; temp >>= 2;
break; *(tmp + (temp & 0x03)) = 'T';
case 1: temp >>= 2;
*tmp++ = 'E'; *(tmp + (temp & 0x03)) = 'R';
break; *(tmp + 4) = '\0';
case 2:
*tmp++ = 'T';
break;
case 3:
*tmp++ = 'R';
break;
}
temp >>= 2;
}
*tmp = '\0';
} }
} }
} }