Changed everywhere from float to double, even mythenDetectorServer and the standalone files

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@206 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2012-08-02 12:58:08 +00:00
parent 3795dcedfe
commit 5aebcd4888
47 changed files with 615 additions and 611 deletions

View File

@ -3,8 +3,8 @@
#include <stdio.h>
float pos;
float i0=0;
double pos;
double i0=0;
#ifdef EPICS
#include <cadef.h>
@ -119,15 +119,15 @@ int caput(chid ch_id, double value) {
*/
float angle(int ichan, float encoder, float totalOffset, float conv_r, float center, float offset, float tilt, int direction) {
double angle(int ichan, double encoder, double totalOffset, double conv_r, double center, double offset, double tilt, int direction) {
(void) tilt; /* to avoid warning: unused parameter */
float ang;
double ang;
ang=180./PI*(center*conv_r+atan((float)(ichan-center)*conv_r))+encoder+totalOffset+offset;
ang=180./PI*(center*conv_r+atan((double)(ichan-center)*conv_r))+encoder+totalOffset+offset;
cout <<"***" << offset << " " << ang << endl;
@ -139,7 +139,7 @@ float angle(int ichan, float encoder, float totalOffset, float conv_r, float cen
/* reads the encoder and returns the position */
float get_position(void *ch_poarg) {
double get_position(void *ch_poarg) {
#ifdef VERBOSE
printf("Getting motor position \n");
#endif
@ -169,7 +169,7 @@ float get_position(void *ch_poarg) {
/* moves the encoder to position p */
int go_to_position(float p,void *ch_parg) {
int go_to_position(double p,void *ch_parg) {
#ifdef VERBOSE
printf("Setting motor position \n");
#endif
@ -196,7 +196,7 @@ int go_to_position(float p,void *ch_parg) {
/* moves the encoder to position p without waiting */
int go_to_position_no_wait(float p) {
int go_to_position_no_wait(double p) {
#ifdef VERBOSE
printf("Setting motor position no wait \n");
#endif
@ -231,7 +231,7 @@ int go_to_position_no_wait(float p) {
/* reads I0 and returns the intensity */
float get_i0(void *ch_ioarg) {
double get_i0(void *ch_ioarg) {
#ifdef VERBOSE
printf("Getting I0 readout \n");
#endif

View File

@ -3,8 +3,8 @@
#include <stdio.h>
float pos;
float i0=0;
double pos;
double i0=0;
#ifdef EPICS
#include <cadef.h>
@ -118,13 +118,13 @@ int caput(chid ch_id, double value) {
*/
float defaultAngleFunction(float ichan, float encoder, float totalOffset, float conv_r, float center, float offset, float tilt, int direction) {
double defaultAngleFunction(double ichan, double encoder, double totalOffset, double conv_r, double center, double offset, double tilt, int direction) {
(void) tilt; /* to avoid warning: unused parameter */
float ang;
double ang;
ang=180./PI*(center*conv_r+direction*atan((float)(ichan-center)*conv_r))+encoder+totalOffset+offset;
ang=180./PI*(center*conv_r+direction*atan((double)(ichan-center)*conv_r))+encoder+totalOffset+offset;
@ -134,7 +134,7 @@ float defaultAngleFunction(float ichan, float encoder, float totalOffset, float
/* reads the encoder and returns the position */
float defaultGetPosition(void *d) {
double defaultGetPosition(void *d) {
#ifdef VERBOSE
printf("Getting motor position \n");
#endif
@ -165,7 +165,7 @@ float defaultGetPosition(void *d) {
/* moves the encoder to position p */
int defaultGoToPosition(float p,void *d) {
int defaultGoToPosition(double p,void *d) {
#ifdef VERBOSE
printf("Setting motor position \n");
#endif
@ -193,7 +193,7 @@ int defaultGoToPosition(float p,void *d) {
/* moves the encoder to position p without waiting */
int defaultGoToPositionNoWait(float p,void *d) {
int defaultGoToPositionNoWait(double p,void *d) {
#ifdef VERBOSE
printf("Setting motor position no wait \n");
#endif
@ -224,7 +224,7 @@ int defaultGoToPositionNoWait(float p,void *d) {
/* reads I0 and returns the intensity */
float defaultGetI0(int t,void *d) {
double defaultGetI0(int t,void *d) {
#ifdef VERBOSE
printf("Getting I0 readout \n");
#endif

View File

@ -29,13 +29,13 @@ extern "C" {
#endif
float defaultAngleFunction(float ichan, float encoder, float totalOffset, float conv_r, float center, float offset, float tilt, int direction);
float defaultGetPosition(void *d);
int defaultGoToPosition(float p,void *d);
int defaultGoToPositionNoWait(float p,void *d);
double defaultAngleFunction(double ichan, double encoder, double totalOffset, double conv_r, double center, double offset, double tilt, int direction);
double defaultGetPosition(void *d);
int defaultGoToPosition(double p,void *d);
int defaultGoToPositionNoWait(double p,void *d);
int defaultConnectChannels(void *d);
int defaultDisconnectChannels(void *d);
float defaultGetI0(int t,void *d);
double defaultGetI0(int t,void *d);
int defaultDataReadyFunc(detectorData* d, void* p);