Diffstat (limited to 'core/settings/light-and-power/sensor.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/settings/light-and-power/sensor.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/core/settings/light-and-power/sensor.cpp b/core/settings/light-and-power/sensor.cpp index ddd71d6..c1df04d 100644 --- a/core/settings/light-and-power/sensor.cpp +++ b/core/settings/light-and-power/sensor.cpp @@ -37,10 +37,10 @@ Sensor::Sensor ( QStringList ¶ms, QWidget *parent, const char *name ) : SensorBase ( parent, name, true, WStyle_ContextHelp ), m_params ( params ) { - int steps = 5; - int inter = 5; + int steps = 12; + int inter = 2; - int smin = 0; - int smax = 255; - int lmin = 0; + int smin = 40; + int smax = 215; + int lmin = 1; int lmax = 255; @@ -51,5 +51,5 @@ Sensor::Sensor ( QStringList ¶ms, QWidget *parent, const char *name ) case 3: smin = params [2]. toInt ( ); case 2: steps = params [1]. toInt ( ); - case 1: inter = params [0]. toInt ( ); + case 1: inter = params [0]. toInt ( ) / 1000; } @@ -62,6 +62,6 @@ Sensor::Sensor ( QStringList ¶ms, QWidget *parent, const char *name ) m_calib-> setLineSteps ( steps ); m_calib-> setInterval ( inter ); - m_calib-> setStartPoint ( QPoint ( smin, lmin )); - m_calib-> setEndPoint ( QPoint ( smax, lmax )); + m_calib-> setStartPoint ( QPoint ( smin, lmax )); + m_calib-> setEndPoint ( QPoint ( smax, lmin )); interval-> setValue ( inter ); @@ -75,10 +75,10 @@ void Sensor::accept ( ) { m_params. clear ( ); - m_params << QString::number ( m_calib-> interval ( )) + m_params << QString::number ( m_calib-> interval ( ) * 1000 ) << QString::number ( m_calib-> lineSteps ( )) << QString::number ( m_calib-> startPoint ( ). x ( )) << QString::number ( m_calib-> endPoint ( ). x ( )) - << QString::number ( m_calib-> startPoint ( ). y ( )) - << QString::number ( m_calib-> endPoint ( ). y ( )); + << QString::number ( m_calib-> endPoint ( ). y ( )) + << QString::number ( m_calib-> startPoint ( ). y ( )); QDialog::accept ( ); |