siehe auch: (evtl. Links zu anderen verwandten Seiten einfügen...)

CamCtrl

The CamCtrl has an I2C data bus.

http://gallery3.mikrokopter.de/var/resizes/tech/CamCtrl_Connector.gif?m=1452852162

Protocol

  • Slave Address: 0x26
  • 4 Bytes command to the unit
  • 11 Bytes from the unit

Defines

FromCamCtrl.CamStatus

  •    1 // FromCamCtrl.CamStatus
       2 #define CAM_STATE_RDY           0x80   // The camera seems to be ready
       3 #define CAM_STATE_REC_ACTIVE    0x40   // Recording Video 
       4 #define CAM_STATE_PHOTO_MODE    0x20   // Camera is in Photo Mode
       5 #define CAM_STATE_OFF           0x10   // Camera off but connected
       6 #define CAM_STATE_CAM_DISCONN   0x08   // Camera is not connected 
       7 #define CAM_STATE_I2C_OK        0x04   // Cam_Ctrl is connected by I2C (set by NC)
       8 #define CAM_STATE_ZOOM          0x02   // Zoom active
       9 #define CAM_STATE_PIC_CAPTURED  0x01   // Bit for captured one Photo recently
      10 
    

ToCamCtrl.CamCommand

  •    1 // ToCamCtrl.CamCommand
       2 #define CAM_CMD_SWITCH_ON       0x80
       3 #define CAM_CMD_SWITCH_OFF      0x40
       4 #define CAM_CMD_REC_ON          0x20
       5 #define CAM_CMD_REC_OFF         0x10
       6 #define CAM_CMD_SHUTTER         0x08
       7 #define CAM_CMD_RESET_CAM       0x02
       8 
    

FromCamCtrl.Type

  •    1 //FromCamCtrl.Type
       2 #define TYPE_LANC       1
       3 #define TYPE_IR         2
       4 #define TYPE_MULTI      3
       5 
    

Structures

Structure FromCamCtrl

  •    1 typedef struct
       2 {
       3   u8 CamStatus;
       4   u16 PhotoCount;
       5   u8 free1;
       6   u8 PPM1Okay;
       7   u8 PPM1Data;
       8   u8 PPM2Okay;
       9   u8 PPM2Data;
      10   u8 Type;              
      11   u8 Version;   // 4 = V1.04   104 = V2.04
      12   u8 Compatible;
      13 } __attribute__((packed)) FromCamCtrl_t; // note: use 'packed' for 16 or 32-bit processors
      14 extern FromCamCtrl_t FromCamCtrl;
    

Structure ToCamCtrl

  •    1 typedef struct
       2 {
       3   u8 CamCommand;
       4   u8 ZoomInput;
       5   u8 dummy;  // free for further use -> leave zero
       6   u8 dummy2;  // free for further use -> leave zero
       7 } __attribute__((packed)) ToCamCtrl_t; // note: use 'packed' for 16 or 32-bit processors
       8