26 #include <core/exceptions/software.h> 27 #include <utils/math/angle.h> 97 {0.03548, 0.04138, 0.05319, 0.06497, 0.08262, 0.10608, 0.12951, 0.15865,
98 0.19933, 0.24535, 0.30159, 0.35137, 0.43540, 0.53611, 0.67246, 0.81519,
99 0.99870, 1.20673, 1.45304, 1.70703, 1.99278, 2.25729, 2.44293, 2.71852};
105 {0.03541, 0.04127, 0.05298, 0.06449, 0.08195, 0.10480, 0.12741, 0.15535,
106 0.19356, 0.23685, 0.28438, 0.33367, 0.41066, 0.49517, 0.59622, 0.71474,
107 0.83085, 0.97431, 1.08745, 1.20977};
118 unsigned int def_timeout_ms,
120 :
Visca(device_file, def_timeout_ms, blocking)
145 int tpan = 0, ttilt = 0;
161 int tpan = 0, ttilt = 0;
179 if ( (pan_speed < 0) ||
184 if ( (tilt_speed < 0) ||
190 unsigned int pan_ind = SONY_EVID100P_NUM_PAN_SPEEDS - 1;
192 float last_dist = min_pan_dist;;
193 for (
unsigned int i = 0; i < SONY_EVID100P_NUM_PAN_SPEEDS; ++i) {
198 }
else if (dist > last_dist) {
204 unsigned int tilt_ind = SONY_EVID100P_NUM_TILT_SPEEDS - 1;
206 last_dist = min_tilt_dist;
207 for (
unsigned int i = 0; i < SONY_EVID100P_NUM_TILT_SPEEDS; ++i) {
210 min_tilt_dist = dist;
212 }
else if (dist > last_dist) {
229 unsigned char ps, ts;
244 float &tilt_min,
float &tilt_max)
static const float MIN_TILT_RAD
Min tilt in rad.
static const unsigned int EFFECT_NEGATIVE
Negative effect.
void set_pan_tilt(int pan, int tilt)
Set pan tilt.
static const float MAX_PAN_DEG
Max pan in degrees.
static const float PAN_STEPS_PER_RAD
Pan steps per rad.
void get_speed_radsec(float &pan_speed, float &tilt_speed)
Get current speed in rad/sec.
static const int MIN_PAN
Minimum pan.
static const float MIN_PAN_RAD
Min pan in rad.
static const float MAX_PAN_RAD
Max pan in rad.
Fawkes library namespace.
static const unsigned int EFFECT_SEPIA
Sepia effect.
void set_pan_tilt_speed(unsigned char pan_speed, unsigned char tilt_speed)
Set pan/tilt speed.
static const unsigned int EFFECT_BW
B/W effect.
static const float MAX_TILT_DEG
Max tilt in degrees.
void set_speed_radsec(float pan_speed, float tilt_speed)
Set speed given in rad/sec.
void set_pan_tilt_rad(float pan, float tilt)
Set pan/tilt in radians.
void get_speed_limits(float &pan_min, float &pan_max, float &tilt_min, float &tilt_max)
Get speed limits.
SonyEviD100PVisca(const char *device_file, unsigned int def_timeout_ms=30, bool blocking=true)
Constructor.
static const float TILT_STEPS_PER_DEG
Tilt steps per degree.
static const unsigned int EFFECT_SLIM
Slim effect.
static const int MAX_PAN
Maximum pan.
void get_pan_tilt_rad(float &pan, float &tilt)
Get pan/tilt in radians.
void get_pan_tilt(int &pan, int &tilt)
Get pan and tilt values.
static const unsigned int EFFECT_SOLARIZE
Solarize effect.
Visca control protocol implementation over a serial line.
static const int MAX_TILT
Max Tilt.
static const float PAN_STEPS_PER_DEG
Pan steps per degree.
static const float TILT_STEPS_PER_RAD
Tilt steps per rad.
static const float MIN_PAN_DEG
Min pan in degrees.
~SonyEviD100PVisca()
Destructor.
static const unsigned int EFFECT_STRETCH
Stretch effect.
static const unsigned int EFFECT_MOSAIC
Mosaic effect.
static const float MAX_TILT_RAD
Max tilt in rad.
static const int MIN_TILT
Min tilt .
void get_pan_tilt_speed(unsigned char &pan_speed, unsigned char &tilt_speed)
Get pan/tilt speed.
static const float SPEED_TABLE_TILT[SONY_EVID100P_NUM_TILT_SPEEDS]
Speed table for supported tilt speed values in radians.
static const unsigned int EFFECT_PASTEL
Pastel effect.
float deg2rad(float deg)
Convert an angle given in degrees to radians.
static const float MIN_TILT_DEG
Min tilt in degrees.
static const float SPEED_TABLE_PAN[SONY_EVID100P_NUM_PAN_SPEEDS]
Speed table for supported pan speed values in radians.