24#include <fvcams/control/sony_evid100p.h>
25#include <fvcams/control/visca.h>
26#include <fvutils/system/camargp.h>
27#include <utils/math/angle.h>
103 this->tty_port = strdup(tty_port);
120 tty_port = strdup(cap->
cam_id().c_str());
148 visca->
open(tty_port);
153 e.
append(
"Sony EviD100PControl failed");
213 int tpan = 0, ttilt = 0;
239 int tpan = 0, ttilt = 0;
370 default:
return false;
377 this->_effect = effect_;
void append(const char *format,...) noexcept
Append messages to the message list.
std::string cam_id() const
Get camera ID.
static const unsigned int EFFECT_NONE
No effect constant.
static const int MAX_TILT
Max Tilt.
static const unsigned int EFFECT_SEPIA
Sepia effect.
void set_zoom_speed_tele(unsigned int speed)
Set speed in tele range.
static const int MIN_TILT
Min tilt .
void set_zoom_digital_enabled(bool enabled)
Set if digital zoom may be used.
void set_tilt(int tilt)
Set tilt value.
void process_pantilt()
Process pan/tilt information.
void start_get_pan_tilt()
Start asynchronous fetch operation for pan and tilt values.
void set_effect(unsigned int effect)
Enable effect.
static const float TILT_STEPS_PER_DEG
Tilt steps per degree.
bool supports_tilt()
Check whether this controller supports tilting.
static const unsigned int EFFECT_PASTEL
Pastel effect.
static const float MAX_PAN_RAD
Max pan in rad.
static const float TILT_STEPS_PER_RAD
Tilt steps per rad.
int tilt()
Get tilt value.
void reset_pan_tilt()
Bring camera into home position.
unsigned int white_balance_mode()
Get current white balance mode.
bool supports_pan()
Check whether this controller supports panning.
void pan_tilt(int &pan, int &tilt)
Get pan and tilt at the same time.
static const unsigned int EFFECT_NEGATIVE
Negative effect.
static const float MAX_TILT_RAD
Max tilt in rad.
void set_pan_tilt_rad(float pan, float tilt)
Set pan and tilt as float value.
static const unsigned int EFFECT_SOLARIZE
Solarize effect.
static const float MAX_TILT_DEG
Max tilt in degrees.
unsigned int zoom_max()
Maximum zoom value.
void set_pan(int pan)
Set pan value.
void set_zoom(unsigned int zoom)
Set new camera-specific zoom value.
int min_tilt()
Get minimum tilt value.
SonyEviD100PControl(const CameraArgumentParser *cap)
Constructor.
static const int MAX_PAN
Maximum pan.
void pan_tilt_rad(float &pan, float &tilt)
Get pan and tilt at the same time in radiant.
static const int MIN_PAN
Minimum pan.
int max_tilt()
Get maximum tilt value.
void open()
Open visca device.
static const unsigned int EFFECT_STRETCH
Stretch effect.
void set_pan_tilt_limit(int pan_left, int pan_right, int tilt_up, int tilt_down)
Set pan/tilt limits.
int max_pan()
Get maximum pan value.
bool supports_effect(unsigned int effect)
Check if camera control supports desired effect.
static const float MAX_PAN_DEG
Max pan in degrees.
unsigned int zoom_min()
Minimum zoom value.
unsigned int zoom()
Get current zoom value.
void reset_effect()
Reset effect.
virtual ~SonyEviD100PControl()
Destructor.
static const float MIN_PAN_RAD
Min pan in rad.
void set_zoom_speed_wide(unsigned int speed)
Set speed in wide range.
static const unsigned int EFFECT_BW
B/W effect.
void close()
Close Visca device.
static const float PAN_STEPS_PER_DEG
Pan steps per degree.
void reset_pan_tilt_limit()
Reset pan/tilt limits.
void set_pan_tilt(int pan, int tilt)
Set pan and tilt in one go.
unsigned int effect()
Current effect.
void reset_zoom()
Reset zoom.
static const float PAN_STEPS_PER_RAD
Pan steps per rad.
static const float MIN_PAN_DEG
Min pan in degrees.
int min_pan()
Get minimum pan value.
static const float MIN_TILT_DEG
Min tilt in degrees.
static const unsigned int EFFECT_SLIM
Slim effect.
static const unsigned int EFFECT_MOSAIC
Mosaic effect.
static const float MIN_TILT_RAD
Min tilt in rad.
Visca control protocol implementation over a serial line.
void setZoomSpeedTele(unsigned int speed)
Set zoom speed in tele.
void setPanTiltLimit(int pan_left, int pan_right, int tilt_up, int tilt_down)
Set pan tilt limit.
void process()
Process incoming data.
void setPanTilt(int pan, int tilt)
Set pan tilt.
void getPanTilt(int *pan, int *tilt)
Get pan and tilt values.
void applyEffectNegArt()
Apply negative art effect.
unsigned int getWhiteBalanceMode()
Get white balance mode.
void applyEffectSolarize()
Apply solarize effect.
void resetPanTilt()
Reset pan/tilt.
void applyEffectSepia()
Apply sepia effect.
void set_address(unsigned int num_cameras)
Set addresses of cameras.
void resetZoom()
Reset zoom.
void applyEffectPastel()
Apply pastel effect.
void setZoomSpeedWide(unsigned int speed)
Set zoom speed in wide angle.
void applyEffectSlim()
Apply slim effect.
void resetPanTiltLimit()
Reset pan/tilt limit.
void open(const char *port)
Open serial port.
void applyEffectStretch()
Apply stretch effect.
void applyEffectBnW()
Apply B/W effect.
void startGetPanTilt()
Query for pan/tilt but do not wait until finished This will send an inquire to the camera that asks f...
void setZoom(unsigned int zoom)
Set zoom.
void getZoom(unsigned int *zoom)
Get zoom.
void resetEffect()
Reset effects.
void applyEffectMosaic()
Apply mosaic effect.
void setZoomDigitalEnabled(bool enabled)
Enable or disable digital zoome.
Fawkes library namespace.
float deg2rad(float deg)
Convert an angle given in degrees to radians.