Changeset 4490
- Timestamp:
- 08/04/04 16:48:29 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol/magicmirror.cpp
r3401 r4490 10 10 #include <qtextstream.h> 11 11 12 #define PANELFILENAME "/home/amc/ Panels.txt"13 #define POSFILENAME "/home/amc/ PanelPos.txt"12 #define PANELFILENAME "/home/amc/AMC/share/amc/Panels.txt" 13 #define POSFILENAME "/home/amc/AMC/share/amc/PanelPos.txt" 14 14 15 15 extern AMCState* g_pAMCState; … … 55 55 56 56 m_iNumPanels = 0; 57 QFile file( "/home/amc/Panels.txt");57 QFile file( PANELFILENAME ); 58 58 if( file.open( IO_ReadOnly ) ) 59 59 { … … 97 97 void MagicMirror::readPanelPositions() 98 98 { 99 QFile file( "/home/amc/PanelPos.txt");99 QFile file( POSFILENAME ); 100 100 if( file.open( IO_ReadOnly ) ) 101 101 { … … 110 110 continue; 111 111 112 int ii, ij, iX, iY, iLaserX, iLaserY; 112 int ii, ij, iX, iY; 113 double dLaserX, dLaserY; 113 114 double dAxisX, dSlopeX, dConvX; 114 115 double dAxisY, dSlopeY, dConvY; 115 sscanf( line.data(),"%d %d %d %d %d %d %lf %lf %lf %lf %lf %lf", 116 &ii, &ij, &iX, &iY, &iLaserX, &iLaserY, 117 &dAxisX, &dSlopeX, &dConvX, &dAxisY, &dSlopeY, &dConvY ); 116 int iIsReversed, iIsInstalled; 117 sscanf( line.data(),"%d %d %d %d %lf %lf %lf %lf %lf %lf %lf %lf %d %d", 118 &ii, &ij, &iX, &iY, &dLaserX, &dLaserY, 119 &dAxisX, &dSlopeX, &dConvX, &dAxisY, &dSlopeY, &dConvY, 120 &iIsReversed, &iIsInstalled ); 118 121 if( dAxisX == 0.0) 119 122 { … … 126 129 m_arrPanels[ii+8][ij+8]->setRefX( iX ); 127 130 m_arrPanels[ii+8][ij+8]->setRefY( iY ); 128 m_arrPanels[ii+8][ij+8]->setLaserX( iLaserX );129 m_arrPanels[ii+8][ij+8]->setLaserY( iLaserY );131 m_arrPanels[ii+8][ij+8]->setLaserX( dLaserX ); 132 m_arrPanels[ii+8][ij+8]->setLaserY( dLaserY ); 130 133 m_arrPanels[ii+8][ij+8]->setAxisX( dAxisX ); 131 134 m_arrPanels[ii+8][ij+8]->setSlopeX( dSlopeX ); … … 134 137 m_arrPanels[ii+8][ij+8]->setSlopeY( dSlopeY ); 135 138 m_arrPanels[ii+8][ij+8]->setConversionY( dConvY ); 139 m_arrPanels[ii+8][ij+8]->setReversed( (iIsReversed == 1) ); 136 140 } 137 141 } … … 168 172 { 169 173 AMCMirrorPanel* pPanel = m_arrPanels[i][j]; 170 line.sprintf( " %2d %2d\t%5d\t%5d\t% 5d\t%5d\t%9.2f\t%7.2f\t%10.5f\t%9.2f\t%7.2f\t%10.5f\n",174 line.sprintf( " %2d %2d\t%5d\t%5d\t%7.2f\t%7.3f\t%9.2f\t%9.5f\t%10.5f\t%9.2f\t%9.5f\t%10.5f\t%1d\t%1d\n", 171 175 pPanel->i(), 172 176 pPanel->j(), … … 180 184 pPanel->getAxisY(), 181 185 pPanel->getSlopeY(), 182 pPanel->getConversionY() ); 186 pPanel->getConversionY(), 187 ( pPanel->isReversed() ? 1 : 0 ), 188 ( pPanel->isInstalled() ? 1 : 0 ) ); 183 189 stream << line; 184 190 } … … 191 197 "Can't open panel position description file", 192 198 "The programm tried to open the file \'PanelPos.txt\'\n" 193 "in the directory \'/home/amc/ \'.\n"199 "in the directory \'/home/amc/AMC/share\'.\n" 194 200 "The file may not have the right permissions.\n", 195 201 "Continue" );
Note:
See TracChangeset
for help on using the changeset viewer.