diff options
Diffstat (limited to 'ofxHelios/src/ofxHelios.h')
| -rw-r--r-- | ofxHelios/src/ofxHelios.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/ofxHelios/src/ofxHelios.h b/ofxHelios/src/ofxHelios.h index e55e99d..280906f 100644 --- a/ofxHelios/src/ofxHelios.h +++ b/ofxHelios/src/ofxHelios.h @@ -14,8 +14,8 @@ #include "ofMain.h" #include "colourPolyline.h" -#define SUBDIVIDE 20 -#define BLANK_NUM 4 +#define SUBDIVIDE 15 +#define BLANK_NUM 8 #define MAX_ANGLE 15.0f #include <HeliosDac.h> @@ -43,7 +43,8 @@ public: pps=_pps; //dac.SetShutter(device,true); } - prev_point=ofPoint(0x7ff,0x7ff); + output_centre=ofPoint(0x7ff,0x7ff); + prev_point=output_centre; } ~ofxHelios() @@ -51,13 +52,24 @@ public: //stopThread(); } + void set_centre(ofPoint c){ + ofPoint cp=c+ofPoint(0x7ff,0x7ff); + if (cp!=output_centre){ + output_centre=cp; + ofLogNotice() << "ofxHelios v "<<OFXHELIOS_VERSION<<": set output centre to "<<output_centre.x<<","<<output_centre.y; + } + } void set_pts(int n){ - pps=n; - ofLogNotice() << "ofxHelios v "<<OFXHELIOS_VERSION<<": set point output to "<<pps; + if (n!=pps){ + pps=n; + ofLogNotice() << "ofxHelios v "<<OFXHELIOS_VERSION<<": set point output to "<<pps; + } } void set_intensity(int i){ - laserintensity=i; - ofLogNotice() << "ofxHelios v "<<OFXHELIOS_VERSION<<": set intensity to "<<laserintensity; + if (i!=laserintensity){ + laserintensity=i; + ofLogNotice() << "ofxHelios v "<<OFXHELIOS_VERSION<<": set intensity to "<<laserintensity; + } } int get_pts(){ return pps; @@ -78,6 +90,7 @@ public: int pps; int laserintensity; + ofPoint output_centre; ofPoint prev_point; ofColor prev_colour; |
