DAS  3.1.6 - 18/09/2017
Functions | Variables
DAS_Spat_ConfCBs.c File Reference

DAS configuration procedures. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include <direct.h>
#include <math.h>
#include "mgui.h"
#include "DAS_Spatram.h"
#include "dcl.h"
#include "dil.h"
#include "bil.h"
#include "wsc.h"
#include "dxl.h"
#include "dscud.h"
#include "DOAS.h"
+ Include dependency graph for DAS_Spat_ConfCBs.c:

Go to the source code of this file.

Functions

void ActEditCB (MOBJECT edit, char *text, void *ed)
 Text Application callback Apply to the variables the text typed in various text box and validated by ValidateCB(MOBJECT edit, EDIT_VAL *ev, void *ii) More...
 
void ADTesterCB (MOBJECT shell, void *od, void *ad)
 Test Temperature AD Converter callback. More...
 
void ApplyChCB (MOBJECT shell, void *od, void *ad)
 Apply changes in DAS Config callback. More...
 
void ApplyImgCB (MOBJECT shell, void *od, void *ad)
 Image type Application callback Apply to the CCD buffer the selected type of image (MONO or RGB) More...
 
void CCDSetupCB (MOBJECT shell, void *od, void *ad)
 CCD setup Callback. Execute DCS.exe (DTA Camera Select) More...
 
void CloseColPickCB (MOBJECT obj, void *s, void *v)
 Declared but not used. More...
 
void CloseConfigCB (MOBJECT shell, void *od, void *ad)
 Close DAS-Config callback close the DAS_Config window. If the testing of the ADConverter is running it is stopped. More...
 
void CloseFontViewCB (MOBJECT p, void *a, void *data)
 This callback Unloads the latest loaded font and destroys the dialog. More...
 
void ColObjCB (MOBJECT o, void *a, void *v)
 select the object to consider for color picking More...
 
void ColorAssignCB (MOBJECT o, void *o_data, void *a_data)
 
void ColorFreeCB (MOBJECT o, void *o_data, void *a_data)
 Declared but not used. More...
 
void ColorMapExposeCB (MOBJECT obj, MEvent *pexp, void *a_data)
 Declared but not used. More...
 
void ColorMapInputCB (MOBJECT obj, MEvent *pe, void *a_data)
 Declared but not used. More...
 
void ColorMapResizeCB (MOBJECT obj, DRAWAREA_PREF *pref, void *a_data)
 Declared but not used. More...
 
void ColorPickCB (MOBJECT o, void *o_data, void *a_data)
 
void ColorSaveCB (MOBJECT o, void *o_data, void *a_data)
 Declared but not used. More...
 
void ColPickBackForeGCB (MOBJECT o, void *a, void *v)
 select if the foreground or background color of the selected object will be picked More...
 
void ConfigCB (MOBJECT p, void *od, void *ad)
 DAS Configuration shell creation callback. More...
 
void D_UndoCB (MOBJECT o, void *a, void *v)
 Undo the previous color setting operation. More...
 
void DB_AMSposmode_CB (MOBJECT o, void *a, void *v)
 callback selecting the positioning mode for stepper motors ( sequential or simulaneaous)
More...
 
void DB_AMSProgBar_CB (MOBJECT o, void *a, void *v)
 callback selecting if show or not the progress bar for motor positioning
More...
 
void DB_CellExposeCB (MOBJECT obj, MEvent *pexp, void *a_data)
 display selected Color More...
 
void DB_CellResizeCB (MOBJECT obj, DRAWAREA_PREF *pref, void *a_data)
 display selected Color More...
 
void DB_ChangeColorCellCB (MOBJECT o, MVALUE o_data, void *a_data)
 draw the object 'o' with the selected color More...
 
void DB_ColorAssign (MOBJECT a[], int numel, short tc[])
 Assign to the selected object the chosen color. More...
 
void DB_ColorPick (MOBJECT o)
 
void DB_DispBlindPixCB (MOBJECT o, void *id, void *a_data)
 Display Blind Pixel Callback
Set if the blind pixels will be displayed or not on the plot window. More...
 
void DB_Do2Undo_Colors (short docol[], short undocol[])
 
void DB_Do2Undo_Fonts (MTFont dofont, MTFont undofont)
 
void DB_FilterType_CB (MOBJECT o, void *a, void *v)
 callback selecting the type of installed filter wheel module
More...
 
void DB_FontAssign (MOBJECT a[], int numel, MTFont fnt)
 This callback assign font to the selected object. More...
 
void DB_ImgTypeCB (MOBJECT o, void *id, void *a_data)
 Set the Image type. More...
 
void DB_MIGE_CB (MOBJECT o, void *a, void *v)
 callback selecting the operation mode for the AltAzPlatform
More...
 
void DB_MIGEopmode_CB (MOBJECT o, void *a, void *v)
 callback selecting the operation mode for the AltAzPlatform
More...
 
void DB_MIGEType_CB (MOBJECT o, void *a, void *v)
 
void DB_MirrorImg_CB (MOBJECT o, void *a, void *v)
 callback selecting the activation of the mirroring of the CCD image along the X or Y axis
More...
 
void DB_PlotDisplayCB (MOBJECT o, void *id, void *a_data)
 Select if the PLOT will be displayed after the measurement
. More...
 
void DB_PlotYAxisCB (MOBJECT o, void *id, void *a_data)
 Select the Y axis Unit mode
. More...
 
void DB_RadDrkSourceCB (MOBJECT o, void *a, void *v)
 Set the dark source. More...
 
void DB_RadioAvgModeCB (MOBJECT o, void *id, void *a_data)
 Set the Averaging mode flag. More...
 
void DB_RadioDarkCB (MOBJECT o, void *id, void *a_data)
 Set the dark removing from the measurements. More...
 
void DB_RadioFNSelCB (MOBJECT o, void *id, void *a_data)
 Set the file name mode. More...
 
void DB_RadioModeSelCB (MOBJECT o, void *id, void *a_data)
 Set the saving mode. More...
 
void DB_RadioPixCorrCB (MOBJECT o, void *id, void *a_data)
 Set the image Correction flag. More...
 
void DB_SelOutModeCB (MOBJECT o, void *id, void *a_data)
 Select the Output for the Temperature AD Converter
. More...
 
void DB_SetCCDTargetTempCB (MOBJECT o, void *id, void *a_data)
 Select the CCD temperature mode
. More...
 
void DB_SetXUnitsCB (MOBJECT o, void *id, void *a_data)
 Select the X axis Unit mode
. More...
 
void DB_Shutter_CB (MOBJECT o, void *a, void *v)
 callback selecting if the shutter is installed or not
More...
 
void DB_ShutterType_CB (MOBJECT o, void *a, void *v)
 callback selecting the type of installed shutter
More...
 
void DB_TestF (void)
 
void DB_Undo2Do_Colors (short undocol[], short docol[])
 Assign to the DO_Color structure the Color Values of the UNDO_Color Structure. More...
 
void DB_Undo2Do_Fonts (MTFont undofont, MTFont dofont)
 
void DB_VMRsfCB (MOBJECT o, void *id, void *a_data)
 Set the flag for modification or reload of DAS configuration files
Set the VMRsf (View Modify Re-load system files) flag. More...
 
void DrawAreaExpFontCB (MOBJECT obj, MEvent *pe, void *data)
 This callback draws strings using the selected font. More...
 
char * EquipCode2Name (int eqcode, char *src, char *dest)
 translate the Equipment Code in the Equipment Name More...
 
void FontOBJSelCB (MOBJECT obj, void *a, void *v)
 This callback select the object for applying font. More...
 
int fraz2val (int mod, char *val)
 ratio value to decimal value
opposite than listval2fraz or val2fraz More...
 
int GetDefPix (int mod)
 Maps the defective pixel. More...
 
int hertz2int (int mod, char *string)
 translate the Hertz speed in AMS digit unit.
More...
 
double int2hertz (int mod, int k)
 
double int2perc (int mod, int k)
 translate the AMS digit unit in text.
The power assigned to the motor trough the AMS, is translated in text More...
 
void listval2fraz (int mod, int val)
 Decimal value to ratio value
The decimal value indicating the fractioning of the step is translated in ratio (i.e. 0 –> 1/2 = 400 s/r, 1–> 1/4 =800 s/r) More...
 
void LoadFontCB (MOBJECT obj, void *a, void *data)
 This callback tries to load the specified font. More...
 
int LoadPaletteCB (MOBJECT o, void *o_data, void *a_data)
 Callback for LoadTestPalette. More...
 
void MAPDefPix (int mod)
 create the Under/Over exposed pixels window
At the pression of the button in DAS_Config the appropriate shell (For the creation of the Under or Over exposed pixel map) will be created. More...
 
void MAPDefPixCB (MOBJECT o, void *id, void *a_data)
 GetDefPix(mod) Callback At the pression of the 'Execute' button in the appropriate shell the GetDefPix procedure will be executed. More...
 
void ModifyConfFileCB (MOBJECT o, void *id, void *a_data)
 Modification DAS Configuration files Callback
Set if the blind pixels will be displayed or not on the plot window. More...
 
void NovaTypeCB (MOBJECT p, void *od, void *ad)
 Callback for NOVA selection. More...
 
void PB_H_CB (MOBJECT p, void *od, void *ad)
 Quick Help Callback. More...
 
int perc2int (int mod, char *string)
 translate the percent power in AMS digit unit.
The percent power assigned to the motor trough the AMS , is translated in digital unit (i.e. 50% –> 38) More...
 
void print2file (FILE *ff, int x, int y, unsigned int m)
 Print to file the defective pixel. More...
 
void ScreenInfoCB (MOBJECT o, void *s, void *v)
 
void SetBoldCB (MOBJECT obj, MVALUE a, void *data)
 This callback toggles the Bold attribute. More...
 
void SetItalicCB (MOBJECT obj, MVALUE a, void *data)
 This callback toggles the Italic attribute. More...
 
void TestFontCB (MOBJECT obj, void *a, void *data)
 This callback tries to load the specified font. More...
 
void TextColorAssignCB (MOBJECT o, MVALUE o_data, void *a_data)
 
void UnderOverPixCB (MOBJECT o, void *id, void *a_data)
 Under/Over exposed pixels Callback
At the pression of the button in DAS_Config the appropriate shell (For the creation of the Under or Over exposed pixel map - with the MAPDefPix() function) will be created. More...
 
void UndoFCB (MOBJECT obj, void *a, void *v)
 This callback UnDo the font choice (Not implemented yet) More...
 
void val2fraz (int id, int sn, int val)
 Decimal value to ratio value
Similar to listval2fraz The decimal value indicating the fractioning of the step is translated in ratio (i.e. 0 –> 1/2 = 400 s/r, 1–> 1/4 =800 s/r) More...
 
void ValidateCB (MOBJECT edit, EDIT_VAL *ev, void *ii)
 Text Validation callback Validation callback for the text typed in different text box. More...
 
int WriteAMSCB (MOBJECT shell, void *od, void *ad)
 Write AMS.ini file
. More...
 
int WriteColorsCB (MOBJECT o, void *a, void *v)
 Write selected color in DASSysColor.INI. More...
 
int WriteEquipini (void)
 Write equipment.ini file
. More...
 
void WriteFontCB (MOBJECT obj, void *a, void *v)
 This callback write on file the selected font (Not implemented yet) More...
 
int WriteHardwareiniCB (MOBJECT shell, void *od, void *ad)
 Write hardware.ini file
. More...
 
int WriteOptioniniCB (MOBJECT shell, void *od, void *ad)
 Write Options.ini file
. More...
 
int WriteParaminiCB (MOBJECT shell, void *od, void *ad)
 Write Param.ini file
. More...
 
int WritewlstepiniCB (MOBJECT shell, void *od, void *ad)
 Write wlstep.ini file
. More...
 

Variables

adtester ADTESTER
 
bil BIL
 
ccd cc
 
config Cfg
 
MOBJECT CP_Sh
 
das DAS
 
ccd DC_CCD
 
ptf DC_HP
 
dftp DFTP
 
dil DIL
 
doas DOAS
 
palette DPAL
 
DSCCB dsccb
 
DXL_par DXL
 
flag FLAG
 
ids IDS
 ID tasks. More...
 
listf LISTF
 
mtcl MTCL
 MTColor. More...
 
omuthr OMUTHR
 
paramini PARAM
 
unsigned char Port = 0
 
undopal UDPAL
 
int undofont = 15
 

Detailed Description

DAS configuration procedures.

Author
Daniele Bortoli

Definition in file DAS_Spat_ConfCBs.c.

Function Documentation

§ ActEditCB()

void ActEditCB ( MOBJECT  edit,
char *  text,
void *  ed 
)

Text Application callback Apply to the variables the text typed in various text box and validated by ValidateCB(MOBJECT edit, EDIT_VAL *ev, void *ii)

Definition at line 1877 of file DAS_Spat_ConfCBs.c.

References optionini::avgmode, paramini::ccdWx, paramini::ccdWy, paramini::ccdXoff, paramini::ccdYoff, paramini::CoolPw, das::DOption, doas::FFTFilter, dftp::ftppwd, dftp::ftpserver, dftp::ftpuser, GrafoIMG(), optionini::hlineafter, optionini::hlinebefore, paramini::ITemp, LevelDefPix, optionini::maxlvlar, paramini::maxtexp, N_AVG, paramini::Offset, ON_OFFLINEPLOT, das::Paramini, omuthr::PCPower, omuthr::PID_kd, omuthr::PID_ki, omuthr::PID_kp, SZAMax, TOTTEXP, paramini::TPelt, and paramini::VBin.

Referenced by CONFP_AMS_SM_OFFSET(), CONFP_opt_page1(), CONFP_opt_page2(), CONFP_opt_page3(), CONFP_opt_page4(), CONFP_param_page1(), D_PlotTools(), MAPDefPix(), and MDCreateColFor_Sh().

1878 {
1879 
1880  int c = (int) ed;
1881 
1882  switch (c)
1883  {
1884 
1885  case 1:
1886  {
1887  DAS.Paramini.ITemp = strtod( text, &text );
1888  break;
1889  }
1890  case 2:
1891  {
1892  DAS.Paramini.CoolPw = (int) (strtod( text, &text ) * 10);
1893  break;
1894  }
1895  case 3:
1896  {
1897  DAS.Paramini.TPelt = strtod( text, &text );
1898  break;
1899  }
1900  case 2000:
1901  {
1902  OMUTHR.PCPower = (int) (strtod( text, &text ) * 10);
1903  break;
1904  }
1905 
1906  case 4:
1907  {
1908  DAS.Paramini.ccdXoff = (int) strtol( text, &text, 10 );
1909  break;
1910  }
1911  case 5:
1912  {
1913  DAS.Paramini.ccdWx = (int) strtol( text, &text, 10 );
1914  break;
1915  }
1916  case 6:
1917  {
1918  DAS.Paramini.ccdYoff = (int) strtol( text, &text, 10 );
1919  break;
1920  }
1921  case 7:
1922  {
1923  DAS.Paramini.ccdWy = (int) strtol( text, &text, 10 );
1924  break;
1925  }
1926  case 8:
1927  {
1928  DAS.Paramini.VBin = (int) strtol( text, &text, 10 );
1929  break;
1930  }
1931 /*
1932  case 9:
1933  {
1934 
1935  DAS.StepM.cop[0] = (int) strtol( text, &text, 10 );
1936  break;
1937  }
1938  case 10:
1939  {
1940  DAS.StepM.step[0] = (int) strtol( text, &text, 10 );
1941  break;
1942  }
1943  case 11:
1944  {
1945  DAS.StepM.slope[0] = (int) strtol( text, &text, 10 );
1946  break;
1947  }
1948  case 12:
1949  {
1950  DAS.StepM.speed[0] = (int) strtol( text, &text, 10 );
1951  break;
1952  }
1953 
1954  case 13:
1955  {
1956  DAS.StepM.cop[1] = (int) strtol( text, &text, 10 );
1957  break;
1958  }
1959  case 14:
1960  {
1961  DAS.StepM.step[1] = (int) strtol( text, &text, 10 );
1962  break;
1963  }
1964  case 15:
1965  {
1966  DAS.StepM.slope[1] = (int) strtol( text, &text, 10 );
1967  break;
1968  }
1969  case 16:
1970  {
1971  DAS.StepM.speed[1] = (int) strtol( text, &text, 10 );
1972  break;
1973  }
1974 
1975  case 17:
1976  {
1977  DAS.StepM.cop[2] = (int) strtol( text, &text, 10 );
1978  break;
1979  }
1980  case 18:
1981  {
1982  DAS.StepM.step[2] = (int) strtol( text, &text, 10 );
1983  break;
1984  }
1985  case 19:
1986  {
1987  DAS.StepM.slope[2] = (int) strtol( text, &text, 10 );
1988  break;
1989  }
1990  case 20:
1991  {
1992  DAS.StepM.speed[2] = (int) strtol( text, &text, 10 );
1993  break;
1994  }
1995 */
1996  case 111:
1997  {
1998  if(DAS.DOption.avgmode)
1999  {
2000  TOTTEXP = (int) strtol( text, &text, 10 );
2001  }
2002  else
2003  N_AVG = (int) strtol( text, &text, 10 );
2004  break;
2005  }
2006  case 120:
2007  {
2008  SZAMax = (int) strtol( text, &text, 10 );
2009  break;
2010  }
2011  case 130:
2012  {
2013  DAS.DOption.hlinebefore = (int) strtol( text, &text, 10 );
2014  break;
2015  }
2016  case 135:
2017  {
2018  DAS.DOption.hlineafter = (int) strtol( text, &text, 10 );
2019  break;
2020  }
2021 
2022  case 140:
2023  {
2024  LevelDefPix = (int) strtol( text, &text, 10 );
2025  break;
2026  }
2027  case 150:
2028  {
2029  DOAS.FFTFilter = (int) strtol( text, &text, 10 );
2031  break;
2032  }
2033  case 151:
2034  {
2035  DOAS.FFTFilter = (int) strtol( text, &text, 10 );
2036  break;
2037  }
2038 
2039  case 200:
2040  {
2041  sprintf(DFTP.ftpserver, "%s", text);
2042  break;
2043  }
2044  case 210:
2045  {
2046  sprintf(DFTP.ftpuser, "%s", text);
2047  break;
2048  }
2049  case 220:
2050  {
2051  sprintf(DFTP.ftppwd, "%s", text);
2052  break;
2053  }
2054 
2055 // for DEVICES OFFSETS
2056  case 300:
2057  {
2058  DAS.Paramini.Offset[0] = (int) strtol( text, &text, 10 );
2059  break;
2060  }
2061  case 301:
2062  {
2063  DAS.Paramini.Offset[1] = (int) strtol( text, &text, 10 );
2064  break;
2065  }
2066  case 302:
2067  {
2068  DAS.Paramini.Offset[2] = (int) strtol( text, &text, 10 );
2069  break;
2070  }
2071  case 303:
2072  {
2073  DAS.Paramini.Offset[3] = (int) strtol( text, &text, 10 );
2074  break;
2075  }
2076  case 304:
2077  {
2078  DAS.Paramini.Offset[4] = (int) strtol( text, &text, 10 );
2079  break;
2080  }
2081  case 123:
2082  {
2083  DAS.Paramini.maxtexp = strtod( text, &text);
2084  break;
2085  }
2086  /********************************************************/
2087  //PID Parameters
2088  case 500: //kp
2089  {
2090  OMUTHR.PID_kp = (float)strtod( text, &text);
2091  }
2092  case 501: //ki
2093  {
2094  OMUTHR.PID_ki = (float)strtod( text, &text);
2095  }
2096  case 502: //kd
2097  {
2098  OMUTHR.PID_kd = (float)strtod( text, &text);
2099  }
2100 
2101  /********************************************************/
2102  case 600: //Autoranging max level
2103  {
2104  DAS.DOption.maxlvlar = strtol( text, &text, 10);
2105  }
2106 
2107 
2108 
2109 
2110  }
2111 
2112 }
void GrafoIMG(int mode)
Definition: Spat_Plot.c:1242
optionini DOption
Options for DAS execution.
int PCPower
Power to the Peltier for Cooling.
int ccdWx
CCD X End.
int Offset[16]
Offset of the hardware devices (Input Mirror (5), Grating, Filter Wheel...)
int ccdXoff
CCD X Start.
omuthr OMUTHR
int SZAMax
Maximum SZA for performing measurements.
Definition: DAS_Spat.c:116
int ccdWy
CCD Y End.
int hlinebefore
Number of HiddenLines before the central line in Plot.
float PID_ki
int avgmode
Flag to set Averaging mode: 0 = Repeat measurements for fixed number, 1 = Repeat measurements for fix...
int VBin
CCD Vertical Binning.
int CoolPw
CCD Init Power.
int ON_OFFLINEPLOT
Definition: DAS_Spat.c:117
dftp DFTP
char ftpuser[32]
FTP server users.
int TOTTEXP
Total Exposure time in Averaging mode.
Definition: DAS_Spat.c:115
char ftpserver[32]
FTP server address.
int FFTFilter
Fast Fourier Trasform Filter windows.
Definition: DOASdef.h:25
doas DOAS
int hlineafter
Number of HiddenLines after the central line in Plot.
das DAS
float PID_kp
double maxtexp
Maximum exposure time (used in Autorange())
unsigned int LevelDefPix
Definition: DAS_Spat.c:126
char ftppwd[32]
FTP server pwd.
int N_AVG
Number of measurements for Averaging mode in fixed number of meas. mode.
Definition: DAS_Spat.c:113
int ccdYoff
CCD Y Start.
double ITemp
CCD Target Temperature.
unsigned int maxlvlar
maximum level of autoranging (max 65000)
double TPelt
OMU Target Temperature.
float PID_kd
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ADTesterCB()

void ADTesterCB ( MOBJECT  shell,
void *  od,
void *  ad 
)

Test Temperature AD Converter callback.

Definition at line 3576 of file DAS_Spat_ConfCBs.c.

References adtester::ADInflbl, adtester::ADpb, flag::ADPC104, flag::ADTempTest, AMS2, AMS_PWM(), FANPeltier(), adtester::lblADvalue, ids::LISTEMP, LISTEMP_TASK_TIME, MMessageDialog(), MObjectSetText(), MRefreshTimeout(), Peltier(), and Task_LIS_Temp().

Referenced by MDCreateDASConfig().

