Changeset 4485
- Timestamp:
- 08/04/04 16:40:21 (20 years ago)
- Location:
- trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol/calibratelasermovementdialog.cpp
r3401 r4485 145 145 double dMaxX, dMaxY; 146 146 m_pXLinearRegression->reset(); 147 for( int j= - 2700; j<=2700; j+=300)147 for( int j= -1200; j<=1200; j+=300) 148 148 { 149 149 checkStop(); 150 150 processSpot( j, 0 ); 151 m_pXLinearRegression->addPoint( m_ iSpotX, m_iSpotY );152 if( m_ iSpotX != -1)151 m_pXLinearRegression->addPoint( m_dSpotX, m_dSpotY ); 152 if( m_dSpotX != -1. ) 153 153 { 154 154 if ( iMinJ < -3000 ) 155 155 { 156 156 iMinJ = j; 157 dMinX = m_ iSpotX;158 dMinY = m_ iSpotY;157 dMinX = m_dSpotX; 158 dMinY = m_dSpotY; 159 159 } 160 160 else 161 161 { 162 162 iMaxJ = j; 163 dMaxX = m_ iSpotX;164 dMaxY = m_ iSpotY;163 dMaxX = m_dSpotX; 164 dMaxY = m_dSpotY; 165 165 } 166 166 } 167 m_qtsStream << j << " " << 0 << " " << m_ iSpotX << " " << m_iSpotY << " ";167 m_qtsStream << j << " " << 0 << " " << m_dSpotX << " " << m_dSpotY << " "; 168 168 m_qtsStream << m_pXLinearRegression->getAxis() << " " << m_pXLinearRegression->getSlope() << endl; 169 169 QCustomEvent* pEvent = new QCustomEvent( X_SPOT_EVENT ); … … 192 192 iMaxJ = -4000; 193 193 m_pYLinearRegression->reset(); 194 for( int j= - 2700; j<=2700; j+=300)194 for( int j= -1200; j<=1200; j+=300) 195 195 { 196 196 checkStop(); 197 197 processSpot( 0, j ); 198 m_pYLinearRegression->addPoint( m_ iSpotX, m_iSpotY );199 if( m_ iSpotX != -1)198 m_pYLinearRegression->addPoint( m_dSpotX, m_dSpotY ); 199 if( m_dSpotX != -1. ) 200 200 { 201 201 if ( iMinJ < -3000 ) 202 202 { 203 203 iMinJ = j; 204 dMinX = m_ iSpotX;205 dMinY = m_ iSpotY;204 dMinX = m_dSpotX; 205 dMinY = m_dSpotY; 206 206 } 207 207 else 208 208 { 209 209 iMaxJ = j; 210 dMaxX = m_ iSpotX;211 dMaxY = m_ iSpotY;210 dMaxX = m_dSpotX; 211 dMaxY = m_dSpotY; 212 212 } 213 213 } 214 m_qtsStream << 0 << " " << j << " " << m_ iSpotX << " " << m_iSpotY << " ";214 m_qtsStream << 0 << " " << j << " " << m_dSpotX << " " << m_dSpotY << " "; 215 215 m_qtsStream << m_pYLinearRegression->getAxis() << " " << m_pYLinearRegression->getSlope() << endl; 216 216 QCustomEvent* pEvent = new QCustomEvent( Y_SPOT_EVENT ); … … 357 357 358 358 /** Find the Laser spot */ 359 void CalibrateLaserMovementDialog::findSpot( int& p_iX, int& p_iY )359 void CalibrateLaserMovementDialog::findSpot( double& p_dX, double& p_dY ) 360 360 { 361 361 int threshold = getThreshold(); … … 399 399 { 400 400 VideoSpot* pSpot = m_qlSpotList.first(); 401 p_ iX = pSpot->getX();402 p_ iY = pSpot->getY();401 p_dX = pSpot->getX(); 402 p_dY = pSpot->getY(); 403 403 } 404 404 else 405 405 { 406 p_ iX = -1;407 p_ iY = -1;406 p_dX = -1.; 407 p_dY = -1.; 408 408 } 409 409 } … … 468 468 469 469 substractDark(); 470 findSpot( m_ iSpotX, m_iSpotY );471 qsMsg.sprintf("Spot at: (% d,%d)", m_iSpotX, m_iSpotY );470 findSpot( m_dSpotX, m_dSpotY ); 471 qsMsg.sprintf("Spot at: (%6.1f,%6.1f)", m_dSpotX, m_dSpotY ); 472 472 outputProgress( qsMsg ); 473 473 -
trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol/calibratelasermovementdialog.h
r3401 r4485 31 31 private: 32 32 void processSpot( int p_iX, int p_iY ); 33 void findSpot( int& p_iY, int& p_iY );33 void findSpot( double& p_dY, double& p_dY ); 34 34 int getThreshold(); 35 35 void checkStop(); … … 48 48 uchar* m_pDark; 49 49 bool m_zRun; 50 int m_iSpotX;51 int m_iSpotY;50 double m_dSpotX; 51 double m_dSpotY; 52 52 QFile m_qfFile; 53 53 QTextStream m_qtsStream;
Note:
See TracChangeset
for help on using the changeset viewer.