mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
Added 3 more baudrate options for windows users .. 230400, 460800 & 921600
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2715 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
3bad7982dd
commit
7643cd2016
@ -73,7 +73,10 @@ enum BaudRateType
|
|||||||
BAUD76800, //POSIX ONLY
|
BAUD76800, //POSIX ONLY
|
||||||
BAUD115200,
|
BAUD115200,
|
||||||
BAUD128000, //WINDOWS ONLY
|
BAUD128000, //WINDOWS ONLY
|
||||||
BAUD256000 //WINDOWS ONLY
|
BAUD230400, //WINDOWS ONLY
|
||||||
|
BAUD256000, //WINDOWS ONLY
|
||||||
|
BAUD460800, //WINDOWS ONLY
|
||||||
|
BAUD921600 //WINDOWS ONLY
|
||||||
};
|
};
|
||||||
|
|
||||||
enum DataBitsType
|
enum DataBitsType
|
||||||
|
@ -695,11 +695,26 @@ void QextSerialPort::setBaudRate(BaudRateType baudRate) {
|
|||||||
Win_CommConfig.dcb.BaudRate=CBR_128000;
|
Win_CommConfig.dcb.BaudRate=CBR_128000;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/*230400 baud*/
|
||||||
|
case BAUD230400:
|
||||||
|
Win_CommConfig.dcb.BaudRate=CBR_230400;
|
||||||
|
break;
|
||||||
|
|
||||||
/*256000 baud*/
|
/*256000 baud*/
|
||||||
case BAUD256000:
|
case BAUD256000:
|
||||||
TTY_PORTABILITY_WARNING("QextSerialPort Portability Warning: POSIX does not support 256000 baud operation.");
|
TTY_PORTABILITY_WARNING("QextSerialPort Portability Warning: POSIX does not support 256000 baud operation.");
|
||||||
Win_CommConfig.dcb.BaudRate=CBR_256000;
|
Win_CommConfig.dcb.BaudRate=CBR_256000;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/*460800 baud*/
|
||||||
|
case BAUD460800:
|
||||||
|
Win_CommConfig.dcb.BaudRate=CBR_460800;
|
||||||
|
break;
|
||||||
|
|
||||||
|
/*921600 baud*/
|
||||||
|
case BAUD921600:
|
||||||
|
Win_CommConfig.dcb.BaudRate=CBR_921600;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
|
SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user