mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-11-09 16:41:21 +08:00
AP_Scripting: provide bindings for parity and stop bits
This commit is contained in:
1 parent
adabe78dae
commit
6b30f2cccb
4 files changed
+25
No files matched your search
@@ -24,6 +24,18 @@ void AP_Scripting_SerialAccess::begin(uint32_t baud)
|
||||
}
|
||||
}
|
||||
|
||||
void AP_Scripting_SerialAccess::configure_parity(uint8_t parity) {
|
||||
if (!check_is_device_port()) {
|
||||
stream->configure_parity(parity);
|
||||
}
|
||||
}
|
||||
|
||||
void AP_Scripting_SerialAccess::set_stop_bits(uint8_t stop_bits) {
|
||||
if (!check_is_device_port()) {
|
||||
stream->set_stop_bits(stop_bits);
|
||||
}
|
||||
}
|
||||
|
||||
size_t AP_Scripting_SerialAccess::write(uint8_t c)
|
||||
{
|
||||
return write(&c, 1);
|
||||
|
||||
Reference in new issue
Block a user