]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
Merge remote-tracking branch 'origin/personal/svedimon/color-finder' into update
authorMichal Vokac <vokac.m@gmail.com>
Fri, 5 Oct 2012 17:38:35 +0000 (19:38 +0200)
committerMichal Vokac <vokac.m@gmail.com>
Fri, 5 Oct 2012 17:38:35 +0000 (19:38 +0200)
1  2 
src/camera/color-finder/main/revue.cpp

index 85810cc0e1c725de0590531ed458a4ba7b9b8ddf,ad6918d9efbc3e5da43e3b936d3e003bfbf148d3..9ecd9c1bf036d8bc729e08c560290413da3d09da
@@@ -1,10 -1,6 +1,10 @@@
  #include <stdlib.h>
  #include <CCamera.h>
 +
 +#ifdef __i386__
  #include <CGui.h>
 +#endif
 +
  #include <CRobot.h>
  #include <CTimer.h>
  #include <CRecognition.h>
@@@ -12,6 -8,7 +12,6 @@@
  
  extern "C" {
  #include <roboorte_robottype.h>
 -#include <robot.h>
  #include "../control/CRecognition.h"
  }
  
@@@ -20,22 -17,17 +20,22 @@@ int numSaved = 0
  bool stop = false;
  bool cp = true;
  CCamera* camera;
 +
 +#ifdef __i386__
  CGui* gui;
 -CRawImage *image;
  SDL_Event event;
 +#endif
 +
 +CRawImage *image;
 +
  //CRobot* robot;
  CRecognition *recognition;
  //SRobotCommand command;
  SPixelPosition meanPosition;
  bool move = false;
 -Uint8 lastKeys[10000];
 +unsigned char lastKeys[10000];
  int keyNumber = 1000;
 -Uint8 *keys = NULL;
 +unsigned char *keys = NULL;
  
  unsigned char color [3];
  unsigned char* pix = NULL;
@@@ -119,9 -111,10 +119,10 @@@ void send_data(SPixelPosition pos
          orte.camera_result.y = pos.y;
          orte.camera_result.target_valid = pos.info; // OK / NOTĀ OK
          orte.camera_result.data_valid = data;
+       orte.camera_result.angle_deg = pos.uhel;
  
          ORTEPublicationSend(orte.publication_camera_result);
-         fprintf(stderr, "ORTE: x: %d y: %d, info: %d \n", pos.x, pos.y, pos.info);
+         fprintf(stderr, "ORTE: x: %d y: %d, info: %d uhel: %lf data_valid: %d \n", pos.x, pos.y, pos.info, pos.uhel, data);
  }
  
  /* Fce pro zapnuti a vypnuti rozpoznavani */
@@@ -266,9 -259,7 +267,9 @@@ int main(int argc,char* argv[]
        delete recognition;
        //delete robot;
        delete image;
 +#ifdef __i386__
        delete gui;
 +#endif
        delete camera;
  
        ret = robottype_roboorte_destroy(&orte);