1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

add -n parameter to stmloader to prevent sending reboot sequence in case STM32 was already in bootloader mode (by fiendie)

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@266 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
timecop@gmail.com 2013-02-15 09:53:24 +00:00
parent 4c0fe94072
commit f5616f1437
4 changed files with 26 additions and 18 deletions

View file

@ -175,7 +175,7 @@ char *stmHexLoader(serialStruct_t *s, FILE *fp) {
return 0;
}
void stmLoader(serialStruct_t *s, FILE *fp, unsigned char overrideParity) {
void stmLoader(serialStruct_t *s, FILE *fp, unsigned char overrideParity, unsigned char noSendR) {
char c;
unsigned char b1, b2, b3;
unsigned char i, n;
@ -185,13 +185,15 @@ void stmLoader(serialStruct_t *s, FILE *fp, unsigned char overrideParity) {
if (!overrideParity)
serialEvenParity(s);
top:
printf("Sending R to place Baseflight in bootloader, press a key to continue");
serialFlush(s);
c = 'R';
serialWrite(s, &c, 1);
getchar();
printf("\n");
if(!noSendR) {
top:
printf("Sending R to place Baseflight in bootloader, press a key to continue");
serialFlush(s);
c = 'R';
serialWrite(s, &c, 1);
getchar();
printf("\n");
}
serialFlush(s);