MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / _discard_input

Method _discard_input

libraries/AP_Scripting/AP_Scripting_SerialDevice.cpp:127–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125
126
127bool AP_Scripting_SerialDevice::Port::_discard_input()
128{
129 WITH_SEMAPHORE(sem);
130 if (readbuffer != nullptr) {
131 readbuffer->clear();
132 }
133 return true;
134}
135
136/*
137 initialise read/write buffers

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected