Skip to content

Commit

Permalink
Fix includes
Browse files Browse the repository at this point in the history
  • Loading branch information
xxxajk committed Nov 4, 2013
1 parent 9ede270 commit 3445338
Show file tree
Hide file tree
Showing 42 changed files with 650 additions and 884 deletions.
12 changes: 6 additions & 6 deletions eoseventdump.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ e-mail : [email protected]
#if !defined(__EOSEVENTDUMP_H__)
#define __EOSEVENTDUMP_H__

#include <inttypes.h>
#include <avr/pgmspace.h>
#include "ptpcallback.h"
#include "parsetools.h"

#if defined(ARDUINO) && ARDUINO >=100
#include <Arduino.h>
#else
#include <WProgram.h>
#endif
#include <inttypes.h>
#include <avr/pgmspace.h>
#include "ptpcallback.h"
#include "Usb.h"


class EOSEventDump : public PTPReadParser
{
Expand All @@ -39,7 +39,7 @@ class EOSEventDump : public PTPReadParser
MultiValueBuffer valueBuffer;
uint32_t theBuffer;
public:
EOSEventDump() : ptppktSize(0), recordSize(0), parseStage(0), parseSubstage(0)
EOSEventDump() : ptppktSize(0), recordSize(0), parseStage(0), parseSubstage(0)
{ valueBuffer.valueSize = 4; valueBuffer.pValue = &theBuffer; };
void Initialize() { ptppktSize = 0; recordSize = 0; parseStage = 0; valueParser.Initialize(&valueBuffer); };
virtual void Parse(const uint16_t len, const uint8_t *pbuf, const uint32_t &offset);
Expand Down
8 changes: 4 additions & 4 deletions eoseventparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ e-mail : [email protected]
#define __EOSEVENTPARSER_H__

#include <inttypes.h>
#include <parsetools.h>
#include <Usb.h>
#include <canoneos.h>

struct EOSEvent
Expand Down Expand Up @@ -63,7 +63,7 @@ class EOSEventParser : public PTPReadParser
void InitEOSEventStruct();

public:
EOSEventParser(EOSEventHandlers *p) :
EOSEventParser(EOSEventHandlers *p) :
pHandler(p),
constInitialEventCode(0xFFFF),
nStage(0),
Expand All @@ -72,8 +72,8 @@ class EOSEventParser : public PTPReadParser
varBuffer(0),
paramCountdown(0),
paramsChanged(0)
{
theBuffer.pValue = &varBuffer;
{
theBuffer.pValue = &varBuffer;
};

void Reset()
Expand Down
20 changes: 6 additions & 14 deletions examples/Canon_EOS/EOSBulb/EOSBulb.pde
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
#include <inttypes.h>
#include <avr/pgmspace.h>

#include <avrpins.h>
#include <max3421e.h>
#include <usbhost.h>
#include <usb_ch9.h>
#include <Usb.h>
#include <usbhub.h>
#include <address.h>

#include <message.h>

#include <ptp.h>
#include <canoneos.h>
Expand All @@ -20,10 +12,10 @@ class CamStateHandlers : public EOSStateHandlers
{
enum CamStates { stInitial, stDisconnected, stConnected };
CamStates stateConnected;

public:
CamStateHandlers() : stateConnected(stInitial) {};

virtual void OnDeviceDisconnectedState(PTP *ptp);
virtual void OnDeviceInitializedState(PTP *ptp);
} CamStates;
Expand All @@ -47,9 +39,9 @@ void CamStateHandlers::OnDeviceInitializedState(PTP *ptp)
{
stateConnected = stConnected;
E_Notify(PSTR("Camera connected\r\n"),0x80);

uint16_t rc = ((CanonEOS*)ptp)->SetProperty(EOS_DPC_ShutterSpeed,SHUTTER_SPEED_BULB);

if (rc != PTP_RC_OK)
ErrorMessage<uint16_t>("Error", rc);
}
Expand All @@ -59,7 +51,7 @@ void CamStateHandlers::OnDeviceInitializedState(PTP *ptp)
((CanonEOS*)ptp)->StopBulb();
}

void setup()
void setup()
{
Serial.begin( 115200 );
Serial.println("Start");
Expand All @@ -70,7 +62,7 @@ void setup()
delay( 200 );
}

void loop()
void loop()
{
Usb.Task();
}
Loading

0 comments on commit 3445338

Please sign in to comment.