mirror of
https://github.com/ole00/afterburner.git
synced 2025-02-18 01:31:06 +00:00
PC App: fix gal type
Now, the MCU code can decode more than 9 gal types.
This commit is contained in:
parent
7cb4aaa5db
commit
08e3cea5c7
@ -631,7 +631,7 @@ static char* stripPrompt(char* buf) {
|
|||||||
len = i;
|
len = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
//strp rear new line characters
|
//strip rear new line characters
|
||||||
for (i = len - 1; i >= 0; i--) {
|
for (i = len - 1; i >= 0; i--) {
|
||||||
if (buf[i] != '\r' && buf[i] != '\n') {
|
if (buf[i] != '\r' && buf[i] != '\n') {
|
||||||
break;
|
break;
|
||||||
@ -1032,7 +1032,10 @@ static char operationSetGalType(Galtype type) {
|
|||||||
if (openSerial() != 0) {
|
if (openSerial() != 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
sprintf(buf, "g%i\r", (int)type);
|
if (verbose) {
|
||||||
|
printf("sending 'g' command type=%i\n", type);
|
||||||
|
}
|
||||||
|
sprintf(buf, "g%c\r", '0' + (int)type);
|
||||||
result = sendGenericCommand(buf, "setGalType failed ?", 4000, 0);
|
result = sendGenericCommand(buf, "setGalType failed ?", 4000, 0);
|
||||||
closeSerial();
|
closeSerial();
|
||||||
return result;
|
return result;
|
||||||
@ -1067,7 +1070,7 @@ static char operationWritePes(void) {
|
|||||||
sendLine(buf, MAX_LINE, 300);
|
sendLine(buf, MAX_LINE, 300);
|
||||||
|
|
||||||
//set GAL type
|
//set GAL type
|
||||||
sprintf(buf, "#t %i\r", (int) gal);
|
sprintf(buf, "#t %c\r", '0' + (int) gal);
|
||||||
sendLine(buf, MAX_LINE, 300);
|
sendLine(buf, MAX_LINE, 300);
|
||||||
|
|
||||||
//set new PES
|
//set new PES
|
||||||
|
Loading…
x
Reference in New Issue
Block a user