     if(random(1001) <= prob << 1 || (pt->angle >= pt->maxAngle && pt->dir == 1) || pt->angle <= pt->minAngle && pt->dir == -1){
       pt->dir *= -1;
 
+
     }
 
     return pt->dir;

#include "stuPanTilt.h"
#include "stuLaser.h"

#define BAUD_RATE 115200
#define DIRECTION_CHANGE_PROBABILITY 15


//X Position: lower numbers == Right

  changeVal = getMarkovSpeed(changeVal);

  panTiltX.angle = getDeltaPosition(&panTiltX, changeVal, DIRECTION_CHANGE_PROBABILITY) + panTiltX.angle;



  panTiltY.angle = getDeltaPosition(&panTiltY, changeVal, DIRECTION_CHANGE_PROBABILITY) + panTiltY.angle;

