mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Merge remote-tracking branch 'origin/next' into thread/OP-984_PID_banks_GUI
This commit is contained in:
commit
cd5fb01d7e
2
.gitignore
vendored
2
.gitignore
vendored
@ -10,6 +10,7 @@ GPATH
|
||||
GRTAGS
|
||||
GSYMS
|
||||
GTAGS
|
||||
core
|
||||
|
||||
# flight
|
||||
/flight/*.pnproj
|
||||
@ -56,6 +57,7 @@ openpilotgcs-build-desktop
|
||||
/.cproject
|
||||
/.project
|
||||
/.metadata
|
||||
/.settings
|
||||
|
||||
# Ignore Eclipse temp folder, git plugin based?
|
||||
RemoteSystemsTempFiles
|
||||
|
@ -104,6 +104,7 @@ int32_t EventDispatcherInitialize()
|
||||
|
||||
// Create callback
|
||||
eventSchedulerCallback = DelayedCallbackCreate(&eventTask, CALLBACK_PRIORITY, TASK_PRIORITY, STACK_SIZE * 4);
|
||||
DelayedCallbackDispatch(eventSchedulerCallback);
|
||||
|
||||
// Done
|
||||
return 0;
|
||||
|
@ -126,7 +126,7 @@ Vector3f twostep_bias_only(const Vector3f samples[],
|
||||
const float noise)
|
||||
{
|
||||
// \tilde{H}
|
||||
Vector3f centeredSamples[n_samples];
|
||||
Vector3f *centeredSamples = new Vector3f[n_samples];
|
||||
// z_k
|
||||
float sampleDeltaMag[n_samples];
|
||||
// eq 7 and 8 applied to samples
|
||||
@ -172,6 +172,7 @@ Vector3f twostep_bias_only(const Vector3f samples[],
|
||||
// Note that the negative has been done twice
|
||||
estimate += neg_increment;
|
||||
}
|
||||
delete[] centeredSamples;
|
||||
return estimate;
|
||||
}
|
||||
|
||||
|
@ -205,6 +205,8 @@ qint64 RawHIDReadThread::getBytesAvailable()
|
||||
return m_readBuffer.size();
|
||||
}
|
||||
|
||||
// *********************************************************************************
|
||||
|
||||
RawHIDWriteThread::RawHIDWriteThread(RawHID *hid)
|
||||
: m_hid(hid),
|
||||
hiddev(&hid->dev),
|
||||
@ -212,8 +214,6 @@ RawHIDWriteThread::RawHIDWriteThread(RawHID *hid)
|
||||
m_running(true)
|
||||
{}
|
||||
|
||||
// *********************************************************************************
|
||||
|
||||
RawHIDWriteThread::~RawHIDWriteThread()
|
||||
{
|
||||
m_running = false;
|
||||
@ -227,9 +227,11 @@ void RawHIDWriteThread::run()
|
||||
{
|
||||
while (m_running) {
|
||||
char buffer[WRITE_SIZE] = { 0 };
|
||||
int size;
|
||||
|
||||
m_writeBufMtx.lock();
|
||||
int size = qMin(WRITE_SIZE - 2, m_writeBuffer.size());
|
||||
{
|
||||
QMutexLocker lock(&m_writeBufMtx);
|
||||
size = qMin(WRITE_SIZE - 2, m_writeBuffer.size());
|
||||
while (size <= 0) {
|
||||
// wait on new data to write condition, the timeout
|
||||
// enable the thread to shutdown properly
|
||||
@ -248,7 +250,7 @@ void RawHIDWriteThread::run()
|
||||
memcpy(&buffer[2], m_writeBuffer.constData(), size);
|
||||
buffer[1] = size; // valid data length
|
||||
buffer[0] = 2; // reportID
|
||||
m_writeBufMtx.unlock();
|
||||
}
|
||||
|
||||
// must hold lock through the send to know how much was sent
|
||||
int ret = hiddev->send(hidno, buffer, WRITE_SIZE, WRITE_TIMEOUT);
|
||||
|
@ -5,6 +5,15 @@
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="415b", MODE="0664", GROUP="plugdev"
|
||||
# OpenPilot OPLink Mini radio modem board
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="415c", MODE="0664", GROUP="plugdev"
|
||||
# OpenPilot Revolution board
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="415e", MODE="0664", GROUP="plugdev"
|
||||
|
||||
# Other OpenPilot reserved pids
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="415d", MODE="0664", GROUP="plugdev"
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="4194", MODE="0664", GROUP="plugdev"
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="4195", MODE="0664", GROUP="plugdev"
|
||||
|
||||
|
||||
# unprogrammed openpilot flight control board
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5750", MODE="0664", GROUP="plugdev"
|
||||
# FTDI FT2232C Dual USB-UART/FIFO IC
|
||||
|
Loading…
x
Reference in New Issue
Block a user