3577 {
3578 
3579  int PowerOn, PowerOff,i;
3580 
3581  if(FLAG.ADTempTest == 0)
3582  {
3583 
3584  MObjectSetText(ADTESTER.ADpb, "AD_Testing");
3585  MObjectSetText(ADTESTER.ADInflbl, "Click AD_Test to stop ");
3586  if(FLAG.ADPC104 == 0)
3587  {
3588  FLAG.ADTempTest = 1;
3589  PowerOn = 1;
3590  PowerOff = LISTEMP_TASK_TIME ;
3591  AMS_PWM(AMS2, PowerOn, PowerOff);//Peltier Power a 0
3592  Peltier(0); //Peltier Off
3593  FANPeltier(0);
3594  }
3595  else
3596  MMessageDialog("ADTEST","AD Test Not possible \n Check the PC104 Connection","OK", NULL);
3597 
3598  }
3599  else if(FLAG.ADTempTest == 1)
3600  {
3601 
3602  MObjectSetText(ADTESTER.ADpb, "Start");
3603  MObjectSetText(ADTESTER.ADInflbl, "Click Start to Test ");
3604 
3605  FLAG.ADTempTest = 0;
3606 
3608  for (i=0; i<16; i++)
3609  {
3610  MObjectSetText(ADTESTER.lblADvalue[i], "0.0");
3611  }
3612 
3613 
3614  }
3615 
3616 
3617 }
void FANPeltier(int mod)
FAN ON/OFF .
Definition: Spat_Device.c:2652
void MRefreshTimeout(TIMEOUT_ID *pid, CARD32 msec, TIMEOUT_CB cb, void *ud)
#define AMS2
AMS2 address.
void AMS_PWM(int id, int on, int off)
set the on/off time on the PWM set the on/off time on the PWM.
Definition: Dxl.c:492
void Peltier(int mod)
Peltier ON/OFF .
Definition: Spat_Device.c:2597
void MObjectSetText(MOBJECT obj, const char *text)
ids IDS
ID tasks.
void Task_LIS_Temp(TIMEOUT_ID id, void *data)
OMU Thermoregulation Task. Provide the thermoregulation of the Optical Mechanical Unit In addition al...
Definition: Chktemp.c:873
MOBJECT lblADvalue[16]
int ADTempTest
= 0 -> AD Converter results on the Control Panel; = 1 -> AD Converter Testing Phase(results on the co...
MOBJECT ADInflbl
#define LISTEMP_TASK_TIME
spectrometer termoregulation
int ADPC104
0 –> Device PC104 exist, 1 –> PC104 DOESN&#39;T exist
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
int LISTEMP
Lis Temperature ID.
MOBJECT ADpb
adtester ADTESTER
flag FLAG
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ApplyChCB()

void ApplyChCB ( MOBJECT  shell,
void *  od,
void *  ad 
)

Apply changes in DAS Config callback.

Parameters
a_data
  • = 0 –> Apply to CCD camera
  • = 1 –> Apply to AMS devices

Definition at line 3446 of file DAS_Spat_ConfCBs.c.

References _MAX_PATH, CCD_SetupFlg, d_fileman::CONFIGDIREQUIPMENT, gui::ConfigPanel, gui::ContrPanel, paramini::CoolPw, stepm::cop_perc, DB_InitCamera(), DB_InitMotor(), DB_KB_ButtonActive(), bil::DFILEM, d_fileman::DIRDCL, fraz2val(), das::Gui, hertz2int(), paramini::ITemp, controlpanel::lbl_Par, MObjectGetText(), MObjectSetText(), stepm::multiplier, stepm::NAMS, das::Paramini, omuthr::PCPower, perc2int(), controlpanel::power, stepm::power, controlpanel::slope, stepm::slope, configpanel::SM_multiplier, configpanel::SM_power, configpanel::SM_slope, configpanel::SM_speed, configpanel::SM_step, controlpanel::speed, stepm::speed, stepm::speed_Hz, controlpanel::step, stepm::step, stepm::step_fraz, das::StepM, paramini::TPelt, val2fraz(), and paramini::VBin.

Referenced by CONFP_param_page1(), and MDCreateDASConfig().

3447 {
3448  int c = (int) ad, i;
3449  char str[16];
3450  int er, nummot = 0;
3451  int ans = 0, k;
3452 
3453 // char destination[_MAX_PATH];
3454 // char working_dir[_MAX_PATH];
3455 // char source[_MAX_PATH];
3456  char buf[_MAX_PATH];
3457 
3458  sprintf(str, "%.1lf", DAS.Paramini.ITemp);
3460 
3461  sprintf(str,"%.1lf%%",(double)DAS.Paramini.CoolPw / 10);
3463 
3464  sprintf(str,"%.1lf", DAS.Paramini.TPelt);
3466 
3467 
3468  sprintf(str,"%.1lf%%",(double)OMUTHR.PCPower / 10);
3470 
3471 
3472 /*
3473  sprintf(str,"%d", DAS.Paramini.ccdXoff);
3474  MObjectSetText(DAS.Gui.ContrPanel.lbl_Par[3], str);
3475 
3476  sprintf(str,"%d", DAS.Paramini.ccdYoff);
3477  MObjectSetText(DAS.Gui.ContrPanel.lbl_Par[4], str);
3478 
3479  sprintf(str,"%d", DAS.Paramini.ccdWx);
3480  MObjectSetText(DAS.Gui.ContrPanel.lbl_Par[5], str);
3481 
3482  sprintf(str,"%d", DAS.Paramini.ccdWy);
3483  MObjectSetText(DAS.Gui.ContrPanel.lbl_Par[6], str);
3484 */
3485 
3486  sprintf(str, "%d", DAS.Paramini.VBin);
3488 
3489 
3490  if(CCD_SetupFlg)
3491  {
3492  CCD_SetupFlg = 0;
3493 
3494  //Copy camera.cfg
3495  sprintf(buf, "copy %s\\camera.cfg %s\\", BIL.DFILEM.DIRDCL, BIL.DFILEM.CONFIGDIREQUIPMENT);
3496  er = system(buf);
3497  //sprintf(buf, "copy %s\\dcl.cfg %s\\dcl", BIL.DFILEM.DIRDCL, BIL.DFILEM.CONFIGDIREQUIPMENT);
3498  //er = system(buf);
3499 
3500  }
3501 
3502 
3503 // Stepper Motors Parameters
3504  for (i=0;i<DAS.StepM.NAMS;i++)
3505  {
3506  for(k=0;k<2;k++)
3507  {
3508  /*
3509  * Get user preferences from the EDIT Objects for Power SMx
3510  */
3511  //Power
3513  DAS.StepM.cop_perc[i][k] = atof(str);
3514  DAS.StepM.power[i][k] = perc2int(0, str);
3515  MObjectSetText(DAS.Gui.ContrPanel.power[i][k], str);
3516 
3517  /*
3518  * Get user preferences from the EDIT Objects for Step SMx
3519  */
3520  //Step
3522  DAS.StepM.step[i][k] = fraz2val(0, str);
3523  val2fraz(i, k, DAS.StepM.step[i][k]);
3524  sprintf(str, "%s", DAS.StepM.step_fraz[i][k]);
3525  MObjectSetText(DAS.Gui.ContrPanel.step[i][k], str);
3526 
3527  // Slope
3529  DAS.StepM.slope[i][k] = atoi(str);
3530  sprintf(str, "%d", DAS.StepM.slope[i][k]);
3531  MObjectSetText(DAS.Gui.ContrPanel.slope[i][k], str);
3532 
3533  //speed
3535  DAS.StepM.speed_Hz[i][k] = atof(str);
3536  DAS.StepM.speed[i][k] = hertz2int(0, str);
3537  MObjectSetText(DAS.Gui.ContrPanel.speed[i][k], str);
3538 
3539  //multiplier
3541  DAS.StepM.multiplier[i][k] = atof(str);
3542 
3543  }
3544  }
3545 
3546  if (c == 0)
3547  {
3548  er = DB_InitCamera(1);
3549 
3550 
3551  }
3552  if (c)
3553  {
3554  //Disattiva i pulsanti sulla keyboard
3555  DB_KB_ButtonActive(0);
3556 
3557 
3558  //er = DB_CloseCOM();
3559  //if(er)
3560  // ComErrors(er);
3561 
3562 
3563  er = DB_InitMotor(0);
3564  //Attiva i pulsanti sulla keyboard
3565  DB_KB_ButtonActive(1);
3566 
3567 
3568  }
3569 
3570 
3571 
3572 }
stepm StepM
Stepper motors parameters structure.
gui Gui
Graphic User Interface Structure.
void DB_KB_ButtonActive(int mod)
Enable/Disable Push buttons on the Control Panel.
Definition: CreateForms.c:3810
int DB_InitMotor(int mod)
Initialize AMS. Procedure that initialize the parameters for the AMS&#39;s devices.
Definition: Init.c:1584
int DB_InitCamera(int mod)
Initialize Camera Parameters. Procedure that initialize the CCD Camera.
Definition: Init.c:170
MOBJECT speed[AMSMAX][2]
Active Control Panel Labels for Stepper Motors "speed".
int NAMS
Number of AMSs Devices.
MOBJECT SM_multiplier[AMSMAX][2]
int PCPower
Power to the Peltier for Cooling.
int slope[AMSMAX][2]
Stepper Motors Slope.
MOBJECT step[AMSMAX][2]
Active Control Panel Labels for Stepper Motors "step".
MOBJECT lbl_Par[11]
Parametric Labels of the Control Panel.
int perc2int(int mod, char *string)
translate the percent power in AMS digit unit. The percent power assigned to the motor trough the AMS...
char * MObjectGetText(MOBJECT obj, char *text)
float multiplier[AMSMAX][2]
multiplier, > 0 multiplier, < 0 demultiplier
omuthr OMUTHR
void MObjectSetText(MOBJECT obj, const char *text)
MOBJECT slope[AMSMAX][2]
Active Control Panel Labels for Stepper Motors "Slope".
MOBJECT SM_power[AMSMAX][2]
d_fileman DFILEM
Definition: bildef.h:257
char DIRDCL[_MAX_PATH]
Definition: bildef.h:210
int VBin
CCD Vertical Binning.
int CoolPw
CCD Init Power.
MOBJECT SM_step[AMSMAX][2]
char CONFIGDIREQUIPMENT[_MAX_PATH]
Definition: bildef.h:208
int hertz2int(int mod, char *string)
translate the Hertz speed in AMS digit unit.
MOBJECT SM_slope[AMSMAX][2]
double cop_perc[AMSMAX][2]
Stepper Motors Power percent.
#define _MAX_PATH
Definition: Dildef.h:202
int fraz2val(int mod, char *val)
ratio value to decimal value opposite than listval2fraz or val2fraz
das DAS
configpanel ConfigPanel
Configuration panel structure.
char step_fraz[AMSMAX][2][6]
Stepper Motors Step fraction.
void val2fraz(int id, int sn, int val)
Decimal value to ratio value Similar to listval2fraz The decimal value indicating the fractioning of ...
controlpanel ContrPanel
Control Panel Structure.
int CCD_SetupFlg
Definition: DAS_Spat.c:138
int speed[AMSMAX][2]
Stepper Motors Speed.
int step[AMSMAX][2]
Stepper Motors Step.
double speed_Hz[AMSMAX][2]
Stepper Motors Speed [Hz].
MOBJECT SM_speed[AMSMAX][2]
double ITemp
CCD Target Temperature.
MOBJECT power[AMSMAX][2]
active Control Panel Labels for Stepper Motors "power"
double TPelt
OMU Target Temperature.
bil BIL
int power[AMSMAX][2]
Stepper Motors Power.
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ApplyImgCB()

void ApplyImgCB ( MOBJECT  shell,
void *  od,
void *  ad 
)

Image type Application callback Apply to the CCD buffer the selected type of image (MONO or RGB)

Definition at line 2116 of file DAS_Spat_ConfCBs.c.

References img::attrib, DI_CloseImage(), DI_OpenImage(), DI_RunHisto(), das::DOption, ccd::dx, ccd::dy, IDX, IDY, dil::Img, optionini::imgtype, ccd::kind, image::Mat, das::Paramini, Server, and paramini::VBin.

Referenced by CONFP_opt_page1().

2117 {
2118 
2119 // int er;
2120  char buf[64];
2121 
2122  IDX = DC_CCD.dx;
2124 
2125  //sprintf(buf, "Marconi %s %d x %d Image",DC_CCD.name, IDX, IDY);
2126  sprintf(buf, "Marconi %d %d x %d Image",DC_CCD.kind , IDX, IDY);
2127  Server = DI_OpenImage((unsigned short)IDX, (unsigned short)IDY, (unsigned short)DAS.DOption.imgtype, 1, buf);
2128  DI_RunHisto();
2129 
2130  if(Server)
2131  {
2132  DIL.Img.Mat[Server - 1].attrib = 0;
2133  DI_CloseImage(Server - 1);
2134  }
2135 
2136  if(Server == 0)
2137  {
2138  DIL.Img.Mat[Server + 1].attrib = 0;
2139  DI_CloseImage(Server + 1);
2140  }
2141 
2142 
2143  /*
2144  er = DI_OpenImage(IDX, IDY, DAS.DOption.flgimgtype, 1, "NONAME");
2145  if(DAS.DOption.flgimgtype)
2146  er= DI_CloseImage(0);
2147  if(!DAS.DOption.flgimgtype)
2148  er= DI_CloseImage(1);
2149 */
2150 
2151 }
ccd DC_CCD
int IDX
Number of sensible horizontal pixels.
Definition: DAS_Spat.c:118
int Server
Definition: DAS_Spat.c:253
optionini DOption
Options for DAS execution.
C_DEF int DI_CloseImage(int s)
S16 dx
Num. of X pixels.
Definition: dcldef.h:1022
S16 kind
CCD manufacturer codes CCD code definitions.
Definition: dcldef.h:1021
img Mat[MAXIMG]
Definition: Dildef.h:552
image Img
Definition: Dildef.h:675
int VBin
CCD Vertical Binning.
int IDY
Number of sensible vertical pixels.
Definition: DAS_Spat.c:119
S16 dy
Num. of Y pixels.
Definition: dcldef.h:1023
C_DEF void DI_RunHisto(void)
das DAS
int imgtype
Flag to set Image type: 0=MONOINT, 1=RGB.
dil DIL
C_DEF int DI_OpenImage(U16 dx, U16 dy, U16 ifmt, U16 type, char *tit)
S16 attrib
Definition: Dildef.h:279
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CCDSetupCB()

void CCDSetupCB ( MOBJECT  shell,
void *  od,
void *  ad 
)

CCD setup Callback. Execute DCS.exe (DTA Camera Select)

Definition at line 3385 of file DAS_Spat_ConfCBs.c.

References _MAX_PATH, CCD_SetupFlg, CodeEq2Name(), d_fileman::CONFIGDIREQUIPMENT, bil::DFILEM, DI_FileExist(), paramini::EqType, d_fileman::HOMEDIRECTORY, MMessageDialog(), and das::Paramini.

Referenced by CONFP_param_page1().

3386 {
3387 
3388  int er = 0;
3389  char str[_MAX_PATH];
3390 // char buf[_MAX_PATH];
3391  char buff[_MAX_PATH];
3392 
3393  CCD_SetupFlg = 1;
3394 /*
3395  //Set path for the DCL
3396  sprintf(buff, "%s\\dcl\\", BIL.DFILEM.CONFIGDIREQUIPMENT );
3397  // Return: 1 if PATH exist, else return 0
3398  er = DI_PathExist(buff);
3399  if (er)
3400  {
3401  //Set path for the DCL
3402  DC_SetPathName(buff);
3403  }
3404  else
3405  {
3406  sprintf(buf,"Path '%s' deos not exist,\nPlease create and fill ", buff);
3407  MMessageDialog ("DAS ERROR ", buf, "OK",NULL);
3408  return 1001;
3409 
3410  }
3411 
3412  sprintf(str, "%s%s", buff , "dcs.exe -f ");
3413 */
3414 
3415 
3416 
3417 
3418  sprintf(buff, "%s\\%s.cfg", BIL.DFILEM.CONFIGDIREQUIPMENT,CodeEq2Name(DAS.Paramini.EqType));
3419 
3420  //Return: 1 if file exist, else return 0
3421  er = DI_FileExist(buff);
3422  if (er)
3423  {
3424  sprintf(str, "%s\\%s -f %s", BIL.DFILEM.HOMEDIRECTORY , "dcs.exe", buff);
3425 
3426  }
3427  else
3428  {
3429  sprintf(buff,"File'%s\\%s.cfg' not found,\n\
3430 Now 'dcs.exe' will load the standard 'camera.cfg' configuration file\n\
3431 Set the camera parameters, copy the '%s\\dcl\\camera.cfg' file in the %s folder\n\
3432 and rename in '%s.cfg'", BIL.DFILEM.CONFIGDIREQUIPMENT, CodeEq2Name(DAS.Paramini.EqType),
3434  MMessageDialog ("DAS ERROR ", buff, "OK",NULL);
3435  sprintf(str, "%s//%s", BIL.DFILEM.HOMEDIRECTORY , "dcs.exe");
3436 
3437  }
3438 
3439  er = WinExec(str, SW_SHOW);
3440 
3441 
3442 }
char HOMEDIRECTORY[_MAX_PATH]
Definition: bildef.h:200
char * CodeEq2Name(int code)
code Equipment to Name
Definition: Load.c:371
d_fileman DFILEM
Definition: bildef.h:257
char CONFIGDIREQUIPMENT[_MAX_PATH]
Definition: bildef.h:208
#define _MAX_PATH
Definition: Dildef.h:202
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
das DAS
int CCD_SetupFlg
Definition: DAS_Spat.c:138
int EqType
Spectrometer Type.
C_DEF int DI_FileExist(char *tit)
bil BIL
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CloseColPickCB()

void CloseColPickCB ( MOBJECT  obj,
void *  s,
void *  v 
)

Declared but not used.

Definition at line 776 of file DAS_Spat_ConfCBs.c.

References cell_color, drawarea_bgc, MFreeCell(), MFreeColor(), MObjectShell(), MShellDestroy(), MShellUnrealize(), and p.

777 {
778  MOBJECT p;
779 
782  p = MObjectShell(obj);
783 
784  MShellUnrealize(p);
785  MShellDestroy(p);
786 }
void MShellUnrealize(MOBJECT obj)
void MShellDestroy(MOBJECT obj)
MOBJECT MObjectShell(MOBJECT obj)
MTColor cell_color
Definition: DAS_Spatram.h:3059
static double p
Definition: SOLPOS.C:131
void * MOBJECT
Definition: Mguidefs.h:192
void MFreeCell(MTColor c)
void MFreeColor(MTColor col)
MTColor drawarea_bgc
Definition: DAS_Spatram.h:3062
+ Here is the call graph for this function:

§ CloseConfigCB()

void CloseConfigCB ( MOBJECT  shell,
void *  od,
void *  ad 
)

Close DAS-Config callback close the DAS_Config window. If the testing of the ADConverter is running it is stopped.

Definition at line 2153 of file DAS_Spat_ConfCBs.c.

References adtester::ADpb, flag::ADTempTest, DPWD, adtester::lblADvalue, ids::LISTEMP, LISTEMP_TASK_TIME, MObjectSetText(), MRefreshTimeout(), MShellDestroy(), MShellUnrealize(), dpwd::OwnPwdOk, dpwd::ROwnPwdOk, and Task_LIS_Temp().

Referenced by CONFP_Options(), CONFP_param_page1(), CONFP_param_page2(), CONFP_param_page3(), CONFP_param_page4(), CONFP_param_page5(), and MDCreateDASConfig().

2154 {
2155 
2156  MOBJECT c;
2157  int i;
2158 
2159  DPWD.ROwnPwdOk = 1;
2160  DPWD.OwnPwdOk = 1;
2161 
2162 
2163  c = (MOBJECT) ad;
2164  if(FLAG.ADTempTest == 1)
2165  {
2166 
2167  MObjectSetText(ADTESTER.ADpb, "Start");
2168  FLAG.ADTempTest = 0;
2170  for (i=0; i<16; i++)
2171  MObjectSetText(ADTESTER.lblADvalue[i], "0.0");
2172 
2173 
2174 
2175  }
2176 
2177 
2178  MShellUnrealize(c);
2179  MShellDestroy(c);
2180 }
dpwd DPWD
Definition: CreateForms.c:79
void MRefreshTimeout(TIMEOUT_ID *pid, CARD32 msec, TIMEOUT_CB cb, void *ud)
int OwnPwdOk
void MShellUnrealize(MOBJECT obj)
void MObjectSetText(MOBJECT obj, const char *text)
ids IDS
ID tasks.
void MShellDestroy(MOBJECT obj)
int ROwnPwdOk
void Task_LIS_Temp(TIMEOUT_ID id, void *data)
OMU Thermoregulation Task. Provide the thermoregulation of the Optical Mechanical Unit In addition al...
Definition: Chktemp.c:873
MOBJECT lblADvalue[16]
int ADTempTest
= 0 -> AD Converter results on the Control Panel; = 1 -> AD Converter Testing Phase(results on the co...
#define LISTEMP_TASK_TIME
spectrometer termoregulation
int LISTEMP
Lis Temperature ID.
void * MOBJECT
Definition: Mguidefs.h:192
MOBJECT ADpb
adtester ADTESTER
flag FLAG
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CloseFontViewCB()

void CloseFontViewCB ( MOBJECT  p,
void *  a,
void *  data 
)

This callback Unloads the latest loaded font and destroys the dialog.

Definition at line 1474 of file DAS_Spat_ConfCBs.c.

References FIXED_MEDIUM, font, MObjectShell(), MShellDestroy(), MShellUnrealize(), and MUnloadFont().

1475 {
1476  if (font != FIXED_MEDIUM)
1477  MUnloadFont(font);
1478  font = FIXED_MEDIUM;
1479  p = MObjectShell(p);
1480 
1481  MShellUnrealize(p);
1482  MShellDestroy(p);
1483 }
void MUnloadFont(MTFont font)
void MShellUnrealize(MOBJECT obj)
void MShellDestroy(MOBJECT obj)
MOBJECT MObjectShell(MOBJECT obj)
#define FIXED_MEDIUM
Definition: Mguidefs.h:879
MTFont font
Definition: DAS_Spatram.h:3066
static double p
Definition: SOLPOS.C:131
+ Here is the call graph for this function:

§ ColObjCB()

void ColObjCB ( MOBJECT  o,
void *  a,
void *  v 
)

select the object to consider for color picking

Definition at line 413 of file DAS_Spat_ConfCBs.c.

References b_sbar, palette::DB_BG, palette::DB_BG_Albl, palette::DB_BG_lblUP, palette::DB_BG_Plbl, DB_ColorPick(), palette::DB_FG_Albl, palette::DB_FG_lblUP, palette::DB_FG_Plbl, palette::DB_Sel, palette::DB_UnSel, DOASMODE, flag::exemode, das::Flag, FlgBG, FlgFG, FlgOBJ, g_sbar, listf::lbl, MMessageDialog(), MRButtonDeactivate(), MRButtonGetActivationStatus(), MScrollBarSetPos(), OFFLINEPLOT, r_sbar, listf::rb, and listf::shell.

Referenced by ColPickBackForeGCB(), and MDCreateDASConfig().

414 {
415 //sceglie l'oggetto da considerare label, buttons....
416 
417  int c = (int) v;
418  int er = 0;
419  int r, g, b;
420 
422  if (er)
423  {
424  switch (c)
425  {
426  case 0:
427  FlgOBJ=0; //Unselected Command Button
428  if(FlgBG)
429  {
430  r = DPAL.DB_UnSel[0];
431  g = DPAL.DB_UnSel[1];
432  b = DPAL.DB_UnSel[2];
433  }
434  break;
435  case 1:
436  FlgOBJ=1; //Selected KeyCom
437  if(FlgBG)
438  {
439  r = DPAL.DB_Sel[0];
440  g = DPAL.DB_Sel[1];
441  b = DPAL.DB_Sel[2];
442  }
443  break;
444 
445  case 2:
446  FlgOBJ=2; //Active Labels
448  {
449  if(FlgBG)
450  {
451  r = DPAL.DB_BG_Albl[0];
452  g = DPAL.DB_BG_Albl[1];
453  b = DPAL.DB_BG_Albl[2];
454  }
455  if(FlgFG)
456  {
457  r = DPAL.DB_FG_Albl[0];
458  g = DPAL.DB_FG_Albl[1];
459  b = DPAL.DB_FG_Albl[2];
460  }
461  break;
462  }
463  else
464  {
465  if(!MMessageDialog("DAS information", "Not Available in this Execution mode", " Ok ", NULL))
467  break;
468  }
469  case 3:
470  FlgOBJ=3; //Passive Labels
472  {
473  if(FlgBG)
474  {
475  r = DPAL.DB_BG_Plbl[0];
476  g = DPAL.DB_BG_Plbl[1];
477  b = DPAL.DB_BG_Plbl[2];
478  }
479  if(FlgFG)
480  {
481  r = DPAL.DB_FG_Plbl[0];
482  g = DPAL.DB_FG_Plbl[1];
483  b = DPAL.DB_FG_Plbl[2];
484  }
485  break;
486  }
487  else
488  {
489  if(!MMessageDialog("DAS information", "Not Available in this Execution mode", " Ok ", NULL))
491  break;
492  }
493  case 4:
494  FlgOBJ=4; //Forms Background
496  {
497  r = DPAL.DB_BG[0];
498  g = DPAL.DB_BG[1];
499  b = DPAL.DB_BG[2];
500 // DB_ColorPick(DAS.Gui.ContrPanel.RwFrm0);
501  break;
502  }
503  else
504  {
506  break;
507  }
508  case 5:
509  FlgOBJ=5; //Kapital Labels UP
511  {
512  if(FlgBG)
513  {
514  r = DPAL.DB_BG_lblUP[0];
515  g = DPAL.DB_BG_lblUP[1];
516  b = DPAL.DB_BG_lblUP[2];
517  }
518  if(FlgFG)
519  {
520  r = DPAL.DB_FG_lblUP[0];
521  g = DPAL.DB_FG_lblUP[1];
522  b = DPAL.DB_FG_lblUP[2];
523  }
524  break;
525  }
526  else
527  {
528  DB_ColorPick(LISTF.lbl[0]);
529  break;
530  }
531  case 6:
532  FlgOBJ=6; //Radio Buttons
533  DB_ColorPick(LISTF.rb[0]);
534  break;
535  }
536 
537  MScrollBarSetPos(r_sbar, (long) r);
538  MScrollBarSetPos(g_sbar, (long) g);
539  MScrollBarSetPos(b_sbar, (long) b);
540  }
541 }
short DB_BG_lblUP[3]
Background Capital Letters Labels Color UP.
MOBJECT rb[10]
Definition: DOASdef.h:62
short DB_FG_Plbl[3]
Foreground PASSIVE Label Colors.
MOBJECT b_sbar
Definition: DAS_Spatram.h:3057
MOBJECT r_sbar
Definition: DAS_Spatram.h:3057
#define DOASMODE
execution for DOAS Processing
flag Flag
Structure for different flags.
short DB_BG_Albl[3]
Background ACTIVE Label Colors.
short DB_Sel[3]
Selected Buttons Colors.
int FlgBG
Definition: DAS_Spat_Conf.c:91
MOBJECT shell
Definition: DOASdef.h:66
int MRButtonGetActivationStatus(MOBJECT o)
#define OFFLINEPLOT
execution for archived data visualisation
void MScrollBarSetPos(MOBJECT p, long pos)
void MRButtonDeactivate(MOBJECT o)
void DB_ColorPick(MOBJECT o)
int FlgFG
Definition: DAS_Spat_Conf.c:92
short DB_FG_Albl[3]
Foreground ACTIVE Label Colors.
short DB_BG_Plbl[3]
Background PASSIVE Label Colors.
MOBJECT g_sbar
Definition: DAS_Spatram.h:3057
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
das DAS
short DB_BG[3]
Default Background Color.
int FlgOBJ
Definition: DAS_Spat_Conf.c:93
MOBJECT lbl[5]
Definition: DOASdef.h:60
palette DPAL
short DB_UnSel[3]
Unselected Buttons Colors.
int exemode
Set the Execution MODE (Execution modes)
listf LISTF
short DB_FG_lblUP[3]
Foreground Capital Letters Labels Color UP.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ColorAssignCB()

void ColorAssignCB ( MOBJECT  o,
void *  o_data,
void *  a_data 
)

Definition at line 635 of file DAS_Spat_ConfCBs.c.

References b_c, palette::DB_BG, palette::DB_BG_Albl, palette::DB_BG_lblUP, palette::DB_BG_Plbl, palette::DB_BG_RButt, palette::DB_FG_Albl, palette::DB_FG_lblUP, palette::DB_FG_Plbl, palette::DB_FG_RButt, palette::DB_Sel, palette::DB_UnSel, palette::DB_UnSelFG, FlgBG, FlgFG, FlgOBJ, g_c, das::Gui, MObjectMap(), MObjectRedraw(), MObjectUnmap(), r_c, shells::Sh_Main, and gui::Shells.

Referenced by MDCreateDASConfig().

636 {
637 
638 // int i;
639  // Unselected Buttons BG
640  if(FlgBG && (FlgOBJ==0))
641  {
642  DPAL.DB_UnSel[0] = r_c;
643  DPAL.DB_UnSel[1] = g_c;
644  DPAL.DB_UnSel[2] = b_c;
645  }
646  // Unselected Buttons FG
647  if(FlgFG && (FlgOBJ==0))
648  {
649  DPAL.DB_UnSelFG[0] = r_c;
650  DPAL.DB_UnSelFG[1] = g_c;
651  DPAL.DB_UnSelFG[2] = b_c;
652  }
653  // Selected Buttons
654  if (FlgBG && (FlgOBJ==1))
655  {
656  DPAL.DB_Sel[0] = r_c;
657  DPAL.DB_Sel[1] = g_c;
658  DPAL.DB_Sel[2] = b_c;
659  }
660  //Active Labels BG
661  if (FlgBG && (FlgOBJ==2))
662  {
663  DPAL.DB_BG_Albl[0] = r_c;
664  DPAL.DB_BG_Albl[1] = g_c;
665  DPAL.DB_BG_Albl[2] = b_c;
666  }
667 
668  //Active Labels FG
669  if (FlgFG && (FlgOBJ==2))
670  {
671  DPAL.DB_FG_Albl[0] = r_c;
672  DPAL.DB_FG_Albl[1] = g_c;
673  DPAL.DB_FG_Albl[2] = b_c;
674 
675  }
676 
677  //Passive Labels BG
678  if (FlgBG && (FlgOBJ==3))
679  {
680  DPAL.DB_BG_Plbl[0] = r_c;
681  DPAL.DB_BG_Plbl[1] = g_c;
682  DPAL.DB_BG_Plbl[2] = b_c;
683  }
684 
685  //Passive Labels FG
686  if (FlgFG && (FlgOBJ==3))
687  {
688  DPAL.DB_FG_Plbl[0] = r_c;
689  DPAL.DB_FG_Plbl[1] = g_c;
690  DPAL.DB_FG_Plbl[2] = b_c;
691  }
692 
693  //Forms BG
694  if (FlgBG && (FlgOBJ==4))
695  {
696  DPAL.DB_BG[0] = r_c;
697  DPAL.DB_BG[1] = g_c;
698  DPAL.DB_BG[2] = b_c;
699  }
700 
701  // Kapital Labels UP BG
702  if (FlgBG && (FlgOBJ==5))
703  {
704  DPAL.DB_BG_lblUP[0] = r_c;
705  DPAL.DB_BG_lblUP[1] = g_c;
706  DPAL.DB_BG_lblUP[2] = b_c;
707  }
708 
709  // Kapital Labels UP FG
710  if (FlgFG && (FlgOBJ==5))
711  {
712  DPAL.DB_FG_lblUP[0] = r_c;
713  DPAL.DB_FG_lblUP[1] = g_c;
714  DPAL.DB_FG_lblUP[2] = b_c;
715  }
716 
717  // Radio Buttons DW BG
718  if (FlgBG && (FlgOBJ==6))
719  {
720  DPAL.DB_BG_RButt[0] = r_c;
721  DPAL.DB_BG_RButt[1] = g_c;
722  DPAL.DB_BG_RButt[2] = b_c;
723  }
724 
725 
726  // Radio Buttons FG
727  if (FlgFG && (FlgOBJ==6))
728  {
729  DPAL.DB_FG_RButt[0] = r_c;
730  DPAL.DB_FG_RButt[1] = g_c;
731  DPAL.DB_FG_RButt[2] = b_c;
732  }
733 
734 
738 
739 
740 
741 
742 }
short DB_BG_lblUP[3]
Background Capital Letters Labels Color UP.
gui Gui
Graphic User Interface Structure.
shells Shells
Shells structure.
short DB_FG_Plbl[3]
Foreground PASSIVE Label Colors.
MOBJECT Sh_Main
Main shell for control panel.
short DB_BG_Albl[3]
Background ACTIVE Label Colors.
short DB_Sel[3]
Selected Buttons Colors.
int FlgBG
Definition: DAS_Spat_Conf.c:91
short DB_BG_RButt[3]
Background Radio Buttons.
int b_c
Definition: DAS_Spatram.h:3060
int FlgFG
Definition: DAS_Spat_Conf.c:92
short DB_FG_Albl[3]
Foreground ACTIVE Label Colors.
void MObjectRedraw(MOBJECT obj)
int r_c
Definition: DAS_Spatram.h:3060
short DB_BG_Plbl[3]
Background PASSIVE Label Colors.
das DAS
short DB_BG[3]
Default Background Color.
void MObjectUnmap(MOBJECT obj)
int FlgOBJ
Definition: DAS_Spat_Conf.c:93
short DB_FG_RButt[3]
Foreground Radio Buttons.
short DB_UnSelFG[3]
Unselected Buttons Colors.
int g_c
Definition: DAS_Spatram.h:3060
palette DPAL
short DB_UnSel[3]
Unselected Buttons Colors.
void MObjectMap(MOBJECT obj)
short DB_FG_lblUP[3]
Foreground Capital Letters Labels Color UP.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ColorFreeCB()

void ColorFreeCB ( MOBJECT  o,
void *  o_data,
void *  a_data 
)

Declared but not used.

Definition at line 767 of file DAS_Spat_ConfCBs.c.

References cell_color, MFreeCell(), MSetCellColor(), and sel_cell.

768 {
769  if (sel_cell != (int) cell_color)
770  {
771  MSetCellColor(sel_cell, 0, 0, 0);
773  }
774 }
int sel_cell
Definition: DAS_Spatram.h:3060
MTColor cell_color
Definition: DAS_Spatram.h:3059
void MFreeCell(MTColor c)
void MSetCellColor(MTColor c, int r, int g, int b)
+ Here is the call graph for this function:

§ ColorMapExposeCB()

void ColorMapExposeCB ( MOBJECT  obj,
MEvent pexp,
void *  a_data 
)

Declared but not used.

Definition at line 803 of file DAS_Spat_ConfCBs.c.

References dil::Cfg, MDrawBox(), MDrawFilledBox(), MObjectGetHeight(), MObjectGetWidth(), cfg::NColors, sel_x, sel_y, and mtcl::white.

Referenced by ColorSaveCB().

804 {
805  int n, hsize, wsize, i, j;
806 
807  n = (DIL.Cfg.NColors == 16 ? 4 : 16);
808  wsize = MObjectGetWidth(obj) / n;
809  hsize = MObjectGetHeight(obj) / n;
810  for (i = 0; i < n; i++)
811  for (j = 0; j < n; j++)
812  MDrawFilledBox(obj, wsize * j + 1, hsize * i + 1, wsize - 2, hsize - 2, i * n + j);
813  MDrawBox(obj, sel_x, sel_y, wsize, hsize, MTCL.white);
814 }
cfg Cfg
Definition: Dildef.h:678
void MDrawFilledBox(MOBJECT p, int x, int y, int w, int h, MTColor bgc)
int MObjectGetHeight(MOBJECT obj)
mtcl MTCL
MTColor.
MTColor white
U32 NColors
Definition: Dildef.h:648
int MObjectGetWidth(MOBJECT obj)
void MDrawBox(MOBJECT p, int x, int y, int w, int h, MTColor bgc)
dil DIL
int sel_x
Definition: DAS_Spatram.h:3060
int sel_y
Definition: DAS_Spatram.h:3060
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ColorMapInputCB()

void ColorMapInputCB ( MOBJECT  obj,
MEvent pe,
void *  a_data 
)

Declared but not used.

Definition at line 831 of file DAS_Spat_ConfCBs.c.

References b_sbar, dil::Cfg, D_A, drawarea_bgc, E_BUTTON_PRESS, E_KEY_PRESS, g_sbar, MEvent::key, MKeyEvent::keycode, L_A, MDrawBox(), MObjectGetHeight(), MObjectGetWidth(), MEvent::mouse, MQueryColor(), MScrollBarSetPos(), cfg::NColors, R_A, r_sbar, sel_cell, sel_x, sel_y, MEvent::type, U_A, mtcl::white, MMouseEvent::x, and MMouseEvent::y.

832 {
833  int n, hsize, wsize;
834  int r, g, b, old_x, old_y;
835 
836  n = (DIL.Cfg.NColors == 16 ? 4 : 16);
837  wsize = MObjectGetWidth(obj) / n;
838  hsize = MObjectGetHeight(obj) / n;
839  old_x = sel_x;
840  old_y = sel_y;
841  if (pe->type == E_KEY_PRESS)
842  {
843  switch (pe->key.keycode)
844  {
845  case U_A:
846  sel_cell -= n;
847  if (sel_cell < 0)
848  sel_cell += (int) DIL.Cfg.NColors;
849  break;
850  case D_A:
851  sel_cell += n;
852  if (sel_cell > (int) DIL.Cfg.NColors)
853  sel_cell -= (int) DIL.Cfg.NColors;
854  break;
855  case R_A:
856  if (++sel_cell >= (int) DIL.Cfg.NColors)
857  sel_cell = 0;
858  break;
859  case L_A:
860  if (--sel_cell < 0)
861  sel_cell = (int) DIL.Cfg.NColors - 1;
862  break;
863  default:
864  return;
865  }
866  sel_x = (sel_cell % n) * wsize;
867  sel_y = (sel_cell / n) * hsize;
868  }
869  else if (pe->type == E_BUTTON_PRESS)
870  {
871  sel_x = (pe->mouse.x / wsize) * wsize;
872  sel_y = (pe->mouse.y / hsize) * hsize;
873  sel_cell = sel_x / wsize + sel_y / hsize * n;
874  }
875  else
876  return;
877  MDrawBox(obj, old_x, old_y, wsize, hsize, drawarea_bgc);
878  MDrawBox(obj, sel_x, sel_y, wsize, hsize, MTCL.white);
879  MQueryColor(sel_cell, &r, &g, &b);
880  MScrollBarSetPos(r_sbar, (long) r);
881  MScrollBarSetPos(g_sbar, (long) g);
882  MScrollBarSetPos(b_sbar, (long) b);
883 
884 }
void MQueryColor(MTColor col, int *pr, int *pg, int *pb)
cfg Cfg
Definition: Dildef.h:678
unsigned int keycode
Code for the pressed key.
Definition: Mguidefs.h:541
MOBJECT b_sbar
Definition: DAS_Spatram.h:3057
MOBJECT r_sbar
Definition: DAS_Spatram.h:3057
int MObjectGetHeight(MOBJECT obj)
mtcl MTCL
MTColor.
MTColor white
#define R_A
Definition: KEYCODES.H:280
U32 NColors
Definition: Dildef.h:648
#define U_A
Definition: KEYCODES.H:278
MMouseEvent mouse
Definition: Mguidefs.h:832
int MObjectGetWidth(MOBJECT obj)
#define L_A
Definition: KEYCODES.H:281
#define E_BUTTON_PRESS
Definition: Mguidefs.h:275
#define E_KEY_PRESS
Definition: Mguidefs.h:274
MKeyEvent key
Definition: Mguidefs.h:831
void MScrollBarSetPos(MOBJECT p, long pos)
void MDrawBox(MOBJECT p, int x, int y, int w, int h, MTColor bgc)
int sel_cell
Definition: DAS_Spatram.h:3060
MOBJECT g_sbar
Definition: DAS_Spatram.h:3057
#define D_A
Definition: KEYCODES.H:279
dil DIL
int type
Definition: Mguidefs.h:829
int x
pointer x, y coordinates in event window
Definition: Mguidefs.h:616
MTColor drawarea_bgc
Definition: DAS_Spatram.h:3062
int sel_x
Definition: DAS_Spatram.h:3060
int sel_y
Definition: DAS_Spatram.h:3060
+ Here is the call graph for this function:

§ ColorMapResizeCB()

void ColorMapResizeCB ( MOBJECT  obj,
DRAWAREA_PREF pref,
void *  a_data 
)

Declared but not used.

Definition at line 816 of file DAS_Spat_ConfCBs.c.

References dil::Cfg, cfg::NColors, DRAWAREA_PREF::new_h, DRAWAREA_PREF::new_w, DRAWAREA_PREF::old_h, DRAWAREA_PREF::old_w, sel_x, and sel_y.

817 {
818  int n, new_hsize, new_wsize, old_hsize, old_wsize;
819 
820  n = (DIL.Cfg.NColors == 16 ? 4 : 16);
821  old_wsize = pref->old_w / n;
822  old_hsize = pref->old_h / n;
823  new_wsize = pref->new_w / n;
824  new_hsize = pref->new_h / n;
825  sel_x = (sel_x * new_wsize) / old_wsize;
826  sel_y = (sel_y * new_hsize) / old_hsize;
827  pref->new_w = new_wsize * n;
828  pref->new_h = new_hsize * n;
829 }
cfg Cfg
Definition: Dildef.h:678
U32 NColors
Definition: Dildef.h:648
dil DIL
int sel_x
Definition: DAS_Spatram.h:3060
int sel_y
Definition: DAS_Spatram.h:3060

§ ColorPickCB()

void ColorPickCB ( MOBJECT  o,
void *  o_data,
void *  a_data 
)

Definition at line 386 of file DAS_Spat_ConfCBs.c.

References b_sbar, g_sbar, MObjectBackgroundColor(), MQueryColor(), MScrollBarSetPos(), p, and r_sbar.

387 {
388  MOBJECT p = (MOBJECT) a_data;
389  int r, g, b;
390 
391  MQueryColor(MObjectBackgroundColor(p), &r, &g, &b);
392  MScrollBarSetPos(r_sbar, (long) r);
393  MScrollBarSetPos(g_sbar, (long) g);
394  MScrollBarSetPos(b_sbar, (long) b);
395 }
void MQueryColor(MTColor col, int *pr, int *pg, int *pb)
MOBJECT b_sbar
Definition: DAS_Spatram.h:3057
MOBJECT r_sbar
Definition: DAS_Spatram.h:3057
MTColor MObjectBackgroundColor(MOBJECT obj)
void MScrollBarSetPos(MOBJECT p, long pos)
MOBJECT g_sbar
Definition: DAS_Spatram.h:3057
static double p
Definition: SOLPOS.C:131
void * MOBJECT
Definition: Mguidefs.h:192
+ Here is the call graph for this function:

§ ColorSaveCB()

void ColorSaveCB ( MOBJECT  o,
void *  o_data,
void *  a_data 
)

Declared but not used.

Definition at line 754 of file DAS_Spat_ConfCBs.c.

References b_c, ColorMapExposeCB(), frm3_dr1, g_c, MAllocCell(), PaletteMode, and r_c.

755 {
756  MAllocCell(r_c, g_c, b_c);
757 #ifdef WINDOWS
758 /*
759  * Windows palette is indirect, so it is
760  * necessary to redraw rectangles with a new color
761  */
762  if (PaletteMode)
763  ColorMapExposeCB(frm3_dr1, NULL, 0L);
764 #endif
765 }
int PaletteMode
Definition: DAS_Spat.c:158
MTColor MAllocCell(int r, int g, int b)
int b_c
Definition: DAS_Spatram.h:3060
int r_c
Definition: DAS_Spatram.h:3060
MOBJECT frm3_dr1
Definition: DAS_Spatram.h:3058
void ColorMapExposeCB(MOBJECT obj, MEvent *pexp, void *a_data)
Declared but not used.
int g_c
Definition: DAS_Spatram.h:3060
+ Here is the call graph for this function:

§ ColPickBackForeGCB()

void ColPickBackForeGCB ( MOBJECT  o,
void *  a,
void *  v 
)

select if the foreground or background color of the selected object will be picked

pick the color of the selected object

Parameters
v
  • 0 = background color
  • 1 = foreground color

Definition at line 167 of file DAS_Spat_ConfCBs.c.

References ColObjCB(), gui::ConfigPanel, DOASMODE, flag::exemode, False, das::Flag, FlgBG, FlgFG, das::Gui, configpanel::RBColObj, and True.

Referenced by MDCreateDASConfig().

168 {
169 //setta i flag foreground e background
170  int i;
171  switch ((int) v)
172  {
173  case 0:
174  FlgBG = True;
175  FlgFG = False;
176  break;
177  case 1:
178  FlgFG = True;
179  FlgBG = False;
180  break;
181  }
182  if (DAS.Flag.exemode == DOASMODE )
183  for (i = 0;i<7; i++)
184  ColObjCB(DAS.Gui.ConfigPanel.RBColObj[i], NULL, (void *) i);
185  else
186  for (i = 0;i<6; i++)
187  ColObjCB(DAS.Gui.ConfigPanel.RBColObj[i], NULL, (void *) i);
188 }
gui Gui
Graphic User Interface Structure.
#define DOASMODE
execution for DOAS Processing
flag Flag
Structure for different flags.
#define False
Definition: Mguidefs.h:236
int FlgBG
Definition: DAS_Spat_Conf.c:91
MOBJECT RBColObj[7]
int FlgFG
Definition: DAS_Spat_Conf.c:92
das DAS
configpanel ConfigPanel
Configuration panel structure.
void ColObjCB(MOBJECT o, void *a, void *v)
select the object to consider for color picking
#define True
Definition: Mguidefs.h:235
int exemode
Set the Execution MODE (Execution modes)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ConfigCB()

void ConfigCB ( MOBJECT  p,
void *  od,
void *  ad 
)

DAS Configuration shell creation callback.

Definition at line 2182 of file DAS_Spat_ConfCBs.c.

References MDCreateDASConfig().

2183 {
2184  MDCreateDASConfig();
2185 }
MOBJECT MDCreateDASConfig(void)
DAS Config shell. Procedure that build the shell for the DAS Config panels. The DAS Config allow for ...
+ Here is the call graph for this function:

§ D_UndoCB()

void D_UndoCB ( MOBJECT  o,
void *  a,
void *  v 
)

Undo the previous color setting operation.

Definition at line 225 of file DAS_Spat_ConfCBs.c.

Referenced by MDCreateDASConfig().

226 {
227 // int i;
228  // Unselected Buttons
229 /*
230  if(FlgBG && (FlgOBJ==0))
231  {
232  DB_Undo2Do_Colors( DPAL.DB_UnSel, UDPAL.DB_UnSel);
233 
234  if(DAS.Flag.exemode == DOASMODE)
235  DB_ColorAssign(LISTF.pb, sizeof LISTF.pb / sizeof LISTF.pb[0], DPAL.DB_UnSel);
236  else
237  {
238  DB_ColorAssign(PBUTT.KeyB, sizeof PBUTT.KeyB / sizeof PBUTT.KeyB[0], DPAL.DB_UnSel);
239  DB_ColorAssign(DAS.Gui.ContrPanel.pblamps, sizeof DAS.Gui.ContrPanel.pblamps / sizeof DAS.Gui.ContrPanel.pblamps[0], DPAL.DB_UnSel);
240  }
241 
242 
243  }
244  if(FlgFG && (FlgOBJ==0))
245  {
246  DB_Undo2Do_Colors( DPAL.DB_UnSelFG, UDPAL.DB_UnSelFG);
247 
248  if(DAS.Flag.exemode == DOASMODE)
249  DB_ColorAssign(LISTF.pb, sizeof LISTF.pb / sizeof LISTF.pb[0], DPAL.DB_UnSelFG);
250  else
251  {
252  DB_ColorAssign(PBUTT.KeyB, sizeof PBUTT.KeyB / sizeof PBUTT.KeyB[0], DPAL.DB_UnSelFG);
253  DB_ColorAssign(DAS.Gui.ContrPanel.pblamps, sizeof DAS.Gui.ContrPanel.pblamps / sizeof DAS.Gui.ContrPanel.pblamps[0], DPAL.DB_UnSelFG);
254  }
255 
256  }
257  // Selected Buttons
258  if (FlgBG && (FlgOBJ==1))
259  {
260  DB_Undo2Do_Colors(DPAL.DB_Sel, UDPAL.DB_Sel);
261 
262  MSelectObject(PBUTT.KeyB[0]);
263  MObjectSetBackgroundRGB(PBUTT.KeyB[0], DPAL.DB_Sel[0], DPAL.DB_Sel[1], DPAL.DB_Sel[2]);
264  }
265  //Active Labels BG
266  if (FlgBG && (FlgOBJ==2))
267  {
268  DB_Undo2Do_Colors(DPAL.DB_BG_Albl, UDPAL.DB_BG_Albl);
269 
270  DB_ColorAssign(DAS.Gui.ContrPanel.lbl_Par, sizeof DAS.Gui.ContrPanel.lbl_Par / sizeof DAS.Gui.ContrPanel.lbl_Par[0], DPAL.DB_BG_Albl);
271  DB_ColorAssign(DAS.Gui.ContrPanel.Albl_CS, sizeof DAS.Gui.ContrPanel.Albl_CS / sizeof DAS.Gui.ContrPanel.Albl_CS[0], DPAL.DB_BG_Albl);
272  DB_ColorAssign(DAS.Gui.ContrPanel.Albl_IE, sizeof DAS.Gui.ContrPanel.Albl_IE / sizeof DAS.Gui.ContrPanel.Albl_IE[0], DPAL.DB_BG_Albl);
273  DB_ColorAssign(DAS.Gui.ContrPanel.Albl_LS, sizeof DAS.Gui.ContrPanel.Albl_LS / sizeof DAS.Gui.ContrPanel.Albl_LS[0], DPAL.DB_BG_Albl);
274  DB_ColorAssign(DAS.Gui.ContrPanel.Albl_LT, sizeof DAS.Gui.ContrPanel.Albl_LT / sizeof DAS.Gui.ContrPanel.Albl_LT[0], DPAL.DB_BG_Albl);
275  DB_ColorAssign(DAS.Gui.ContrPanel.cop, sizeof DAS.Gui.ContrPanel.cop / sizeof DAS.Gui.ContrPanel.cop[0] , DPAL.DB_BG_Albl);
276  DB_ColorAssign(DAS.Gui.ContrPanel.step, sizeof DAS.Gui.ContrPanel.step / sizeof DAS.Gui.ContrPanel.step[0] , DPAL.DB_BG_Albl);
277  DB_ColorAssign(DAS.Gui.ContrPanel.slope, sizeof DAS.Gui.ContrPanel.slope / sizeof DAS.Gui.ContrPanel.slope[0] , DPAL.DB_BG_Albl);
278  DB_ColorAssign(DAS.Gui.ContrPanel.speed, sizeof DAS.Gui.ContrPanel.speed / sizeof DAS.Gui.ContrPanel.speed[0] , DPAL.DB_BG_Albl);
279  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Albl_Status, DPAL.DB_BG_Albl[0], DPAL.DB_BG_Albl[1], DPAL.DB_BG_Albl[2]);
280  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Albl_Script, DPAL.DB_BG_Albl[0], DPAL.DB_BG_Albl[1], DPAL.DB_BG_Albl[2]);
281  }
282 
283  //Active Labels FG
284  if (FlgFG && (FlgOBJ==2))
285  {
286 
287  DB_Undo2Do_Colors(DPAL.DB_FG_Albl, UDPAL.DB_FG_Albl);
288 
289  DB_ColorAssign(DAS.Gui.ContrPanel.lbl_Par, sizeof DAS.Gui.ContrPanel.lbl_Par / sizeof DAS.Gui.ContrPanel.lbl_Par[0], DPAL.DB_FG_Albl);
290  DB_ColorAssign(DAS.Gui.ContrPanel.Albl_CS, sizeof DAS.Gui.ContrPanel.Albl_CS / sizeof DAS.Gui.ContrPanel.Albl_CS[0], DPAL.DB_FG_Albl);
291  DB_ColorAssign(DAS.Gui.ContrPanel.Albl_IE, sizeof DAS.Gui.ContrPanel.Albl_IE / sizeof DAS.Gui.ContrPanel.Albl_IE[0], DPAL.DB_FG_Albl);
292  DB_ColorAssign(DAS.Gui.ContrPanel.Albl_LS, sizeof DAS.Gui.ContrPanel.Albl_LS / sizeof DAS.Gui.ContrPanel.Albl_LS[0], DPAL.DB_FG_Albl);
293  DB_ColorAssign(DAS.Gui.ContrPanel.Albl_LT, sizeof DAS.Gui.ContrPanel.Albl_LT / sizeof DAS.Gui.ContrPanel.Albl_LT[0], DPAL.DB_FG_Albl);
294  DB_ColorAssign(DAS.Gui.ContrPanel.cop, sizeof DAS.Gui.ContrPanel.cop / sizeof DAS.Gui.ContrPanel.cop[0] , DPAL.DB_FG_Albl);
295  DB_ColorAssign(DAS.Gui.ContrPanel.step, sizeof DAS.Gui.ContrPanel.step / sizeof DAS.Gui.ContrPanel.step[0] , DPAL.DB_FG_Albl);
296  DB_ColorAssign(DAS.Gui.ContrPanel.slope, sizeof DAS.Gui.ContrPanel.slope / sizeof DAS.Gui.ContrPanel.slope[0] , DPAL.DB_FG_Albl);
297  DB_ColorAssign(DAS.Gui.ContrPanel.speed, sizeof DAS.Gui.ContrPanel.speed / sizeof DAS.Gui.ContrPanel.speed[0] , DPAL.DB_FG_Albl);
298 
299  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Albl_Status, DPAL.DB_FG_Albl[0], DPAL.DB_FG_Albl[1], DPAL.DB_FG_Albl[2]);
300  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Albl_Script, DPAL.DB_FG_Albl[0], DPAL.DB_FG_Albl[1], DPAL.DB_FG_Albl[2]);
301  }
302 
303  //Passive Labels BG
304  if (FlgBG && (FlgOBJ==3))
305  {
306  DB_Undo2Do_Colors(DPAL.DB_BG_Plbl, UDPAL.DB_BG_Plbl);
307 
308  DB_ColorAssign(DAS.Gui.ContrPanel.lbl_NP, sizeof DAS.Gui.ContrPanel.lbl_NP / sizeof DAS.Gui.ContrPanel.lbl_NP[0], DPAL.DB_BG_Plbl);
309  DB_ColorAssign(DAS.Gui.ContrPanel.Plbl_CS, sizeof DAS.Gui.ContrPanel.Plbl_CS / sizeof DAS.Gui.ContrPanel.Plbl_CS[0], DPAL.DB_BG_Plbl);
310  DB_ColorAssign(DAS.Gui.ContrPanel.Plbl_IE, sizeof DAS.Gui.ContrPanel.Plbl_IE / sizeof DAS.Gui.ContrPanel.Plbl_IE[0], DPAL.DB_BG_Plbl);
311  DB_ColorAssign(DAS.Gui.ContrPanel.Plbl_LS, sizeof DAS.Gui.ContrPanel.Plbl_LS / sizeof DAS.Gui.ContrPanel.Plbl_LS[0], DPAL.DB_BG_Plbl);
312  DB_ColorAssign(DAS.Gui.ContrPanel.Plbl_LT, sizeof DAS.Gui.ContrPanel.Plbl_LT / sizeof DAS.Gui.ContrPanel.Plbl_LT[0], DPAL.DB_BG_Plbl);
313 
314  DB_ColorAssign(DAS.Gui.ContrPanel.lbl_lamps, sizeof DAS.Gui.ContrPanel.lbl_lamps / sizeof DAS.Gui.ContrPanel.lbl_lamps[0], DPAL.DB_BG_Plbl);
315  DB_ColorAssign(DAS.Gui.ContrPanel.Plbl_SM, sizeof DAS.Gui.ContrPanel.Plbl_SM / sizeof DAS.Gui.ContrPanel.Plbl_SM[0], DPAL.DB_BG_Plbl);
316  DB_ColorAssign(DAS.Gui.ContrPanel.lbl, sizeof DAS.Gui.ContrPanel.lbl / sizeof DAS.Gui.ContrPanel.lbl[0] , DPAL.DB_BG_Plbl);
317 
318  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_Status, DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
319  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_Script, DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
320  }
321 
322  //Passive Labels FG
323  if (FlgFG && (FlgOBJ==3))
324  {
325  DB_Undo2Do_Colors(DPAL.DB_FG_Plbl, UDPAL.DB_FG_Plbl);
326 
327  DB_ColorAssign(DAS.Gui.ContrPanel.lbl_NP, sizeof DAS.Gui.ContrPanel.lbl_NP / sizeof DAS.Gui.ContrPanel.lbl_NP[0], DPAL.DB_FG_Plbl);
328  DB_ColorAssign(DAS.Gui.ContrPanel.Plbl_CS, sizeof DAS.Gui.ContrPanel.Plbl_CS / sizeof DAS.Gui.ContrPanel.Plbl_CS[0], DPAL.DB_FG_Plbl);
329  DB_ColorAssign(DAS.Gui.ContrPanel.Plbl_IE, sizeof DAS.Gui.ContrPanel.Plbl_IE / sizeof DAS.Gui.ContrPanel.Plbl_IE[0], DPAL.DB_FG_Plbl);
330  DB_ColorAssign(DAS.Gui.ContrPanel.Plbl_LS, sizeof DAS.Gui.ContrPanel.Plbl_LS / sizeof DAS.Gui.ContrPanel.Plbl_LS[0], DPAL.DB_FG_Plbl);
331  DB_ColorAssign(DAS.Gui.ContrPanel.Plbl_LT, sizeof DAS.Gui.ContrPanel.Plbl_LT / sizeof DAS.Gui.ContrPanel.Plbl_LT[0], DPAL.DB_FG_Plbl);
332 
333  DB_ColorAssign(DAS.Gui.ContrPanel.lbl_lamps, sizeof DAS.Gui.ContrPanel.lbl_lamps / sizeof DAS.Gui.ContrPanel.lbl_lamps[0], DPAL.DB_FG_Plbl);
334  DB_ColorAssign(DAS.Gui.ContrPanel.Plbl_SM, sizeof DAS.Gui.ContrPanel.Plbl_SM / sizeof DAS.Gui.ContrPanel.Plbl_SM[0], DPAL.DB_FG_Plbl);
335  DB_ColorAssign(DAS.Gui.ContrPanel.lbl, sizeof DAS.Gui.ContrPanel.lbl / sizeof DAS.Gui.ContrPanel.lbl[0] , DPAL.DB_FG_Plbl);
336 
337  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_Status, DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
338  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_Script, DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
339 
340  }
341 
342  //Forms BG
343  if (FlgBG && (FlgOBJ==4))
344  {
345  DB_Undo2Do_Colors(DPAL.DB_BG, UDPAL.DB_BG);
346  MObjectUnmap(CP_Sh);
347  MObjectMap(CP_Sh);
348 // MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.RwFrm0, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
349 // MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.TbFrm0, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
350 // MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.TbFrm1, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
351  }
352 
353  // Kapital Labels UP BG
354  if (FlgBG && (FlgOBJ==5))
355  {
356  DB_Undo2Do_Colors(DPAL.DB_BG_lblUP, UDPAL.DB_BG_lblUP);
357  DB_ColorAssign(DAS.Gui.ContrPanel.lblK, sizeof DAS.Gui.ContrPanel.lblK / sizeof DAS.Gui.ContrPanel.lblK[0] , DPAL.DB_BG_lblUP);
358  }
359 
360  // Kapital Labels UP FG
361  if (FlgFG && (FlgOBJ==5))
362  {
363  DB_Undo2Do_Colors(DPAL.DB_FG_lblUP, UDPAL.DB_FG_lblUP);
364  DB_ColorAssign(DAS.Gui.ContrPanel.lblK, sizeof DAS.Gui.ContrPanel.lblK / sizeof DAS.Gui.ContrPanel.lblK[0] , DPAL.DB_FG_lblUP);
365  }
366 
367  // Radio Button BG
368  if (FlgBG && (FlgOBJ==6))
369  {
370  DB_Undo2Do_Colors(DPAL.DB_BG_RButt, UDPAL.DB_BG_RButt);
371  DB_ColorAssign(LISTF.rb, sizeof LISTF.rb / sizeof LISTF.rb[0] , DPAL.DB_BG_RButt);
372  }
373 
374 
375  // Radio Button FG
376  if (FlgFG && (FlgOBJ==6))
377  {
378  DB_Undo2Do_Colors(DPAL.DB_FG_RButt, UDPAL.DB_FG_RButt);
379  DB_ColorAssign(LISTF.rb, sizeof LISTF.rb / sizeof LISTF.rb[0] , DPAL.DB_FG_RButt);
380  }
381 */
382 
383 }
+ Here is the caller graph for this function:

§ DB_AMSposmode_CB()

void DB_AMSposmode_CB ( MOBJECT  o,
void *  a,
void *  v 
)

callback selecting the positioning mode for stepper motors ( sequential or simulaneaous)

Definition at line 1234 of file DAS_Spat_ConfCBs.c.

References das::DOption, MRButtonGetActivationStatus(), and optionini::smposmode.

Referenced by CONFP_opt_page5().

1235 {
1236 
1237  int er = 0;
1238  int c = (int) v;
1239 
1240 
1242 
1243  if(er)
1244  {
1245  switch (c)
1246  {
1247  case 0:
1248  DAS.DOption.smposmode = 1; //Simultaneous positioning
1249  break;
1250  case 1:
1251  DAS.DOption.smposmode = 0; //sequential positioning
1252  break;
1253  }
1254  }
1255 
1256 }
optionini DOption
Options for DAS execution.
int MRButtonGetActivationStatus(MOBJECT o)
das DAS
int smposmode
positioning mode for stepper , 0 = sequential mode; 1 = simoultaneous mode
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_AMSProgBar_CB()

void DB_AMSProgBar_CB ( MOBJECT  o,
void *  a,
void *  v 
)

callback selecting if show or not the progress bar for motor positioning

Definition at line 1119 of file DAS_Spat_ConfCBs.c.

References optionini::amsprogbar, das::DOption, and MRButtonGetActivationStatus().

Referenced by CONFP_opt_page5().

1120 {
1121 
1122  int er = 0;
1123  int c = (int) v;
1124 
1125 
1127 
1128  if(er)
1129  {
1130  switch (c)
1131  {
1132  case 0:
1133  DAS.DOption.amsprogbar = 0; //hide prog bars
1134  break;
1135  case 1:
1136  DAS.DOption.amsprogbar = 1; //show prog bars
1137  break;
1138  }
1139  }
1140 
1141 }
optionini DOption
Options for DAS execution.
int MRButtonGetActivationStatus(MOBJECT o)
int amsprogbar
display/hide prograssion bar, 0 = Hide, 1 = display
das DAS
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_CellExposeCB()

void DB_CellExposeCB ( MOBJECT  obj,
MEvent pexp,
void *  a_data 
)

display selected Color

Definition at line 788 of file DAS_Spat_ConfCBs.c.

References cell_color, MDrawFilledBox(), MObjectGetHeight(), MObjectGetWidth(), and PaletteMode.

Referenced by MDCreateDASConfig().

789 {
790  int hsize, wsize;
791 
792  wsize = MObjectGetWidth(obj);
793  hsize = MObjectGetHeight(obj);
794  if (PaletteMode)
795  MDrawFilledBox(obj, 0, 0, wsize, hsize, cell_color);
796 }
int PaletteMode
Definition: DAS_Spat.c:158
void MDrawFilledBox(MOBJECT p, int x, int y, int w, int h, MTColor bgc)
int MObjectGetHeight(MOBJECT obj)
int MObjectGetWidth(MOBJECT obj)
MTColor cell_color
Definition: DAS_Spatram.h:3059
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_CellResizeCB()

void DB_CellResizeCB ( MOBJECT  obj,
DRAWAREA_PREF pref,
void *  a_data 
)

display selected Color

Definition at line 798 of file DAS_Spat_ConfCBs.c.

References DRAWAREA_PREF::new_h, and DRAWAREA_PREF::old_h.

Referenced by MDCreateDASConfig().

799 {
800  pref->new_h = pref->old_h;
801 }
+ Here is the caller graph for this function:

§ DB_ChangeColorCellCB()

void DB_ChangeColorCellCB ( MOBJECT  o,
MVALUE  o_data,
void *  a_data 
)

draw the object 'o' with the selected color

Definition at line 543 of file DAS_Spat_ConfCBs.c.

References b_c, b_label, cell_color, frm3_dr1, g_c, g_label, MObjectSetBackgroundRGB(), MObjectSetText(), MSetCellColor(), PaletteMode, r_c, and r_label.

Referenced by MDCreateDASConfig().

544 {
545  char str[16];
546 
547  switch ((int) a_data)
548  {
549  case 0:
550  r_c = (int) o_data;
551  sprintf(str, "%03d", r_c);
552  MObjectSetText(r_label, str);
553  break;
554  case 1:
555  g_c = (int) o_data;
556  sprintf(str, "%03d", g_c);
557  MObjectSetText(g_label, str);
558  break;
559  case 2:
560  b_c = (int) o_data;
561  sprintf(str, "%03d", b_c);
562  MObjectSetText(b_label, str);
563  break;
564  }
565  if (PaletteMode)
567  else
569 }
int PaletteMode
Definition: DAS_Spat.c:158
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT r_label
Definition: DAS_Spatram.h:3058
void MObjectSetText(MOBJECT obj, const char *text)
MOBJECT g_label
Definition: DAS_Spatram.h:3058
int b_c
Definition: DAS_Spatram.h:3060
int r_c
Definition: DAS_Spatram.h:3060
MTColor cell_color
Definition: DAS_Spatram.h:3059
MOBJECT frm3_dr1
Definition: DAS_Spatram.h:3058
int g_c
Definition: DAS_Spatram.h:3060
MOBJECT b_label
Definition: DAS_Spatram.h:3058
void MSetCellColor(MTColor c, int r, int g, int b)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_ColorAssign()

void DB_ColorAssign ( MOBJECT  a[],
int  numel,
short  tc[] 
)

Assign to the selected object the chosen color.

Definition at line 204 of file DAS_Spat_ConfCBs.c.

References CP_Sh, FlgBG, FlgFG, MObjectSetBackgroundRGB(), MObjectSetForegroundRGB(), and MObjectSetTransparency().

205 {
206  int i;
207 
208  for (i=0; i < numel; i++)
209  {
210  if(FlgBG)
211  {
212  MObjectSetBackgroundRGB(a[i], tc[0], tc[1], tc[2]);
213  MObjectSetTransparency(a[i],0);
214  }
215  if(FlgFG)
216  {
217  MObjectSetForegroundRGB(a[i], tc[0], tc[1], tc[2]);
218  MObjectSetTransparency(a[i],0);
219  }
220  }
221 
222 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
int FlgBG
Definition: DAS_Spat_Conf.c:91
int FlgFG
Definition: DAS_Spat_Conf.c:92
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
+ Here is the call graph for this function:

§ DB_ColorPick()

void DB_ColorPick ( MOBJECT  o)

Definition at line 397 of file DAS_Spat_ConfCBs.c.

References b_sbar, FlgBG, FlgFG, g_sbar, MObjectBackgroundColor(), MObjectForegroundColor(), MQueryColor(), MScrollBarSetPos(), and r_sbar.

Referenced by ColObjCB().

398 {
399 
400  int r, g, b;
401 
402  if(FlgBG)
403  MQueryColor(MObjectBackgroundColor(o), &r, &g, &b);
404  if(FlgFG)
405  MQueryColor(MObjectForegroundColor(o), &r, &g, &b);
406 
407  MScrollBarSetPos(r_sbar, (long) r);
408  MScrollBarSetPos(g_sbar, (long) g);
409  MScrollBarSetPos(b_sbar, (long) b);
410 }
void MQueryColor(MTColor col, int *pr, int *pg, int *pb)
MOBJECT b_sbar
Definition: DAS_Spatram.h:3057
MOBJECT r_sbar
Definition: DAS_Spatram.h:3057
MTColor MObjectBackgroundColor(MOBJECT obj)
int FlgBG
Definition: DAS_Spat_Conf.c:91
MTColor MObjectForegroundColor(MOBJECT obj)
void MScrollBarSetPos(MOBJECT p, long pos)
int FlgFG
Definition: DAS_Spat_Conf.c:92
MOBJECT g_sbar
Definition: DAS_Spatram.h:3057
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_DispBlindPixCB()

void DB_DispBlindPixCB ( MOBJECT  o,
void *  id,
void *  a_data 
)

Display Blind Pixel Callback
Set if the blind pixels will be displayed or not on the plot window.

Definition at line 3697 of file DAS_Spat_ConfCBs.c.

References flag::DispBlindPix.

Referenced by CONFP_opt_page3().

3698 {
3699  int c = (int) a_data;
3700 
3701  switch(c)
3702  {
3703  case 0 :
3704  FLAG.DispBlindPix = 0;
3705  break;
3706  case 1:
3707  FLAG.DispBlindPix = 1;
3708  break;
3709 
3710  }
3711 }
flag FLAG
int DispBlindPix
Display Blind Pix: 0 = NO, 1 = Yes.
+ Here is the caller graph for this function:

§ DB_Do2Undo_Colors()

void DB_Do2Undo_Colors ( short  docol[],
short  undocol[] 
)

Definition at line 578 of file DAS_Spat_ConfCBs.c.

References b_c, g_c, and r_c.

579 {
580 
581  int i;
582  for (i = 0; i < 3;i++)
583  {
584  undocol[i] = docol[i];
585  }
586 
587 
588  docol[0] = r_c;
589  docol[1] = g_c;
590  docol[2] = b_c;
591 
592 }
int b_c
Definition: DAS_Spatram.h:3060
int r_c
Definition: DAS_Spatram.h:3060
int g_c
Definition: DAS_Spatram.h:3060

§ DB_Do2Undo_Fonts()

void DB_Do2Undo_Fonts ( MTFont  dofont,
MTFont  undofont 
)

Definition at line 1358 of file DAS_Spat_ConfCBs.c.

1359 {
1360 
1361  undofont = dofont;
1362 
1363 }
int undofont

§ DB_FilterType_CB()

void DB_FilterType_CB ( MOBJECT  o,
void *  a,
void *  v 
)

callback selecting the type of installed filter wheel module

Definition at line 1174 of file DAS_Spat_ConfCBs.c.

References das::DOption, FDOUBLE, optionini::filtertype, FPLUS, FSIMPLE, and MRButtonGetActivationStatus().

Referenced by CONFP_opt_page7().

1175 {
1176 
1177  int er = 0;
1178  int c = (int) v;
1179 
1180 
1182 
1183  if(er)
1184  {
1185  switch (c)
1186  {
1187  case FSIMPLE:
1189  break;
1190  case FDOUBLE:
1192  break;
1193  case FPLUS:
1195  break;
1196 
1197  }
1198  }
1199 
1200 }
optionini DOption
Options for DAS execution.
int filtertype
type of installed filter module: 0=Simple-SM3, 1=Double-SM3+SM4, 2=simpleplus-SM3+TM) ...
int MRButtonGetActivationStatus(MOBJECT o)
#define FDOUBLE
double filter wheel
#define FPLUS
Filter Wheel Torque Motor.
#define FSIMPLE
simple filter wheel
das DAS
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_FontAssign()

void DB_FontAssign ( MOBJECT  a[],
int  numel,
MTFont  fnt 
)

This callback assign font to the selected object.

Definition at line 1374 of file DAS_Spat_ConfCBs.c.

References MObjectSetFont(), and True.

1375 {
1376  int i;
1377  for (i=0; i < numel; i++)
1378  {
1379  MObjectSetFont(a[i], fnt, True);
1380  }
1381 
1382 }
#define True
Definition: Mguidefs.h:235
void MObjectSetFont(MOBJECT obj, MTFont font, int resize)
+ Here is the call graph for this function:

§ DB_ImgTypeCB()

void DB_ImgTypeCB ( MOBJECT  o,
void *  id,
void *  a_data 
)

Set the Image type.

Parameters
*a_data
  • 0 = MONO
  • 1 = RGB

Definition at line 1314 of file DAS_Spat_ConfCBs.c.

References das::DOption, and optionini::imgtype.

Referenced by CONFP_opt_page1().

1315 {
1316 
1317  int c = (int) a_data;
1318 // char buf[80];
1319 
1320  switch(c)
1321  {
1322  case 0 :
1323  DAS.DOption.imgtype=0; //Mono
1324  break;
1325  case 1:
1326  DAS.DOption.imgtype=1; //RGB
1327  break;
1328 
1329  }
1330 
1331 
1332 
1333 
1334 }
optionini DOption
Options for DAS execution.
das DAS
int imgtype
Flag to set Image type: 0=MONOINT, 1=RGB.
+ Here is the caller graph for this function:

§ DB_MIGE_CB()

void DB_MIGE_CB ( MOBJECT  o,
void *  a,
void *  v 
)

callback selecting the operation mode for the AltAzPlatform

Definition at line 1000 of file DAS_Spat_ConfCBs.c.

References gui::ConfigPanel, das::Gui, pushbutt::KeyB, mige::linked, das::MIGE, MObjectSetSensitive(), MObjectSetUnsensitive(), MRButtonGetActivationStatus(), gui::PushButt, configpanel::rbMIGEopmode, and configpanel::rbMIGEtype.

Referenced by CONFP_opt_page5().

1001 {
1002 
1003  int er = 0;
1004  int c = (int) v;
1005 
1006 
1008 
1009  if(er)
1010  {
1011  switch (c)
1012  {
1013  case 0:
1014  DAS.MIGE.linked = 0; //MIGE not Connected
1024 
1025  //MObjectSetUnsensitive(DAS.Gui.PushButt.KeyB[5]);
1026  break;
1027  case 1:
1028  DAS.MIGE.linked = 1; //
1038  break;
1039  }
1040  }
1041 }
gui Gui
Graphic User Interface Structure.
MOBJECT KeyB[28]
Keyboard Buttons.
void MObjectSetUnsensitive(MOBJECT obj)
int MRButtonGetActivationStatus(MOBJECT o)
mige MIGE
pushbutt PushButt
Push buttons.
int linked
das DAS
configpanel ConfigPanel
Configuration panel structure.
MOBJECT rbMIGEtype[5]
radio button for MIGE type
MOBJECT rbMIGEopmode[3]
radio button for MIGE operating mode
void MObjectSetSensitive(MOBJECT obj)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_MIGEopmode_CB()

void DB_MIGEopmode_CB ( MOBJECT  o,
void *  a,
void *  v 
)

callback selecting the operation mode for the AltAzPlatform

Definition at line 1071 of file DAS_Spat_ConfCBs.c.

References optionini::aaopmode, DOASMODE, das::DOption, flag::exemode, das::Flag, das::Gui, pushbutt::KeyB, MObjectSetSensitive(), MObjectSetUnsensitive(), MRButtonGetActivationStatus(), and gui::PushButt.

Referenced by CONFP_opt_page5().

1072 {
1073 
1074  int er = 0;
1075  int c = (int) v;
1076 
1077 
1079 
1080  if(er)
1081  {
1082  switch (c)
1083  {
1084  case 0:
1085  DAS.DOption.aaopmode = 0; //Solar Tracker
1086  if(DAS.Flag.exemode != DOASMODE)
1087  {
1091  //MObjectSetUnsensitive(DAS.Gui.PushButt.KeyB[4]);
1092  }
1093  break;
1094  case 1:
1095  DAS.DOption.aaopmode = 1; //Anti Solar Tracker
1096  if(DAS.Flag.exemode != DOASMODE)
1097  {
1101  //MObjectSetUnsensitive(DAS.Gui.PushButt.KeyB[4]);
1102  }
1103  break;
1104  case 2:
1105  DAS.DOption.aaopmode = 2; //Free Positioning
1106  if(DAS.Flag.exemode != DOASMODE)
1107  {
1111  //MObjectSetSensitive(DAS.Gui.PushButt.KeyB[4]);
1112  }
1113  break;
1114  }
1115  }
1116 }
gui Gui
Graphic User Interface Structure.
optionini DOption
Options for DAS execution.
MOBJECT KeyB[28]
Keyboard Buttons.
void MObjectSetUnsensitive(MOBJECT obj)
#define DOASMODE
execution for DOAS Processing
flag Flag
Structure for different flags.
int MRButtonGetActivationStatus(MOBJECT o)
pushbutt PushButt
Push buttons.
das DAS
int aaopmode
operation mode for the Alt Az Platform, 0 = solar Traxker; 1 = Anti-Solar Tracker; 2 = Free Positioni...
void MObjectSetSensitive(MOBJECT obj)
int exemode
Set the Execution MODE (Execution modes)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_MIGEType_CB()

void DB_MIGEType_CB ( MOBJECT  o,
void *  a,
void *  v 
)

Definition at line 1043 of file DAS_Spat_ConfCBs.c.

References das::MIGE, MRButtonGetActivationStatus(), and mige::type.

Referenced by CONFP_opt_page5().

1044 {
1045 
1046  int er = 0;
1047  int c = (int) v;
1048 
1049 
1051 
1052  if(er)
1053  {
1054  switch (c)
1055  {
1056  case 0:
1057  DAS.MIGE.type = 0; //Old and Big Platform (not used anymore)
1058  break;
1059  case 1:
1060  DAS.MIGE.type = 1; //ISAC Version
1061  break;
1062  case 2:
1063  DAS.MIGE.type = 2; //COM Version (with slip ring)
1064  break;
1065  }
1066  }
1067 }
int type
int MRButtonGetActivationStatus(MOBJECT o)
mige MIGE
das DAS
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_MirrorImg_CB()

void DB_MirrorImg_CB ( MOBJECT  o,
void *  a,
void *  v 
)

callback selecting the activation of the mirroring of the CCD image along the X or Y axis

Definition at line 1259 of file DAS_Spat_ConfCBs.c.

References das::DOption, optionini::mirrorimg, MRButtonGetActivationStatus(), XAX, and YAX.

Referenced by CONFP_opt_page5().

1260 {
1261 
1262  int er = 0;
1263  int c = (int) v;
1264 
1265 
1267 
1268  if(er)
1269  {
1270  switch (c)
1271  {
1272  case 0:
1273  DAS.DOption.mirrorimg[XAX] = 1; //Mirror image along X Axis
1274  break;
1275  case 1:
1276  DAS.DOption.mirrorimg[XAX] = 0; //Do NOT mirror image along X Axis ;
1277  break;
1278  case 2:
1279  DAS.DOption.mirrorimg[YAX] = 1; //Mirror image along Y Axis
1280  break;
1281  case 3:
1282  DAS.DOption.mirrorimg[YAX] = 0; //Do NOT mirror image along Y Axis ;
1283  break;
1284 
1285  }
1286  }
1287 
1288 }
optionini DOption
Options for DAS execution.
#define XAX
X Axis.
int MRButtonGetActivationStatus(MOBJECT o)
#define YAX
Y Axis.
das DAS
int mirrorimg[2]
Flag to set the mirroring of the CCD image: 0 = NO Mirroring, 1= YES Mirroring (element 0 for X axis;...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_PlotDisplayCB()

void DB_PlotDisplayCB ( MOBJECT  o,
void *  id,
void *  a_data 
)

Select if the PLOT will be displayed after the measurement
.

Parameters
adata
  • = 0 –> NO
  • = 1 –> Yes

Definition at line 3714 of file DAS_Spat_ConfCBs.c.

References das::Flag, and flag::plotW.

Referenced by CONFP_opt_page3().

3715 {
3716  int c = (int) a_data;
3717 
3718  switch(c)
3719  {
3720  case 0 :
3721  DAS.Flag.plotW = 0;
3722  break;
3723  case 1:
3724  DAS.Flag.plotW = 1;
3725  break;
3726 
3727  }
3728 }
int plotW
Flag for the plot display.
flag Flag
Structure for different flags.
das DAS
+ Here is the caller graph for this function:

§ DB_PlotYAxisCB()

void DB_PlotYAxisCB ( MOBJECT  o,
void *  id,
void *  a_data 
)

Select the Y axis Unit mode
.

Parameters
adata
  • = 0 –> Full Range
  • = 1 –> Min/Max

Definition at line 3678 of file DAS_Spat_ConfCBs.c.

References flag::plotYRange.

Referenced by CONFP_opt_page3().

3679 {
3680  int c = (int) a_data;
3681 
3682  switch(c)
3683  {
3684  case 0 :
3685  FLAG.plotYRange = 0;
3686  break;
3687  case 1:
3688  FLAG.plotYRange = 1;
3689  break;
3690 
3691  }
3692 
3693 
3694 
3695 }
int plotYRange
0 –> full range; 1 –> min/max
flag FLAG
+ Here is the caller graph for this function:

§ DB_RadDrkSourceCB()

void DB_RadDrkSourceCB ( MOBJECT  o,
void *  a,
void *  v 
)

Set the dark source.

Parameters
*a_data
  • 0 = Blind Pixels only
  • 1 = Full frame

Definition at line 1290 of file DAS_Spat_ConfCBs.c.

References optionini::darksource, das::DOption, and MRButtonGetActivationStatus().

Referenced by CONFP_opt_page2().

1291 {
1292  int er = 0;
1293  int c = (int) v;
1294 
1295 
1297 
1298  if(er)
1299  {
1300  switch (c)
1301  {
1302  case 0:
1303  DAS.DOption.darksource = 0;
1304  break;
1305  case 1:
1306  DAS.DOption.darksource = 1;
1307  break;
1308 
1309  }
1310  }
1311 
1312 }
optionini DOption
Options for DAS execution.
int MRButtonGetActivationStatus(MOBJECT o)
das DAS
int darksource
Flag to set Dark source: 0 = Blind Pixels, 1 = Full Frame.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_RadioAvgModeCB()

void DB_RadioAvgModeCB ( MOBJECT  o,
void *  id,
void *  a_data 
)

Set the Averaging mode flag.

Parameters
*a_data
  • 0 = Fixed number of measurements
  • 1 = Fixed tot exposure time

Definition at line 904 of file DAS_Spat_ConfCBs.c.

References optionini::avgmode, gui::ConfigPanel, das::DOption, das::Gui, configpanel::lblAvg, MObjectSetText(), N_AVG, configpanel::n_avg, and TOTTEXP.

Referenced by CONFP_opt_page1().

905 {
906  int c = (int) a_data;
907  char buf[80];
908 
909  switch(c)
910  {
911  case 0 :
912  DAS.DOption.avgmode=0;
913  sprintf(buf,"%d",N_AVG);
914  MObjectSetText(DAS.Gui.ConfigPanel.lblAvg, "Repeat measure for: ");
916 
917  break;
918  case 1:
919  DAS.DOption.avgmode=1;
920  sprintf(buf, "%d", TOTTEXP);
921  MObjectSetText(DAS.Gui.ConfigPanel.lblAvg, "TOT Exposure Time [s]:");
923 
924  break;
925 
926  }
927 }
gui Gui
Graphic User Interface Structure.
MOBJECT lblAvg
optionini DOption
Options for DAS execution.
void MObjectSetText(MOBJECT obj, const char *text)
int avgmode
Flag to set Averaging mode: 0 = Repeat measurements for fixed number, 1 = Repeat measurements for fix...
int TOTTEXP
Total Exposure time in Averaging mode.
Definition: DAS_Spat.c:115
das DAS
configpanel ConfigPanel
Configuration panel structure.
int N_AVG
Number of measurements for Averaging mode in fixed number of meas. mode.
Definition: DAS_Spat.c:113
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_RadioDarkCB()

void DB_RadioDarkCB ( MOBJECT  o,
void *  id,
void *  a_data 
)

Set the dark removing from the measurements.

Parameters
*a_data
  • 0 = DO NOT remove dark
  • 1 = Remove dark

Definition at line 972 of file DAS_Spat_ConfCBs.c.

References configpanel::BPDark, gui::ConfigPanel, optionini::darkremove, das::DOption, configpanel::FFDark, das::Gui, MObjectSetSensitive(), and MObjectSetUnsensitive().

Referenced by CONFP_opt_page2().

973 {
974  int c = (int) a_data;
975 // char buf[80];
976 
977  switch(c)
978  {
979  case 0 :
983 
984  break;
985  case 1:
989 
990 /* if (DAS.DOption.flgdarksource)
991  MRButtonActivate(DAS.Gui.ConfigPanel.FFDark);
992  else
993  MRButtonActivate(DAS.Gui.ConfigPanel.BPDark);
994 */ break;
995 
996  }
997 }
gui Gui
Graphic User Interface Structure.
optionini DOption
Options for DAS execution.
void MObjectSetUnsensitive(MOBJECT obj)
int darkremove
Flag to set Dark Removal from measurements; motors0 = No Dark Removal, 1 = Dark Removal.
das DAS
configpanel ConfigPanel
Configuration panel structure.
MOBJECT BPDark
void MObjectSetSensitive(MOBJECT obj)
MOBJECT FFDark
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_RadioFNSelCB()

void DB_RadioFNSelCB ( MOBJECT  o,
void *  id,
void *  a_data 
)

Set the file name mode.

Parameters
*a_data
  • 0 = Free choice
  • 1 = Automatic

Definition at line 1336 of file DAS_Spat_ConfCBs.c.

References das::DOption, and optionini::filename.

Referenced by CONFP_opt_page1().

1337 {
1338 
1339  int c = (int) a_data;
1340 // char buf[80];
1341 
1342  switch(c)
1343  {
1344  case 0 :
1345  DAS.DOption.filename=0; //free
1346  break;
1347  case 1:
1348  DAS.DOption.filename=1; //Automatico
1349  break;
1350 
1351  }
1352 
1353 }
optionini DOption
Options for DAS execution.
das DAS
int filename
Flag to set file name mode 0=Free choice, 1 = Automatic.
+ Here is the caller graph for this function:

§ DB_RadioModeSelCB()

void DB_RadioModeSelCB ( MOBJECT  o,
void *  id,
void *  a_data 
)

Set the saving mode.

Parameters
*a_data
  • 0 = ASCII data files
  • 1 = BINARY data file

Definition at line 955 of file DAS_Spat_ConfCBs.c.

References das::DOption, and optionini::savingmode.

Referenced by CONFP_opt_page1().

956 {
957  int c = (int) a_data;
958 // char buf[80];
959 
960  switch(c)
961  {
962  case 0 :
964  break;
965  case 1:
967  break;
968 
969  }
970 }
optionini DOption
Options for DAS execution.
int savingmode
Flag to set saving mode: 0=ASCII, 1=Binary.
das DAS
+ Here is the caller graph for this function:

§ DB_RadioPixCorrCB()

void DB_RadioPixCorrCB ( MOBJECT  o,
void *  id,
void *  a_data 
)

Set the image Correction flag.

Parameters
*a_data
  • 0 = disable defective pixel correction
  • 1 = enable defective pixel correction

Definition at line 931 of file DAS_Spat_ConfCBs.c.

References gui::ConfigPanel, optionini::DEFPIXFILENAME, das::DOption, das::Gui, configpanel::lblCorrPixF, MObjectSetSensitive(), MObjectSetText(), MObjectSetUnsensitive(), configpanel::pbBrowseCorrPixF, and optionini::pixcorr.

Referenced by CONFP_opt_page1().

932 {
933  int c = (int) a_data;
934 // char buf[80];
935 
936  switch(c)
937  {
938  case 0 :
939  DAS.DOption.pixcorr=0; //Pixel correction disabled
942 
943  break;
944  case 1:
945  DAS.DOption.pixcorr=1; //Pixel correction ENABLED
949  break;
950 
951  }
952 }
gui Gui
Graphic User Interface Structure.
optionini DOption
Options for DAS execution.
void MObjectSetUnsensitive(MOBJECT obj)
void MObjectSetText(MOBJECT obj, const char *text)
das DAS
configpanel ConfigPanel
Configuration panel structure.
int pixcorr
Flag to set defective pixel correction: 0=NOT Corrected, 1=Corrected.
void MObjectSetSensitive(MOBJECT obj)
MOBJECT lblCorrPixF
label for name file used for defec pix correction
MOBJECT pbBrowseCorrPixF
Push button for file selection.
char DEFPIXFILENAME[_MAX_PATH]
defective pixel filename with path
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_SelOutModeCB()

void DB_SelOutModeCB ( MOBJECT  o,
void *  id,
void *  a_data 
)

Select the Output for the Temperature AD Converter
.

Parameters
adata
  • = 0 –> Volts
  • = 1 –> Celsius degree

Definition at line 3622 of file DAS_Spat_ConfCBs.c.

References adtester::OutputMode.

Referenced by MDCreateDASConfig().

3623 {
3624  int c = (int) a_data;
3625 // char buf[80];
3626 
3627  switch(c)
3628  {
3629  case 0 :
3630  ADTESTER.OutputMode = 0;
3631  break;
3632  case 1:
3633  ADTESTER.OutputMode = 1;
3634  break;
3635 
3636  }
3637 }
adtester ADTESTER
+ Here is the caller graph for this function:

§ DB_SetCCDTargetTempCB()

void DB_SetCCDTargetTempCB ( MOBJECT  o,
void *  id,
void *  a_data 
)

Select the CCD temperature mode
.

Parameters
adata
  • = 0 –> FIXED Temperateure
  • = 1 –> SZA Driven Temperature

Definition at line 3642 of file DAS_Spat_ConfCBs.c.

References flag::settempvar.

Referenced by CONFP_opt_page2().

3643 {
3644  int c = (int) a_data;
3645 
3646  switch(c)
3647  {
3648  case 0 :
3649  FLAG.settempvar = 0;
3650  break;
3651  case 1:
3652  FLAG.settempvar = 1;
3653  break;
3654  }
3655 }
int settempvar
flag FLAG
+ Here is the caller graph for this function:

§ DB_SetXUnitsCB()

void DB_SetXUnitsCB ( MOBJECT  o,
void *  id,
void *  a_data 
)

Select the X axis Unit mode
.

Parameters
adata
  • = 0 –> Pixel
  • = 1 –> Wavelength (Angstrom)
  • = 2 –> Wavelength (nm)

Definition at line 3659 of file DAS_Spat_ConfCBs.c.

References flag::Wl.

Referenced by CONFP_opt_page3().

3660 {
3661  int c = (int) a_data;
3662 
3663  switch(c)
3664  {
3665  case 0 :
3666  FLAG.Wl = 0;
3667  break;
3668  case 1:
3669  FLAG.Wl = 1;
3670  break;
3671  case 2:
3672  FLAG.Wl = 2;
3673  break;
3674 
3675  }
3676 }
int Wl
Flag for the units on the X scale plot.
flag FLAG
+ Here is the caller graph for this function:

§ DB_Shutter_CB()

void DB_Shutter_CB ( MOBJECT  o,
void *  a,
void *  v 
)

callback selecting if the shutter is installed or not

Definition at line 1204 of file DAS_Spat_ConfCBs.c.

References gui::ConfigPanel, das::DOption, optionini::emshutter, das::Gui, MObjectSetSensitive(), MObjectSetUnsensitive(), MRButtonGetActivationStatus(), and configpanel::rbSHUTType.

Referenced by CONFP_opt_page7().

1205 {
1206 
1207  int er = 0;
1208  int c = (int) v;
1209 
1210 
1212 
1213  if(er)
1214  {
1215  switch (c)
1216  {
1217  case 0:
1218  DAS.DOption.emshutter = 0; //Shutter not Installed
1222  break;
1223  case 1:
1224  DAS.DOption.emshutter = 1; //Shutter installed
1228  break;
1229  }
1230  }
1231 
1232 }
gui Gui
Graphic User Interface Structure.
optionini DOption
Options for DAS execution.
void MObjectSetUnsensitive(MOBJECT obj)
int MRButtonGetActivationStatus(MOBJECT o)
int emshutter
Presence of the CCD Shutter, emshutter = 1 –> Shutter IS Installed, = 0 –> Shutter NOT Installed...
das DAS
configpanel ConfigPanel
Configuration panel structure.
MOBJECT rbSHUTType[3]
radio button for SHUTTER type
void MObjectSetSensitive(MOBJECT obj)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_ShutterType_CB()

void DB_ShutterType_CB ( MOBJECT  o,
void *  a,
void *  v 
)

callback selecting the type of installed shutter

Definition at line 1145 of file DAS_Spat_ConfCBs.c.

References das::DOption, MRButtonGetActivationStatus(), ROTSHUT, optionini::shuttertype, TORQUEM, and VS25.

Referenced by CONFP_opt_page7().

1146 {
1147 
1148  int er = 0;
1149  int c = (int) v;
1150 
1151 
1153 
1154  if(er)
1155  {
1156  switch (c)
1157  {
1158  case VS25:
1160  break;
1161  case ROTSHUT:
1163  break;
1164  case TORQUEM:
1166  break;
1167 
1168  }
1169  }
1170 
1171 }
optionini DOption
Options for DAS execution.
#define TORQUEM
Torque Motor.
#define ROTSHUT
Rotating Shutter.
int MRButtonGetActivationStatus(MOBJECT o)
#define VS25
Uniblitz Shutter VS25.
das DAS
int shuttertype
type of installed shutter: 0 = VS25, 1 = Rotating Shutter, 2 = TorqueMotor
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_TestF()

void DB_TestF ( void  )

Definition at line 1425 of file DAS_Spat_ConfCBs.c.

References bold, gui::ConfigPanel, e_fname, e_fsize, FIXED_MEDIUM, font, configpanel::frm4_dr1, das::Gui, italic, MBeep(), MLoadFont(), MObjectGetText(), MObjectRedraw(), MUnloadFont(), and newfont.

Referenced by SetBoldCB(), SetItalicCB(), and TestFontCB().

1426 {
1427  MTFont newfont;
1428  int size;
1429  char family[32], buff[8];
1430 /*
1431  * Get user preferences from the EDIT Objects
1432  */
1433  MObjectGetText (e_fname, family);
1434  MObjectGetText (e_fsize, buff);
1435  size = atoi (buff);
1436  newfont = MLoadFont (family, size, bold, italic);
1437 /*
1438  * The function returns FIXED_MEDIUM on failure
1439  */
1440  if (newfont != FIXED_MEDIUM)
1441  {
1442  if (font != FIXED_MEDIUM)
1443  MUnloadFont (font);
1444  font = newfont;
1446  }
1447  else
1448  MBeep ();
1449 
1450 
1451 }
MTFont newfont
Definition: CreateForms.c:95
gui Gui
Graphic User Interface Structure.
MOBJECT frm4_dr1
void MUnloadFont(MTFont font)
char * MObjectGetText(MOBJECT obj, char *text)
MOBJECT e_fsize
Definition: DAS_Spatram.h:3064
#define FIXED_MEDIUM
Definition: Mguidefs.h:879
MTFont font
Definition: DAS_Spatram.h:3066
int MTFont
Definition: Mguidefs.h:175
void MBeep(void)
MTFont MLoadFont(const char *family, int h, int bold, int italic)
int bold
Definition: DAS_Spat_Conf.c:88
void MObjectRedraw(MOBJECT obj)
das DAS
configpanel ConfigPanel
Configuration panel structure.
MOBJECT e_fname
Definition: DAS_Spatram.h:3064
int italic
Definition: DAS_Spat_Conf.c:89
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_Undo2Do_Colors()

void DB_Undo2Do_Colors ( short  undocol[],
short  docol[] 
)

Assign to the DO_Color structure the Color Values of the UNDO_Color Structure.

Assign to the UNDO_Color structure the Color Values of the DO_Color Structure.

Definition at line 189 of file DAS_Spat_ConfCBs.c.

References b_c, g_c, and r_c.

190 {
191  int i;
192  for (i = 0; i < 3;i++)
193  {
194  undocol[i] = docol[i];
195  }
196 
197 
198  docol[0] = r_c;
199  docol[1] = g_c;
200  docol[2] = b_c;
201 
202 }
int b_c
Definition: DAS_Spatram.h:3060
int r_c
Definition: DAS_Spatram.h:3060
int g_c
Definition: DAS_Spatram.h:3060

§ DB_Undo2Do_Fonts()

void DB_Undo2Do_Fonts ( MTFont  undofont,
MTFont  dofont 
)

Definition at line 1365 of file DAS_Spat_ConfCBs.c.

References undofont.

1366 {
1367 
1368  dofont = undofont;
1369 
1370 }
int undofont

§ DB_VMRsfCB()

void DB_VMRsfCB ( MOBJECT  o,
void *  id,
void *  a_data 
)

Set the flag for modification or reload of DAS configuration files
Set the VMRsf (View Modify Re-load system files) flag.

Parameters
*a_data
  • = 0 –> FLAG.VMRsf = 0 –> view/modify files
  • = 1 –> FLAG.VMRsf = 1 –> re-load files

Definition at line 4184 of file DAS_Spat_ConfCBs.c.

References flag::VMRsf.

Referenced by CONFP_opt_page2().

4185 {
4186 
4187  int c = (int) a_data;
4188  switch (c)
4189  {
4190  case 0:
4191  FLAG.VMRsf = 0;
4192  break;
4193  case 1:
4194  FLAG.VMRsf = 1;
4195  break;
4196 
4197  }
4198 
4199 }
int VMRsf
ViewModifyReloadsystemfile: 0 = ViewModify, 1 = Reload.
flag FLAG
+ Here is the caller graph for this function:

§ DrawAreaExpFontCB()

void DrawAreaExpFontCB ( MOBJECT  obj,
MEvent pe,
void *  data 
)

This callback draws strings using the selected font.

Definition at line 1615 of file DAS_Spat_ConfCBs.c.

References mtcl::black, CENTER_ALIGN, font, MDrawText(), MObjectGetHeight(), and MObjectGetWidth().

Referenced by MDCreateDASConfig().

1616 {
1617  MDrawText(obj,
1618  0, 0, MObjectGetWidth(obj), MObjectGetHeight(obj)/2,
1619  "AaBbCcDdEeFfGgHhIiJjKkLl",
1621  MDrawText(obj,
1622  0, MObjectGetHeight(obj) / 2, MObjectGetWidth(obj), MObjectGetHeight(obj) / 2,
1623  "MmOoPpQqRrSsTtUuVvWwXxYyZz",
1625 }
MTColor black
int MObjectGetHeight(MOBJECT obj)
mtcl MTCL
MTColor.
int MObjectGetWidth(MOBJECT obj)
#define CENTER_ALIGN
Definition: Mguidefs.h:917
MTFont font
Definition: DAS_Spatram.h:3066
void MDrawText(MOBJECT p, int x, int y, int w, int h, const char *text, MTFont font, MTColor fgc, int align)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ EquipCode2Name()

char * EquipCode2Name ( int  eqcode,
char *  src,
char *  dest 
)

translate the Equipment Code in the Equipment Name

Parameters
inteqcode = /ref eqtype
char*src = source string (buffer) (can be an empty string: "")
char*dest = destination string (buffer) defined in the calling code (i.e.: dest[32] = {'\0'})
Returns
dest

Definition at line 3163 of file DAS_Spat_ConfCBs.c.

References GASCODNG1, GASCODNG2, GASCODNG3, GASCODNG4, LIS_, SPATRAM, SPATRAM2, SPATRAM3, SPATRAMPLUS, and TROPOGAS.

3164 {
3165 
3166  char str[32];
3167 
3168  switch (eqcode)
3169  {
3170  case TROPOGAS:
3171  sprintf(str,"TROPOGAS");
3172  break;
3173  case SPATRAM:
3174  sprintf(str,"SPATRAM");
3175  break;
3176  case LIS_:
3177  sprintf(str,"LIS");
3178  break;
3179  case SPATRAMPLUS:
3180  sprintf(str,"SPATRAMPLUS");
3181  break;
3182  case GASCODNG1:
3183  sprintf(str,"GASCODNG1");
3184  break;
3185  case GASCODNG2:
3186  sprintf(str,"GASCODNG2");
3187  break;
3188  case GASCODNG3:
3189  sprintf(str,"GASCODNG3");
3190  break;
3191  case GASCODNG4:
3192  sprintf(str,"GASCODNG4");
3193  break;
3194  case SPATRAM2:
3195  sprintf(str,"SPATRAM2");
3196  break;
3197  case SPATRAM3:
3198  sprintf(str,"SPATRAM3");
3199  break;
3200 
3201  default:
3202  sprintf(str,"UNKNOWN");
3203  break;
3204  }
3205 
3206  strcat(dest,str);
3207  return dest;
3208 
3209  }
#define SPATRAM
SPectrometer for Atmospheric TRAcers Measurements - CGE-UE Portugal.
#define LIS_
Lampedusa Island Spectrometer - ENEA.
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
#define GASCODNG2
GASCODNG 2 (with ATX power supply & HiresIV)
#define SPATRAM2
SPATRAM2 (with ATX power supply & HiresV)
#define SPATRAMPLUS
As SPATRAM plus AltAzimuth platform.
#define GASCODNG3
GASCODNG 3 (with ATX power supply & HiresIV)
#define GASCODNG1
GASCODNG 1 (with ATX power supply & HiresIV)
#define GASCODNG4
GASCODNG 4.
#define SPATRAM3
SPATRAM3.

§ FontOBJSelCB()

void FontOBJSelCB ( MOBJECT  obj,
void *  a,
void *  v 
)

This callback select the object for applying font.

Definition at line 1385 of file DAS_Spat_ConfCBs.c.

References FlgOBJ.

Referenced by MDCreateDASConfig().

1386 {
1387 //sceglie l'oggetto da considerare label, buttons....
1388 
1389  switch ((int) v)
1390  {
1391  case 0:
1392  FlgOBJ=0; //Unselected KeyCom
1393  break;
1394  case 1:
1395  FlgOBJ=1; //Selected KeyCom
1396  break;
1397  case 2:
1398  FlgOBJ=2; //Active Labels
1399  break;
1400  case 3:
1401  FlgOBJ=3; //Passive Labels
1402  break;
1403  case 4:
1404  FlgOBJ=4; //Forms Background
1405  break;
1406  case 5:
1407  FlgOBJ=5; //Kapital Labels UP
1408  break;
1409  case 6:
1410  FlgOBJ=6; //Kapital Labels DW
1411  break;
1412  }
1413 }
int FlgOBJ
Definition: DAS_Spat_Conf.c:93
+ Here is the caller graph for this function:

§ fraz2val()

int fraz2val ( int  mod,
char *  val 
)

ratio value to decimal value
opposite than listval2fraz or val2fraz

Parameters
modNOT USED (0)
valsring indicating the ratio

Definition at line 2435 of file DAS_Spat_ConfCBs.c.

Referenced by ApplyChCB(), and WriteAMSCB().

2436 {
2437 
2438  int b = 0;
2439 
2440  if(strcmp( val, " 1/2") == 0)
2441  b = 0;
2442  if(strcmp( val, " 1/4") == 0)
2443  b = 1;
2444  if(strcmp( val, " 1/5") == 0)
2445  b = 2;
2446  if(strcmp( val, " 1/8") == 0)
2447  b = 3;
2448  if(strcmp( val, " 1/10") == 0)
2449  b = 4;
2450  if(strcmp( val, " 1/16") == 0)
2451  b = 5;
2452  if(strcmp( val, " 1/25") == 0)
2453  b = 6;
2454  if(strcmp( val, " 1/32") == 0)
2455  b = 7;
2456  if(strcmp( val, " 1/50") == 0)
2457  b = 8;
2458  if(strcmp( val, " 1/64") == 0)
2459  b = 9;
2460  if(strcmp( val, "1/125") == 0)
2461  b = 10;
2462  if(strcmp( val, "1/128") == 0)
2463  b = 11;
2464  if(strcmp( val, "1/250") == 0)
2465  b = 12;
2466  if(strcmp( val, "1/256") == 0)
2467  b = 13;
2468 
2469  return b;
2470 
2471 
2472 
2473 }
+ Here is the caller graph for this function:

§ GetDefPix()

int GetDefPix ( int  mod)

Maps the defective pixel.

Parameters
mod
  • 0 –> UNDER exposed pixels
  • 1 –> OVER exposed pixels
Returns
0

Definition at line 3755 of file DAS_Spat_ConfCBs.c.

References _MAX_PATH, AutoRange(), d_fileman::CONFIGDIREQUIPMENT, D_Saving(), date::da_day, date::da_mon, date::da_year, DB_GetCCD(), bil::DFILEM, bil::DPLOT, GetDateTime(), IDX, IDY, img::Imat, d_view::ImatGraf, dil::Img, LevelDefPix, image::Mat, MMessageDialog(), print2file(), QjLamp(), SD_Mirror(), Server, TExp, time::ti_hour, and time::ti_min.

Referenced by MAPDefPixCB().

3756 {
3757 
3758 
3759  FILE *fs;
3760  char str[80];
3761  char buff[_MAX_PATH];
3762  int i, t, j;
3763  unsigned int mx;
3764  unsigned short temp, *matdefpix;
3765  struct time adesso;
3766  struct date oggi;
3767  struct tm today;
3768  int NumOverExP = 0;
3769  int NumUnderExP = 0;
3770 
3771 
3772  GetDateTime(&oggi, &adesso, &today);
3773  //gettime(&adesso);
3774  //getdate(&oggi);
3775 
3776 
3777  if (mod ==1)
3778  {
3779  sprintf(buff, "%s\\OverExpPix.dat", BIL.DFILEM.CONFIGDIREQUIPMENT);
3780 
3781  fs = fopen(buff, "w");
3782  if(fs == NULL) return 1;
3783 
3784  sprintf(str, "DREM #######################################################\n");
3785  fprintf(fs,str,NULL);
3786  sprintf(str, "DREM # OVER EXPOSED DEFECTIVE PIXELS: #\n");
3787  fprintf(fs,str);
3788  sprintf(str, "DREM # by DanBo %02u/%02u/%d at %02u:%02u:%02u #\n", oggi.da_day,oggi.da_mon,oggi.da_year, adesso.ti_hour, adesso.ti_min,adesso.ti_min);
3789  fprintf(fs,str);
3790  sprintf(str, "DREM #######################################################\n");
3791  fprintf(fs,str,NULL);
3792  fclose(fs);
3793 
3794 
3795  }
3796  if (mod == 0)
3797  {
3798  sprintf(buff, "%s\\UnderExpPix.dat", BIL.DFILEM.CONFIGDIREQUIPMENT);
3799 
3800  fs = fopen(buff, "w");
3801  if(fs == NULL) return 1;
3802 
3803  sprintf(str, "DREM #######################################################\n");
3804  fprintf(fs,str,NULL);
3805  sprintf(str, "DREM # UNDER EXPOSED DEFECTIVE PIXELS: #\n");
3806  fprintf(fs,str);
3807  sprintf(str, "DREM # by DanBo %02u/%02u/%d at %02u:%02u:%02u #\n", oggi.da_day,oggi.da_mon,oggi.da_year, adesso.ti_hour, adesso.ti_min,adesso.ti_min);
3808  fprintf(fs,str);
3809  sprintf(str, "DREM #######################################################\n");
3810  fprintf(fs,str,NULL);
3811 
3812  fclose(fs);
3813 
3814  }
3815  if (mod == 2)
3816  {
3817  sprintf(buff, "%s\\OverExpPix5.dat", BIL.DFILEM.CONFIGDIREQUIPMENT);
3818 
3819  fs = fopen(buff, "w");
3820  if(fs == NULL) return 1;
3821 
3822  sprintf(str, "DREM #######################################################\n");
3823  fprintf(fs,str,NULL);
3824  sprintf(str, "DREM # OVER EXPOSED DEFECTIVE PIXELS: #\n");
3825  fprintf(fs,str);
3826  sprintf(str, "DREM # by DanBo %02u/%02u/%d at %02u:%02u:%02u #\n", oggi.da_day,oggi.da_mon,oggi.da_year, adesso.ti_hour, adesso.ti_min,adesso.ti_min);
3827  fprintf(fs,str);
3828  sprintf(str, "DREM #######################################################\n");
3829  fprintf(fs,str,NULL);
3830  fclose(fs);
3831 
3832 
3833  }
3834 
3835 
3836  if (IDX != 0)
3837  {
3838  mx = (unsigned long) IDX * (unsigned long) IDY;
3839  BIL.DPLOT.ImatGraf = (unsigned short *) calloc( mx, sizeof(unsigned short));
3840 
3841  mx = (unsigned long) IDX * (unsigned long) IDY;
3842  matdefpix = (unsigned short *) calloc( mx, sizeof(unsigned short));
3843 
3844  }
3845  else
3846  {
3847  MMessageDialog("ALERT", "CCD Not Initialized" , "Ok", NULL);
3848  return 1;
3849 
3850  }
3851 
3852  if (mod == 1)
3853  {
3854  TExp = 0;
3855  for (i= 0; i<3; i++)
3856  DB_GetCCD(0);
3857  }
3858  if (mod == 0)
3859  {
3860  TExp = 0;
3861  DB_GetCCD(0);
3862  QjLamp(1);
3863  SD_Mirror(2);
3864  AutoRange(0);
3865  DB_GetCCD(1);
3866  }
3867 
3868  if (mod == 2)
3869  {
3870  TExp = 5;
3871  for (i= 0; i<3; i++)
3872  DB_GetCCD(0);
3873  }
3874 
3875 
3876  for(t = 0 ; t < IDY ; t++)
3877  {
3878  for(j = 0; j < IDX; j++)
3879  {
3880  if(DIL.Img.Mat[Server].Imat[t * IDX + j] > LevelDefPix)
3881  {
3882  NumOverExP++;
3883  //NumUnderExP++;
3884  }
3885  else
3886  {
3887  NumUnderExP++;
3888  //NumOverExP++;
3889  }
3890 
3891  }
3892  }
3893 
3894  fs = fopen(buff, "a");
3895  if(fs == NULL) return 1;
3896 
3897 
3898  if (mod==1 || mod==2)
3899  {
3900 
3901  sprintf(str, "DREM Start of pixel section\n");
3902  fprintf(fs,str);
3903  sprintf(str, "PIX\n");
3904  fprintf(fs,str);
3905  sprintf(str, "DREM Number of items of pixel correction\n");
3906  fprintf(fs,str);
3907  sprintf(str, "PITM %d\n", NumOverExP);
3908  fprintf(fs,str);
3909  }
3910 
3911  if (mod==0)
3912  {
3913 
3914  sprintf(str, "DREM Start of pixel section\n");
3915  fprintf(fs,str);
3916  sprintf(str, "PIX\n");
3917  fprintf(fs,str);
3918  sprintf(str, "DREM Number of items of pixel correction\n");
3919  fprintf(fs,str);
3920  sprintf(str, "PITM %d\n", NumUnderExP);
3921  fprintf(fs,str);
3922  }
3923 
3924  for(t = 0 ; t < IDY ; t++)
3925  {
3926  for(j = 0; j < IDX; j++)
3927  {
3928 
3929 
3930  if (mod==1 || mod==2)
3931  {
3932  if(DIL.Img.Mat[Server].Imat[t * IDX + j] >= LevelDefPix)
3933  {
3934  temp = 100;
3935  matdefpix[t * IDX + j] = temp;
3936  print2file(fs, j, t,DIL.Img.Mat[Server].Imat[t * IDX + j]);
3937  }
3938  }
3939 
3940  if (mod==0)
3941  {
3942  if(DIL.Img.Mat[Server].Imat[t * IDX + j] < LevelDefPix)
3943  {
3944  temp = 100;
3945  matdefpix[t * IDX + j] = temp;
3946  print2file(fs, j, t,DIL.Img.Mat[Server].Imat[t * IDX + j]);
3947  }
3948  }
3949  BIL.DPLOT.ImatGraf[t * IDX + j] = temp;
3950 
3951  }
3952  }
3953 /*
3954  if(DIL.Img.Mat[Server].Imat[t * IDX + j] < LevelDefPix)
3955  {
3956  temp = 100;
3957  matdefpix[t * IDX + j] = temp;
3958  if (mod==1 || mod==2)
3959  {
3960 
3961  }
3962  else
3963  {
3964  print2file(fs, j, t,DIL.Img.Mat[Server].Imat[t * IDX + j]);
3965  }
3966 
3967  }
3968  if(DIL.Img.Mat[Server].Imat[t * IDX + j] >= LevelDefPix)
3969  {
3970  temp =40000;
3971  matdefpix[t * IDX + j] = temp;
3972  if (mod==1 || mod==2)
3973  {
3974  print2file(fs, j, t,DIL.Img.Mat[Server].Imat[t * IDX + j]);
3975  }
3976  else
3977  {
3978 
3979  }
3980 
3981  }
3982  BIL.DPLOT.ImatGraf[t * IDX + j] = temp;
3983  }
3984  }
3985 */
3986  sprintf(str, "DEND\n");
3987  fprintf(fs,str);
3988 
3989  fclose(fs);
3990 
3991  D_Saving(); //Save the measured image
3992 
3993  for(t = 0 ; t < IDY ; t++)
3994  {
3995  for(j = 0; j < IDX; j++)
3996  {
3997  DIL.Img.Mat[Server].Imat[t * IDX + j] = matdefpix[t * IDX + j];
3998  }
3999  }
4000 
4001  D_Saving(); //Save the image of defective pixels
4002 
4003 
4004 
4005  free(matdefpix);
4006 
4007  return 0;
4008 }
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
Definition: Spat_Device.c:1898
int IDX
Number of sensible horizontal pixels.
Definition: DAS_Spat.c:118
int Server
Definition: DAS_Spat.c:253
U16 * Imat
Definition: Dildef.h:286
img Mat[MAXIMG]
Definition: Dildef.h:552
void QjLamp(int mod)
QJ Lamp ON/OFF .
Definition: Spat_Device.c:2724
void print2file(FILE *ff, int x, int y, unsigned int m)
Print to file the defective pixel.
image Img
Definition: Dildef.h:675
void D_Saving(void)
Saving image. Procedure for saving the CCD Image Used since version 2.1.0. The coiche between binary ...
Definition: Procedures.c:1369
d_fileman DFILEM
Definition: bildef.h:257
d_view DPLOT
Definition: bildef.h:254
char CONFIGDIREQUIPMENT[_MAX_PATH]
Definition: bildef.h:208
Definition: Dildef.h:240
double AutoRange(int mod)
Calculate the exposure time The optimum exposure time (TExp) is calculated with an initial TExpAR=0...
Definition: Procedures.c:899
int IDY
Number of sensible vertical pixels.
Definition: DAS_Spat.c:119
#define _MAX_PATH
Definition: Dildef.h:202
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
unsigned short * ImatGraf
Definition: bildef.h:176
double TExp
CCD Exposure time.
Definition: DAS_Spat.c:130
void GetDateTime(struct date *dp, struct time *tp, struct tm *when)
Definition: Save.c:43
Definition: Dildef.h:234
unsigned int LevelDefPix
Definition: DAS_Spat.c:126
dil DIL
int DB_GetCCD(int mod)
Get CCD Image. .
Definition: Procedures.c:1749
bil BIL
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ hertz2int()

int hertz2int ( int  mod,
char *  string 
)

translate the Hertz speed in AMS digit unit.

Parameters
mod–> int not used (0)
*string–> char containing the Hertz speed
Returns
c –> digital unit

Definition at line 2226 of file DAS_Spat_ConfCBs.c.

Referenced by ApplyChCB(), and WriteAMSCB().

2227 {
2228  int c;
2229 
2230  c = (int) (((atof(string)*1000) - 125.0) / 125.0) ;
2231 
2232  return c;
2233 }
+ Here is the caller graph for this function:

§ int2hertz()

double int2hertz ( int  mod,
int  k 
)

Definition at line 2213 of file DAS_Spat_ConfCBs.c.

Referenced by AssignParam(), and CONFP_AMS_TabSingMotor().

2214 {
2215  double c;
2216 
2217  c = (125 * ((double) k + 1.0)) / 1000 ;
2218 
2219  return c;
2220 }
+ Here is the caller graph for this function:

§ int2perc()

double int2perc ( int  mod,
int  k 
)

translate the AMS digit unit in text.
The power assigned to the motor trough the AMS, is translated in text

Parameters
mod–> int not used (0)
k–> int containing the decimal value
Returns
c –> percentage

Definition at line 2202 of file DAS_Spat_ConfCBs.c.

Referenced by AssignParam(), and CONFP_AMS_TabSingMotor().

2203 {
2204  double c;
2205 
2206  c = (1.0 - (76.0 - (double) k ) / 76.0) * 100.0;
2207  return c;
2208 }
+ Here is the caller graph for this function:

§ listval2fraz()

void listval2fraz ( int  mod,
int  val 
)

Decimal value to ratio value
The decimal value indicating the fractioning of the step is translated in ratio (i.e. 0 –> 1/2 = 400 s/r, 1–> 1/4 =800 s/r)

Parameters
modNOT USED (0)
valsteps

Definition at line 2236 of file DAS_Spat_ConfCBs.c.

References lfraz.

Referenced by CONFP_AMS_TabSingMotor().

2237 {
2238 
2239 
2240  int c = (int) val;
2241 
2242  switch (c)
2243  {
2244  case 0:
2245  {
2246  sprintf(lfraz, " 1/2");
2247  break;
2248  }
2249  case 1:
2250  {
2251  sprintf(lfraz, " 1/4");
2252 
2253  break;
2254  }
2255  case 2:
2256  {
2257  sprintf(lfraz, " 1/5");
2258 
2259  break;
2260  }
2261  case 3:
2262  {
2263  sprintf(lfraz, " 1/8");
2264 
2265  break;
2266  }
2267  case 4:
2268  {
2269  sprintf(lfraz, " 1/10");
2270 
2271  break;
2272  }
2273  case 5:
2274  {
2275  sprintf(lfraz, " 1/16");
2276 
2277  break;
2278  }
2279  case 6:
2280  {
2281  sprintf(lfraz, " 1/25");
2282 
2283  break;
2284  }
2285  case 7:
2286  {
2287  sprintf(lfraz, " 1/32");
2288 
2289  break;
2290  }
2291  case 8:
2292  {
2293  sprintf(lfraz, " 1/50");
2294 
2295  break;
2296  }
2297  case 9:
2298  {
2299 
2300  sprintf(lfraz, " 1/64");
2301  break;
2302  }
2303  case 10:
2304  {
2305  sprintf(lfraz, "1/125");
2306 
2307  break;
2308  }
2309  case 11:
2310  {
2311  sprintf(lfraz, "1/128");
2312  ;
2313  break;
2314  }
2315  case 12:
2316  {
2317  sprintf(lfraz, "1/250");
2318 
2319  break;
2320  }
2321  case 13:
2322  {
2323  sprintf(lfraz, "1/256");
2324 
2325  break;
2326  }
2327 
2328  }
2329 
2330 }
char lfraz[6]
Definition: DAS_Spat_Conf.c:94
+ Here is the caller graph for this function:

§ LoadFontCB()

void LoadFontCB ( MOBJECT  obj,
void *  a,
void *  data 
)

This callback tries to load the specified font.

Definition at line 1503 of file DAS_Spat_ConfCBs.c.

Referenced by MDCreateDASConfig().

1504 {
1505 /*
1506  MTFont newfont;
1507  int size;
1508 // int i;
1509  char family[32], buff[8];
1510 /*
1511  * Get user preferences from the EDIT Objects
1512  *
1513  MObjectGetText(e_fname, family);
1514  MObjectGetText(e_fsize, buff);
1515  size = atoi(buff);
1516  newfont = MLoadFont(family, size, bold, italic);
1517 /*
1518  * Apply the selected fonts to the selected object
1519  *
1520  // KeyCom Unselected
1521  if(FlgOBJ==0)
1522  {
1523  DB_Do2Undo_Fonts( newfont, undofont);
1524  DB_FontAssign(PBUTT.KeyB, sizeof PBUTT.KeyB / sizeof PBUTT.KeyB[0], newfont);
1525 
1526  }
1527  // KeyCom Selected
1528  if (FlgOBJ==1)
1529  {
1530  DB_Do2Undo_Fonts( newfont, undofont);
1531  MObjectSetFont(PBUTT.KeyB[0], newfont, True);
1532  }
1533  //Active Labels
1534  if (FlgOBJ==2)
1535  {
1536  DB_Do2Undo_Fonts( newfont, undofont);
1537  DB_FontAssign(DAS.Gui.ContrPanel.lbl_Par, sizeof DAS.Gui.ContrPanel.lbl_Par / sizeof DAS.Gui.ContrPanel.lbl_Par[0], newfont);
1538  DB_FontAssign(DAS.Gui.ContrPanel.Albl_CS, sizeof DAS.Gui.ContrPanel.Albl_CS / sizeof DAS.Gui.ContrPanel.Albl_CS[0], newfont);
1539  DB_FontAssign(DAS.Gui.ContrPanel.Albl_IE, sizeof DAS.Gui.ContrPanel.Albl_IE / sizeof DAS.Gui.ContrPanel.Albl_IE[0], newfont);
1540  DB_FontAssign(DAS.Gui.ContrPanel.Albl_LS, sizeof DAS.Gui.ContrPanel.Albl_LS / sizeof DAS.Gui.ContrPanel.Albl_LS[0], newfont);
1541  DB_FontAssign(DAS.Gui.ContrPanel.Albl_LT, sizeof DAS.Gui.ContrPanel.Albl_LT / sizeof DAS.Gui.ContrPanel.Albl_LT[0], newfont);
1542  DB_FontAssign(DAS.Gui.ContrPanel.cop, sizeof DAS.Gui.ContrPanel.cop / sizeof DAS.Gui.ContrPanel.cop[0] , newfont);
1543  DB_FontAssign(DAS.Gui.ContrPanel.step, sizeof DAS.Gui.ContrPanel.step / sizeof DAS.Gui.ContrPanel.step[0] , newfont);
1544  DB_FontAssign(DAS.Gui.ContrPanel.slope, sizeof DAS.Gui.ContrPanel.slope / sizeof DAS.Gui.ContrPanel.slope[0] , newfont);
1545  DB_FontAssign(DAS.Gui.ContrPanel.speed, sizeof DAS.Gui.ContrPanel.speed / sizeof DAS.Gui.ContrPanel.speed[0] , newfont);
1546  MObjectSetFont(DAS.Gui.ContrPanel.Albl_Status, newfont, True);
1547  MObjectSetFont(DAS.Gui.ContrPanel.Albl_Script, newfont, True);
1548 
1549  }
1550 
1551  //Passive Labels BG
1552  if (FlgOBJ==3)
1553  {
1554  DB_Do2Undo_Fonts( newfont, undofont);
1555  DB_FontAssign(DAS.Gui.ContrPanel.lbl_NP, sizeof DAS.Gui.ContrPanel.lbl_NP / sizeof DAS.Gui.ContrPanel.lbl_NP[0], newfont);
1556  DB_FontAssign(DAS.Gui.ContrPanel.Plbl_CS, sizeof DAS.Gui.ContrPanel.Plbl_CS / sizeof DAS.Gui.ContrPanel.Plbl_CS[0], newfont);
1557  DB_FontAssign(DAS.Gui.ContrPanel.Plbl_IE, sizeof DAS.Gui.ContrPanel.Plbl_IE / sizeof DAS.Gui.ContrPanel.Plbl_IE[0], newfont);
1558  DB_FontAssign(DAS.Gui.ContrPanel.Plbl_LS, sizeof DAS.Gui.ContrPanel.Plbl_LS / sizeof DAS.Gui.ContrPanel.Plbl_LS[0], newfont);
1559  DB_FontAssign(DAS.Gui.ContrPanel.Plbl_LT, sizeof DAS.Gui.ContrPanel.Plbl_LT / sizeof DAS.Gui.ContrPanel.Plbl_LT[0], newfont);
1560 
1561  DB_FontAssign(DAS.Gui.ContrPanel.lbl_lamps, sizeof DAS.Gui.ContrPanel.lbl_lamps / sizeof DAS.Gui.ContrPanel.lbl_lamps[0], newfont);
1562  DB_FontAssign(DAS.Gui.ContrPanel.Plbl_SM, sizeof DAS.Gui.ContrPanel.Plbl_SM / sizeof DAS.Gui.ContrPanel.Plbl_SM[0], newfont);
1563  DB_FontAssign(DAS.Gui.ContrPanel.lbl, sizeof DAS.Gui.ContrPanel.lbl / sizeof DAS.Gui.ContrPanel.lbl[0] , newfont);
1564 
1565  MObjectSetFont(DAS.Gui.ContrPanel.Plbl_Status, newfont, True);
1566  MObjectSetFont(DAS.Gui.ContrPanel.Plbl_Script, newfont, True);
1567 
1568 
1569  }
1570 
1571 
1572 
1573 
1574  // Kapital Labels UP BG
1575  if (FlgOBJ==4)
1576  {
1577  DB_Do2Undo_Fonts( newfont, undofont);
1578  DB_FontAssign(DAS.Gui.ContrPanel.lblK, sizeof DAS.Gui.ContrPanel.lblK / sizeof DAS.Gui.ContrPanel.lblK[0], newfont);
1579 
1580  }
1581 
1582 
1583  // Kapital Labels DW BG
1584  if (FlgOBJ==5)
1585  {
1586  DB_Do2Undo_Fonts( newfont, undofont);
1587  DB_FontAssign(DAS.Gui.ContrPanel.lblK_DW, sizeof DAS.Gui.ContrPanel.lblK_DW / sizeof DAS.Gui.ContrPanel.lblK_DW[0], newfont);
1588 
1589  }
1590 
1591 
1592 
1593 
1594 
1595 /**************************************************************/
1596 /*
1597  * The function returns FIXED_MEDIUM on failure
1598 
1599  if (newfont != FIXED_MEDIUM)
1600  {
1601 // if (font != FIXED_MEDIUM)
1602 // MUnloadFont(font);
1603 // font = newfont;
1604  MObjectRedraw(DAS.Gui.ConfigPanel.frm4_dr1);
1605  }
1606  else
1607  MBeep();
1608 
1609 */
1610 }
+ Here is the caller graph for this function:

§ LoadPaletteCB()

int LoadPaletteCB ( MOBJECT  o,
void *  o_data,
void *  a_data 
)

Callback for LoadTestPalette.

Definition at line 595 of file DAS_Spat_ConfCBs.c.

References _MAX_PATH, FB_PREFS::allow_dir_create, FB_PREFS::allow_dir_delete, FB_PREFS::allow_dir_rename, FB_PREFS::bg_image_file, FB_PREFS::button_font, FB_PREFS::change_cwd, d_fileman::DBFILENAME, bil::DFILEM, False, FB_PREFS::font, HELV_SMALL, d_fileman::HOMEDIRECTORY, LoadTestPalette(), MFileBrowseExt(), MGetCurrentDirectory(), FB_PREFS::transparent_tree, and True.

Referenced by MDCreateDASConfig().

596 {
597 
598  char str[_MAX_PATH] ;
599  char fname[128], dirname[128];
600  int er;
601 
602  FB_PREFS fbp;
603  strcpy (dirname, MGetCurrentDirectory ());
604  fname[0] = '\0';
605  memset (&fbp, 0, sizeof (fbp));
606 
607  fbp.change_cwd = True;
608  fbp.allow_dir_create = True;
609  fbp.allow_dir_rename = True;
610  fbp.allow_dir_delete = True;
611  fbp.transparent_tree = False;
612  fbp.font = HELV_SMALL;
613  fbp.button_font = HELV_SMALL;
614  //Set Img file
615  sprintf(str, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "sys\\Tile2.bmp" );
616  fbp.bg_image_file =str;
617 
618 
619  er = MFileBrowseExt ("Select File for Plotting", "*.MAP", fname, dirname, &fbp);
620  sprintf(BIL.DFILEM.DBFILENAME,"%s%s",dirname, fname);
621 
622  //BIL.DFILEM.DBFILENAME[0] = 0;
623 
624  //MDCreateFM_Shell(FOPEN, FMAP); //Open File, MAP ext.
625 
626  if(BIL.DFILEM.DBFILENAME[0] == 0)
627  return 1;
628 
630  return 0;
631 }
CARD8 change_cwd
Definition: Mguidefs.h:1485
CARD8 allow_dir_create
Definition: Mguidefs.h:1487
MTFont button_font
Definition: Mguidefs.h:1501
CARD8 allow_dir_delete
Definition: Mguidefs.h:1493
char HOMEDIRECTORY[_MAX_PATH]
Definition: bildef.h:200
MTFont font
Definition: Mguidefs.h:1499
#define False
Definition: Mguidefs.h:236
File Browser Preferences. Used by the Utility functions MFileBowserExt() and MDirBowserExt().
Definition: Mguidefs.h:1482
CARD8 transparent_tree
Definition: Mguidefs.h:1495
d_fileman DFILEM
Definition: bildef.h:257
#define HELV_SMALL
Definition: Mguidefs.h:881
const char * MGetCurrentDirectory(void)
char DBFILENAME[_MAX_PATH]
Definition: bildef.h:204
int MFileBrowseExt(const char *t, const char *ext, char *fname, char *dname, FB_PREFS *prefs)
const char * bg_image_file
Definition: Mguidefs.h:1519
#define _MAX_PATH
Definition: Dildef.h:202
int LoadTestPalette(char *nf)
Load a test palette. Procedure that load a test palette.
Definition: Load.c:908
#define True
Definition: Mguidefs.h:235
CARD8 allow_dir_rename
Definition: Mguidefs.h:1490
bil BIL
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ MAPDefPix()

void MAPDefPix ( int  mod)

create the Under/Over exposed pixels window
At the pression of the button in DAS_Config the appropriate shell (For the creation of the Under or Over exposed pixel map) will be created.

Parameters
mod
  • = 0 –> Under Exposed pixels
  • = 1 –> Over Exposed pixels

Definition at line 4036 of file DAS_Spat_ConfCBs.c.

References ActEditCB(), CENTER_ALIGN, False, FIXED_SMALL, lbl, LEFT_ALIGN, MAPDefPixCB(), MCreateClippedEdit(), MCreateLabel(), MCreatePButton(), MCreateRowForm(), MCreateShell(), MCreateTableForm(), MDQuitCB(), MEditSetActCallback(), MEditSetValCallback(), MLabelSetAlignment(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetTransparency(), MPButtonSetCallback(), MShellRealize(), MShellSetWMCloseCallback(), p, TOP_ALIGN, True, and ValidateCB().

Referenced by UnderOverPixCB().

4037 {
4038 
4039  MOBJECT sh, rowf, lbl,lbl1,lbl2, tb, level, pb;
4040  char str[80];
4041  int *p, k;
4042 
4043  sh = MCreateShell("MAP DEFECTIVE PIXELS", 0);
4044 // MObjectSetCompositeWidth(sh, 670);
4045 // MObjectSetCompositeHeight(sh, 483);
4046 
4047  rowf = MCreateRowForm(sh);
4048  MObjectSetBackgroundRGB(rowf, 112, 128, 112);
4049  MObjectSetResize(rowf, True, True);
4050 // MObjectSetCompositeWidth(rowf, 357);
4052 
4053  if(mod==1)
4054  sprintf(str, "This procedure allows for the mapping of the\n OVER exposed pixels of the CCD sensor");
4055 
4056  if(mod==0)
4057  sprintf(str, "This procedure allows for the mapping of the\n UNDER exposed pixels of the CCD sensor");
4058 
4059  if(mod==2)
4060  sprintf(str, "This procedure allows for the mapping of the\n OVER exposed pixels of the CCD sensor");
4061 
4062  lbl = MCreateLabel(rowf, str, FIXED_SMALL);
4063  MObjectSetResize(lbl, True, True);
4064  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4065  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4066  MObjectSetTransparency(lbl, 0);
4067 
4068  if(mod==1)
4069  sprintf(str, "3 Flat Measurements (Texp = 0) will be porformed\n in order to identify the defective pixels");
4070 
4071  if(mod==0)
4072  sprintf(str, "3 Measurements of QJ lamp will be porformed\n in order to identify the defective pixels");
4073 
4074  if(mod==2)
4075  sprintf(str, "3 Flat Measurements (Texp = 5s) will be porformed\n in order to identify the defective pixels");
4076 
4077 
4078  lbl1 = MCreateLabel(rowf, str, FIXED_SMALL);
4079  MObjectSetResize(lbl1, True, True);
4080  MObjectSetForegroundRGB(lbl1, 255, 255, 255);
4081  MObjectSetBackgroundRGB(lbl1, 96, 132, 152);
4082  MObjectSetTransparency(lbl1, 0);
4083 
4084 
4085  if(mod==1)
4086  sprintf(str, " You have to set the maximum level in\norder to consider the pixel as good");
4087 
4088  if(mod==0)
4089  sprintf(str, " You have to set the minimum level in\norder to consider the pixel as good");
4090 
4091  if(mod==2)
4092  sprintf(str, " You have to set the maximum level in\norder to consider the pixel as good");
4093 
4094  lbl2 = MCreateLabel(rowf, str, FIXED_SMALL);
4095  MObjectSetForegroundRGB(lbl2, 255, 255, 255);
4096  MObjectSetBackgroundRGB(lbl2, 96, 132, 152);
4097  MObjectSetTransparency(lbl2, 0);
4098 
4099 
4100 
4101 /**************************************/
4102  tb = MCreateTableForm(rowf, 3);
4103  MObjectSetBackgroundRGB(tb, 56, 112, 112);
4105 // MObjectSetCompositeWidth(tb, 347);
4106 
4107  if(mod==1)
4108  sprintf(str, "Pix with values higher than");
4109 
4110  if(mod==0)
4111  sprintf(str, "Pix with values lower than");
4112 
4113  if(mod==2)
4114  sprintf(str, "Pix with values higher than");
4115 
4116  lbl = MCreateLabel(tb, str, FIXED_SMALL);
4118  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4119  MObjectSetTransparency(lbl, 0);
4120  MObjectSetResize(lbl, False, False);
4122 
4123  level = MCreateClippedEdit(tb, " ", 10, 5, FIXED_SMALL);
4124  MObjectSetForegroundRGB(level, 255, 255, 255);
4125  MObjectSetBackgroundRGB(level, 40, 96, 72);
4126 // MObjectSetCompositeWidth(level, 35);
4128  k = 140;
4129  p = (void *) k;
4130  MEditSetValCallback(level, ValidateCB, p);
4131  MEditSetActCallback(level, ActEditCB, p);
4132 
4133  lbl1 = MCreateLabel(tb, "will be marked as defective", FIXED_SMALL);
4135  MObjectSetForegroundRGB(lbl1, 255, 255, 255);
4136  MObjectSetTransparency(lbl1, 0);
4137  MObjectSetResize(lbl1, False, False);
4139 
4140  tb = MCreateTableForm(rowf, 2);
4141  MObjectSetBackgroundRGB(tb, 56, 112, 112);
4143 
4144 
4145  pb = MCreatePButton(tb ,"Execute", FIXED_SMALL);
4146  MPButtonSetCallback(pb, MAPDefPixCB, (void *) mod);
4147  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4148  MObjectSetCompositeWidth(pb, 100);
4149 /*
4150  pb = MCreatePButton(tb, "Close", FIXED_SMALL);
4151  MPButtonSetCallback(pb, MDQuitCB, (void *) 0);
4152  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4153  MObjectSetCompositeWidth(pb, 100);
4154 */
4155 
4156 /************************************/
4157  MShellRealize(sh);
4159 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT lbl
Definition: DFileMan.c:42
void MShellRealize(MOBJECT obj)
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
#define False
Definition: Mguidefs.h:236
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
void ActEditCB(MOBJECT edit, char *text, void *ed)
Text Application callback Apply to the variables the text typed in various text box and validated by ...
MOBJECT MCreateClippedEdit(MOBJECT parent, const char *text, int len, int clip_len, MTFont font)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
void MDQuitCB(MOBJECT shell, void *od, void *ad)
callback for closing a generic MGUI shell
Definition: REQ.C:40
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define CENTER_ALIGN
Definition: Mguidefs.h:917
void MEditSetActCallback(MOBJECT edit, OBJ_STRING_CB cb, void *data)
#define FIXED_SMALL
Definition: Mguidefs.h:878
void ValidateCB(MOBJECT edit, EDIT_VAL *ev, void *ii)
Text Validation callback Validation callback for the text typed in different text box...
void MEditSetValCallback(MOBJECT edit, EDIT_VAL_CB cb, void *data)
MOBJECT MCreateShell(const char *title, int flags)
static double p
Definition: SOLPOS.C:131
void MLabelSetAlignment(MOBJECT p, int align)
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
#define LEFT_ALIGN
Definition: Mguidefs.h:915
void MAPDefPixCB(MOBJECT o, void *id, void *a_data)
GetDefPix(mod) Callback At the pression of the &#39;Execute&#39; button in the appropriate shell the GetDefPi...
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
void MShellSetWMCloseCallback(MOBJECT p, WM_CLOSE_CB cb, void *a_data)
MOBJECT MCreateRowForm(MOBJECT parent)
#define TOP_ALIGN
Definition: Mguidefs.h:918
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ MAPDefPixCB()

void MAPDefPixCB ( MOBJECT  o,
void *  id,
void *  a_data 
)

GetDefPix(mod) Callback At the pression of the 'Execute' button in the appropriate shell the GetDefPix procedure will be executed.

Parameters
a_data
  • = 0 –> Under Exposed pixels
  • = 1 –> Over Exposed pixels

Definition at line 4010 of file DAS_Spat_ConfCBs.c.

References GetDefPix().

Referenced by MAPDefPix().

4011 {
4012 
4013  int c = (int) a_data;
4014 
4015  GetDefPix(c);
4016 /* switch (c)
4017  {
4018  case 0:
4019  GetDefPix(0);
4020  break;
4021  case 1:
4022  GetDefPix(1);
4023  break;
4024  case 2:
4025  GetDefPix(2);
4026  break;
4027 
4028  }
4029 */
4030 }
int GetDefPix(int mod)
Maps the defective pixel.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ModifyConfFileCB()

void ModifyConfFileCB ( MOBJECT  o,
void *  id,
void *  a_data 
)

Modification DAS Configuration files Callback
Set if the blind pixels will be displayed or not on the plot window.

Parameters
*a_data_
  • = 0 –> edit selected configuration file
  • = 1 –> re-load selected configuration file

Definition at line 4203 of file DAS_Spat_ConfCBs.c.

References d_fileman::CONFIGDIRCOMMON, d_fileman::CONFIGDIREQUIPMENT, bil::DFILEM, d_fileman::HOMEDIRECTORY, LoadDasSysCol(), LoadDB_Options(), MObjectGetText(), and flag::VMRsf.

Referenced by CONFP_opt_page2().

4204 {
4205  char buff[80];
4206  char str[MAX_PATH];
4207  int c = (int) a_data, er;
4208 
4209  if(FLAG.VMRsf == 0)
4210  {
4211  switch (c)
4212  {
4213  case 0:
4214  case 1:
4215  case 2:
4216  case 3:
4217  case 4:
4218  case 6:
4219  case 8:
4220  MObjectGetText(o, buff);
4221  sprintf(str,"%s %s\\%s","MEDIT.EXE", BIL.DFILEM.CONFIGDIREQUIPMENT, buff);
4222  er = WinExec(str, SW_SHOW);
4223  //If you want you can use the DED Library
4224  //In my opinion MEDIT is better
4225  //sprintf(str,"%s\\Config\\%s", BIL.DFILEM.HOMEDIRECTORY,buff);
4226  //DED(str);
4227  break;
4228  case 5:
4229  sprintf(str,"%s %s\\Config\\%s","MEDIT.EXE", BIL.DFILEM.HOMEDIRECTORY,"NoName.txt");
4230  er = WinExec(str, SW_SHOW);
4231  //sprintf(str,"%s\\%s", BIL.DFILEM.HOMEDIRECTORY,"NoName.txt");
4232  //DED(str);
4233  break;
4234  case 7:
4235  MObjectGetText(o, buff);
4236  sprintf(str,"%s %s\\%s","MEDIT.EXE", BIL.DFILEM.CONFIGDIRCOMMON , buff);
4237  er = WinExec(str, SW_SHOW);
4238  //If you want you can use the DED Library
4239  //In my opinion MEDIT is better
4240  //sprintf(str,"%s\\Config\\%s", BIL.DFILEM.HOMEDIRECTORY,buff);
4241  //DED(str);
4242  break;
4243 
4244  }
4245  }
4246  else if(FLAG.VMRsf == 1)
4247  {
4248  switch (c)
4249  {
4250  case 0:
4251  break;
4252  case 1:
4253  LoadDasSysCol();
4254 // MObjectRedraw(CP_Sh);
4255 // MObjectRedraw(LIS.Sh_KeyB);
4256  break;
4257  case 2:
4258  LoadDB_Options();
4259  break;
4260  case 3:
4261  break;
4262  case 4:
4263  break;
4264  case 5:
4265  sprintf(str,"%s %s\\Config\\%s","MEDIT.EXE", BIL.DFILEM.HOMEDIRECTORY,"NoName.txt");
4266  er = WinExec(str, SW_SHOW);
4267  //sprintf(str,"%s\\%s", BIL.DFILEM.HOMEDIRECTORY,"NoName.txt");
4268  //DED(str);
4269  break;
4270  }
4271  }
4272 
4273 }
int VMRsf
ViewModifyReloadsystemfile: 0 = ViewModify, 1 = Reload.
char HOMEDIRECTORY[_MAX_PATH]
Definition: bildef.h:200
char * MObjectGetText(MOBJECT obj, char *text)
int LoadDB_Options(void)
Load Options. Procedure that load the Options in the file {homedir}/config/Options.INI.
Definition: Load.c:390
d_fileman DFILEM
Definition: bildef.h:257
char CONFIGDIREQUIPMENT[_MAX_PATH]
Definition: bildef.h:208
int LoadDasSysCol(void)
Load system colors. Procedure that load the DAS colors in the file {homedir}/config/DASSysColor.INI.
Definition: Load.c:811
flag FLAG
char CONFIGDIRCOMMON[_MAX_PATH]
Definition: bildef.h:206
bil BIL
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ NovaTypeCB()

void NovaTypeCB ( MOBJECT  p,
void *  od,
void *  ad 
)

Callback for NOVA selection.

Definition at line 60 of file DAS_Spat_ConfCBs.c.

References nova::DigIn, nova::DigOut, MRButtonGetActivationStatus(), das::Nova, NOVA6612G2, NOVA7892, NOVA945GSE, and nova::type.

Referenced by CONFP_AMS_NOVA().

61 {
62  int c = (int) ad, er;
63 // char buf[80];
64 
66  if (er)
67  {
68  switch(c)
69  {
70  case NOVA7892:
72  DAS.Nova.DigOut = 0;
73  DAS.Nova.DigIn = 0;
74  break;
75  case NOVA6612G2:
77  DAS.Nova.DigOut = 0;
78  break;
79  case NOVA945GSE:
81  DAS.Nova.DigOut = 15;
82  DAS.Nova.DigIn = 15;
83  break;
84  }
85  }
86 
87  //WriteHardwareiniCB();
88  //For checking
89  //sprintf(buf,"Nova Type=%d", novatype);
90  //MMessageDialog("Info", buf, "OK", NULL);
91 }
unsigned short DigOut
Digital Output.
#define NOVA945GSE
NOVA945GSE (SPATRAM2, GASCODNG1, GASCODNG4)
#define NOVA6612G2
NOVA6612G2 (not used in TROPOGAS, LIS, GASCODNG2/3)
int MRButtonGetActivationStatus(MOBJECT o)
das DAS
nova Nova
NOVA structure.
static double p
Definition: SOLPOS.C:131
#define NOVA7892
NOVA7892 monoboard (old)
unsigned char DigIn
Digital Input.
int type
type of NOVA monoboard used (7892 or 945GSE)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ PB_H_CB()

void PB_H_CB ( MOBJECT  p,
void *  od,
void *  ad 
)

Quick Help Callback.

Definition at line 3363 of file DAS_Spat_ConfCBs.c.

References MMessageDialog().

Referenced by CONFP_param_page1().

3364 {
3365 
3366  int c = (int) ad;
3367  char buf[1024];
3368 
3369  switch(c)
3370  {
3371  case 0:
3372  sprintf(buf,"In this text box the user can specify \nthe Maximum Exposure Time (MEXT) \
3373 (s) that will be used in the AutoRange() Procedure.\n The Maximum time allowed \
3374 is 999s.\n If the MEXT is set to 0.0, the Autoranging procedure will ignore the \n\
3375 limitations and the calculated exposure time will be used.");
3376  MMessageDialog("DAS Quick Help:", buf, "ok", NULL);
3377  break;
3378  case 2:
3379  break;
3380 
3381  }
3382 }
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ perc2int()

int perc2int ( int  mod,
char *  string 
)

translate the percent power in AMS digit unit.
The percent power assigned to the motor trough the AMS , is translated in digital unit (i.e. 50% –> 38)

translate the AMS digit unit in hertz speed.

Parameters
mod–> int not used (0)
*string–> char containing the percent power
Returns
c –> digital unit
Parameters
mod–> int not used (0)
string–> char containing the
Returns
c –> speed (khz)

Definition at line 2191 of file DAS_Spat_ConfCBs.c.

Referenced by ApplyChCB(), and WriteAMSCB().

2192 {
2193  int c;
2194 
2195  c = (int) (atof(string) * 76.0 / 100.0);
2196  return c;
2197 }
+ Here is the caller graph for this function:

§ print2file()

void print2file ( FILE *  ff,
int  x,
int  y,
unsigned int  m 
)

Print to file the defective pixel.

Parameters
*ffPointer to the buffer file
xImage horizontal dimension
yImage vertical dimension
mimage buffer

Definition at line 3734 of file DAS_Spat_ConfCBs.c.

Referenced by GetDefPix().

3735 {
3736 
3737  char str[80];
3738 
3739 
3740  //sprintf(str, "x, y, val: %d %d %u\n", x, y, m);
3741  //sprintf(str, "%d %d %u 1 1 0 0\n", x, y, m);
3742  sprintf(str, "%d %d 1 1 0 0\n", x, y);
3743 
3744  fprintf(ff,str);
3745 
3746 
3747 
3748 }
+ Here is the caller graph for this function:

§ ScreenInfoCB()

void ScreenInfoCB ( MOBJECT  o,
void *  s,
void *  v 
)

Definition at line 886 of file DAS_Spat_ConfCBs.c.

References MGetNColors(), MGetNPlanes(), MGetScreenHeight(), MGetScreenWidth(), and MMessageDialog().

887 {
888  char buff[256];
889 
890  sprintf(buff, "Width: %d\nHeight: %d\nColors: %ld\nPlanes: %d",
891  MGetScreenWidth(),
893  MGetNColors(),
894  MGetNPlanes());
895  MMessageDialog("Screen Information", buff, " Ok ", NULL);
896 }
int MGetNPlanes(void)
long MGetNColors(void)
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
int MGetScreenWidth(void)
int MGetScreenHeight(void)
+ Here is the call graph for this function:

§ SetBoldCB()

void SetBoldCB ( MOBJECT  obj,
MVALUE  a,
void *  data 
)

This callback toggles the Bold attribute.

Definition at line 1455 of file DAS_Spat_ConfCBs.c.

References bold, and DB_TestF().

Referenced by MDCreateDASConfig().

1456 {
1457  bold = (int) a;
1458  DB_TestF();
1459 }
int bold
Definition: DAS_Spat_Conf.c:88
void DB_TestF(void)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ SetItalicCB()

void SetItalicCB ( MOBJECT  obj,
MVALUE  a,
void *  data 
)

This callback toggles the Italic attribute.

Definition at line 1464 of file DAS_Spat_ConfCBs.c.

References DB_TestF(), and italic.

Referenced by MDCreateDASConfig().

1465 {
1466  italic = (int) a;
1467  DB_TestF();
1468 }
void DB_TestF(void)
int italic
Definition: DAS_Spat_Conf.c:89
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ TestFontCB()

void TestFontCB ( MOBJECT  obj,
void *  a,
void *  data 
)

This callback tries to load the specified font.

Definition at line 1489 of file DAS_Spat_ConfCBs.c.

References DB_TestF().

Referenced by MDCreateDASConfig().

1490 {
1491 
1492  DB_TestF();
1493 
1494 
1495 }
void DB_TestF(void)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ TextColorAssignCB()

void TextColorAssignCB ( MOBJECT  o,
MVALUE  o_data,
void *  a_data 
)

Definition at line 744 of file DAS_Spat_ConfCBs.c.

References mtcl::black, cell_label, label_fgc, MObjectBackgroundColor(), MObjectSetColor(), and mtcl::white.

745 {
746  if (o_data)
747  {
748  label_fgc = (a_data ? MTCL.white : MTCL.black);
750  }
751 }
void MObjectSetColor(MOBJECT obj, MTColor bgc, MTColor fgc)
MOBJECT cell_label
Definition: DAS_Spatram.h:3057
MTColor black
mtcl MTCL
MTColor.
MTColor white
MTColor MObjectBackgroundColor(MOBJECT obj)
MTColor label_fgc
Definition: DAS_Spatram.h:3059
+ Here is the call graph for this function:

§ UnderOverPixCB()

void UnderOverPixCB ( MOBJECT  o,
void *  id,
void *  a_data 
)

Under/Over exposed pixels Callback
At the pression of the button in DAS_Config the appropriate shell (For the creation of the Under or Over exposed pixel map - with the MAPDefPix() function) will be created.

Parameters
a_data
  • = 0 –> Under Exposed pixels
  • = 1 –> Over Exposed pixels

Definition at line 4162 of file DAS_Spat_ConfCBs.c.

References MAPDefPix().

Referenced by CONFP_opt_page1().

4163 {
4164 
4165  int c = (int) a_data;
4166 
4167  MAPDefPix(c);
4168 /* switch (c)
4169  {
4170  case 0:
4171  MAPDefPix(0);
4172  break;
4173  case 1:
4174  MAPDefPix(1);
4175  break;
4176  case 2:
4177  MAPDefPix(2);
4178  break;
4179 
4180 
4181  }
4182 */
4183 }
void MAPDefPix(int mod)
create the Under/Over exposed pixels window At the pression of the button in DAS_Config the appropri...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ UndoFCB()

void UndoFCB ( MOBJECT  obj,
void *  a,
void *  v 
)

This callback UnDo the font choice (Not implemented yet)

Definition at line 1421 of file DAS_Spat_ConfCBs.c.

Referenced by MDCreateDASConfig().

1422 {
1423 
1424 }
+ Here is the caller graph for this function:

§ val2fraz()

void val2fraz ( int  id,
int  sn,
int  val 
)

Decimal value to ratio value
Similar to listval2fraz The decimal value indicating the fractioning of the step is translated in ratio (i.e. 0 –> 1/2 = 400 s/r, 1–> 1/4 =800 s/r)

Parameters
idNOT USED (0)
snNOT USED (0)
valsteps

Definition at line 2333 of file DAS_Spat_ConfCBs.c.

References stepm::step_fraz, and das::StepM.

Referenced by ApplyChCB(), AssignParam(), and WriteAMSCB().

2334 {
2335 
2336  char xx[10];
2337  int c = (int) val;
2338 
2339  switch (c)
2340  {
2341  case 0:
2342  {
2343  sprintf(xx, " 1/2");
2344  break;
2345  }
2346  case 1:
2347  {
2348  sprintf(xx, " 1/4");
2349 
2350  break;
2351  }
2352  case 2:
2353  {
2354  sprintf(xx, " 1/5");
2355 
2356  break;
2357  }
2358  case 3:
2359  {
2360  sprintf(xx, " 1/8");
2361 
2362  break;
2363  }
2364  case 4:
2365  {
2366  sprintf(xx, " 1/10");
2367 
2368  break;
2369  }
2370  case 5:
2371  {
2372  sprintf(xx, " 1/16");
2373 
2374  break;
2375  }
2376  case 6:
2377  {
2378  sprintf(xx, " 1/25");
2379 
2380  break;
2381  }
2382  case 7:
2383  {
2384  sprintf(xx, " 1/32");
2385 
2386  break;
2387  }
2388  case 8:
2389  {
2390  sprintf(xx, " 1/50");
2391 
2392  break;
2393  }
2394  case 9:
2395  {
2396 
2397  sprintf(xx, " 1/64");
2398  break;
2399  }
2400  case 10:
2401  {
2402  sprintf(xx, "1/125");
2403 
2404  break;
2405  }
2406  case 11:
2407  {
2408  sprintf(xx, "1/128");
2409  ;
2410  break;
2411  }
2412  case 12:
2413  {
2414  sprintf(xx, "1/250");
2415 
2416  break;
2417  }
2418  case 13:
2419  {
2420  sprintf(xx, "1/256");
2421 
2422  break;
2423  }
2424 
2425  }
2426 
2427 
2428  for(c = 0; c < (int) strlen(xx); c++)
2429  DAS.StepM.step_fraz[id][sn][c] = xx[c];
2430 
2431 
2432 
2433 }
stepm StepM
Stepper motors parameters structure.
das DAS
char step_fraz[AMSMAX][2][6]
Stepper Motors Step fraction.
+ Here is the caller graph for this function:

§ ValidateCB()

void ValidateCB ( MOBJECT  edit,
EDIT_VAL ev,
void *  ii 
)

Text Validation callback Validation callback for the text typed in different text box.

Definition at line 1632 of file DAS_Spat_ConfCBs.c.

References paramini::ccdWx, paramini::ccdWy, paramini::ccdXoff, paramini::ccdYoff, paramini::CoolPw, das::DOption, ccd::dx, ccd::dy, False, EDIT_VAL::focus_leave, paramini::ITemp, optionini::maxlvlar, paramini::maxtexp, MMessageDialog(), das::Paramini, omuthr::PCPower, EDIT_VAL::text, paramini::TPelt, and paramini::VBin.

Referenced by CONFP_AMS_SM_OFFSET(), CONFP_opt_page1(), CONFP_opt_page2(), CONFP_opt_page3(), CONFP_param_page1(), D_PlotTools(), MAPDefPix(), and MDCreateColFor_Sh().

1633 {
1634  int c = (int) ii;
1635 // int x,y;
1636 // div_t div_result;
1637 
1638  switch (c)
1639  {
1640  case 1:
1641  {
1642  DAS.Paramini.ITemp = strtod( ev->text, &ev->text );
1643  if (DAS.Paramini.ITemp < -40 || DAS.Paramini.ITemp > 30)
1644  {
1645  ev->focus_leave = False;
1646 
1647  }
1648  break;
1649  }
1650  case 2:
1651  {
1652  DAS.Paramini.CoolPw = (int) (strtod(ev->text, &ev->text ) * 10);
1653  if (DAS.Paramini.CoolPw < 0 || DAS.Paramini.CoolPw > 1000)
1654  {
1655  ev->focus_leave = False;
1656  }
1657  break;
1658  }
1659 
1660  case 3:
1661  {
1662  DAS.Paramini.TPelt = strtod( ev->text, &ev->text );
1663  if (DAS.Paramini.TPelt < 0 || DAS.Paramini.TPelt > 30)
1664  {
1665  ev->focus_leave = False;
1666  }
1667  break;
1668  }
1669  case 2000:
1670  {
1671  OMUTHR.PCPower = (int) (strtod(ev->text, &ev->text ) * 10);
1672  if (OMUTHR.PCPower < 0 || OMUTHR.PCPower > 1000)
1673  {
1674  ev->focus_leave = False;
1675  }
1676  break;
1677  }
1678 
1679  case 4:
1680  {
1681 
1682  DAS.Paramini.ccdXoff = (int) strtol( ev->text, &ev->text, 10 );
1684  {
1685  ev->focus_leave = False;
1686  }
1687  break;
1688  }
1689  case 5:
1690  {
1691  DAS.Paramini.ccdWx = (int) strtol( ev->text, &ev->text, 10 );
1692  if (DAS.Paramini.ccdWx < 0 || DAS.Paramini.ccdWx > DC_CCD.dx)
1693  {
1694  ev->focus_leave = False;
1695  }
1696  break;
1697  }
1698  case 6:
1699  {
1700 
1701  DAS.Paramini.ccdYoff = (int) strtol( ev->text, &ev->text, 10 );
1703  {
1704  ev->focus_leave = False;
1705  }
1706  break;
1707  }
1708  case 7:
1709  {
1710  DAS.Paramini.ccdWy = (int) strtol( ev->text, &ev->text, 10 );
1711  if (DAS.Paramini.ccdWy < 0 || DAS.Paramini.ccdWy > DC_CCD.dy)
1712  {
1713  ev->focus_leave = False;
1714  }
1715  break;
1716  }
1717 
1718  case 8:
1719  {
1720  DAS.Paramini.VBin = (int) strtol( ev->text, &ev->text, 10 );
1721 // x = DAS.Paramini.ccdWy - DAS.Paramini.ccdYoff;
1722 // y = DAS.Paramini.VBin;
1723 // div_result = div( x, y );
1724 // if (div_result.rem)
1725 // ev->focus_leave = False;
1726  break;
1727  }
1728 // SM1
1729 /* case 9:
1730  {
1731  DAS.StepM.cop[0] = (int) strtol( ev->text, &ev->text, 10 );
1732  if (DAS.StepM.cop[0] < 0 || DAS.StepM.cop[0] > 100)
1733  {
1734  ev->focus_leave = False;
1735  }
1736  break;
1737  }
1738  case 10:
1739  {
1740  DAS.StepM.step[0] = (int) strtol( ev->text, &ev->text, 10 );
1741  if (DAS.StepM.step[0] < 0 || DAS.StepM.step[0] > 13)
1742  {
1743  ev->focus_leave = False;
1744  }
1745  break;
1746  }
1747  case 11:
1748  {
1749  DAS.StepM.slope[0] = (int) strtol( ev->text, &ev->text, 10 );
1750  if (DAS.StepM.slope[0] < 0 || DAS.StepM.slope[0] > 255)
1751  {
1752  ev->focus_leave = False;
1753  }
1754  break;
1755  }
1756  case 12:
1757  {
1758  DAS.StepM.speed[0] = (int) strtol( ev->text, &ev->text, 10 );
1759  if (DAS.StepM.speed[0] < 1 || DAS.StepM.speed[0] > 50000)
1760  {
1761  ev->focus_leave = False;
1762  }
1763  break;
1764  }
1765 // SM2
1766  case 13:
1767  {
1768  DAS.StepM.cop[1] = (int) strtol( ev->text, &ev->text, 10 );
1769  if (DAS.StepM.cop[1] < 0 || DAS.StepM.cop[1] > 100)
1770  {
1771  ev->focus_leave = False;
1772  }
1773  break;
1774  }
1775  case 14:
1776  {
1777  DAS.StepM.step[1] = (int) strtol( ev->text, &ev->text, 10 );
1778  if (DAS.StepM.step[1] < 0 || DAS.StepM.step[1] > 13)
1779  {
1780  ev->focus_leave = False;
1781  }
1782  break;
1783  }
1784  case 15:
1785  {
1786  DAS.StepM.slope[1] = (int) strtol( ev->text, &ev->text, 10 );
1787  if (DAS.StepM.slope[1] < 0 || DAS.StepM.slope[1] > 255)
1788  {
1789  ev->focus_leave = False;
1790  }
1791  break;
1792  }
1793  case 16:
1794  {
1795  DAS.StepM.speed[1] = (int) strtol( ev->text, &ev->text, 10 );
1796  if (DAS.StepM.speed[1] < 1 || DAS.StepM.speed[1] > 50000)
1797  {
1798  ev->focus_leave = False;
1799  }
1800  break;
1801  }
1802 // SM3
1803  case 17:
1804  {
1805  DAS.StepM.cop[2] = (int) strtol( ev->text, &ev->text, 10 );
1806  if (DAS.StepM.cop[2] < 0 || DAS.StepM.cop[2] > 100)
1807  {
1808  ev->focus_leave = False;
1809  }
1810  break;
1811  }
1812  case 18:
1813  {
1814  DAS.StepM.step[2] = (int) strtol( ev->text, &ev->text, 10 );
1815  if (DAS.StepM.step[2] < 0 || DAS.StepM.step[2] > 13)
1816  {
1817  ev->focus_leave = False;
1818  }
1819  break;
1820  }
1821  case 19:
1822  {
1823  DAS.StepM.slope[2] = (int) strtol( ev->text, &ev->text, 10 );
1824  if (DAS.StepM.slope[2] < 0 || DAS.StepM.slope[2] > 255)
1825  {
1826  ev->focus_leave = False;
1827  }
1828  break;
1829  }
1830  case 20:
1831  {
1832  DAS.StepM.speed[2] = (int) strtol( ev->text, &ev->text, 10 );
1833  if (DAS.StepM.speed[2] < 1 || DAS.StepM.speed[2] > 50000)
1834  {
1835  ev->focus_leave = False;
1836  }
1837  break;
1838  }
1839 
1840 
1841  case 111:
1842  {
1843 
1844  break;
1845  }
1846 */
1847  case 123:
1848  {
1849  DAS.Paramini.maxtexp = strtod( ev->text, &ev->text );
1850  if (DAS.Paramini.maxtexp < 0 || DAS.Paramini.maxtexp > 1000)
1851  {
1852  ev->focus_leave = False;
1853  }
1854  break;
1855  }
1856 
1857  case 600:
1858  {
1859  DAS.DOption.maxlvlar = strtol( ev->text, &ev->text, 10 );
1860  if(DAS.DOption.maxlvlar < 5000 || DAS.DOption.maxlvlar > 63000)
1861  {
1862  ev->focus_leave = False;
1863  MMessageDialog("DAS information", "Value Outside Limits" , "OK", NULL);
1864 
1865  }
1866  break;
1867  }
1868 
1869 
1870  }
1871 
1872 
1873 
1874 }
ccd DC_CCD
optionini DOption
Options for DAS execution.
char * text
Definition: Mguidefs.h:1389
int PCPower
Power to the Peltier for Cooling.
int ccdWx
CCD X End.
#define False
Definition: Mguidefs.h:236
int ccdXoff
CCD X Start.
S16 dx
Num. of X pixels.
Definition: dcldef.h:1022
omuthr OMUTHR
int ccdWy
CCD Y End.
int VBin
CCD Vertical Binning.
int CoolPw
CCD Init Power.
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
S16 dy
Num. of Y pixels.
Definition: dcldef.h:1023
das DAS
double maxtexp
Maximum exposure time (used in Autorange())
unsigned focus_leave
Definition: Mguidefs.h:1397
int ccdYoff
CCD Y Start.
double ITemp
CCD Target Temperature.
unsigned int maxlvlar
maximum level of autoranging (max 65000)
double TPelt
OMU Target Temperature.
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ WriteAMSCB()

int WriteAMSCB ( MOBJECT  shell,
void *  od,
void *  ad 
)

Write AMS.ini file
.

Returns
0 –> operation succefully performed; 1 –>problems in writing file

Definition at line 2834 of file DAS_Spat_ConfCBs.c.

References _MAX_PATH, d_fileman::CONFIGDIREQUIPMENT, gui::ConfigPanel, gui::ContrPanel, stepm::cop_perc, date::da_day, date::da_mon, date::da_year, bil::DFILEM, fraz2val(), GetDateTime(), das::Gui, hertz2int(), stepm::hometype, MMessageDialog(), MObjectGetText(), MObjectSetText(), stepm::multiplier, stepm::NAMS, paramini::Offset, das::Paramini, perc2int(), controlpanel::power, stepm::power, controlpanel::slope, stepm::slope, configpanel::SM_multiplier, configpanel::SM_power, configpanel::SM_slope, configpanel::SM_speed, configpanel::SM_step, controlpanel::speed, stepm::speed, stepm::speed_Hz, controlpanel::step, stepm::step, stepm::step_fraz, das::StepM, time::ti_hour, time::ti_min, and val2fraz().

Referenced by MDCreateDASConfig().

2835 {
2836  FILE *fs;
2837  char str[80];
2838  char buf[16];
2839  struct time adesso;
2840  struct date oggi;
2841  struct tm today;
2842  int c,i, k, t;
2843  char buff[_MAX_PATH];
2844 
2845 
2846  sprintf(buff,"%s\\AMS.INI", BIL.DFILEM.CONFIGDIREQUIPMENT);
2847  fs = fopen(buff, "w");
2848 
2849  GetDateTime(&oggi, &adesso, &today);
2850  //gettime(&adesso);
2851  //getdate(&oggi);
2852 
2853 
2854  if(fs == NULL)
2855  {
2856  MMessageDialog("DAS information", "Problems in opening file", " Ok ", NULL);
2857  return 1;
2858  }
2859 
2860 
2861 
2862  sprintf(str, "###############################################\n");
2863  fprintf(fs,str);
2864  sprintf(str, "# AMS.INI #\n");
2865  fprintf(fs,str);
2866  sprintf(str, "# Main configuration file for AMS Devices #\n");
2867  fprintf(fs,str);
2868  sprintf(str, "###############################################\n");
2869  fprintf(fs,str);
2870  sprintf(str, "# ------------------------------------------- #\n");
2871  fprintf(fs,str);
2872  sprintf(str, "# by DanBo %02u/%02u/%d at %02u:%02u:%02u #\n", oggi.da_day,oggi.da_mon,oggi.da_year, adesso.ti_hour, adesso.ti_min,adesso.ti_min);
2873  fprintf(fs,str);
2874  sprintf(str, "# ------------------------------------------- #\n");
2875  fprintf(fs,str);
2876 
2877 
2878 
2879  for (i=0;i<DAS.StepM.NAMS;i++)
2880  {
2881  for(k=0;k<2;k++)
2882  {
2883  /*
2884  * Get user preferences from the EDIT Objects for Power SMx
2885  */
2886  //Power
2888  DAS.StepM.cop_perc[i][k] = atof(str);
2889  DAS.StepM.power[i][k] = perc2int(0, str);
2890  MObjectSetText(DAS.Gui.ContrPanel.power[i][k], str);
2891 
2892  /*
2893  * Get user preferences from the EDIT Objects for Step SMx
2894  */
2895  //Step
2897  DAS.StepM.step[i][k] = fraz2val(0, str);
2898  val2fraz(i, k, DAS.StepM.step[i][k]);
2899  sprintf(str, "%s", DAS.StepM.step_fraz[i][k]);
2900  MObjectSetText(DAS.Gui.ContrPanel.step[i][k], str);
2901 
2902  // Slope
2904  DAS.StepM.slope[i][k] = atoi(str);
2905  sprintf(str, "%d", DAS.StepM.slope[i][k]);
2906  MObjectSetText(DAS.Gui.ContrPanel.slope[i][k], str);
2907 
2908  //speed
2910  DAS.StepM.speed_Hz[i][k] = atof(str);
2911  DAS.StepM.speed[i][k] = hertz2int(0, str);
2912  MObjectSetText(DAS.Gui.ContrPanel.speed[i][k], str);
2913 
2914  //multiplier
2916  DAS.StepM.multiplier[i][k] = atof(str);
2917 
2918  }
2919  }
2920 
2921 
2922  sprintf(str, "# Number of AMS # \n");
2923  fprintf(fs,str);
2924 
2925  sprintf(str, "%d\n", DAS.StepM.NAMS);
2926  fprintf(fs,str);
2927 
2928 
2929 /*
2930  //SM
2931  for (i=0;i<(DAS.StepM.NAMS*2);i++)
2932  {
2933  sprintf(buf,"SM%d", i+1);
2934 
2935  switch (i)
2936  {
2937  case 0:
2938  sprintf(str, "# Input Mirror Stepper Motor - %s #\n", buf);
2939  break;
2940  case 1:
2941  sprintf(str, "# Grating Stepper Motor - %s #\n", buf);
2942  break;
2943  case 2:
2944  sprintf(str, "# Filter Wheel Stepper Motor - %s #\n", buf);
2945  break;
2946  case 3:
2947  sprintf(str, "# Not Connected Stepper Motor - %s #\n", buf);
2948  break;
2949  case 4:
2950  sprintf(str, "# Zenith Axis Stepper Motor - %s #\n", buf);
2951  break;
2952  case 5:
2953  sprintf(str, "# Azimuth Axis Stepper Motor - %s #\n", buf);
2954  break;
2955 
2956  }
2957 
2958  fprintf(fs,str);
2959  }
2960 */
2961  for (i=0;i<DAS.StepM.NAMS;i++)
2962  {
2963  for (k=0;k<2;k++)
2964  {
2965 
2966  t=2*i+k;
2967  sprintf(buf,"SM%d", t+1);
2968  switch (t)
2969  {
2970  case 0:
2971  sprintf(str, "# Input Mirror Stepper Motor - %s #\n", buf);
2972  fprintf(fs,str);
2973  break;
2974  case 1:
2975  sprintf(str, "# Grating Stepper Motor - %s #\n", buf);
2976  fprintf(fs,str);
2977  break;
2978  case 2:
2979  sprintf(str, "# Filter Wheel Stepper Motor - %s #\n", buf);
2980  fprintf(fs,str);
2981  break;
2982  case 3:
2983  sprintf(str, "# Not Connected Stepper Motor - %s #\n", buf);
2984  fprintf(fs,str);
2985  break;
2986  case 4:
2987  sprintf(str, "# Zenith Axis Stepper Motor - %s #\n", buf);
2988  fprintf(fs,str);
2989  break;
2990  case 5:
2991  sprintf(str, "# Azimuth Axis Stepper Motor - %s #\n", buf);
2992  fprintf(fs,str);
2993  break;
2994  }
2995 
2996  sprintf(str, "# %s Power (0 = 0A - 76 = 1.52A) #\n", buf);
2997  fprintf(fs,str);
2998  sprintf(str,"%d\n", DAS.StepM.power[i][k]);
2999  fprintf(fs,str);
3000  sprintf(str, "# %s Step (0=400s/r, 1=800s/r,2=1000/sr) #\n", buf);
3001  fprintf(fs,str);
3002  sprintf(str,"%d\n", DAS.StepM.step[i][k]);
3003  fprintf(fs,str);
3004  sprintf(str, "# %s Slope (0 - 255) #\n", buf);
3005  fprintf(fs,str);
3006  sprintf(str,"%d\n", DAS.StepM.slope[i][k]);
3007  fprintf(fs,str);
3008  sprintf(str, "# %s Speed Hz (PS = 125*(n+1), n=0,1..255) #\n", buf);
3009  fprintf(fs,str);
3010  sprintf(str,"%d\n", DAS.StepM.speed[i][k]);
3011  fprintf(fs,str);
3012  sprintf(str, "# %s Multiplier #\n", buf);
3013  fprintf(fs,str);
3014  sprintf(str,"%.1f\n", DAS.StepM.multiplier[i][k]);
3015  fprintf(fs,str);
3016 
3017 
3018  }
3019  }
3020 
3021 
3022  sprintf(str, "# OFFSETS #\n");
3023  fprintf(fs,str);
3024  sprintf(str, "# HMir, Mir0, Mir1, Mir2, Mir3, Mir4, Grat, FW#\n");
3025  fprintf(fs,str);
3026  for(c = 0; c < 9; c++)
3027  {
3028  sprintf(str,"%d ", DAS.Paramini.Offset[c]);
3029  fprintf(fs,str);
3030  }
3031 
3032  sprintf(str, "\nHome Type Mode for Steppers #\n");
3033  fprintf(fs,str);
3034 
3035  sprintf(str, "SM1 SM2 SM3 SM4 SM5 SM6 #\n");
3036  fprintf(fs,str);
3037 
3038  for(c = 0; c < DAS.StepM.NAMS; c++)
3039  {
3040  for(k = 0; k < 2; k++)
3041  {
3042  sprintf(str,"%d ", DAS.StepM.hometype[c][k]);
3043  //sprintf(str,"%d ", 2);
3044  fprintf(fs,str);
3045  }
3046 
3047  }
3048 
3049  sprintf(str, "\n###############################################\n");
3050  fprintf(fs,str);
3051 
3052  fclose(fs);
3053 
3054  sprintf(buff,"The current parameters has been saved in '%s\\AMS.INI' file", BIL.DFILEM.CONFIGDIREQUIPMENT);
3055  MMessageDialog("DAS information", buff, " Ok ", NULL);
3056 
3057  return 0;
3058 
3059 
3060 }
stepm StepM
Stepper motors parameters structure.
gui Gui
Graphic User Interface Structure.
int hometype[AMSMAX][2]
MOBJECT speed[AMSMAX][2]
Active Control Panel Labels for Stepper Motors "speed".
int NAMS
Number of AMSs Devices.
MOBJECT SM_multiplier[AMSMAX][2]
int Offset[16]
Offset of the hardware devices (Input Mirror (5), Grating, Filter Wheel...)
int slope[AMSMAX][2]
Stepper Motors Slope.
MOBJECT step[AMSMAX][2]
Active Control Panel Labels for Stepper Motors "step".
int perc2int(int mod, char *string)
translate the percent power in AMS digit unit. The percent power assigned to the motor trough the AMS...
char * MObjectGetText(MOBJECT obj, char *text)
float multiplier[AMSMAX][2]
multiplier, > 0 multiplier, < 0 demultiplier
void MObjectSetText(MOBJECT obj, const char *text)
MOBJECT slope[AMSMAX][2]
Active Control Panel Labels for Stepper Motors "Slope".
MOBJECT SM_power[AMSMAX][2]
d_fileman DFILEM
Definition: bildef.h:257
MOBJECT SM_step[AMSMAX][2]
char CONFIGDIREQUIPMENT[_MAX_PATH]
Definition: bildef.h:208
int hertz2int(int mod, char *string)
translate the Hertz speed in AMS digit unit.
Definition: Dildef.h:240
MOBJECT SM_slope[AMSMAX][2]
double cop_perc[AMSMAX][2]
Stepper Motors Power percent.
#define _MAX_PATH
Definition: Dildef.h:202
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
int fraz2val(int mod, char *val)
ratio value to decimal value opposite than listval2fraz or val2fraz
das DAS
configpanel ConfigPanel
Configuration panel structure.
char step_fraz[AMSMAX][2][6]
Stepper Motors Step fraction.
void val2fraz(int id, int sn, int val)
Decimal value to ratio value Similar to listval2fraz The decimal value indicating the fractioning of ...
void GetDateTime(struct date *dp, struct time *tp, struct tm *when)
Definition: Save.c:43
controlpanel ContrPanel
Control Panel Structure.
int speed[AMSMAX][2]
Stepper Motors Speed.
int step[AMSMAX][2]
Stepper Motors Step.
Definition: Dildef.h:234
double speed_Hz[AMSMAX][2]
Stepper Motors Speed [Hz].
MOBJECT SM_speed[AMSMAX][2]
MOBJECT power[AMSMAX][2]
active Control Panel Labels for Stepper Motors "power"
bil BIL
int power[AMSMAX][2]
Stepper Motors Power.
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ WriteColorsCB()

int WriteColorsCB ( MOBJECT  o,
void *  a,
void *  v 
)

Write selected color in DASSysColor.INI.

Definition at line 98 of file DAS_Spat_ConfCBs.c.

References _MAX_PATH, d_fileman::CONFIGDIREQUIPMENT, palette::DB_BG, palette::DB_BG_Albl, palette::DB_BG_lblUP, palette::DB_BG_Plbl, palette::DB_BG_RButt, palette::DB_FG_Albl, palette::DB_FG_lblUP, palette::DB_FG_Plbl, palette::DB_FG_RButt, palette::DB_Sel, palette::DB_UnSel, palette::DB_UnSelFG, bil::DFILEM, and MMessageDialog().

Referenced by MDCreateDASConfig().

99 {
100  FILE *fs;
101  char str[80];
102  char buff[_MAX_PATH];
103 
104  sprintf(buff,"%s\\DASSysColor.INI", BIL.DFILEM.CONFIGDIREQUIPMENT);
105  fs = fopen(buff, "w");
106 
107  // if(fs == NULL) return 2;
108 
109  fprintf(fs, "%s\n", "###########################################");
110  fprintf(fs, "%s\n", "# DAS Default Color #");
111  fprintf(fs, "%s\n", "# by DanBo #");
112  fprintf(fs, "%s\n", "###########################################");
113  fprintf(fs, "%s\n", "# All these values can be modified, but #");
114  fprintf(fs, "%s\n", "# DO NOT Exchange the order #");
115  fprintf(fs, "%s\n", "###########################################");
116 
117 
118  fprintf(fs, "%s\n", "# Selected Buttons BG #");
119  fprintf(fs, "%d %d %d\n", DPAL.DB_Sel[0], DPAL.DB_Sel[1], DPAL.DB_Sel[2]);
120 
121  fprintf(fs, "%s\n", "# Unselected Buttons BG #");
122  fprintf(fs, "%d %d %d\n", DPAL.DB_UnSel[0], DPAL.DB_UnSel[1], DPAL.DB_UnSel[2]);
123 
124  fprintf(fs, "%s\n", "# UnSelected Buttons FG #");
125  fprintf(fs, "%d %d %d\n", DPAL.DB_UnSelFG[0], DPAL.DB_UnSelFG[1], DPAL.DB_UnSelFG[2]);
126 
127  fprintf(fs, "%s\n", "# Forms and shell Background #");
128  fprintf(fs, "%d %d %d\n", DPAL.DB_BG[0],DPAL.DB_BG[1],DPAL.DB_BG[2]);
129 
130  fprintf(fs, "%s\n", "# ACTIVE Labels Background #");
131  fprintf(fs, "%d %d %d\n", DPAL.DB_BG_Albl[0],DPAL.DB_BG_Albl[1],DPAL.DB_BG_Albl[2]);
132 
133  fprintf(fs, "%s\n", "# ACTIVE Labels Foreground #");
134  fprintf(fs, "%d %d %d\n", DPAL.DB_FG_Albl[0],DPAL.DB_FG_Albl[1],DPAL.DB_FG_Albl[2]);
135 
136  fprintf(fs, "%s\n", "# PASSIVE Labels Background #");
137  fprintf(fs, "%d %d %d\n", DPAL.DB_BG_Plbl[0],DPAL.DB_BG_Plbl[1],DPAL.DB_BG_Plbl[2]);
138 
139  fprintf(fs, "%s\n", "# PASSIVE Labels Foreground #");
140  fprintf(fs, "%d %d %d\n", DPAL.DB_FG_Plbl[0],DPAL.DB_FG_Plbl[1],DPAL.DB_FG_Plbl[2]);
141 
142  fprintf(fs, "%s\n", "# Capital Letters Labels Color UP BG #");
143  fprintf(fs, "%d %d %d\n", DPAL.DB_BG_lblUP[0],DPAL.DB_BG_lblUP[1],DPAL.DB_BG_lblUP[2]);
144 
145  fprintf(fs, "%s\n", "# Capital Letters Labels Color UP FG #");
146  fprintf(fs, "%d %d %d\n", DPAL.DB_FG_lblUP[0],DPAL.DB_FG_lblUP[1],DPAL.DB_FG_lblUP[2]);
147 
148  fprintf(fs, "%s\n", "# Radio Button BG #");
149  fprintf(fs, "%d %d %d\n", DPAL.DB_BG_RButt[0],DPAL.DB_BG_RButt[1],DPAL.DB_BG_RButt[2]);
150 
151  fprintf(fs, "%s\n", "# Radio Button FG #");
152  fprintf(fs, "%d %d %d\n", DPAL.DB_FG_RButt[0],DPAL.DB_FG_RButt[1],DPAL.DB_FG_RButt[2]);
153 
154  fprintf(fs, "%s\n", "###########################################");
155 
156  fclose(fs);
157 
158 
159  sprintf(str,"The colors have been saved in 'CONFIG\\DASSysColor.INI' file");
160  MMessageDialog("DAS information", str, " Ok ", NULL);
161 
162 
163  return 0;
164 
165 }
short DB_BG_lblUP[3]
Background Capital Letters Labels Color UP.
short DB_FG_Plbl[3]
Foreground PASSIVE Label Colors.
short DB_BG_Albl[3]
Background ACTIVE Label Colors.
short DB_Sel[3]
Selected Buttons Colors.
short DB_BG_RButt[3]
Background Radio Buttons.
d_fileman DFILEM
Definition: bildef.h:257
char CONFIGDIREQUIPMENT[_MAX_PATH]
Definition: bildef.h:208
short DB_FG_Albl[3]
Foreground ACTIVE Label Colors.
short DB_BG_Plbl[3]
Background PASSIVE Label Colors.
#define _MAX_PATH
Definition: Dildef.h:202
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
short DB_BG[3]
Default Background Color.
short DB_FG_RButt[3]
Foreground Radio Buttons.
short DB_UnSelFG[3]
Unselected Buttons Colors.
palette DPAL
short DB_UnSel[3]
Unselected Buttons Colors.
bil BIL
short DB_FG_lblUP[3]
Foreground Capital Letters Labels Color UP.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ WriteEquipini()

int WriteEquipini ( void  )

Write equipment.ini file
.

Returns
0 –> operation succefully performed; 1 –>problems in writing file

Definition at line 3111 of file DAS_Spat_ConfCBs.c.

References _MAX_PATH, d_fileman::CONFIGDIRCOMMON, bil::DFILEM, paramini::EqType, MMessageDialog(), and das::Paramini.

Referenced by DB_EqTypeCB(), and DB_EqTypePlotCB().

3112 {
3113 
3114  FILE *fs;
3115  char str[80];
3116 // char buf[16];
3117  char buff[_MAX_PATH];
3118 // int c,i;
3119 
3120  sprintf(buff,"%s\\Equipment.ini", BIL.DFILEM.CONFIGDIRCOMMON);
3121  fs = fopen(buff, "w");
3122  if(fs == NULL)
3123  {
3124  MMessageDialog("DAS information", "Problems in opening file", " Ok ", NULL);
3125  return 1;
3126  }
3127 
3128 
3129  sprintf(str, "###############################################\n");
3130  fprintf(fs,str);
3131  sprintf(str, "# Equipment.INI #\n");
3132  fprintf(fs,str);
3133  sprintf(str, "# Configuration file setting equipment type #\n");
3134  fprintf(fs,str);
3135  sprintf(str, "###############################################\n");
3136  fprintf(fs,str);
3137  sprintf(str, "# 0 = SPATRAM, 1 = TROPOGAS, 2 = LIS #\n");
3138  fprintf(fs,str);
3139  sprintf(str, "# 3 = SPATRAMPLUS, 4 = GASCODNG1, 5=GASCOD/OA #\n");
3140  fprintf(fs,str);
3141  sprintf(str, "# 6 = GASCODNG2, 7 = GASCODNG3, 8 = GASCODNG4 #\n");
3142  fprintf(fs,str);
3143  sprintf(str, "# 9 = SPATRAM2, #\n");
3144  fprintf(fs,str);
3145  sprintf(str, "###############################################\n");
3146  fprintf(fs,str);
3147 
3148 
3149 
3150  sprintf(str, "%d\n", DAS.Paramini.EqType); // Instrument Type(0 = SPATRAM, 1 = TROPOGAS, 2 = LIS, 3 = SPATRAMPLUS, 4 = GASCODNG1)
3151  fprintf(fs,str);
3152 
3153  fclose(fs);
3154 
3155 // sprintf(buff,"The selected instrument has been saved in '%s\\Equipment.ini' file\n ", BIL.DFILEM.CONFIGDIRCOMMON);
3156 // MMessageDialog("DAS information", buff, " Ok ", NULL);
3157 
3158 
3159  return 0;
3160 
3161 }
d_fileman DFILEM
Definition: bildef.h:257
#define _MAX_PATH
Definition: Dildef.h:202
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
das DAS
int EqType
Spectrometer Type.
char CONFIGDIRCOMMON[_MAX_PATH]
Definition: bildef.h:206
bil BIL
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ WriteFontCB()

void WriteFontCB ( MOBJECT  obj,
void *  a,
void *  v 
)

This callback write on file the selected font (Not implemented yet)

Definition at line 1416 of file DAS_Spat_ConfCBs.c.

References MMessageDialog().

Referenced by MDCreateDASConfig().

1417 {
1418  MMessageDialog("DAS information", "The procedure is not yet implemented!!", " Ok ", NULL);
1419 }
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ WriteHardwareiniCB()

int WriteHardwareiniCB ( MOBJECT  shell,
void *  od,
void *  ad 
)

Write hardware.ini file
.

Returns
0 –> operation succefully performed; 1 –>problems in writing file

Definition at line 3064 of file DAS_Spat_ConfCBs.c.

References _MAX_PATH, d_fileman::CONFIGDIREQUIPMENT, bil::DFILEM, MMessageDialog(), das::Nova, and nova::type.

Referenced by CONFP_AMS_NOVA().

3065 {
3066 
3067  FILE *fs;
3068  char str[80];
3069 // char buf[16];
3070  char buff[_MAX_PATH];
3071 // int c,i;
3072 
3073  sprintf(buff,"%s\\Hardware.ini", BIL.DFILEM.CONFIGDIREQUIPMENT );
3074  fs = fopen(buff, "w");
3075  if(fs == NULL)
3076  {
3077  MMessageDialog("DAS information", "Problems in opening file", " Ok ", NULL);
3078  return 1;
3079  }
3080 
3081 
3082  sprintf(str, "###############################################\n");
3083  fprintf(fs,str);
3084  sprintf(str, "# Hardware .INI #\n");
3085  fprintf(fs,str);
3086  sprintf(str, "###############################################\n");
3087  fprintf(fs,str);
3088  sprintf(str, "# Type of motherboard installed #\n");
3089  fprintf(fs,str);
3090  sprintf(str, "# 0 = NOVA7892; 1 = NOVA6612; 2 = NOVA945GSE #\n");
3091  fprintf(fs,str);
3092  sprintf(str, "###############################################\n");
3093  fprintf(fs,str);
3094 
3095 
3096 
3097  sprintf(str, "%d\n", DAS.Nova.type );
3098  fprintf(fs,str);
3099 
3100  fclose(fs);
3101 
3102  sprintf(buff,"The selected instrument has been saved in '%s\\Hardware.ini' file\n ", BIL.DFILEM.CONFIGDIREQUIPMENT);
3103  MMessageDialog("DAS information", buff, " Ok ", NULL);
3104 
3105 
3106  return 0;
3107 
3108 }
d_fileman DFILEM
Definition: bildef.h:257
char CONFIGDIREQUIPMENT[_MAX_PATH]
Definition: bildef.h:208
#define _MAX_PATH
Definition: Dildef.h:202
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
das DAS
nova Nova
NOVA structure.
int type
type of NOVA monoboard used (7892 or 945GSE)
bil BIL
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ WriteOptioniniCB()

int WriteOptioniniCB ( MOBJECT  shell,
void *  od,
void *  ad 
)

Write Options.ini file
.

Returns
0 –> operation succefully performed; 1 –>problems in writing file

Definition at line 2541 of file DAS_Spat_ConfCBs.c.

References _MAX_PATH, optionini::aaopmode, optionini::amsprogbar, optionini::avgautor, optionini::avgmode, d_fileman::CONFIGDIREQUIPMENT, date::da_day, date::da_mon, date::da_year, optionini::darkremove, optionini::darksource, optionini::DEFPIXFILENAME, flag::DeltaSZA, dsza::DeltaSZA, bil::DFILEM, flag::DispBlindPix, das::DOption, optionini::emshutter, optionini::filename, optionini::filtertype, das::Flag, optionini::ftpbackup, GetDateTime(), optionini::hlineafter, optionini::hlinebefore, optionini::imgtype, mige::linked, optionini::maxlvlar, dsza::MaxSZA, optionini::measmode, das::MIGE, dsza::MinSZA, optionini::mirrorimg, MMessageDialog(), N_AVG, omuthr::PID_kd, omuthr::PID_ki, omuthr::PID_kp, optionini::pixcorr, flag::plotW, flag::plotYRange, optionini::refertemp, optionini::resetEnabled, optionini::resetFreq, optionini::resetType, optionini::savingmode, flag::settempvar, optionini::shuttertype, optionini::smposmode, SZADelta, SZAMax, time::ti_hour, time::ti_min, TOTTEXP, omuthr::TRType, mige::type, flag::Wl, XAX, and YAX.

Referenced by CONFP_Options(), CONFP_param_page4(), and CONFP_param_page5().

2542 {
2543 
2544 
2545 
2546  FILE *fs;
2547  char str[_MAX_PATH];
2548  struct time adesso;
2549  struct date oggi;
2550  char buff[_MAX_PATH];
2551  struct tm today;
2552  sprintf(buff,"%s\\OPTIONS.INI", BIL.DFILEM.CONFIGDIREQUIPMENT);
2553  fs = fopen(buff, "w");
2554 
2555  GetDateTime(&oggi, &adesso, &today);
2556  //gettime(&adesso);
2557  //getdate(&oggi);
2558 
2559 /*********************************/
2560 
2561 
2562  if(fs == NULL)
2563  {
2564  MMessageDialog("DAS information", "Problems in opening file", " Ok ", NULL);
2565  return 1;
2566  }
2567 
2568  sprintf(str, "####################################################\n");
2569  fprintf(fs,str);
2570  sprintf(str, "# Configuration file for OPTIONS Setting. #\n");
2571  fprintf(fs,str);
2572  sprintf(str, "# by DanBo %02u/%02u/%d at %02u:%02u:%02u #\n", oggi.da_day,oggi.da_mon,oggi.da_year, adesso.ti_hour, adesso.ti_min,adesso.ti_min);
2573  fprintf(fs,str);
2574  sprintf(str, "####################################################\n");
2575  fprintf(fs,str);
2576  sprintf(str, "# All these flags can be modified on line #\n");
2577  fprintf(fs,str);
2578  sprintf(str, "# in the CONFIG --> OPTION tabs #\n");
2579  fprintf(fs,str);
2580  sprintf(str, "#--------------------------------------------------#\n");
2581  fprintf(fs,str);
2582  sprintf(str, "# Please DO NOT change the order of the parameters #\n");
2583  fprintf(fs,str);
2584  sprintf(str, "#--------------------------------------------------#\n");
2585  fprintf(fs,str);
2586  sprintf(str, "# Saving Mode: 0 = ASCII, 1 = Binary #\n");
2587  fprintf(fs,str);
2588  sprintf(str, "%d\n", DAS.DOption.savingmode);
2589  fprintf(fs,str);
2590  sprintf(str, "# File Names:0 = free, 1 = automatic file names #\n");
2591  fprintf(fs,str);
2592  sprintf(str, "%d\n", DAS.DOption.filename);
2593  fprintf(fs,str);
2594  sprintf(str, "# Image Type:0=Mono, 1 = RGB #\n");
2595  fprintf(fs,str);
2596  sprintf(str, "%d\n", DAS.DOption.imgtype);
2597  fprintf(fs,str);
2598 
2599  sprintf(str, "# CCD Pix Correction: 0=NOT Corrected, 1=Corrected #\n");
2600  fprintf(fs,str);
2601  sprintf(str, "%d\n", DAS.DOption.pixcorr);
2602  fprintf(fs,str);
2603 
2604  sprintf(str, "# File Name for CCD Pix Correction #\n");
2605  fprintf(fs,str);
2606  sprintf(str, "%s\n", DAS.DOption.DEFPIXFILENAME);
2607  fprintf(fs,str);
2608 
2609  sprintf(str, "# Measuring Mode:0 = Single, 1 = Averaged #\n");
2610  fprintf(fs,str);
2611  sprintf(str, "%d\n", DAS.DOption.measmode);
2612  fprintf(fs,str);
2613 
2614  sprintf(str, "# Averaging Mode:0 = fixed number, 1 = fixed time #\n");
2615  fprintf(fs,str);
2616  sprintf(str, "%d\n", DAS.DOption.avgmode);
2617  fprintf(fs,str);
2618 
2619  sprintf(str, "# Avg Mode fixed Number of measurements #\n");
2620  fprintf(fs,str);
2621  sprintf(str, "%d\n", N_AVG);
2622  fprintf(fs,str);
2623 
2624  sprintf(str, "# Avg Mode fixed Time Exposure [sec] #\n");
2625  fprintf(fs,str);
2626  sprintf(str, "%d\n", TOTTEXP);
2627  fprintf(fs,str);
2628  sprintf(str, "# Remove Dark?: 0 = No, 1 = Yes #\n");
2629  fprintf(fs,str);
2630  sprintf(str, "%d\n", DAS.DOption.darkremove);
2631  fprintf(fs,str);
2632  sprintf(str, "# Dark source: 0 = Blind Pixels, 1 = Full Frame #\n");
2633  fprintf(fs,str);
2634  sprintf(str, "%d\n", DAS.DOption.darksource);
2635  fprintf(fs,str);
2636  sprintf(str, "# CCD Temp: 0 = Fixed, 1 = variation vs SZA #\n");
2637  fprintf(fs,str);
2638  sprintf(str, "%d\n", FLAG.settempvar);
2639  fprintf(fs,str);
2640 
2641 
2642  sprintf(str, "# Plot X Scale: 0 = Pixel #, 1 = Wl[A], 2 = wl[nm] #\n");
2643  fprintf(fs,str);
2644  sprintf(str, "%d\n", FLAG.Wl);
2645  fprintf(fs,str);
2646  sprintf(str, "# Plot display: 0 = NO, 1 = Yes #\n");
2647  fprintf(fs,str);
2648  sprintf(str, "%d\n", DAS.Flag.plotW);
2649  fprintf(fs,str);
2650  sprintf(str, "# Plot Y Scale: 0 = FullRange(0-65535), 1 = min/max#\n");
2651  fprintf(fs,str);
2652  sprintf(str, "%d\n", FLAG.plotYRange);
2653  fprintf(fs,str);
2654  sprintf(str, "# Measurements performed for SZA <= SZAMax #\n");
2655  fprintf(fs,str);
2656  sprintf(str, "%d\n", SZAMax);
2657  fprintf(fs,str);
2658 
2659 
2660  sprintf(str, "# Hidden Lines in Plot-Before and after Cent. line #\n");
2661  fprintf(fs,str);
2662  sprintf(str, "%d\n", DAS.DOption.hlinebefore);
2663  fprintf(fs,str);
2664  sprintf(str, "%d\n", DAS.DOption.hlineafter);
2665  fprintf(fs,str);
2666 
2667  sprintf(str, "# Display Blind Pixel: 0 = NO, 1 = Yes #\n");
2668  fprintf(fs,str);
2669 
2670  sprintf(str, "%d\n", FLAG.DispBlindPix);
2671  fprintf(fs,str);
2672 
2673  sprintf(str, "# Perform FTP Back-UP: 0 = NO, 1 = Yes #\n");
2674  fprintf(fs,str);
2675 
2676  sprintf(str, "%d\n", DAS.DOption.ftpbackup);
2677  fprintf(fs,str);
2678 
2679  sprintf(str, "# Reference temperature for OMU Thermo-Regulation: #\n");
2680  fprintf(fs,str);
2681  sprintf(str, "# 0 = AVG Internal Peltier; 1 = Optic; 2 = Grating #\n");
2682  fprintf(fs,str);
2683 
2684  sprintf(str, "%d\n", DAS.DOption.refertemp);
2685  fprintf(fs,str);
2686 
2687  sprintf(str, "# OMU Thermo-Regulation mode: #\n");
2688  fprintf(fs,str);
2689  sprintf(str, "# 0 = Cold Only; 1 = Heat only; 2 = Cold/Heat #\n");
2690  fprintf(fs,str);
2691  sprintf(str, "%d\n", OMUTHR.TRType);
2692  fprintf(fs,str);
2693 
2694  sprintf(str, "# Mirroring CCD Image along X #\n");
2695  fprintf(fs,str);
2696  sprintf(str, "# 0 = NO Mirroring; 1 = Mirror image #\n");
2697  fprintf(fs,str);
2698  sprintf(str, "%d\n", DAS.DOption.mirrorimg[XAX]);
2699  fprintf(fs,str);
2700 
2701  sprintf(str, "# Mirroring CCD Image along Y #\n");
2702  fprintf(fs,str);
2703  sprintf(str, "# 0 = NO Mirroring; 1 = Mirror image #\n");
2704  fprintf(fs,str);
2705  sprintf(str, "%d\n", DAS.DOption.mirrorimg[YAX]);
2706  fprintf(fs,str);
2707 
2708  sprintf(str, "# AMS Option - Stepper motor Positioning mode #\n");
2709  fprintf(fs,str);
2710  sprintf(str, "# 0 = Sequential; 1 = Simultaneous #\n");
2711  fprintf(fs,str);
2712  sprintf(str, "%d\n", DAS.DOption.smposmode);
2713  fprintf(fs,str);
2714 
2715  sprintf(str, "# AMS Option - Progressive bar #\n");
2716  fprintf(fs,str);
2717  sprintf(str, "# 0 = DO NOT show ; 1 = Show #\n");
2718  fprintf(fs,str);
2719  sprintf(str, "%d\n", DAS.DOption.amsprogbar);
2720  fprintf(fs,str);
2721 
2722 
2723  sprintf(str,"# Autorange before Average #\n");
2724  fprintf(fs,str);
2725  sprintf(str,"# 0 = NO Autoranging, 1 = Autoranging #\n");
2726  fprintf(fs,str);
2727  sprintf(str, "%d\n", DAS.DOption.avgautor);
2728  fprintf(fs,str);
2729 
2730  sprintf(str,"# MIGE Platform connection #\n");
2731  fprintf(fs,str);
2732  sprintf(str,"# 0 = NOT Connected, 1 = Connected #\n");
2733  fprintf(fs,str);
2734  sprintf(str, "%d\n", DAS.MIGE.linked);
2735  fprintf(fs,str);
2736 
2737  sprintf(str,"# MIGE Platform Type #\n");
2738  fprintf(fs,str);
2739  sprintf(str,"# 0 = AltAz V 0.5, 1 = MIGE V. 3 #\n");
2740  fprintf(fs,str);
2741  sprintf(str, "%d\n", DAS.MIGE.type);
2742  fprintf(fs,str);
2743 
2744 
2745  sprintf(str,"# MIGE Platform operating mode #\n");
2746  fprintf(fs,str);
2747  sprintf(str,"# 0 = Sun Track, 1 = AntiSunTrack, 2 = FreePos #\n");
2748  fprintf(fs,str);
2749  sprintf(str, "%d\n", DAS.DOption.aaopmode);
2750  fprintf(fs,str);
2751 
2752  sprintf(str,"# EMShutter #\n");
2753  fprintf(fs,str);
2754  sprintf(str,"# 0 = NOT installed, 1 = Installed #\n");
2755  fprintf(fs,str);
2756  sprintf(str, "%d\n", DAS.DOption.emshutter);
2757  fprintf(fs,str);
2758 
2759  sprintf(str,"# Shutter Type #\n");
2760  fprintf(fs,str);
2761  sprintf(str,"# 0 = VS25, 1 = ROTSHUT, 2 = TORQUEM #\n");
2762  fprintf(fs,str);
2763  sprintf(str, "%d\n", DAS.DOption.shuttertype);
2764  fprintf(fs,str);
2765 
2766 
2767 
2768  sprintf(str,"# Measurements driven by SZA #\n");
2769  fprintf(fs,str);
2770  sprintf(str,"# Format: a, b, c, d where: #\n");
2771  fprintf(fs,str);
2772  sprintf(str,"# a = Flag; 0 = NOT Active, 1 = Active #\n");
2773  fprintf(fs,str);
2774  sprintf(str,"# b = DeltaSZA, value of Delta SZA (x.x deg) #\n");
2775  fprintf(fs,str);
2776  sprintf(str,"# c = MinSZA, value of Min SZA (xx deg) #\n");
2777  fprintf(fs,str);
2778  sprintf(str,"# d = MaxSZA, value of Max SZA (xx deg) #\n");
2779  fprintf(fs,str);
2780  sprintf(str, "%d %.2lf %.2lf %.2lf\n", DAS.Flag.DeltaSZA, SZADelta.DeltaSZA, SZADelta.MinSZA, SZADelta.MaxSZA);
2781  fprintf(fs,str);
2782 
2783 
2784  sprintf(str,"# Filter Wheel type #\n");
2785  fprintf(fs,str);
2786  sprintf(str,"# 0=simple, 1= double, 2= simple +TorqueM #\n");
2787  fprintf(fs,str);
2788  sprintf(str, "%d\n", DAS.DOption.filtertype);
2789  fprintf(fs,str);
2790 
2791  sprintf(str,"#PID Parameters #\n");
2792  fprintf(fs,str);
2793  sprintf(str,"#PID_kp PID_ki PID_kd #\n");
2794  fprintf(fs,str);
2795  sprintf(str, "%.3f %.3f %.3f\n", OMUTHR.PID_kp, OMUTHR.PID_ki, OMUTHR.PID_kd);
2796  fprintf(fs,str);
2797 
2798  //RESET PARAMETERS
2799  sprintf(str,"#DAS/Windows Reset: Enabled = 1, Disabled = 0 #\n");
2800  fprintf(fs,str);
2801  sprintf(str, "%d\n", DAS.DOption.resetEnabled);
2802  fprintf(fs,str);
2803  //RESET Type
2804  sprintf(str,"#Reset Type: Hourly = 0, Daily= 1 #\n");
2805  fprintf(fs,str);
2806  sprintf(str, "%d\n", DAS.DOption.resetType);
2807  fprintf(fs,str);
2808  //RESET Frequency
2809  sprintf(str,"#Reset frequency: Hourly=1 to 23, Daily=1 to 365 #\n");
2810  fprintf(fs,str);
2811  sprintf(str, "%d\n", DAS.DOption.resetFreq);
2812  fprintf(fs,str);
2813 
2814  //AUTORANGING MAX VALUE
2815  sprintf(str,"#AUTORANGING MAX VALUE ( < 63000 #\n");
2816  fprintf(fs,str);
2817  sprintf(str, "%d\n", DAS.DOption.maxlvlar);
2818  fprintf(fs,str);
2819 
2820 
2821  sprintf(str, "####################################################\n");
2822  fprintf(fs,str);
2823 
2824  fclose(fs);
2825 
2826  sprintf(str,"The current options has been saved in '%s\\OPTIONS.INI' file", BIL.DFILEM.CONFIGDIREQUIPMENT);
2827  MMessageDialog("DAS information", str, " Ok ", NULL);
2828 
2829  return 0;
2830 
2831 
2832 }
optionini DOption
Options for DAS execution.
int savingmode
Flag to set saving mode: 0=ASCII, 1=Binary.
dsza SZADelta
Definition: DAS_Spat.c:76
int TRType
Type of thermo regulation (0=TRTCOOL, 1 = TRTHEAT, 2= TRTBOTH)
int Wl
Flag for the units on the X scale plot.
int plotW
Flag for the plot display.
flag Flag
Structure for different flags.
int darkremove
Flag to set Dark Removal from measurements; motors0 = No Dark Removal, 1 = Dark Removal.
int filtertype
type of installed filter module: 0=Simple-SM3, 1=Double-SM3+SM4, 2=simpleplus-SM3+TM) ...
#define XAX
X Axis.
int type
int avgautor
autoranging for averaged measurement, 0 = NO AutoR before average; 1 = AutoR before average; ...
omuthr OMUTHR
int SZAMax
Maximum SZA for performing measurements.
Definition: DAS_Spat.c:116
int hlinebefore
Number of HiddenLines before the central line in Plot.
float PID_ki
d_fileman DFILEM
Definition: bildef.h:257
int avgmode
Flag to set Averaging mode: 0 = Repeat measurements for fixed number, 1 = Repeat measurements for fix...
char CONFIGDIREQUIPMENT[_MAX_PATH]
Definition: bildef.h:208
double MaxSZA
Maximum SZA.
int emshutter
Presence of the CCD Shutter, emshutter = 1 –> Shutter IS Installed, = 0 –> Shutter NOT Installed...
mige MIGE
double DeltaSZA
DeltaSZA.
int DeltaSZA
= 1 Delta SZA measurements activated, = 0 Continous measurements
Definition: Dildef.h:240
int plotYRange
0 –> full range; 1 –> min/max
int resetFreq
frequency of DAS/Windows Reset
int TOTTEXP
Total Exposure time in Averaging mode.
Definition: DAS_Spat.c:115
int amsprogbar
display/hide prograssion bar, 0 = Hide, 1 = display
#define _MAX_PATH
Definition: Dildef.h:202
int hlineafter
Number of HiddenLines after the central line in Plot.
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
int linked
#define YAX
Y Axis.
das DAS
int mirrorimg[2]
Flag to set the mirroring of the CCD image: 0 = NO Mirroring, 1= YES Mirroring (element 0 for X axis;...
void GetDateTime(struct date *dp, struct time *tp, struct tm *when)
Definition: Save.c:43
int pixcorr
Flag to set defective pixel correction: 0=NOT Corrected, 1=Corrected.
int ftpbackup
Flag to set back up: 0 = NO FTP Back-UP; 1 = Perform FTP Back-UP.
int imgtype
Flag to set Image type: 0=MONOINT, 1=RGB.
int measmode
measuring mode: 0 = Single; 1 = Averaged
int settempvar
float PID_kp
Definition: Dildef.h:234
int aaopmode
operation mode for the Alt Az Platform, 0 = solar Traxker; 1 = Anti-Solar Tracker; 2 = Free Positioni...
flag FLAG
int smposmode
positioning mode for stepper , 0 = sequential mode; 1 = simoultaneous mode
int filename
Flag to set file name mode 0=Free choice, 1 = Automatic.
int N_AVG
Number of measurements for Averaging mode in fixed number of meas. mode.
Definition: DAS_Spat.c:113
int darksource
Flag to set Dark source: 0 = Blind Pixels, 1 = Full Frame.
int resetEnabled
DAS/Windows reset option (1 = Enabled; 0 = disabled)
int refertemp
Flag to set the reference temp for thermo-regulation: 0 = AVGPINT; 1 = OPTIC; 2 = GRATING...
int resetType
type of period for DAS Reset: 0=Hours, 1=Days
int DispBlindPix
Display Blind Pix: 0 = NO, 1 = Yes.
int shuttertype
type of installed shutter: 0 = VS25, 1 = Rotating Shutter, 2 = TorqueMotor
unsigned int maxlvlar
maximum level of autoranging (max 65000)
bil BIL
double MinSZA
Minimum SZA.
char DEFPIXFILENAME[_MAX_PATH]
defective pixel filename with path
float PID_kd
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ WriteParaminiCB()

int WriteParaminiCB ( MOBJECT  shell,
void *  od,
void *  ad 
)

Write Param.ini file
.

Returns
0 –> operation succefully performed; 1 –>problems in writing file

Definition at line 3212 of file DAS_Spat_ConfCBs.c.

References _MAX_PATH, CCD_SetupFlg, paramini::ccdWx, paramini::ccdWy, paramini::ccdXoff, paramini::ccdYoff, CodeEq2Name(), d_fileman::CONFIGDIREQUIPMENT, gui::ContrPanel, paramini::CoolPw, date::da_day, date::da_mon, date::da_year, bil::DFILEM, d_fileman::DIRDCL, DOASMODE, paramini::EqType, flag::exemode, das::Flag, GetDateTime(), das::Gui, paramini::ITemp, controlpanel::lbl_Par, paramini::maxtexp, MMessageDialog(), MObjectSetText(), das::Paramini, omuthr::PCPower, time::ti_hour, time::ti_min, paramini::TPelt, and paramini::VBin.

Referenced by CONFP_param_page1().

3213 {
3214 
3215  //MMessageDialog("DAS information", "The procedure is not yet implemented!!", " Ok ", NULL);
3216 
3217  FILE *fs;
3218  char str[_MAX_PATH];
3219  char buf[_MAX_PATH];
3220  struct time adesso;
3221  struct date oggi;
3222  struct tm today;
3223  int er;
3224  char buff[_MAX_PATH];
3225 
3226 // char streqtype[32]= {'\0'};
3227 
3228  GetDateTime(&oggi, &adesso, &today);
3229  //gettime(&adesso);
3230  //getdate(&oggi);
3231 
3232 
3233  sprintf(buff,"%s\\Param.ini", BIL.DFILEM.CONFIGDIREQUIPMENT);
3234 
3235 
3236  fs = fopen(buff, "w");
3237  if(fs == NULL)
3238  {
3239  MMessageDialog("DAS information", "Problems in opening file", " Ok ", NULL);
3240  return 1;
3241  }
3242 
3243 
3244  //sprintf(buff, "%s",EquipCode2Name(DAS.Paramini.EqType, "", streqtype ));
3245 
3246 
3247  sprintf(str, "###############################################\n");
3248  fprintf(fs,str);
3249  sprintf(str, "# Param.INI #\n");
3250  fprintf(fs,str);
3251 // sprintf(str, "# Main configuration file for %s #\n", EquipCode2Name(DAS.Paramini.EqType, "", streqtype ));
3252  sprintf(str, "# Main configuration file for %s #\n", CodeEq2Name(DAS.Paramini.EqType));
3253  fprintf(fs,str);
3254  sprintf(str, "# equipment #\n");
3255  fprintf(fs,str);
3256  sprintf(str, "###############################################\n");
3257  fprintf(fs,str);
3258  sprintf(str, "# ------------------------------------------- #\n");
3259  fprintf(fs,str);
3260  sprintf(str, "# by DanBo %02u/%02u/%d at %02u:%02u:%02u #\n", oggi.da_day,oggi.da_mon,oggi.da_year, adesso.ti_hour, adesso.ti_min,adesso.ti_min);
3261  fprintf(fs,str);
3262  sprintf(str, "# ------------------------------------------- #\n");
3263  fprintf(fs,str);
3264 
3265  sprintf(str, "# CCD Temp (°C) ----------------------------- #\n");
3266  fprintf(fs,str);
3267  sprintf(str, "%.1lf\n",DAS.Paramini.ITemp);
3268  fprintf(fs,str);
3269  sprintf(str, "# CCD Peltier Init Power X 10 (150 = %.1lf%%) #\n",(double) 15);
3270  fprintf(fs,str);
3271  sprintf(str, "%d\n",DAS.Paramini.CoolPw);
3272  fprintf(fs,str);
3273  sprintf(str, "# Optical Unit Target Temperature ------------#\n");
3274  fprintf(fs,str);
3275  sprintf(str, "%.1lf\n",DAS.Paramini.TPelt);
3276  fprintf(fs,str);
3277 
3278  sprintf(str, "# OMU Peltier Init Power X 10 (500 = %.1lf%%) #\n",(double) 50);
3279  fprintf(fs,str);
3280 
3281  sprintf(str, "%d\n", OMUTHR.PCPower);
3282  fprintf(fs,str);
3283 
3284  sprintf(str, "# CCD Window (xstart ys xend ye) -------------#\n");
3285  fprintf(fs,str);
3286  sprintf(str,"%d %d %d %d\n", DAS.Paramini.ccdXoff, DAS.Paramini.ccdYoff, DAS.Paramini.ccdWx, DAS.Paramini.ccdWy);
3287  fprintf(fs,str);
3288  sprintf(str, "# Vertical Binning ---------------------------#\n");
3289  fprintf(fs,str);
3290  sprintf(str,"%d\n", DAS.Paramini.VBin);
3291  fprintf(fs,str);
3292 
3293  sprintf(str, "# Max Exposure Time s (=0 --> free exposure) #\n");
3294  fprintf(fs,str);
3295  sprintf(str,"%.1lf\n", DAS.Paramini.maxtexp);
3296  fprintf(fs,str);
3297 
3298 
3299  sprintf(str, "###############################################\n");
3300  fprintf(fs,str);
3301 
3302  fclose(fs);
3303 
3304  if(CCD_SetupFlg)
3305  {
3306  CCD_SetupFlg = 0;
3307 
3308 
3309 // sprintf(buff, "%s\\%s.cfg", BIL.DFILEM.CONFIGDIREQUIPMENT, CodeEq2Name(DAS.Paramini.EqType));
3310 
3311  //Copy camera.cfg and rename in 'equipment'.cfg
3312  sprintf(buf, "copy %s\\camera.cfg %s", BIL.DFILEM.DIRDCL, BIL.DFILEM.CONFIGDIREQUIPMENT);
3313  er = system(buf);
3314  sprintf(buf, "ren %s\\camera.cfg %s.cfg", BIL.DFILEM.CONFIGDIREQUIPMENT, CodeEq2Name(DAS.Paramini.EqType));
3315  er = system(buf);
3316 
3317  sprintf(str,"The current parameters has been saved in '%s\\Param.ini' file\n The %s\\camera.cfg file was copied in %s folder and renamed as %s.cfg'.",
3318  BIL.DFILEM.DIRDCL,
3321  MMessageDialog("DAS information", str, " Ok ", NULL);
3322 
3323  }
3324  else
3325  {
3326  sprintf(str,"The current parameters has been saved in '%s\\Param.ini' file", BIL.DFILEM.CONFIGDIREQUIPMENT);
3327  MMessageDialog("DAS information", str, " Ok ", NULL);
3328 
3329  }
3330 
3331 
3332 
3334  //CCD and OMU Parameters
3335  if(DAS.Flag.exemode != DOASMODE )
3336  {
3337  sprintf(str, "%.1lf", DAS.Paramini.ITemp);
3339  sprintf(str,"%.1lf%%",(double)DAS.Paramini.CoolPw / 10);
3341  sprintf(str,"%.1lf", DAS.Paramini.TPelt);
3343  sprintf(str,"%d", DAS.Paramini.ccdXoff);
3345  sprintf(str,"%d", DAS.Paramini.ccdYoff);
3347  sprintf(str,"%d", DAS.Paramini.ccdWx);
3349  sprintf(str,"%d", DAS.Paramini.ccdWy);
3351  sprintf(str, "%d", DAS.Paramini.VBin);
3353  }
3354 
3355  return 0;
3356 
3357 
3358 
3359 }
gui Gui
Graphic User Interface Structure.
int PCPower
Power to the Peltier for Cooling.
int ccdWx
CCD X End.
#define DOASMODE
execution for DOAS Processing
flag Flag
Structure for different flags.
int ccdXoff
CCD X Start.
MOBJECT lbl_Par[11]
Parametric Labels of the Control Panel.
char * CodeEq2Name(int code)
code Equipment to Name
Definition: Load.c:371
omuthr OMUTHR
void MObjectSetText(MOBJECT obj, const char *text)
int ccdWy
CCD Y End.
d_fileman DFILEM
Definition: bildef.h:257
char DIRDCL[_MAX_PATH]
Definition: bildef.h:210
int VBin
CCD Vertical Binning.
int CoolPw
CCD Init Power.
char CONFIGDIREQUIPMENT[_MAX_PATH]
Definition: bildef.h:208
Definition: Dildef.h:240
#define _MAX_PATH
Definition: Dildef.h:202
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
das DAS
void GetDateTime(struct date *dp, struct time *tp, struct tm *when)
Definition: Save.c:43
controlpanel ContrPanel
Control Panel Structure.
int CCD_SetupFlg
Definition: DAS_Spat.c:138
Definition: Dildef.h:234
double maxtexp
Maximum exposure time (used in Autorange())
int EqType
Spectrometer Type.
int ccdYoff
CCD Y Start.
double ITemp
CCD Target Temperature.
int exemode
Set the Execution MODE (Execution modes)
double TPelt
OMU Target Temperature.
bil BIL
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ WritewlstepiniCB()

int WritewlstepiniCB ( MOBJECT  shell,
void *  od,
void *  ad 
)

Write wlstep.ini file
.

Returns
0 –> operation succefully performed; 1 –>problems in writing file

Definition at line 2476 of file DAS_Spat_ConfCBs.c.

References _MAX_PATH, d_fileman::CONFIGDIREQUIPMENT, date::da_day, date::da_mon, date::da_year, bil::DFILEM, GetDateTime(), MMessageDialog(), time::ti_hour, time::ti_min, wav, and wl.

Referenced by CONFP_param_page2().

2477 {
2478 
2479 
2480 
2481  FILE *fc;
2482  char str[160];
2483  struct time adesso;
2484  struct date oggi;
2485  char buff[_MAX_PATH];
2486  int i, nitem = 18;
2487  struct tm today;
2488 
2489  GetDateTime(&oggi, &adesso, &today);
2490  //gettime(&adesso);
2491  //getdate(&oggi);
2492 
2493 
2494  sprintf(buff,"%s\\WlStep.ini", BIL.DFILEM.CONFIGDIREQUIPMENT);
2495  fc = fopen(buff, "w");
2496 
2497 
2498  if(fc == NULL)
2499  {
2500  MMessageDialog("DAS information", "Problems in opening file", " Ok ", NULL);
2501  return 1;
2502  }
2503 
2504 
2505 
2506 
2507  sprintf(str, "####################################################\n");
2508  fprintf(fc,str);
2509  sprintf(str, "# WLSTEP.INI #\n");
2510  fprintf(fc,str);
2511  sprintf(str, "# Wavelengths <--> Steps #\n");
2512  fprintf(fc,str);
2513  sprintf(str, "####################################################\n");
2514  fprintf(fc,str);
2515  sprintf(str, "# ------------------------------------------------ #\n");
2516  fprintf(fc,str);
2517  sprintf(str, "# by DanBo %02u/%02u/%d at %02u:%02u:%02u #\n", oggi.da_day,oggi.da_mon,oggi.da_year, adesso.ti_hour, adesso.ti_min,adesso.ti_min);
2518  fprintf(fc,str);
2519  sprintf(str, "# ------------------------------------------------ #\n");
2520  fprintf(fc,str);
2521  sprintf(str, "%d\n", nitem);
2522  fprintf(fc,str);
2523  for (i=0;i<nitem;i++)
2524  {
2525  sprintf(str, "%d %d\n", wl[i], wav[i]);
2526  fprintf(fc,str);
2527  }
2528 
2529 
2530  fclose(fc);
2531 
2532  sprintf(str,"The current setting for Wavelength and stepper steps \n has been saved in '%s' file", buff);
2533  MMessageDialog("DAS information", str, " Ok ", NULL);
2534 
2535  return 0;
2536 
2537 
2538 
2539 }
d_fileman DFILEM
Definition: bildef.h:257
char CONFIGDIREQUIPMENT[_MAX_PATH]
Definition: bildef.h:208
Definition: Dildef.h:240
#define _MAX_PATH
Definition: Dildef.h:202
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
void GetDateTime(struct date *dp, struct time *tp, struct tm *when)
Definition: Save.c:43
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
Definition: Dildef.h:234
long wav[]
Step Number definition - for SD_Grating.
Definition: DAS_Spat.c:195
bil BIL
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

§ ADTESTER

adtester ADTESTER

Definition at line 42 of file DAS_Spat_ConfCBs.c.

§ BIL

bil BIL

Definition at line 49 of file DAS_Spat_ConfCBs.c.

§ cc

ccd cc

Definition at line 26 of file DAS_Spat_ConfCBs.c.

§ Cfg

config Cfg

Definition at line 37 of file DAS_Spat_ConfCBs.c.

§ CP_Sh

MOBJECT CP_Sh

Definition at line 85 of file CreateForms.c.

Referenced by DB_ColorAssign(), and MDCreate_CP().

§ DAS

das DAS

Definition at line 50 of file DAS_Spat_ConfCBs.c.

§ DC_CCD

ccd DC_CCD

Definition at line 35 of file DAS_Spat_ConfCBs.c.

§ DC_HP

ptf DC_HP

Definition at line 36 of file DAS_Spat_ConfCBs.c.

§ DFTP

dftp DFTP

Definition at line 45 of file DAS_Spat_ConfCBs.c.

§ DIL

dil DIL

Definition at line 43 of file DAS_Spat_ConfCBs.c.

§ DOAS

doas DOAS

Definition at line 47 of file DAS_Spat_ConfCBs.c.

§ DPAL

palette DPAL

Definition at line 33 of file DAS_Spat_ConfCBs.c.

§ dsccb

DSCCB dsccb

Definition at line 39 of file DAS_Spat_ConfCBs.c.

§ DXL

DXL_par DXL

Definition at line 27 of file DAS_Spat_ConfCBs.c.

§ FLAG

flag FLAG

Definition at line 38 of file DAS_Spat_ConfCBs.c.

§ IDS

ids IDS

ID tasks.

Definition at line 41 of file DAS_Spat_ConfCBs.c.

§ LISTF

listf LISTF

Definition at line 32 of file DAS_Spat_ConfCBs.c.

§ MTCL

mtcl MTCL

MTColor.

Definition at line 44 of file DAS_Spat_ConfCBs.c.

§ OMUTHR

omuthr OMUTHR

Definition at line 52 of file DAS_Spat_ConfCBs.c.

§ PARAM

paramini PARAM

Definition at line 30 of file DAS_Spat_ConfCBs.c.

§ Port

unsigned char Port = 0

Definition at line 3730 of file DAS_Spat_ConfCBs.c.

Referenced by CameraObject::UsedPort().

§ UDPAL

undopal UDPAL

Definition at line 28 of file DAS_Spat_ConfCBs.c.

§ undofont

int undofont = 15

Definition at line 1499 of file DAS_Spat_ConfCBs.c.

Referenced by DB_Undo2Do_Fonts().

______________________________________________________________________________________
Generated on Mon Sep 18 2017 11:44:53 for DAS - Rel. 3.1.6 - 18/09/2017.