26 #include <core/exceptions/software.h> 27 #include <utils/math/angle.h> 96 0.10608, 0.12951, 0.15865, 0.19933, 0.24535,
97 0.30159, 0.35137, 0.43540, 0.53611, 0.67246,
98 0.81519, 0.99870, 1.20673, 1.45304, 1.70703,
99 1.99278, 2.25729, 2.44293, 2.71852};
105 0.10480, 0.12741, 0.15535, 0.19356, 0.23685,
106 0.28438, 0.33367, 0.41066, 0.49517, 0.59622,
107 0.71474, 0.83085, 0.97431, 1.08745, 1.20977};
117 unsigned int def_timeout_ms,
119 :
Visca(device_file, def_timeout_ms, blocking)
142 int tpan = 0, ttilt = 0;
157 int tpan = 0, ttilt = 0;
174 if ((pan_speed < 0) || (pan_speed >
SPEED_TABLE_PAN[SONY_EVID100P_NUM_PAN_SPEEDS - 1])) {
180 if ((tilt_speed < 0) || (tilt_speed >
SPEED_TABLE_TILT[SONY_EVID100P_NUM_TILT_SPEEDS - 1])) {
187 unsigned int pan_ind = SONY_EVID100P_NUM_PAN_SPEEDS - 1;
189 float last_dist = min_pan_dist;
191 for (
unsigned int i = 0; i < SONY_EVID100P_NUM_PAN_SPEEDS; ++i) {
196 }
else if (dist > last_dist) {
202 unsigned int tilt_ind = SONY_EVID100P_NUM_TILT_SPEEDS - 1;
204 last_dist = min_tilt_dist;
205 for (
unsigned int i = 0; i < SONY_EVID100P_NUM_TILT_SPEEDS; ++i) {
208 min_tilt_dist = dist;
210 }
else if (dist > last_dist) {
226 unsigned char ps, ts;
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.