Changeset 4173


Ignore:
Timestamp:
05/25/04 14:11:25 (21 years ago)
Author:
merck
Message:
Changes to recalculate reference position when camera center moves.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol/videodisplay.cpp

    r3401 r4173  
    1919#include "amclog.h"
    2020#include "amcmotor.h"
     21#include "amcdefs.h"
    2122#include "amcmirrorpanel.h"
    2223#include "amcprogdlg.h"
     
    271272        Y_Dec_10_Button->setEnabled( p_zEnable );
    272273        Y_Dec_100_Button->setEnabled( p_zEnable );
    273                
     274
    274275        if( p_zEnable )
    275276        {
     
    337338        if( ( iRefX == -1 ) && ( iRefY == -1 ) )
    338339                return;
     340        int iDx, iDy;
     341        iDx = m_videoFrame->m_iCenterX - CAMERA_X;
     342        iDy = m_videoFrame->m_iCenterY - CAMERA_Y;
     343        iRefX += iDx;
     344        iRefY += iDy;
    339345        int iStepX, iStepY;
    340346        calcSteps( iRefX, iRefY, iStepX, iStepY );
     
    359365        if( ( iVSpotX == -1 ) && ( iVSpotY == -1 ) )
    360366                return;
    361         qDebug("Spot at x,y: %4d %4d", iVSpotX, iVSpotY );     
    362         qDebug("Ref  at x,y: %4d %4d", p_iRefX, p_iRefY );     
     367        qDebug("Spot at x,y: %4d %4d", iVSpotX, iVSpotY );
     368        qDebug("Ref  at x,y: %4d %4d", p_iRefX, p_iRefY );
    363369
    364370        double dX = p_iRefX - iVSpotX;
Note: See TracChangeset for help on using the changeset viewer.