Implemented first Hangar-Service

Dependencies:   CalibrateMagneto QuaternionMath

Fork of SML2 by TobyRich GmbH

CherryCam.h

Committer:
pvaibhav
Date:
2015-05-27
Revision:
46:fd5a62296b12
Parent:
30:a56c141d1d38

File content as of revision 46:fd5a62296b12:

#ifndef _H_CHERRYCAM_H
#define _H_CHERRYCAM_H

#include "mbed.h"

/// Manages the camera used on the CarbonFlyer
class CherryCam
{
public:
    CherryCam();            ///< Constructor

    void powerOn();         ///< Turn the camera power on. Takes 10-12 sec to boot up.
    void powerOff();        ///< Turn the camera power off.
    void start();           ///< Start video recording. Camera power must be on.
    void stop();            ///< Stop the video recording.

private:
    void generateFallingEdge();
    void pulldownShutterPin();
    DigitalOut powerPin;
    DigitalOut shutterPin;
    Timeout pulldownTimer;
    bool recording;
};

#endif//_H_CHERRYCAM_H