diff --git a/lib/App/3dSERVER/LRF_HardwareManager.cpp b/lib/App/3dSERVER/LRF_HardwareManager.cpp index c1acdf4d..61364a51 100644 --- a/lib/App/3dSERVER/LRF_HardwareManager.cpp +++ b/lib/App/3dSERVER/LRF_HardwareManager.cpp @@ -1843,7 +1843,11 @@ static uint32_t m_sgnFlipCounter = 0; bool LRF_HardwareManager::performFlip( void ){ if( !m_bInitOK ) return false; if( m_pSOC != NULL ){ +#ifdef TH_PER_MIRROR + volatile thresholdNode *th_node[40]; +#else volatile thresholdNode *th_node[16]; +#endif uint32_t sampleID; uint8_t lrfID; uint32_t cMax; @@ -1870,6 +1874,32 @@ bool LRF_HardwareManager::performFlip( void ){ th_node[13] = th_node[12]+ TH_SIZE_NODES; th_node[14] = th_node[13]+ TH_SIZE_NODES; th_node[15] = th_node[14]+ TH_SIZE_NODES; +#ifdef TH_PER_MIRROR + th_node[16] = th_node[15]+ TH_SIZE_NODES; + th_node[17] = th_node[16]+ TH_SIZE_NODES; + th_node[18] = th_node[17]+ TH_SIZE_NODES; + th_node[19] = th_node[18]+ TH_SIZE_NODES; + th_node[20] = th_node[19]+ TH_SIZE_NODES; + th_node[21] = th_node[20]+ TH_SIZE_NODES; + th_node[22] = th_node[21]+ TH_SIZE_NODES; + th_node[23] = th_node[22]+ TH_SIZE_NODES; + th_node[24] = th_node[23]+ TH_SIZE_NODES; + th_node[25] = th_node[24]+ TH_SIZE_NODES; + th_node[26] = th_node[25]+ TH_SIZE_NODES; + th_node[27] = th_node[26]+ TH_SIZE_NODES; + th_node[28] = th_node[27]+ TH_SIZE_NODES; + th_node[29] = th_node[28]+ TH_SIZE_NODES; + th_node[30] = th_node[29]+ TH_SIZE_NODES; + th_node[31] = th_node[30]+ TH_SIZE_NODES; + th_node[32] = th_node[31]+ TH_SIZE_NODES; + th_node[33] = th_node[32]+ TH_SIZE_NODES; + th_node[34] = th_node[33]+ TH_SIZE_NODES; + th_node[35] = th_node[34]+ TH_SIZE_NODES; + th_node[36] = th_node[35]+ TH_SIZE_NODES; + th_node[37] = th_node[36]+ TH_SIZE_NODES; + th_node[38] = th_node[37]+ TH_SIZE_NODES; + th_node[39] = th_node[38]+ TH_SIZE_NODES; +#endif m_nGPointsFlags = 0xFF; #ifdef DEBUG @@ -1884,7 +1914,11 @@ bool LRF_HardwareManager::performFlip( void ){ #endif for( sampleID=0; sampleID < TH_SIZE_NODES; sampleID++ ){ sNodeID = sampleID - ( TH_LINE_NODES + 1 ) * m_sCP_Detector.order; +#ifdef TH_PER_MIRROR + for( lrfID = 0; lrfID < KERNEL_COUNT * Q_MIRROR_COUNT; lrfID++ ){ +#else for( lrfID = 0; lrfID < KERNEL_COUNT; lrfID++ ){ +#endif //Filter Kernel if( ((1 << lrfID ) & m_nKernelFilter ) == 0 ) continue; // Get Central TH Point @@ -1947,7 +1981,11 @@ bool LRF_HardwareManager::performFlip( void ){ // Just Update - Without Remove TH Old Info if( tTN.values.cnt ){ #endif +#ifdef TH_PER_MIRROR + th_node[20|( lrfID >> 2 )][sampleID].data = tTN.data; +#else th_node[8|lrfID][sampleID].data = tTN.data; +#endif #ifdef TH_JUST_UPDATE_WORKING }; #endif diff --git a/lib/App/3dSERVER/LRF_Kernel.cpp b/lib/App/3dSERVER/LRF_Kernel.cpp index fcb8e396..2b8685e6 100644 --- a/lib/App/3dSERVER/LRF_Kernel.cpp +++ b/lib/App/3dSERVER/LRF_Kernel.cpp @@ -720,10 +720,12 @@ thresholdNode *LRF_Kernel::getTreshold( uint32_t &size, uint8_t kID ){ if( ptr!= NULL ){ m_nThresholdSize = TH_SIZE_NODES; if( m_pThreshold == NULL ) { - m_pThreshold = (thresholdNode *) malloc( sizeof(thresholdNode)* m_nThresholdSize ); + //m_pThreshold = (thresholdNode *) malloc( sizeof(thresholdNode)* m_nThresholdSize ); + m_pThreshold = (thresholdNode *) malloc( TH_SIZE_BYTES ); }; if( m_pThreshold != NULL ) { - memcpy( m_pThreshold, ptr+(kID*TH_SIZE_NODES), sizeof(thresholdNode)* m_nThresholdSize ); + //memcpy( m_pThreshold, ptr+(kID*TH_SIZE_NODES), sizeof(thresholdNode)* m_nThresholdSize ); + memcpy( m_pThreshold, ptr+(kID*TH_SIZE_NODES), TH_SIZE_BYTES ); } else m_nThresholdSize = 0; }; }; diff --git a/put_to_git b/put_to_git index d66eaf1e..1b3a2ea6 100755 --- a/put_to_git +++ b/put_to_git @@ -1,4 +1,4 @@ #!/bin/bash #git commit -a -m '$1' -git commit -a -m 'Cortex Library Updated to last MERCURY version Also added SDL preliminary basics' +git commit -a -m '3DServer tart changes to mirror th'