00001 #include "Flash.h" 00002 00003 00004 namespace FCam { 00005 namespace F2 { 00006 00007 00008 Flash::Flash(int phidgetOutputIndex){ 00009 phidgetIndex = phidgetOutputIndex; 00010 latencyGuess = 127*1000; 00011 //phidgetFlash.flashOutputIndex = phidgetIndex; 00012 //printf("phidgetFlash outputIndex is %d\n", phidgetFlash.flashOutputIndex); 00013 } 00014 Flash::~Flash() {} 00015 00016 void Flash::setBrightness(float b) { 00017 // Yeah, nothing here. 00018 } 00019 00020 00021 void Flash::setDuration(int d) { 00022 // Figure this out later, probably using something more complicated than phidgets 00023 } 00024 00025 void Flash::fire(float brightness, int duration) { 00026 printf("Flash::fire() called, using index %d\n", phidgetIndex); 00027 phidgetFlash.triggerFlash(phidgetIndex); 00028 } 00029 00030 void Flash::startStrobe() { 00031 phidgetFlash.startStrobe(phidgetIndex); 00032 } 00033 void Flash::stopStrobe() { 00034 phidgetFlash.stopStrobe(phidgetIndex); 00035 } 00036 00037 00038 Flash::StrobeStartAction::StrobeStartAction(Flash *f) : flash(f){ 00039 latency = flash->fireLatency(); 00040 time = 0; 00041 } 00042 Flash::StrobeStartAction::StrobeStartAction(Flash *f, int t) : flash(f) { 00043 latency = flash->fireLatency(); 00044 time = t; 00045 } 00046 00047 Flash::StrobeStopAction::StrobeStopAction(Flash *f) : flash(f){ 00048 latency = flash->fireLatency(); 00049 time = 0; 00050 } 00051 Flash::StrobeStopAction::StrobeStopAction(Flash *f, int t) : flash(f) { 00052 latency = flash->fireLatency(); 00053 time = t; 00054 } 00055 00056 void Flash::StrobeStartAction::doAction() { 00057 flash->startStrobe(); 00058 } 00059 void Flash::StrobeStopAction::doAction() { 00060 flash->stopStrobe(); 00061 } 00062 00063 00064 } 00065 }
1.5.6