Browse Source

Started Mask Transfer Fix

AGP
Evgeny Gagua 3 years ago
parent
commit
45743c6eef
  1. 6
      Projects/la_mojo/build
  2. 1825
      lib/App/common/deviceNode2D.cpp
  3. 4
      lib/App/common/deviceNodeSensor.h
  4. 13
      lib/components/base/basicTransport.cpp
  5. 2
      lib/components/base/basicTransport.h
  6. 6
      lib/data/protocol/protocol.cpp

6
Projects/la_mojo/build

@ -2,10 +2,10 @@
#make clean -e "CFG=Debug"
#make -e "CFG=Debug" -j6
make -e "CFG=Debug" -j6
make clean -e "CFG=Debug86"
make -e "CFG=Debug86" -j4
#make clean -e "CFG=Debug86"
#make -e "CFG=Debug86" -j4
#make clean -e "CFG=Release86"
#make -e "CFG=Release86" -j4

1825
lib/App/common/deviceNode2D.cpp
File diff suppressed because it is too large
View File

4
lib/App/common/deviceNodeSensor.h

@ -121,8 +121,8 @@ typedef enum E_LRF_WORK_STAGE{
LRF_WS_STAGE_13,
LRF_WS_STAGE_14,
LRF_WS_STAGE_15,
LRF_WS_DELAY,
LRF_WS_WAIT,
//LRF_WS_DELAY,
//LRF_WS_WAIT,
LRF_WS_COUNT
} LRF_WORK_STAGE;

13
lib/components/base/basicTransport.cpp

@ -21,6 +21,19 @@ bool basicTransport::addRecipient( protocolParser *ProtoParser ){
return true;
};
bool basicTransport::removeRecipient( protocolParser *ProtoParser ){
m_mQueueProtectorMutex.lock();
parseQueue::iterator it = std::find(m_vParsers.begin(), m_vParsers.end(), ProtoParser );
if ( it != m_vParsers.end() ) {
m_vParsers.erase( it );
m_mQueueProtectorMutex.unlock();
return true;
};
m_mQueueProtectorMutex.unlock();
return false;
};
void basicTransport::setConnectionStatus( CONNECTION_STATUS CS ){
m_mQueueProtectorMutex.lock();
m_eConnectionStatus = CS;

2
lib/components/base/basicTransport.h

@ -2,6 +2,7 @@
#define __BASIC_TNSPORT_HEADERS__
#include <vector>
#include <algorithm>
#include "basicMutex.h"
@ -32,6 +33,7 @@ class basicTransport{
virtual bool sendData(unsigned char *Data, int DataSize){ return true; };
virtual bool reconnect( void ){ return false; };
bool addRecipient( protocolParser *ProtoParser );
bool removeRecipient( protocolParser *ProtoParser );
bool getStatus( void ){ return m_eConnectionStatus == CS_CONNECTED; };
void setConnectionStatus( CONNECTION_STATUS ES);
CONNECTION_STATUS getConnectionStatus( void );

6
lib/data/protocol/protocol.cpp

@ -94,10 +94,14 @@ bool protocolParser::setTransport( basicTransport* Transport, bool CAE ){
LOG("Set Transport Req");
#endif
if( CAE ){
if (m_oDataTransport != NULL) {
if( m_oDataTransport != NULL ) {
LOG_ERROR("Transport Already Assigned!");
return false;
};
} else {
if ( m_oDataTransport != NULL ) {
m_oDataTransport->removeRecipient( this );
};
};
m_oDataTransport = Transport;
if( Transport != NULL ){

Loading…
Cancel
Save