1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +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) {
uint8_t temp = ch_order;
*tmp++ = ' ';
for (uint8_t i = 0; i < 4; i++) {
switch (temp & 0x03) {
case 0:
*tmp++ = 'A';
break;
case 1:
*tmp++ = 'E';
break;
case 2:
*tmp++ = 'T';
break;
case 3:
*tmp++ = 'R';
break;
}
temp >>= 2;
}
*tmp = '\0';
*(tmp + (temp & 0x03)) = 'A';
temp >>= 2;
*(tmp + (temp & 0x03)) = 'E';
temp >>= 2;
*(tmp + (temp & 0x03)) = 'T';
temp >>= 2;
*(tmp + (temp & 0x03)) = 'R';
*(tmp + 4) = '\0';
}
}
}