1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

Add a msleep in the SSP loop to avoid taking 100% CPU when waiting for commands.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2386 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
edouard 2011-01-12 00:15:44 +00:00 committed by edouard
parent 809f4f7e07
commit 67fb65b984

View File

@ -10,6 +10,7 @@ void qsspt::run()
{ {
receivestatus=this->ssp_ReceiveProcess(); receivestatus=this->ssp_ReceiveProcess();
sendstatus=this->ssp_SendProcess(); sendstatus=this->ssp_SendProcess();
msleep(1);
sendbufmutex.lock(); sendbufmutex.lock();
if(datapending && receivestatus==SSP_TX_IDLE) if(datapending && receivestatus==SSP_TX_IDLE)
{ {