DAS  3.1.6 - 18/09/2017
Functions | Variables
DAS_Spat_Conf.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 <ctype.h>
#include <conio.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 "portio32.h"
+ Include dependency graph for DAS_Spat_Conf.c:

Go to the source code of this file.

Functions

int AddStCB (MOBJECT shell, void *od, void *ad)
 
void AMS_AdvancedCB (MOBJECT o, void *od, void *ad)
 
int ApplyGeoCB (MOBJECT shell, void *od, void *ad)
 
int BrowseLog (void)
 
int ChkDigIO (unsigned char word, int bitn)
 check for digital I/O Status More...
 
void CloseShTempCB (MOBJECT p, void *od, void *ad)
 
void CONFP_AMS (MOBJECT pf, int amsn)
 
void CONFP_AMS_IOPort (MOBJECT dtb, int amsn)
 
void CONFP_AMS_NOVA (MOBJECT pf)
 
void CONFP_AMS_SM_OFFSET (MOBJECT obj, int nams)
 
void CONFP_AMS_TabSingMotor (int id, int snum, MOBJECT tb1)
 
void CONFP_AMS_Utility (MOBJECT pf)
 
void CONFP_opt_page1 (int mod, MOBJECT obj)
 
void CONFP_opt_page2 (int mod, MOBJECT obj)
 
void CONFP_opt_page3 (int mod, MOBJECT obj)
 
void CONFP_opt_page4 (int mod, MOBJECT obj)
 
void CONFP_opt_page5 (int mod, MOBJECT obj)
 
void CONFP_opt_page6 (int mod, MOBJECT obj)
 
void CONFP_opt_page7 (int mod, MOBJECT obj)
 
void CONFP_opt_ScheMeas (int mod, MOBJECT p)
 
void CONFP_Options (int mod, MOBJECT mo)
 
void CONFP_Param (int mod, MOBJECT mo)
 
void CONFP_param_page1 (int mod, MOBJECT obj)
 
void CONFP_param_page2 (int mod, MOBJECT obj)
 
void CONFP_param_page3 (int mod, MOBJECT obj)
 
void CONFP_param_page4 (int mod, MOBJECT obj)
 
void CONFP_param_page5 (int mod, MOBJECT obj)
 
void DB_2DPlot (char *title, int x, int y, int dx, int dy, int mode)
 2D_Plot panel callback. More...
 
void DB_AVGAutoR_CB (MOBJECT o, void *a, void *v)
 
void DB_EqTypeCB (MOBJECT o, void *a, void *v)
 
void DB_GeocoordCB (MOBJECT o, void *a, void *v)
 
void DB_HomeTypeCB (MOBJECT p, LIST_ACT *la, void *ad)
 
void DB_MeasMode_CB (MOBJECT o, void *a, void *v)
 
void DB_RadioFTPCB (MOBJECT o, void *a, void *v)
 
void DB_ResetEnable_CB (MOBJECT o, void *a, void *v)
 
void DB_ResetType_CB (MOBJECT o, void *a, void *v)
 
void DB_StorePB (MOBJECT obj, MAnyWindowEvent *pe, void *a_data)
 
void DB_TempHistCB (MOBJECT o, void *a, void *v)
 
void DB_TestHomeTypeCB (MOBJECT p, void *od, void *ad)
 
int DeleteGeoCB (MOBJECT shell, void *od, void *ad)
 
void DGeoeditCB (MOBJECT edit, EDIT_VAL *ev, void *ii)
 
void DMessage (char *str)
 
void DSZArb_CB (MOBJECT o, void *a, void *v)
 
void edtCCDOffSet_CB (MOBJECT p, LIST_ACT *la, void *ad)
 
void edtDASReset_CB (MOBJECT p, LIST_ACT *la, void *ad)
 
void edtDSZA_CB (MOBJECT p, LIST_ACT *la, void *ad)
 
void edtSZA_CB (MOBJECT p, LIST_ACT *la, void *ad)
 
void FrmNOVA_IO_Test (int mod, MOBJECT obj)
 
void FrmStepperHomeMode (int mod, MOBJECT obj)
 
MOBJECT MDCreate2DPlot (char *title, int x, int y, int dx, int dy, int mode)
 create the 2D_Plot panel via the MDCreate_2DPlot. More...
 
MOBJECT MDCreateDASConfig (void)
 DAS Config shell. Procedure that build the shell for the DAS Config panels. The DAS Config allow for setting a lot of the application parameters. More...
 
void NOVAIn_CB (MOBJECT obj, void *od, void *ad)
 
void NOVAOut_CB (MOBJECT obj, MVALUE value, void *ad)
 
void OOP_CB (MOBJECT obj, MVALUE value, void *ad)
 
void PbftpCB (MOBJECT o, void *a, void *v)
 
void PBH_CB (MOBJECT p, void *od, void *ad)
 
void PBTempHistoCB (MOBJECT o, void *a, void *v)
 
void ReadInputCB (MOBJECT p, void *od, void *ad)
 
int ReadLogFile (int mod, char *dir, char *filename, int nx, int ny, struct omutemp datatemp)
 Read DAS LOG File.
. More...
 
void Rebuildrb (int mode)
 
void SelDefPixFileCB (MOBJECT o, void *a, void *v)
 
void stedtCB (MOBJECT edit, char *text, void *ed)
 
int StoreGeoCB (MOBJECT shell, void *od, void *ad)
 
int TestFTP (void)
 
void valstedt (MOBJECT edit, EDIT_VAL *ev, void *ii)
 
void valwledt (MOBJECT edit, EDIT_VAL *ev, void *ii)
 
void wledtCB (MOBJECT edit, char *text, void *ed)
 
int WriteFTPINI (void)
 
int WriteGeo (int mode)
 

Variables

adtester ADTESTER
 
bil BIL
 
int bold = False
 
ccd cc
 
config Cfg
 
das DAS
 
ccd DC_CCD
 
ptf DC_HP
 
dftp DFTP
 
palette DPAL
 
DSCCB dsccb
 
DXL_par DXL
 
flag FLAG
 
int FlgBG = True
 
int FlgFG = False
 
int FlgOBJ = -1
 
ids IDS
 ID tasks. More...
 
int italic = False
 
char lfraz [6]
 
listf LISTF
 
nova NOVA
 
omutemp OMUTEMP
 structure for OMU temperatures More...
 
omuthr OMUTHR
 
paramini PARAM
 
MOBJECT PFAMS
 
const char * Relais_Code []
 
undopal UDPAL
 

Detailed Description

DAS configuration procedures.

Author
Daniele Bortoli

Definition in file DAS_Spat_Conf.c.

Function Documentation

§ AddStCB()

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

Definition at line 2392 of file DAS_Spat_Conf.c.

References das::DGeo, d_geo::edit, d_geo::flagnewstation, MObjectSetText(), MSelectObject(), d_geo::nitem, and d_geo::selitem.

Referenced by CONFP_param_page3().

2393 {
2394 
2395  int er = 0, i;
2396  char str[16];
2397 
2398  sprintf(str, "%s"," ");
2399  for(i=0;i<5;i++)
2400  MObjectSetText(DAS.DGeo.edit[i], str);
2401 
2402 
2403  MSelectObject(DAS.DGeo.edit[0]);
2404 
2405  DAS.DGeo.flagnewstation = 1;
2406  DAS.DGeo.nitem++;
2407  DAS.DGeo.selitem = DAS.DGeo.nitem-1;
2408  return 0;
2409 
2410 
2411 }
void MSelectObject(MOBJECT f)
MOBJECT edit[5]
Edit Object.
int selitem
void MObjectSetText(MOBJECT obj, const char *text)
d_geo DGeo
struct for Station location
das DAS
Definition: DAS_Spat_Conf.c:56
int nitem
Number of items of the GeoDB.ini.
int flagnewstation
New Station Flag.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ AMS_AdvancedCB()

void AMS_AdvancedCB ( MOBJECT  o,
void *  od,
void *  ad 
)

Definition at line 6983 of file DAS_Spat_Conf.c.

References _MAX_PATH, bil::DFILEM, FALSE, and d_fileman::HOMEDIRECTORY.

Referenced by MDCreateDASConfig().

6984 {
6985 
6986  char buff[_MAX_PATH];
6987  int f;
6988 
6989  STARTUPINFO si;
6990  PROCESS_INFORMATION pi;
6991 
6992 
6993 // chdir(buff);
6994 
6995  sprintf(buff,"%s\\%s",BIL.DFILEM.HOMEDIRECTORY, "\\AMSTester50\\AMS50.exe");
6996 
6997 // WinExec(buff, 1);
6998 
6999 
7000  // // perform the equivalent of WinExec in NT, but we use a Unicode string
7001  //
7002  memset(&si, 0, sizeof(si));
7003  si.cb = sizeof(si);
7004  si.dwFlags= STARTF_USESHOWWINDOW;
7005  si.wShowWindow = SW_SHOW;
7006  f = CreateProcess(NULL, buff, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
7007 
7008 
7009 // sprintf(buff,"%ss",BIL.DFILEM.HOMEDIRECTORY, "SolPosCalc");
7010 
7011  chdir(BIL.DFILEM.HOMEDIRECTORY);
7012 
7013 
7014 }
char HOMEDIRECTORY[_MAX_PATH]
Definition: bildef.h:200
d_fileman DFILEM
Definition: bildef.h:257
bil BIL
Definition: DAS_Spat_Conf.c:51
#define _MAX_PATH
Definition: Dildef.h:202
#define FALSE
Definition: DSCUD.H:110
+ Here is the caller graph for this function:

§ ApplyGeoCB()

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

Definition at line 2180 of file DAS_Spat_Conf.c.

References _MAX_PATH, d_geo::alititude, d_fileman::CONFIGDIREQUIPMENT, bil::DFILEM, das::DGeo, d_geo::latitude, d_geo::longitude, d_geo::s_name, and d_geo::timezone.

Referenced by CONFP_param_page3().

2181 {
2182 
2183 
2184 
2185  FILE *fs;
2186  char str[180];
2187  char buff[_MAX_PATH];
2188 // int i;
2189 
2190 
2191  sprintf(buff, "%s\\GeoCoord.INI", BIL.DFILEM.CONFIGDIREQUIPMENT);
2192  fs = fopen(buff, "w");
2193  if(fs == NULL) return 1;
2194 
2195  sprintf(str, "Geographical Coordinates file for %s station.\n");
2196  fprintf(fs,str);
2197 
2198 
2199  sprintf(str, "%s Station name (3 CHAR)\n",DAS.DGeo.s_name);
2200  fprintf(fs,str);
2201 
2202  sprintf(str, "%.3f Latitude [ 90N, -90S]\n",DAS.DGeo.latitude);
2203  fprintf(fs,str);
2204 
2205  sprintf(str, "%.3f Longitude [ 0, 180 E],[-180 W, 0]\n",DAS.DGeo.longitude);
2206  fprintf(fs,str);
2207 
2208  sprintf(str, "%.3f Altitude [ masl]\n",DAS.DGeo.alititude);
2209  fprintf(fs,str);
2210 
2211  sprintf(str, "%d TimeZone\n",DAS.DGeo.timezone);
2212  fprintf(fs,str);
2213 
2214  fclose(fs);
2215 
2216  return 0;
2217 
2218 }
double alititude
Station altitude.
double latitude
Station latitude.
d_geo DGeo
struct for Station location
int timezone
Station timezone.
char s_name[4]
Station name.
d_fileman DFILEM
Definition: bildef.h:257
bil BIL
Definition: DAS_Spat_Conf.c:51
char CONFIGDIREQUIPMENT[_MAX_PATH]
Definition: bildef.h:208
das DAS
Definition: DAS_Spat_Conf.c:56
#define _MAX_PATH
Definition: Dildef.h:202
double longitude
Station longitude.
+ Here is the caller graph for this function:

§ BrowseLog()

int BrowseLog ( void  )

Definition at line 456 of file DAS_Spat_Conf.c.

References AllocFloatMat(), FB_PREFS::allow_dir_create, FB_PREFS::allow_dir_delete, FB_PREFS::allow_dir_rename, FB_PREFS::bg_image, FB_PREFS::bg_image_file, FB_PREFS::button_font, omutemp::CCDPwr, omutemp::CCDTemp, FB_PREFS::change_cwd, FB_PREFS::close_button, FB_PREFS::create_menu, DB_2DPlot(), bil::DFILEM, omutemp::dimx, omutemp::dimy, False, FB_PREFS::file_label, FB_PREFS::filter_label, FB_PREFS::font, HELV_SMALL, d_fileman::LOGDIR, MFileBrowseExt(), FB_PREFS::ok_button, omutemp::PltPwr, omutemp::pTempMat, omutemp::ptimeMat, ReadLogFile(), FB_PREFS::remove_menu, FB_PREFS::rename_menu, SET2D_GRID, FB_PREFS::transparent_tree, and True.

Referenced by DB_ToolsKeyB_CB(), and PBTempHistoCB().

457 {
458  int er = 0;
459  char buf[255];
460  int tix = 0, tiy = OMUTEMP.dimy = 16;
461 
462  char fname[128], dirname[128];
463  unsigned long mx;
464 
465 
466  FB_PREFS prefs;
467 
468  prefs.allow_dir_create = True;
469  prefs.allow_dir_delete = True;
470  prefs.allow_dir_rename = True;
471  prefs.change_cwd = True;
472  prefs.allow_dir_create = True;
473  prefs.allow_dir_rename = True;
474  prefs.bg_image = False;
475  prefs.bg_image_file = "";
476  prefs.button_font = HELV_SMALL;
477  prefs.close_button = "CANCEL";
478  prefs.create_menu = "CREATE";
479  prefs.file_label = "File:";
480  prefs.filter_label = "Filter:";
481  prefs.font = HELV_SMALL;
482  prefs.ok_button = "OK";
483  prefs.remove_menu = "REMOVE";
484  prefs.rename_menu = "RENAME";
485  prefs.transparent_tree = False;
486 
487  strcpy (dirname, BIL.DFILEM.LOGDIR);
488  fname[0] = '\0';
489 
490 
491 
492 
493  if(MFileBrowseExt("Select LOG file", "*.log", fname, dirname, &prefs))
494  {
495 
496  sprintf(buf, "%s%s", dirname, fname);
497  }
498  else
499  return 1;
500 
501  OMUTEMP.dimx = ReadLogFile(0, dirname, fname, 0, 0, OMUTEMP);
502  if (OMUTEMP.dimx >=5)
503  {
504  //Remenber to de-alloc theese arrays
506 
507  mx = (unsigned long) OMUTEMP.dimx;
508  OMUTEMP.ptimeMat = (struct dtime *) calloc( mx, sizeof(struct dtime ));
509  OMUTEMP.CCDTemp = (float *) calloc( mx, sizeof(float));
510  OMUTEMP.CCDPwr = (float *) calloc( mx, sizeof(float));
511  OMUTEMP.PltPwr = (float *) calloc( mx, sizeof(float));
512 
513  }
514  else
515  return 1;
516 
517  ReadLogFile(1, dirname, fname, OMUTEMP.dimx, OMUTEMP.dimy, OMUTEMP);
518 
519  sprintf(buf,"TEMPERATURE HISTORY - File:%s", fname);
520 
521  DB_2DPlot(buf, OMUTEMP.dimx, OMUTEMP.dimy, 512, 256, SET2D_GRID);
522 
523  return 0;
524 
525 }
const char * rename_menu
Definition: Mguidefs.h:1513
const char * create_menu
Definition: Mguidefs.h:1511
const char * remove_menu
Definition: Mguidefs.h:1515
const char * close_button
Definition: Mguidefs.h:1509
CARD8 change_cwd
Definition: Mguidefs.h:1485
char LOGDIR[_MAX_PATH]
Definition: bildef.h:209
omutemp OMUTEMP
structure for OMU temperatures
Definition: DAS_Spat_Conf.c:50
struct dtime * ptimeMat
Definition: bildef.h:101
CARD8 allow_dir_create
Definition: Mguidefs.h:1487
int ReadLogFile(int mod, char *dir, char *filename, int nx, int ny, struct omutemp datatemp)
Read DAS LOG File. .
MTFont button_font
Definition: Mguidefs.h:1501
CARD8 allow_dir_delete
Definition: Mguidefs.h:1493
MTFont font
Definition: Mguidefs.h:1499
#define False
Definition: Mguidefs.h:236
float * CCDPwr
Definition: bildef.h:103
File Browser Preferences. Used by the Utility functions MFileBowserExt() and MDirBowserExt().
Definition: Mguidefs.h:1482
const char * ok_button
Definition: Mguidefs.h:1507
int dimx
Definition: bildef.h:113
CARD8 transparent_tree
Definition: Mguidefs.h:1495
d_fileman DFILEM
Definition: bildef.h:257
#define HELV_SMALL
Definition: Mguidefs.h:881
bil BIL
Definition: DAS_Spat_Conf.c:51
const char * file_label
Definition: Mguidefs.h:1505
int MFileBrowseExt(const char *t, const char *ext, char *fname, char *dname, FB_PREFS *prefs)
Definition: bildef.h:77
const char * bg_image_file
Definition: Mguidefs.h:1519
#define SET2D_GRID
Definition: Dildef.h:156
MIMAGE bg_image
Definition: Mguidefs.h:1517
float * PltPwr
Definition: bildef.h:104
const char * filter_label
Definition: Mguidefs.h:1503
#define True
Definition: Mguidefs.h:235
float * AllocFloatMat(int hp, int vp)
Definition: Spat_Plot.c:2009
int dimy
Definition: bildef.h:113
float * CCDTemp
Definition: bildef.h:102
CARD8 allow_dir_rename
Definition: Mguidefs.h:1490
void DB_2DPlot(char *title, int x, int y, int dx, int dy, int mode)
2D_Plot panel callback.
float * pTempMat
Definition: bildef.h:100
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ChkDigIO()

int ChkDigIO ( unsigned char  word,
int  bitn 
)

check for digital I/O Status

Parameters
word= 8 bit word to be checked
bitn= bit number to be checked (0 to 7)

Definition at line 997 of file DAS_Spat_Conf.c.

Referenced by AMS_PWM_Zero(), CONFP_AMS_IOPort(), CONFP_AMS_NOVA(), DB_KeyB_CB(), NOVAIn_CB(), NOVAOut_CB(), and OOP_CB().

998 {
999 
1000 
1001  int bn = bitn;
1002  int sts = 2;
1003  char str[80], *s;
1004  int er;
1005  unsigned long stbyte = 0;
1006 
1007  er = 0;
1008 // strcpy(
1009  sprintf(str,"0x%0x",word);
1010  stbyte = strtol(str, &s, 16);
1011  //stbyte = strtol(word, &s, 16);
1012 
1013  sts = stbyte & (unsigned char) pow(2,(double)(bn));
1014  sts = sts >> bn;
1015  if (sts == 2)
1016  return 2;
1017  else
1018  return sts;
1019 
1020 
1021 }
+ Here is the caller graph for this function:

§ CloseShTempCB()

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

Definition at line 323 of file DAS_Spat_Conf.c.

References _MAX_PATH, bil::DFILEM, d_fileman::HOMEDIRECTORY, MShellDestroy(), MShellUnrealize(), and SetWorkDirMGUIenv().

Referenced by MDCreate2DPlot().

324 {
325  char buf[_MAX_PATH];
326  int er = 0;
327 
328  // DAS Working directory and MGUI Environment
329  sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "DAS.exe");
330  er = SetWorkDirMGUIenv(buf);
331  if (er == -1)
332  {
333  //Unable to set the enviromental variable
334  }
335 
337  MShellDestroy(p);
338 
339 
340 }
char HOMEDIRECTORY[_MAX_PATH]
Definition: bildef.h:200
void MShellUnrealize(MOBJECT obj)
void MShellDestroy(MOBJECT obj)
d_fileman DFILEM
Definition: bildef.h:257
bil BIL
Definition: DAS_Spat_Conf.c:51
#define _MAX_PATH
Definition: Dildef.h:202
static double p
Definition: SOLPOS.C:131
int SetWorkDirMGUIenv(char *buff)
set DAS and MGUI enviroment when the program is launched undirectly (for offlineplot or log or auto o...
Definition: DAS_Spat.c:3353
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CONFP_AMS()

void CONFP_AMS ( MOBJECT  pf,
int  amsn 
)

Definition at line 2004 of file DAS_Spat_Conf.c.

References CONFP_AMS_IOPort(), CONFP_AMS_TabSingMotor(), False, FIXED_SMALL, lbl, LEFT_ALIGN, MButtonSetImageMaskByPixel(), MCreateImagePButtonExt(), MCreateLabel(), MCreatePButton(), MCreateRowForm(), MCreateTableForm(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetText(), MObjectSetTransparency(), MObjectSetUnsensitive(), MPButtonSetCallback(), PBH_CB(), RIGHT_ALIGN, tb1, TOP_ALIGN, True, and WS_NONE.

Referenced by MDCreateDASConfig().

2005 {
2006 
2007  char buf[64];
2008  MOBJECT lbl, tb, tb1, pb, pbh, rowform;
2009  int i;
2010 // double speedhz;
2011 // MOBJECT list;
2012 
2013  sprintf(buf, "AMS%d",amsn+1);
2014  MObjectSetText(pf, buf);
2015 
2016  tb = MCreateTableForm(pf, 3);
2017  MObjectSetBackgroundRGB(tb, 80, 60, 0);
2020 
2021  lbl = MCreateLabel(tb, "ADDRESS:", FIXED_SMALL);
2022  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2023  MObjectSetBackgroundRGB(lbl, 80, 60, 0);
2024  MObjectSetTransparency(lbl, 0);
2026  MObjectSetResize(lbl, True, True);
2027 
2028  sprintf(buf," %d ", amsn);
2029  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
2030  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2031  MObjectSetBackgroundRGB(lbl, 120, 100, 0);
2032  MObjectSetTransparency(lbl, 0);
2033  MObjectSetResize(lbl, True, True);
2034 
2035  pb = MCreatePButton(tb, "New Address", FIXED_SMALL);
2037  //MPButtonSetCallback(pb, TestFontCB, 0L);
2038  MObjectSetBackgroundRGB(pb, 224, 224, 176);
2040 
2041 
2042  tb1 = MCreateTableForm(pf, 3);
2043  MObjectSetBackgroundRGB(tb1, 80, 60, 0);
2044  MObjectSetResize(tb1, True, True);
2045 
2046 
2047  switch (amsn)
2048  {
2049  case 0:
2050  lbl = MCreateLabel(tb1, "SM-A, SM1 - MIRROR", FIXED_SMALL);
2051  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2052 
2053 
2054  lbl = MCreateLabel(tb1, "SM-B, SM2 - GRATING", FIXED_SMALL);
2055  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2056 
2057  lbl = MCreateLabel(tb1, "Help", FIXED_SMALL);
2058  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2059 
2060  break;
2061  case 1:
2062  lbl = MCreateLabel(tb1, "SM-A, SM3 - FILTERS ", FIXED_SMALL);
2063  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2064 
2065  lbl = MCreateLabel(tb1, "SM-B, SM4 - Not Conn", FIXED_SMALL);
2066  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2067 
2068  lbl = MCreateLabel(tb1, "Help", FIXED_SMALL);
2069  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2070 
2071  break;
2072  case 2:
2073  lbl = MCreateLabel(tb1, "SM-A, SM5 - ZENITH", FIXED_SMALL);
2074  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2075 
2076  lbl = MCreateLabel(tb1, "SM-B, SM6 - AZIMUTH", FIXED_SMALL);
2077  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2078 
2079  lbl = MCreateLabel(tb1, "Help", FIXED_SMALL);
2080  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2081 
2082  break;
2083  }
2084 
2085 
2086  for (i=0;i<2;i++)
2087  {
2088  //TabSingleMotor(amsn, i, tb1);
2089  CONFP_AMS_TabSingMotor(amsn, i, tb1);
2090  }
2091 
2092  /*****+++++++++++++++++++++++++++++++++******/
2093 
2094  //Help Buttons
2095  rowform = MCreateRowForm(tb1);
2096  MObjectSetResize(rowform, True, True);
2097  MObjectSetBackgroundRGB(rowform, 74, 60, 0);
2098  MObjectSetShadow(rowform, WS_NONE, 0, 0);
2099 
2100 
2101  for(i=0;i<6;i++)
2102  {
2103  pbh = MCreateImagePButtonExt(rowform, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", "");
2104  MButtonSetImageMaskByPixel(pbh, 0, 0);
2105  MObjectSetTransparency(pbh, 255);
2106  MObjectSetShadow(pbh, WS_NONE, 0, 0);
2107  MObjectSetBackgroundRGB(pbh, 74, 60, 0);
2108  MPButtonSetCallback(pbh, PBH_CB, (void *) i);
2109  MObjectSetResize(pbh, False, True);
2110  }
2111 
2112 
2113  /*****************************************************/
2114 
2115 
2116  CONFP_AMS_IOPort(pf, amsn);
2117 
2118 // FrmStepperOFFSET(pf, amsn);
2119 
2120 
2121 
2122 }
#define RIGHT_ALIGN
Definition: Mguidefs.h:916
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
#define WS_NONE
Definition: Mguidefs.h:956
MOBJECT lbl
Definition: DFileMan.c:42
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
void MObjectSetUnsensitive(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 CONFP_AMS_TabSingMotor(int id, int snum, MOBJECT tb1)
void CONFP_AMS_IOPort(MOBJECT dtb, int amsn)
void MObjectSetText(MOBJECT obj, const char *text)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define FIXED_SMALL
Definition: Mguidefs.h:878
void PBH_CB(MOBJECT p, void *od, void *ad)
void MButtonSetImageMaskByPixel(MOBJECT obj, int x, int y)
MOBJECT tb1
Definition: DFileMan.c:41
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
#define LEFT_ALIGN
Definition: Mguidefs.h:915
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MCreateRowForm(MOBJECT parent)
MOBJECT MCreateImagePButtonExt(MOBJECT parent, const char *npf, const char *apf, const char *upf, const char *non, const char *aon, const char *uon)
#define TOP_ALIGN
Definition: Mguidefs.h:918
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CONFP_AMS_IOPort()

void CONFP_AMS_IOPort ( MOBJECT  dtb,
int  amsn 
)

Definition at line 1259 of file DAS_Spat_Conf.c.

References CENTER_ALIGN, ChkDigIO(), gui::ConfigPanel, F_ATT_FORM, False, FIXED_SMALL, das::Gui, HELV_SMALL, configpanel::IOP, lbl, LEFT_ALIGN, MBottomAttach(), MButtonSetImageMaskByPixel(), MCreateColForm(), MCreateImagePButtonExt(), MCreateImageTButtonExt(), MCreateLabel(), MCreatePButton(), MCreatePixmapFromFile(), MCreateRowForm(), MCreateTableForm(), MFormSetSpacing(), MLabelSetAlignment(), MLabelSetMargin(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetFGColorFromParent(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetTransparency(), MPButtonSetCallback(), MTableFormSetColAlign(), MTButtonActivate(), MTButtonDeactivate(), MTButtonSetCallback(), configpanel::OOP, stepm::OOP, OOP_CB(), PBH_CB(), ReadInputCB(), das::StepM, TIMES_SMALL, TOP_ALIGN, True, UNDEF_ALIGN, WS_NONE, and WS_SHADOW_OUT.

Referenced by CONFP_AMS().

1260 {
1261 
1262  MOBJECT lbl;
1263  int i;
1264  unsigned char er = 0;
1265  MOBJECT rowform, colform, rowform1, pb, pbh;
1266  MOBJECT tb, pixmap;
1267  char buf[32];
1268 
1269  lbl = MCreateLabel(dtb, " TEST I/O Ports", FIXED_SMALL);
1270  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1271  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1272  MObjectSetTransparency(lbl, 0);
1273 // MObjectSetCompositeWidth(lbl, 347);
1274 
1275 
1276  //era rowform017
1277  rowform = MCreateRowForm(dtb);
1278  MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN);
1280  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
1281  MObjectSetShadow(rowform, WS_SHADOW_OUT, 2, 0);
1282  MObjectSetResize(rowform, True, True);
1283 
1284  //era _colform003
1285  colform = MCreateColForm(rowform);
1286  MObjectSetForegroundRGB(colform, 255, 255, 255);
1287  MObjectSetBackgroundRGB(colform, 74, 60, 0);
1288  MObjectSetShadow(colform, WS_NONE, 0, 0);
1289  MObjectSetResize(colform, True, True);
1290 
1291  //era _rowform018
1292  rowform1 = MCreateRowForm(colform);
1293  MObjectSetForegroundRGB(rowform1, 255, 255, 255);
1294  MObjectSetBackgroundRGB(rowform1, 74, 60, 0);
1295  MObjectSetResize(rowform1, True, True);
1296 
1297  lbl = MCreateLabel(rowform1, "Input Port", HELV_SMALL);
1299  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1300  MObjectSetBackgroundRGB(lbl, 74, 60, 0);
1301  MObjectSetResize(lbl, False, False);
1302 
1303  pb = MCreatePButton(rowform1, "Read Input", TIMES_SMALL);
1304  MBottomAttach(pb, F_ATT_FORM, 0, NULL);
1306  MObjectSetForegroundRGB(pb, 255, 255, 255);
1307  MObjectSetBackgroundRGB(pb, 71, 126, 246);
1308  MPButtonSetCallback(pb, ReadInputCB, (void *) 0);
1309 
1310  //era _tablefrm018
1311  tb = MCreateTableForm(colform, 8);
1313  MObjectSetForegroundRGB(tb, 255, 255, 255);
1314  MObjectSetBackgroundRGB(tb, 120, 100, 0);
1316 
1317 
1318 
1319 
1320  for (i=7;i>=0;i--)
1321  {
1322  sprintf(buf,"%d", i);
1323  lbl = MCreateLabel(tb, buf, HELV_SMALL);
1324  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1325  MObjectSetBackgroundRGB(lbl, 91, 91, 91);
1326  }
1327 
1328  for (i=7;i>=0;i--)
1329  {
1330  DAS.Gui.ConfigPanel.IOP[amsn][i] = MCreatePixmapFromFile(tb, "SYS\\ledoff.bmp");
1331  MObjectSetShadow(DAS.Gui.ConfigPanel.IOP[amsn][i], WS_NONE, 0, 0);
1332  }
1333 
1334 
1335 
1336  pbh = MCreateImagePButtonExt(colform, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", "");
1337  MButtonSetImageMaskByPixel(pbh, 0, 0);
1338  MObjectSetTransparency(pbh, 255);
1339  MObjectSetShadow(pbh, WS_NONE, 0, 0);
1340  MObjectSetBackgroundRGB(pbh, 80, 60, 0);
1341  MPButtonSetCallback(pbh, PBH_CB, (void *) 6);
1342  MObjectSetResize(pbh, False, True);
1343 
1344  //era _rowform019
1345  rowform = MCreateRowForm(dtb);
1346  MObjectAlign(rowform, UNDEF_ALIGN, TOP_ALIGN);
1348  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
1349  MObjectSetResize(rowform, True, True);
1350 
1351  //era _colform004
1352  colform = MCreateColForm(rowform);
1353  MObjectSetForegroundRGB(colform, 255, 255, 255);
1354  MObjectSetBackgroundRGB(colform, 74, 60, 0);
1355  MObjectSetShadow(colform, WS_NONE, 0, 0);
1356  MObjectSetResize(colform, True, True);
1357 
1358  //era _rowform020
1359  rowform1 = MCreateRowForm(colform);
1360  MObjectSetBackgroundRGB(rowform1, 74, 60, 0);
1361  MObjectSetResize(rowform1, True, True);
1362 
1363  lbl = MCreateLabel(rowform1, "Output Port", HELV_SMALL);
1364  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1365  MObjectSetBackgroundRGB(lbl, 74, 60, 0);
1366  MObjectSetResize(lbl, False, False);
1367 
1368  //era _tablefrm019
1369  tb = MCreateTableForm(rowform1, 2);
1370  MFormSetSpacing(tb, 1);
1372 // MTopAttach(_tablefrm019, F_ATT_OBJ, 0, _label033);
1374  MObjectSetBackgroundRGB(tb, 112, 128, 112);
1376 
1377  pixmap = MCreatePixmapFromFile(tb, "sys\\LEDOFFsmall.BMP");
1378 
1379  lbl = MCreateLabel(tb, "OFF = 0", HELV_SMALL);
1380  MLabelSetMargin(lbl, 3, 1);
1381  MObjectSetBackgroundRGB(lbl, 74, 60, 0);
1382  MObjectSetTransparency(lbl, 0);
1383  MObjectSetResize(lbl, False, False);
1384 
1385  pixmap = MCreatePixmapFromFile(tb, "sys\\LEDONsmall.BMP");
1386 
1387  lbl = MCreateLabel(tb, "ON = 1", HELV_SMALL);
1389  MLabelSetMargin(lbl, 3, 1);
1391  MObjectSetBackgroundRGB(lbl, 74, 60, 0);
1392  MObjectSetTransparency(lbl, 0);
1393 
1394  //era _tablefrm020 e colform004
1395  tb = MCreateTableForm(colform, 8);
1397  MObjectSetForegroundRGB(tb, 255, 255, 255);
1398  MObjectSetBackgroundRGB(tb, 120, 100, 0);
1400 
1401 
1402  for (i=7;i>=0;i--)
1403  {
1404  sprintf(buf,"%d", i);
1405  lbl = MCreateLabel(tb, buf, HELV_SMALL);
1406  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1407  MObjectSetBackgroundRGB(lbl, 91, 91, 91);
1408  }
1409 
1410  for (i=7;i>=0;i--)
1411  {
1412  sprintf(buf,"%d", i);
1413  DAS.Gui.ConfigPanel.OOP[amsn][i] = MCreateImageTButtonExt(tb, "sys\\ledoff.bmp", "sys\\ledon.bmp", "", "", "", "");
1414  //MCreatePixmapFromFile(tb, "SYS\\ledoff.bmp");
1415  MObjectSetShadow(DAS.Gui.ConfigPanel.OOP[amsn][i], WS_NONE, 0, 0);
1416  //MTButtonSetCallback(DAS.Gui.ConfigPanel.OOP[amsn][i], OOP_CB , (void *) i);
1417  er = ChkDigIO(DAS.StepM.OOP[amsn], i);
1418  if(er==1)
1420  else if(er==0)
1422 
1423  // the callback has to be after the creation and the setting of the buttons status!!!!!!!!!!
1424  MTButtonSetCallback(DAS.Gui.ConfigPanel.OOP[amsn][i], OOP_CB , (void *) i);
1425  }
1426 
1427 
1428 
1429  pbh = MCreateImagePButtonExt(colform, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", "");
1430  MButtonSetImageMaskByPixel(pbh, 0, 0);
1431  MObjectSetTransparency(pbh, 255);
1432  MObjectSetShadow(pbh, WS_NONE, 0, 0);
1433  MObjectSetBackgroundRGB(pbh, 80, 60, 0);
1434  MPButtonSetCallback(pbh, PBH_CB, (void *) 7);
1435  MObjectSetResize(pbh, False, True);
1436 
1437 
1438 
1439 
1440 
1441 }
stepm StepM
Stepper motors parameters structure.
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
#define WS_NONE
Definition: Mguidefs.h:956
MOBJECT MCreatePixmapFromFile(MOBJECT parent, const char *fname)
MOBJECT lbl
Definition: DFileMan.c:42
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
void MBottomAttach(MOBJECT child, int att_type, int off, MOBJECT obj)
void MTButtonDeactivate(MOBJECT o)
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
void MTButtonActivate(MOBJECT o)
#define False
Definition: Mguidefs.h:236
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
MOBJECT OOP[AMSMAX][8]
OptoOutput Port N (N=0,1...,7), for AMSx (x=0,1,...AMSMAX-1)
void MTableFormSetColAlign(MOBJECT form, int col, int al)
void ReadInputCB(MOBJECT p, void *od, void *ad)
MOBJECT IOP[AMSMAX][8]
OptoInput Port N (N=0,1...,7), for AMSx (x=0,1,...AMSMAX-1)
#define UNDEF_ALIGN
Definition: Mguidefs.h:920
#define TIMES_SMALL
Definition: Mguidefs.h:883
int ChkDigIO(unsigned char word, int bitn)
check for digital I/O Status
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
void MTButtonSetCallback(MOBJECT button, OBJ_VALUE_CB cb, void *data)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define CENTER_ALIGN
Definition: Mguidefs.h:917
void MObjectSetFGColorFromParent(MOBJECT obj, int true_false)
void OOP_CB(MOBJECT obj, MVALUE value, void *ad)
unsigned char OOP[AMSMAX]
2 byte Word for AMS Opto insulated Output Port Status
#define HELV_SMALL
Definition: Mguidefs.h:881
#define FIXED_SMALL
Definition: Mguidefs.h:878
void PBH_CB(MOBJECT p, void *od, void *ad)
void MLabelSetMargin(MOBJECT p, int wm, int hm)
MOBJECT MCreateColForm(MOBJECT parent)
das DAS
Definition: DAS_Spat_Conf.c:56
void MButtonSetImageMaskByPixel(MOBJECT obj, int x, int y)
configpanel ConfigPanel
Configuration panel structure.
void MLabelSetAlignment(MOBJECT p, int align)
#define F_ATT_FORM
Definition: Mguidefs.h:1107
void MFormSetSpacing(MOBJECT p, int offset)
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
#define LEFT_ALIGN
Definition: Mguidefs.h:915
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MCreateRowForm(MOBJECT parent)
MOBJECT MCreateImagePButtonExt(MOBJECT parent, const char *npf, const char *apf, const char *upf, const char *non, const char *aon, const char *uon)
#define TOP_ALIGN
Definition: Mguidefs.h:918
#define WS_SHADOW_OUT
Definition: Mguidefs.h:957
MOBJECT MCreateImageTButtonExt(MOBJECT parent, const char *npf, const char *apf, const char *upf, const char *non, const char *aon, const char *uon)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CONFP_AMS_NOVA()

void CONFP_AMS_NOVA ( MOBJECT  pf)

Definition at line 1745 of file DAS_Spat_Conf.c.

References CENTER_ALIGN, ChkDigIO(), gui::ConfigPanel, nova::DigIn, nova::DigOut, F_ATT_FORM, False, FIXED_SMALL, das::Gui, HELV_SMALL, nova::INP, lbl, configpanel::lbltelap, MBottomAttach(), MCreateEdit(), MCreateImageTButtonExt(), MCreateLabel(), MCreatePButton(), MCreatePixmapFromFile(), MCreateRButton(), MCreateRowForm(), MCreateTableForm(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetText(), MObjectSetTransparency(), MPButtonSetCallback(), MTButtonActivate(), MTButtonDeactivate(), MTButtonSetCallback(), das::Nova, NOVA6612G2, NOVA7892, NOVA945GSE, NOVA_In(), NOVAIn_CB(), NOVAOut_CB(), NovaTypeCB(), TIMES_SMALL, TOP_ALIGN, True, nova::type, UNDEF_ALIGN, WDT_CB(), configpanel::WDT_edt, WDT_Task_CB(), nova::WDT_TOUT, WriteHardwareiniCB(), and WS_NONE.

Referenced by MDCreateDASConfig().

1746 {
1747 
1748  MOBJECT lbl, tb, pb, rb, rowfrm;
1749  int i, er;
1750  char buf[64];
1751 
1752  sprintf(buf, "SET NOVA MB");
1753  MObjectSetText(pf, buf);
1754 
1755 
1756  rowfrm = MCreateRowForm(pf);
1757  MObjectSetBackgroundRGB(rowfrm, 80, 60, 0);
1758  MObjectSetResize(rowfrm, True, False);
1760 
1761 
1762  lbl = MCreateLabel(rowfrm, "Select NOVA board", FIXED_SMALL);
1763  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1764  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1765  MObjectSetTransparency(lbl, 0);
1766 
1767  tb = MCreateTableForm(rowfrm, 3);
1768  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1769  MObjectSetResize(tb, True, True);
1770 
1771  rb = MCreateRButton(tb, "7892", FIXED_SMALL);
1772  MPButtonSetCallback(rb, NovaTypeCB, (void *) NOVA7892);
1774  MObjectSetShadow(rb, WS_NONE, 0, 0);
1775  MObjectSetForegroundRGB(rb, 255, 255, 255);
1776  MObjectSetBackgroundRGB(rb, 48, 20, 255);
1777  if(DAS.Nova.type == NOVA7892)
1778  MTButtonActivate(rb);
1779  else
1780  MTButtonDeactivate(rb);
1781 
1782  rb = MCreateRButton(tb, "6612G2", FIXED_SMALL);
1783  MPButtonSetCallback(rb, NovaTypeCB, (void *) NOVA6612G2);
1785  MObjectSetShadow(rb, WS_NONE, 0, 0);
1786  MObjectSetForegroundRGB(rb, 255, 255, 255);
1787  MObjectSetBackgroundRGB(rb, 48, 20, 255);
1788  if(DAS.Nova.type == NOVA6612G2)
1789  MTButtonActivate(rb);
1790  else
1791  MTButtonDeactivate(rb);
1792 
1793  rb = MCreateRButton(tb, "945GSE", FIXED_SMALL);
1794  MPButtonSetCallback(rb, NovaTypeCB, (void *) NOVA945GSE);
1796  MObjectSetShadow(rb, WS_NONE, 0, 0);
1797  MObjectSetForegroundRGB(rb, 255, 255, 255);
1798  MObjectSetBackgroundRGB(rb, 48, 20, 255);
1799  //MObjectSetUnsensitive(rb);
1800  if(DAS.Nova.type == NOVA945GSE)
1801  MTButtonActivate(rb);
1802  else
1803  MTButtonDeactivate(rb);
1804 
1805 
1806  pb = MCreatePButton(rowfrm, "Store", HELV_SMALL);
1807  MPButtonSetCallback(pb, WriteHardwareiniCB, (void *) 0);
1808 
1809 /**************************************************************/
1810  lbl = MCreateLabel(rowfrm, "Output Port", FIXED_SMALL);
1811  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1812  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1813  MObjectSetTransparency(lbl, 0);
1814 
1815  tb = MCreateTableForm(rowfrm, 4);
1816  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1817  MObjectSetResize(tb, True, True);
1818 
1819 
1820 //**********************
1821  for (i=3;i>=0;i--)
1822  {
1823  sprintf(buf,"%d", i);
1824  lbl = MCreateLabel(tb, buf, HELV_SMALL);
1825  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1826  MObjectSetBackgroundRGB(lbl, 91, 91, 91);
1827  }
1828 
1829  for (i=3;i>=0;i--)
1830  {
1831  sprintf(buf,"%d", i);
1832  pb = MCreateImageTButtonExt(tb, "sys\\ledoff.bmp", "sys\\ledon.bmp", "", "", "", "");
1833  MObjectSetShadow(pb, WS_NONE, 0, 0);
1834  er = ChkDigIO((unsigned char)DAS.Nova.DigOut, i);
1835  if(er == 1)
1836  MTButtonActivate(pb);
1837  else if(er==0)
1838  MTButtonDeactivate(pb);
1839 
1840  // the callback has to be after the creation and the setting of the buttons status!!!!!!!!!!
1841  MTButtonSetCallback(pb, NOVAOut_CB , (void *) i);
1842  }
1843 
1844 
1845 
1846  lbl = MCreateLabel(rowfrm, "Input Port", FIXED_SMALL);
1847  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1848  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1849  MObjectSetTransparency(lbl, 0);
1850 
1851 
1852  pb = MCreatePButton(rowfrm, "Read Input", TIMES_SMALL);
1853  MBottomAttach(pb, F_ATT_FORM, 0, NULL);
1855  MObjectSetForegroundRGB(pb, 255, 255, 255);
1856  MObjectSetBackgroundRGB(pb, 71, 126, 246);
1857  MPButtonSetCallback(pb, NOVAIn_CB, (void *) 0);
1858 
1859 
1860 
1861 
1862  tb = MCreateTableForm(rowfrm, 4);
1863  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1864  MObjectSetResize(tb, True, True);
1865 
1866 
1867 //**********************
1868  for (i=3;i>=0;i--)
1869  {
1870  sprintf(buf,"%d", i);
1871  lbl = MCreateLabel(tb, buf, HELV_SMALL);
1872  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1873  MObjectSetBackgroundRGB(lbl, 91, 91, 91);
1874  }
1875 
1876 
1877  er = NOVA_In(DAS.Nova.type, DAS.Nova.DigIn);
1878  for (i=3;i>=0;i--)
1879  {
1880  er = ChkDigIO(DAS.Nova.DigIn, i);
1881  sprintf(buf,"%d", i);
1882  //DAS.Nova.INP[i] = MCreateImageTButtonExt(tb, "sys\\ledoff.bmp", "sys\\ledon.bmp", "", "", "", "");
1883  if(er == 0)
1884  {
1885  DAS.Nova.INP[i] = MCreatePixmapFromFile(tb, "SYS\\ledoff.bmp");
1886  MObjectSetShadow(DAS.Nova.INP[i], WS_NONE, 0, 0);
1887  }
1888  else if(er == 1)
1889  {
1890  DAS.Nova.INP[i] = MCreatePixmapFromFile(tb, "SYS\\ledon.bmp");
1891  MObjectSetShadow(DAS.Nova.INP[i], WS_NONE, 0, 0);
1892  }
1893  //er = ChkDigIO(DAS.Nova.DigIn, i);
1894  //if(er == 1)
1895  // MTButtonActivate(DAS.Nova.INP[i]);
1896  //else if(er==0)
1897  // MTButtonDeactivate(DAS.Nova.INP[i]);
1898 
1899  // the callback has to be after the creation and the setting of the buttons status!!!!!!!!!!
1900  //MTButtonSetCallback(pb, NOVAIn_CB , (void *) i);
1901  }
1902 
1903 /*******************************************************/
1904 // Set Reset Time
1905  tb = MCreateTableForm(rowfrm, 2);
1906  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1907  MObjectSetResize(tb, True, True);
1908 
1909  lbl = MCreateLabel(tb, "Set reset time (1-255s)", FIXED_SMALL);
1910  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1911  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1912  MObjectSetTransparency(lbl, 0);
1913 
1914  sprintf(buf,"%d", DAS.Nova.WDT_TOUT);
1915  //sprintf(buf,"%d", 15);
1917 
1918 
1919  lbl = MCreateLabel(tb, "Time Elapsed", FIXED_SMALL);
1920  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1921  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1922  MObjectSetTransparency(lbl, 0);
1923 
1928 
1929 
1930  tb = MCreateTableForm(rowfrm, 3);
1931  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1932  MObjectSetResize(tb, True, True);
1933 
1934 
1935  pb = MCreatePButton(tb, "Start", HELV_SMALL);
1936  MPButtonSetCallback(pb, WDT_CB , (void *) 0);
1937 
1938 
1939  pb = MCreatePButton(tb, "Exit", HELV_SMALL);
1940 // MPButtonSetCallback(pb, MDQuitCB, (void *) 0);
1941 
1942 
1943  pb = MCreatePButton(tb, "Launch Task", HELV_SMALL);
1944  MPButtonSetCallback(pb, WDT_Task_CB, (void *) 0);
1945 
1946 
1947 
1948 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
#define WS_NONE
Definition: Mguidefs.h:956
MOBJECT MCreatePixmapFromFile(MOBJECT parent, const char *fname)
MOBJECT lbl
Definition: DFileMan.c:42
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
MOBJECT MCreateEdit(MOBJECT parent, const char *text, int len, MTFont font)
void WDT_CB(MOBJECT p, void *od, void *ad)
Definition: DAS_Spat.c:1507
void MBottomAttach(MOBJECT child, int att_type, int off, MOBJECT obj)
void MTButtonDeactivate(MOBJECT o)
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
void MTButtonActivate(MOBJECT o)
void NovaTypeCB(MOBJECT p, void *od, void *ad)
Callback for NOVA selection.
#define False
Definition: Mguidefs.h:236
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
MOBJECT WDT_edt
edit Mobject for Watch-Dog elapsed time
unsigned short DigOut
Digital Output.
#define NOVA945GSE
NOVA945GSE (SPATRAM2, GASCODNG1, GASCODNG4)
#define NOVA6612G2
NOVA6612G2 (not used in TROPOGAS, LIS, GASCODNG2/3)
#define UNDEF_ALIGN
Definition: Mguidefs.h:920
#define TIMES_SMALL
Definition: Mguidefs.h:883
void MObjectSetText(MOBJECT obj, const char *text)
void WDT_Task_CB(MOBJECT o, void *od, void *ad)
Definition: DAS_Spat.c:1547
int ChkDigIO(unsigned char word, int bitn)
check for digital I/O Status
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
void MTButtonSetCallback(MOBJECT button, OBJ_VALUE_CB cb, void *data)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define CENTER_ALIGN
Definition: Mguidefs.h:917
#define HELV_SMALL
Definition: Mguidefs.h:881
#define FIXED_SMALL
Definition: Mguidefs.h:878
das DAS
Definition: DAS_Spat_Conf.c:56
void NOVAIn_CB(MOBJECT obj, void *od, void *ad)
MOBJECT INP[4]
Input widgets.
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
nova Nova
NOVA structure.
configpanel ConfigPanel
Configuration panel structure.
#define F_ATT_FORM
Definition: Mguidefs.h:1107
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void NOVAOut_CB(MOBJECT obj, MVALUE value, void *ad)
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
int NOVA_In(int novatype, unsigned int DigIn)
Read the NOVA Input port.
Definition: DAS_Spat.c:1306
#define NOVA7892
NOVA7892 monoboard (old)
unsigned char DigIn
Digital Input.
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
int WriteHardwareiniCB(MOBJECT shell, void *od, void *ad)
Write hardware.ini file .
int type
type of NOVA monoboard used (7892 or 945GSE)
MOBJECT MCreateRowForm(MOBJECT parent)
unsigned short WDT_TOUT
WDT timeout.
#define TOP_ALIGN
Definition: Mguidefs.h:918
MOBJECT lbltelap
label elapsed time (for WDT)
MOBJECT MCreateImageTButtonExt(MOBJECT parent, const char *npf, const char *apf, const char *upf, const char *non, const char *aon, const char *uon)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CONFP_AMS_SM_OFFSET()

void CONFP_AMS_SM_OFFSET ( MOBJECT  obj,
int  nams 
)

Definition at line 1663 of file DAS_Spat_Conf.c.

References ActEditCB(), CENTER_ALIGN, paramini::EqType, False, FIXED_SMALL, GASCODNG4, lbl, LEFT_ALIGN, MCreateClippedEdit(), MCreateLabel(), MCreateRowForm(), MCreateTableForm(), MEditSetActCallback(), MEditSetValCallback(), Mir_Code, Mir_CodeTropo, MLabelSetAlignment(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetTransparency(), MTableFormSetColAlign(), paramini::Offset, das::Paramini, SPATRAM3, TOP_ALIGN, TROPOGAS, and ValidateCB().

Referenced by CONFP_AMS_Utility().

1664 {
1665 
1666  char buf[64];
1667  char str[512];
1668  MOBJECT lbl, tb, rowform1, edit;
1669  int i, k;
1670 
1671 
1672  lbl = MCreateLabel(obj, "Devices Offsets", FIXED_SMALL);
1674  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1675  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1676  MObjectSetTransparency(lbl, 0);
1677 // MObjectSetCompositeWidth(lbl, 347);
1678 
1679  rowform1 = MCreateRowForm(obj);
1680  MObjectSetBackgroundRGB(rowform1, 80, 60, 0);
1681  MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN);
1682  MObjectSetResize(rowform1, False, False);
1683  MObjectSetCompositeWidth(rowform1, 347);
1684 
1685  lbl = MCreateLabel(rowform1, "Input Mirror", FIXED_SMALL);
1686  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1687  MObjectSetTransparency(lbl, 0);
1688  MObjectSetCompositeWidth(lbl, 347);
1689 
1690  tb = MCreateTableForm(rowform1, 5);
1693  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1695  MObjectSetCompositeWidth(tb, 347);
1696 
1697  lbl = MCreateLabel(tb, "Home", FIXED_SMALL);
1699  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1700  MObjectSetTransparency(lbl, 0);
1701  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
1702 
1703  for(i=0;i<4;i++)
1704  {
1706  sprintf(buf, "%s",Mir_CodeTropo[i]);
1707  else
1708  sprintf(buf, "%s",Mir_Code[i]);
1709 
1710  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
1712  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1713  MObjectSetTransparency(lbl, 0);
1714  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
1715  }
1716 
1717  for(i=0;i<5;i++)
1718  {
1719  sprintf(buf, "%d",DAS.Paramini.Offset[i]);
1720  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
1722  MObjectSetForegroundRGB(edit, 255, 255, 255);
1723  MObjectSetBackgroundRGB(edit, 120, 100, 0);
1724 
1725  MObjectSetCompositeWidth(edit, 65);
1726  k= i + 300;
1727  MEditSetValCallback(edit, ValidateCB, (void *) k);
1728  MEditSetActCallback(edit, ActEditCB, (void *) k);
1729  }
1730 
1731 
1732  sprintf(str," Type the new 'offset' value for the Home position\n then push TAB\n then go to the MAIN PANEL\n then push 'H_Mirr'\n DO NOT PUSH the 'Apply' button to test the new offset!");
1733  lbl = MCreateLabel(obj, str, FIXED_SMALL);
1736  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1737  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1738  MObjectSetTransparency(lbl, 0);
1739 
1740 
1741 
1742 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT lbl
Definition: DFileMan.c:42
const char * Mir_Code[]
const char array for the realisation of the Mirrors buttons in the Mirror shell
Definition: DAS_Spat.c:231
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)
int Offset[16]
Offset of the hardware devices (Input Mirror (5), Grating, Filter Wheel...)
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 ...
void MTableFormSetColAlign(MOBJECT form, int col, int al)
MOBJECT MCreateClippedEdit(MOBJECT parent, const char *text, int len, int clip_len, MTFont font)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
#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)
das DAS
Definition: DAS_Spat_Conf.c:56
#define GASCODNG4
GASCODNG 4.
#define SPATRAM3
SPATRAM3.
void MLabelSetAlignment(MOBJECT p, int align)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
void * MOBJECT
Definition: Mguidefs.h:192
#define LEFT_ALIGN
Definition: Mguidefs.h:915
int EqType
Spectrometer Type.
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MCreateRowForm(MOBJECT parent)
#define TOP_ALIGN
Definition: Mguidefs.h:918
const char * Mir_CodeTropo[]
const char array for the realisation of the Mirrors buttons in the Mirror shell for TROPOGAS ...
Definition: DAS_Spat.c:234
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:

§ CONFP_AMS_TabSingMotor()

void CONFP_AMS_TabSingMotor ( int  id,
int  snum,
MOBJECT  tb1 
)

Definition at line 757 of file DAS_Spat_Conf.c.

References gui::ConfigPanel, stepm::cop_perc, DB_HomeTypeCB(), DB_TestHomeTypeCB(), False, FIXED_SMALL, das::Gui, HELV_SMALL, stepm::hometype, int2hertz(), int2perc(), lbl, LEFT_ALIGN, lfraz, listval2fraz(), MCreateLabel(), MCreateOptionEdit(), MCreatePButton(), MCreateTableForm(), MEditDisableEditing(), MEditSetFilter(), MLabelSetAlignment(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetText(), MObjectSetTransparency(), MOptionEditGetList(), MOptionEditSetListCallback(), MPButtonSetCallback(), MSListAddItem(), MSListSelectElement(), stepm::multiplier, stepm::power, RIGHT_ALIGN, stepm::slope, configpanel::SM_hometype, configpanel::SM_multiplier, configpanel::SM_pbtesthome, configpanel::SM_power, configpanel::SM_slope, configpanel::SM_speed, configpanel::SM_step, stepm::speed, stepm::speed_Hz, stepm::step, stepm::step_fraz, das::StepM, TIMES_SMALL, TOP_ALIGN, and True.

Referenced by CONFP_AMS().

758 {
759  char buf[64], str[64];
760  MOBJECT lbl, tb;
761  int i;
762  double percentuale, speedhz;
763  MOBJECT list;
764  float multip;
765  int selectedmult;
766 
767  tb = MCreateTableForm(tb1, 2);
768  MObjectSetBackgroundRGB(tb, 80, 60, 0);
769  MObjectSetResize(tb, True, True);
770 
771 /*********************************************************************/
772  //Power
773  lbl = MCreateLabel(tb, "Power:", HELV_SMALL);
776  MObjectSetForegroundRGB(lbl, 255, 255, 255);
777  MObjectSetTransparency(lbl, 0);
779 
780 
781  sprintf(buf, "%.1f%%",DAS.StepM.cop_perc[id][snum]);
782  DAS.Gui.ConfigPanel.SM_power[id][snum] = MCreateOptionEdit(tb, buf, 6, 6, 6, FIXED_SMALL);
783  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_power[id][snum], 255, 255, 255);
784  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_power[id][snum], 120, 100, 0);
786  list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_power[id][snum] );
787  for(i=1; i<77; i++)
788  {
789  percentuale = int2perc(0, i);
790  sprintf(buf, "%.1f%%",percentuale);
791  MSListAddItem(list, buf, 0L);
792  }
793 
794  MSListSelectElement(list, DAS.StepM.power[id][snum] - 1);
795 /**********************************************************************/
796 
797 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
798  //Step
799  lbl = MCreateLabel(tb, "Step:", HELV_SMALL);
802  MObjectSetForegroundRGB(lbl, 255, 255, 255);
803  MObjectSetTransparency(lbl, 0);
805 
806  //DAS.StepM.step_fraz[id][snum];
807  //MObjectGetText(DAS.Gui.ContrPanel.step[id][snum], buf);
808  DAS.Gui.ConfigPanel.SM_step[id][snum] = MCreateOptionEdit(tb, DAS.StepM.step_fraz[id][snum], 6, 6, 6, FIXED_SMALL);
809  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_step[id][snum], 255, 255, 255);
810  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_step[id][snum], 120, 100, 0);
812  list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_step[id][snum] );
813  for(i=0; i<14; i++)
814  {
815  listval2fraz(0, i);
816  sprintf(lfraz, "%s", lfraz);
817  MSListAddItem(list, lfraz, 0L);
818  }
819  MSListSelectElement(list, DAS.StepM.step[id][snum]);
820 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
821 
822  /*ççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççç // Slope lbl = MCreateLabel(tb, "Slope:", HELV_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); sprintf(buf, "%d",DAS.StepM.slope[id][snum]); DAS.Gui.ConfigPanel.SM_slope[id][snum] = MCreateOptionEdit(tb, buf, 5, 5, 6, FIXED_SMALL); MEditSetFilter(DAS.Gui.ConfigPanel.SM_slope[id][snum], 260, ""); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_slope[id][snum], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_slope[id][snum], 120, 100, 0); MObjectAlign(DAS.Gui.ConfigPanel.SM_slope[id][snum], RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.SM_slope[id][snum]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_slope[id][snum]); for(i=1; i<256; i++) { sprintf(buf, "%d", i); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, DAS.StepM.slope[id][snum] - 1); /*ççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççç*/ /********ùùùùùùùùùùùùùùùùùùùùùùùùùù********/ //Speed lbl = MCreateLabel(tb, "Speed(Hz):", HELV_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); sprintf(buf, "%.3lf",DAS.StepM.speed_Hz[id][snum]); DAS.Gui.ConfigPanel.SM_speed[id][snum]= MCreateOptionEdit(tb, buf, 6, 6, 6, FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.SM_speed[id][snum], RIGHT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_speed[id][snum], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_speed[id][snum], 120, 100, 0); MEditDisableEditing(DAS.Gui.ConfigPanel.SM_speed[id][snum] ); list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_speed[id][snum] ); for(i=0; i<256; i++) { speedhz = int2hertz(0, i); sprintf(buf, "%.3lf", speedhz); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, DAS.StepM.speed[id][snum]); /********ùùùùùùùùùùùùùùùùùùùùùùùùùù********/ /*****+++++++++++++++++++++++++++++++*******/ //Multiplier lbl = MCreateLabel(tb, "Multiplier", HELV_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 74, 60, 0); MObjectSetResize(lbl, False, False); sprintf(buf, "%d",DAS.StepM.multiplier[id][snum]); DAS.Gui.ConfigPanel.SM_multiplier[id][snum] = MCreateOptionEdit(tb, buf, 4, 4, 6, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_multiplier[id][snum] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_multiplier[id][snum] , 120, 100, 0); MObjectAlign(DAS.Gui.ConfigPanel.SM_multiplier[id][snum], RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.SM_multiplier[id][snum]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_multiplier[id][snum]); for(i=1; i<31; i++) { if (i!=0) { multip = (float)i/2 + 0.5; sprintf(buf, "%.1lf", multip); MSListAddItem(list, buf, (void *) i); if (atof(buf) == DAS.StepM.multiplier[id][snum]) { selectedmult = i; sprintf(str, "%s", buf); } } } MSListSelectElement(list, selectedmult-1); MObjectSetText (DAS.Gui.ConfigPanel.SM_multiplier[id][snum], str); //MSTextSetString(list, str); //MSListSelectItem(list, str); //MSListSelectElement(list, DAS.StepM.multiplier[id][snum] - 1); // MOptionEditSetListCallback(CONFP.multip[nams][STEPM.SM1], ListMultipCB, (void *) STEPM.SM1); /*****+++++++++++++++++++++++++++++++++******/ DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum] = MCreatePButton(tb, "HOME", TIMES_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], 94, 111, 0); if (id == 0 && snum == 0) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 0); if (id == 0 && snum == 1) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 1); if (id == 1 && snum == 0) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 2); if (id == 1 && snum == 1) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 3); if (id == 2 && snum == 0) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 4); if (id == 2 && snum == 1) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 5); // MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) snum); if (DAS.StepM.hometype[id][snum] == 0) sprintf(buf, "%s","Standard"); if (DAS.StepM.hometype[id][snum] == 1) sprintf(buf, "%s","Default"); if (DAS.StepM.hometype[id][snum] == 2) sprintf(buf, "%s","Track"); DAS.Gui.ConfigPanel.SM_hometype[id][snum] = MCreateOptionEdit(tb, buf, 8, 8, 2, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_hometype[id][snum] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_hometype[id][snum] , 120, 100, 0); MObjectAlign(DAS.Gui.ConfigPanel.SM_hometype[id][snum], RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.SM_hometype[id][snum]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_hometype[id][snum]); for(i=0; i<3; i++) { if (i==0) { sprintf(buf, "%s", "Standard"); MSListAddItem(list, buf, (void *) i); } if (i==1) { sprintf(buf, "%s", "Default"); MSListAddItem(list, buf, (void *) i); } if (i==2) { sprintf(buf, "%s", "Track"); MSListAddItem(list, buf, (void *) i); } } MSListSelectElement(list, DAS.StepM.hometype[id][snum]); if (id == 0 && snum == 0) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 0); if (id == 0 && snum == 1) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 1); if (id == 1 && snum == 0) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 2); if (id == 1 && snum == 1) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 3); if (id == 2 && snum == 0) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 4); if (id == 2 && snum == 1) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 5); // pla = MSListGetSelected(list); // sprintf(buf, "%s",pla->item); // MObjectSetText(CONFP.power[nams][STEPM.SM1], buf); } */
823  // Slope
824 
825  lbl = MCreateLabel(tb, "Slope:", HELV_SMALL);
828  MObjectSetForegroundRGB(lbl, 255, 255, 255);
829  MObjectSetTransparency(lbl, 0);
831 
832 
833  sprintf(buf, "%d",DAS.StepM.slope[id][snum]);
834  DAS.Gui.ConfigPanel.SM_slope[id][snum] = MCreateOptionEdit(tb, buf, 5, 5, 6, FIXED_SMALL);
835  MEditSetFilter(DAS.Gui.ConfigPanel.SM_slope[id][snum], 260, "");
836  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_slope[id][snum], 255, 255, 255);
837  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_slope[id][snum], 120, 100, 0);
840 
841  list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_slope[id][snum]);
842  for(i=1; i<256; i++)
843  {
844  sprintf(buf, "%d", i);
845  MSListAddItem(list, buf, 0L);
846  }
847  MSListSelectElement(list, DAS.StepM.slope[id][snum] - 1);
848  /*ççççççççççççççççççççççççççççççççççççççççççççççççççççççççççççç /********ùùùùùùùùùùùùùùùùùùùùùùùùùù********/ //Speed lbl = MCreateLabel(tb, "Speed(Hz):", HELV_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetTransparency(lbl, 0); MObjectSetResize(lbl, False, False); sprintf(buf, "%.3lf",DAS.StepM.speed_Hz[id][snum]); DAS.Gui.ConfigPanel.SM_speed[id][snum]= MCreateOptionEdit(tb, buf, 6, 6, 6, FIXED_SMALL); MObjectAlign(DAS.Gui.ConfigPanel.SM_speed[id][snum], RIGHT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_speed[id][snum], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_speed[id][snum], 120, 100, 0); MEditDisableEditing(DAS.Gui.ConfigPanel.SM_speed[id][snum] ); list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_speed[id][snum] ); for(i=0; i<256; i++) { speedhz = int2hertz(0, i); sprintf(buf, "%.3lf", speedhz); MSListAddItem(list, buf, 0L); } MSListSelectElement(list, DAS.StepM.speed[id][snum]); /********ùùùùùùùùùùùùùùùùùùùùùùùùùù********/ /*****+++++++++++++++++++++++++++++++*******/ //Multiplier lbl = MCreateLabel(tb, "Multiplier", HELV_SMALL); MLabelSetAlignment(lbl, LEFT_ALIGN); MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN); MObjectSetForegroundRGB(lbl, 255, 255, 255); MObjectSetBackgroundRGB(lbl, 74, 60, 0); MObjectSetResize(lbl, False, False); sprintf(buf, "%d",DAS.StepM.multiplier[id][snum]); DAS.Gui.ConfigPanel.SM_multiplier[id][snum] = MCreateOptionEdit(tb, buf, 4, 4, 6, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_multiplier[id][snum] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_multiplier[id][snum] , 120, 100, 0); MObjectAlign(DAS.Gui.ConfigPanel.SM_multiplier[id][snum], RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.SM_multiplier[id][snum]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_multiplier[id][snum]); for(i=1; i<31; i++) { if (i!=0) { multip = (float)i/2 + 0.5; sprintf(buf, "%.1lf", multip); MSListAddItem(list, buf, (void *) i); if (atof(buf) == DAS.StepM.multiplier[id][snum]) { selectedmult = i; sprintf(str, "%s", buf); } } } MSListSelectElement(list, selectedmult-1); MObjectSetText (DAS.Gui.ConfigPanel.SM_multiplier[id][snum], str); //MSTextSetString(list, str); //MSListSelectItem(list, str); //MSListSelectElement(list, DAS.StepM.multiplier[id][snum] - 1); // MOptionEditSetListCallback(CONFP.multip[nams][STEPM.SM1], ListMultipCB, (void *) STEPM.SM1); /*****+++++++++++++++++++++++++++++++++******/ DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum] = MCreatePButton(tb, "HOME", TIMES_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], 94, 111, 0); if (id == 0 && snum == 0) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 0); if (id == 0 && snum == 1) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 1); if (id == 1 && snum == 0) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 2); if (id == 1 && snum == 1) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 3); if (id == 2 && snum == 0) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 4); if (id == 2 && snum == 1) MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) 5); // MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) snum); if (DAS.StepM.hometype[id][snum] == 0) sprintf(buf, "%s","Standard"); if (DAS.StepM.hometype[id][snum] == 1) sprintf(buf, "%s","Default"); if (DAS.StepM.hometype[id][snum] == 2) sprintf(buf, "%s","Track"); DAS.Gui.ConfigPanel.SM_hometype[id][snum] = MCreateOptionEdit(tb, buf, 8, 8, 2, FIXED_SMALL); MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_hometype[id][snum] , 255, 255, 255); MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_hometype[id][snum] , 120, 100, 0); MObjectAlign(DAS.Gui.ConfigPanel.SM_hometype[id][snum], RIGHT_ALIGN, TOP_ALIGN); MEditDisableEditing(DAS.Gui.ConfigPanel.SM_hometype[id][snum]); list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_hometype[id][snum]); for(i=0; i<3; i++) { if (i==0) { sprintf(buf, "%s", "Standard"); MSListAddItem(list, buf, (void *) i); } if (i==1) { sprintf(buf, "%s", "Default"); MSListAddItem(list, buf, (void *) i); } if (i==2) { sprintf(buf, "%s", "Track"); MSListAddItem(list, buf, (void *) i); } } MSListSelectElement(list, DAS.StepM.hometype[id][snum]); if (id == 0 && snum == 0) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 0); if (id == 0 && snum == 1) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 1); if (id == 1 && snum == 0) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 2); if (id == 1 && snum == 1) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 3); if (id == 2 && snum == 0) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 4); if (id == 2 && snum == 1) MOptionEditSetListCallback(DAS.Gui.ConfigPanel.SM_hometype[id][snum], DB_HomeTypeCB, (void *) 5); // pla = MSListGetSelected(list); // sprintf(buf, "%s",pla->item); // MObjectSetText(CONFP.power[nams][STEPM.SM1], buf); } */
849 
850 
851  /********ùùùùùùùùùùùùùùùùùùùùùùùùùù********/
852  //Speed
853  lbl = MCreateLabel(tb, "Speed(Hz):", HELV_SMALL);
856  MObjectSetForegroundRGB(lbl, 255, 255, 255);
857  MObjectSetTransparency(lbl, 0);
859 
860  sprintf(buf, "%.3lf",DAS.StepM.speed_Hz[id][snum]);
861  DAS.Gui.ConfigPanel.SM_speed[id][snum]= MCreateOptionEdit(tb, buf, 6, 6, 6, FIXED_SMALL);
863  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_speed[id][snum], 255, 255, 255);
864  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_speed[id][snum], 120, 100, 0);
866  list = MOptionEditGetList(DAS.Gui.ConfigPanel.SM_speed[id][snum] );
867  for(i=0; i<256; i++)
868  {
869  speedhz = int2hertz(0, i);
870  sprintf(buf, "%.3lf", speedhz);
871  MSListAddItem(list, buf, 0L);
872  }
873  MSListSelectElement(list, DAS.StepM.speed[id][snum]);
874 
875  /********ùùùùùùùùùùùùùùùùùùùùùùùùùù********/
876 
877 
878  /*****+++++++++++++++++++++++++++++++*******/
879  //Multiplier
880  lbl = MCreateLabel(tb, "Multiplier", HELV_SMALL);
883  MObjectSetForegroundRGB(lbl, 255, 255, 255);
884  MObjectSetBackgroundRGB(lbl, 74, 60, 0);
886 
887 
888  sprintf(buf, "%d",DAS.StepM.multiplier[id][snum]);
889  DAS.Gui.ConfigPanel.SM_multiplier[id][snum] = MCreateOptionEdit(tb, buf, 4, 4, 6, FIXED_SMALL);
890  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_multiplier[id][snum] , 255, 255, 255);
891  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_multiplier[id][snum] , 120, 100, 0);
895  for(i=1; i<31; i++)
896  {
897 
898  if (i!=0)
899  {
900  multip = (float)i/2 + 0.5;
901 
902  sprintf(buf, "%.1lf", multip);
903  MSListAddItem(list, buf, (void *) i);
904  if (atof(buf) == DAS.StepM.multiplier[id][snum])
905  {
906  selectedmult = i;
907  sprintf(str, "%s", buf);
908  }
909  }
910  }
911 
912 
913  MSListSelectElement(list, selectedmult-1);
915  //MSTextSetString(list, str);
916  //MSListSelectItem(list, str);
917  //MSListSelectElement(list, DAS.StepM.multiplier[id][snum] - 1);
918 
919 // MOptionEditSetListCallback(CONFP.multip[nams][STEPM.SM1], ListMultipCB, (void *) STEPM.SM1);
920 
921  /*****+++++++++++++++++++++++++++++++++******/
922 
923 
924 
925  DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum] = MCreatePButton(tb, "HOME", TIMES_SMALL);
926  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], 255, 255, 255);
928 
929  if (id == 0 && snum == 0)
931  if (id == 0 && snum == 1)
933  if (id == 1 && snum == 0)
935  if (id == 1 && snum == 1)
937  if (id == 2 && snum == 0)
939  if (id == 2 && snum == 1)
941 
942 
943 // MPButtonSetCallback(DAS.Gui.ConfigPanel.SM_pbtesthome[id][snum], DB_TestHomeTypeCB, (void *) snum);
944 
945  if (DAS.StepM.hometype[id][snum] == 0)
946  sprintf(buf, "%s","Standard");
947  if (DAS.StepM.hometype[id][snum] == 1)
948  sprintf(buf, "%s","Default");
949  if (DAS.StepM.hometype[id][snum] == 2)
950  sprintf(buf, "%s","Track");
951 
952  DAS.Gui.ConfigPanel.SM_hometype[id][snum] = MCreateOptionEdit(tb, buf, 8, 8, 2, FIXED_SMALL);
953  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.SM_hometype[id][snum] , 255, 255, 255);
954  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.SM_hometype[id][snum] , 120, 100, 0);
958  for(i=0; i<3; i++)
959  {
960 
961  if (i==0)
962  {
963  sprintf(buf, "%s", "Standard");
964  MSListAddItem(list, buf, (void *) i);
965  }
966  if (i==1)
967  {
968  sprintf(buf, "%s", "Default");
969  MSListAddItem(list, buf, (void *) i);
970  }
971  if (i==2)
972  {
973  sprintf(buf, "%s", "Track");
974  MSListAddItem(list, buf, (void *) i);
975  }
976  }
977 
978  MSListSelectElement(list, DAS.StepM.hometype[id][snum]);
979  if (id == 0 && snum == 0)
981  if (id == 0 && snum == 1)
983  if (id == 1 && snum == 0)
985  if (id == 1 && snum == 1)
987  if (id == 2 && snum == 0)
989  if (id == 2 && snum == 1)
991 // pla = MSListGetSelected(list);
992 // sprintf(buf, "%s",pla->item);
993 // MObjectSetText(CONFP.power[nams][STEPM.SM1], buf);
994 
995 }
void MEditDisableEditing(MOBJECT edit)
stepm StepM
Stepper motors parameters structure.
#define RIGHT_ALIGN
Definition: Mguidefs.h:916
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
int hometype[AMSMAX][2]
MOBJECT lbl
Definition: DFileMan.c:42
MOBJECT MOptionEditGetList(MOBJECT ce)
MOBJECT SM_multiplier[AMSMAX][2]
MOBJECT SM_hometype[AMSMAX][2]
void MOptionEditSetListCallback(MOBJECT obj, LIST_ACT_CB cb, void *data)
void DB_TestHomeTypeCB(MOBJECT p, void *od, void *ad)
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)
int slope[AMSMAX][2]
Stepper Motors Slope.
void MSListSelectElement(MOBJECT p, long n)
float multiplier[AMSMAX][2]
multiplier, > 0 multiplier, < 0 demultiplier
MOBJECT MCreateOptionEdit(MOBJECT parent, const char *text, int len, int clip_len, int nrow, MTFont font)
#define TIMES_SMALL
Definition: Mguidefs.h:883
void MObjectSetText(MOBJECT obj, const char *text)
MOBJECT SM_power[AMSMAX][2]
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define HELV_SMALL
Definition: Mguidefs.h:881
#define FIXED_SMALL
Definition: Mguidefs.h:878
MOBJECT SM_step[AMSMAX][2]
das DAS
Definition: DAS_Spat_Conf.c:56
MOBJECT SM_slope[AMSMAX][2]
double int2hertz(int mod, int k)
MOBJECT SM_pbtesthome[AMSMAX][2]
double cop_perc[AMSMAX][2]
Stepper Motors Power percent.
char lfraz[6]
Definition: DAS_Spat_Conf.c:94
configpanel ConfigPanel
Configuration panel structure.
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
char step_fraz[AMSMAX][2][6]
Stepper Motors Step fraction.
void MEditSetFilter(MOBJECT edit, int filter, const char *extra_chars)
void MLabelSetAlignment(MOBJECT p, int align)
MOBJECT tb1
Definition: DFileMan.c:41
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
int speed[AMSMAX][2]
Stepper Motors Speed.
int step[AMSMAX][2]
Stepper Motors Step.
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
#define LEFT_ALIGN
Definition: Mguidefs.h:915
double speed_Hz[AMSMAX][2]
Stepper Motors Speed [Hz].
int MSListAddItem(MOBJECT p, const char *item, void *data)
void listval2fraz(int mod, int val)
Decimal value to ratio value The decimal value indicating the fractioning of the step is translated i...
void DB_HomeTypeCB(MOBJECT p, LIST_ACT *la, void *ad)
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT SM_speed[AMSMAX][2]
#define TOP_ALIGN
Definition: Mguidefs.h:918
int power[AMSMAX][2]
Stepper Motors Power.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CONFP_AMS_Utility()

void CONFP_AMS_Utility ( MOBJECT  pf)

Definition at line 1950 of file DAS_Spat_Conf.c.

References CENTER_ALIGN, CONFP_AMS_SM_OFFSET(), False, MCreateRowForm(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetResize(), MObjectSetText(), TOP_ALIGN, and True.

Referenced by MDCreateDASConfig().

1951 {
1952 
1953  MOBJECT rowfrm, rowfrm1;
1954 // int er;
1955  char buf[64];
1956 
1957  sprintf(buf, "OFFSET");
1958  MObjectSetText(pf, buf);
1959 
1960 
1961  rowfrm = MCreateRowForm(pf);
1962  MObjectSetBackgroundRGB(rowfrm, 80, 60, 0);
1963  MObjectSetResize(rowfrm, True, False);
1965 /*
1966  lbl = MCreateLabel(rowfrm, "HOME MODE", FIXED_SMALL);
1967  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1968  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
1969  MObjectSetTransparency(lbl, 0);
1970 
1971  tb = MCreateTableForm(rowfrm, 2);
1972  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1973  MObjectSetResize(tb, True, True);
1974 
1975  if(DAS.Paramini.EqType == SPATRAM)
1976  {
1977  for(i=0;i<6;i++)
1978  FrmStepperHomeMode(i, tb);
1979  }
1980  else
1981  {
1982  for(i=0;i<4;i++)
1983  FrmStepperHomeMode(i, tb);
1984  }
1985 */
1986  //NOVA DIGITAL I/O
1987  rowfrm1 = MCreateRowForm(pf);
1988  MObjectSetBackgroundRGB(rowfrm1, 80, 60, 0);
1989  MObjectSetResize(rowfrm1, True, False);
1990  MObjectAlign(rowfrm1, CENTER_ALIGN, TOP_ALIGN);
1991 
1992 
1993  CONFP_AMS_SM_OFFSET(rowfrm, 0);
1994 
1995 
1996 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
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 MObjectSetText(MOBJECT obj, const char *text)
#define CENTER_ALIGN
Definition: Mguidefs.h:917
void CONFP_AMS_SM_OFFSET(MOBJECT obj, int nams)
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
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:

§ CONFP_opt_page1()

void CONFP_opt_page1 ( int  mod,
MOBJECT  obj 
)

Definition at line 4132 of file DAS_Spat_Conf.c.

References ActEditCB(), ApplyImgCB(), optionini::avgautor, optionini::avgmode, gui::ConfigPanel, DB_AVGAutoR_CB(), DB_ImgTypeCB(), DB_MeasMode_CB(), DB_RadioAvgModeCB(), DB_RadioFNSelCB(), DB_RadioModeSelCB(), DB_RadioPixCorrCB(), optionini::DEFPIXFILENAME, das::DOption, False, optionini::filename, FIXED_SMALL, configpanel::FixMeasNum, configpanel::FixTExp, das::Gui, optionini::imgtype, lbl, configpanel::lblAvg, configpanel::lblCorrPixF, LEFT_ALIGN, MCreateClippedEdit(), MCreateColForm(), MCreateLabel(), MCreatePButton(), MCreateRButton(), MCreateTableForm(), optionini::measmode, MEditSetActCallback(), MEditSetValCallback(), MLabelSetAlignment(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetText(), MObjectSetTransparency(), MPButtonSetCallback(), MRButtonActivate(), N_AVG, configpanel::n_avg, p, configpanel::pbBrowseCorrPixF, optionini::pixcorr, configpanel::rbCorrPix, RIGHT_ALIGN, optionini::savingmode, SelDefPixFileCB(), configpanel::tbavg, TOP_ALIGN, TOTTEXP, True, UNDEF_ALIGN, UnderOverPixCB(), ValidateCB(), and WS_ETCHED_IN.

Referenced by CONFP_Options().

4133 {
4134 
4135  MOBJECT rowform; // generic row form
4136 
4137  MOBJECT pb, rb ;
4138  MOBJECT colform;
4139 // MOBJECT _tbutton000;
4140 // MOBJECT _tbutton001;
4141 // MOBJECT tbavg;
4142  MOBJECT lbl;
4143  MOBJECT tb; // generic table object
4144  char buf[64];
4145  int k, *p;
4146 
4147  MObjectSetText(obj, "Page 1");
4148 
4149  /***************************************************************************/
4150  /*********** Saving Mode Section - Start ****************************/
4151  /***************************************************************************/
4152  lbl = MCreateLabel(obj, "SAVING OPTIONS", FIXED_SMALL);
4153  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4154  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4155  MObjectSetTransparency(lbl, 0);
4156 
4157 
4158  tb = MCreateTableForm(obj, 3);
4159  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4160  MObjectSetResize(tb, True, False);
4161 
4162  lbl = MCreateLabel(tb, "Saving Mode:", FIXED_SMALL);
4163  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4164  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4165  MObjectSetTransparency(lbl, 0);
4166  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4167  MObjectSetCompositeWidth(lbl, 150);
4169 
4170  rb = MCreateRButton(tb, "ASCII", FIXED_SMALL);
4171  MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 0);
4173  MObjectSetForegroundRGB(rb, 255, 255, 255);
4174  MObjectSetCompositeWidth(rb, 90);
4175  if(!DAS.DOption.savingmode)
4176  MRButtonActivate(rb);
4177 
4178 
4179  rb = MCreateRButton(tb, "Binary", FIXED_SMALL);
4180  MPButtonSetCallback(rb, DB_RadioModeSelCB, (void *) 1);
4182  MObjectSetForegroundRGB(rb, 255, 255, 255);
4183  MObjectSetCompositeWidth(rb, 90);
4184  if(DAS.DOption.savingmode)
4185  MRButtonActivate(rb);
4186 
4187  /***************************************************************************/
4188  /*********** Saving Mode Section - End ******************************/
4189  /***************************************************************************/
4190  /***************************************************************************/
4191  /*********** File Name Type Section - Start *************************/
4192  /***************************************************************************/
4193 
4194 
4195  tb = MCreateTableForm(obj, 3);
4196  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4197  MObjectSetResize(tb, True, False);
4198 
4199  lbl = MCreateLabel(tb, "Saving File Names:", FIXED_SMALL);
4200  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4201  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4202  MObjectSetTransparency(lbl, 0);
4203  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4204  MObjectSetCompositeWidth(lbl, 150);
4206 
4207  rb = MCreateRButton(tb, "Free ", FIXED_SMALL);
4208  MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 0);
4210  MObjectSetForegroundRGB(rb, 255, 255, 255);
4211  MObjectSetCompositeWidth(rb, 90);
4212  if(!DAS.DOption.filename)
4213  MRButtonActivate(rb);
4214 
4215  rb = MCreateRButton(tb, "Automatic", FIXED_SMALL);
4216  MPButtonSetCallback(rb, DB_RadioFNSelCB, (void *) 1);
4218  MObjectSetForegroundRGB(rb, 255, 255, 255);
4219  MObjectSetCompositeWidth(rb, 90);
4220  //MObjectSetResize(rb, False, False);
4221  if(DAS.DOption.filename)
4222  MRButtonActivate(rb);
4223  /***************************************************************************/
4224  /*********** File Name Type Section - End ***************************/
4225  /***************************************************************************/
4226 
4227  /***************************************************************************/
4228  /*********** START IMAGE TYPE SECTION *******************************/
4229  /***************************************************************************/
4230  lbl = MCreateLabel(obj, "Type of Images:", FIXED_SMALL);
4231  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4232  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4233  MObjectSetTransparency(lbl, 0);
4234  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4235  MObjectSetCompositeWidth(lbl, 200);
4236 
4237  rowform = MCreateTableForm(obj, 3);
4238  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
4239  MObjectSetResize(rowform, True, False);
4240 
4241  rb = MCreateRButton(rowform, "MONO ", FIXED_SMALL);
4242  MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 0);
4244  MObjectSetForegroundRGB(rb, 255, 255, 255);
4245  MObjectSetCompositeWidth(rb, 85);
4246  if(!DAS.DOption.imgtype)
4247  MRButtonActivate(rb);
4248 
4249  rb = MCreateRButton(rowform, "RGB", FIXED_SMALL);
4250  MPButtonSetCallback(rb, DB_ImgTypeCB, (void *) 1);
4252  MObjectSetForegroundRGB(rb, 255, 255, 255);
4253  MObjectSetResize(rb, False, False);
4254  if(DAS.DOption.imgtype)
4255  MRButtonActivate(rb);
4256 
4257  pb = MCreatePButton(rowform, "Apply img", FIXED_SMALL);
4258  MPButtonSetCallback(pb, ApplyImgCB, (void *) 0);
4259  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4260  MObjectSetCompositeWidth(pb, 74);
4261  /***************************************************************************/
4262  /*********** END IMAGE TYPE SECTION *******************************/
4263  /***************************************************************************/
4264 
4265 
4266  /***************************************************************************/
4267  /*********** START AVERAGING SECTION *******************************/
4268  /***************************************************************************/
4272 
4273 
4274 // lbl = MCreateLabel(obj, "AVERAGE", FIXED_SMALL);
4275  lbl = MCreateLabel(DAS.Gui.ConfigPanel.tbavg, "AVERAGE", FIXED_SMALL);
4276  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4277  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4278  MObjectSetTransparency(lbl, 0);
4279 // MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4280 // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4281 // MObjectSetCompositeWidth(lbl, 200);
4282 
4283 
4284 
4285 
4287  //tb = MCreateTableForm(obj, 3);
4289  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4290  MObjectSetResize(tb, True, False);
4291 
4292  lbl = MCreateLabel(tb, "Automatic ARange for AVG ?", FIXED_SMALL);
4293  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4294  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4295  MObjectSetTransparency(lbl, 0);
4296  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4297  //MObjectSetCompositeWidth(lbl, 200);
4298 
4299  rb = MCreateRButton(tb, "Yes", FIXED_SMALL);
4300  MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 0);
4302  MObjectSetForegroundRGB(rb, 255, 255, 255);
4303  //MObjectSetCompositeWidth(rb, 100);
4304  if(DAS.DOption.avgautor == 1)
4305  MRButtonActivate(rb);
4306 
4307  rb = MCreateRButton(tb, "No", FIXED_SMALL);
4308  MPButtonSetCallback(rb, DB_AVGAutoR_CB, (void *) 1);
4310  MObjectSetForegroundRGB(rb, 255, 255, 255);
4311  //MObjectSetCompositeWidth(rb, 90);
4312  if(DAS.DOption.avgautor == 0)
4313  MRButtonActivate(rb);
4314 
4315 
4316 
4317  //tb = MCreateTableForm(obj, 2);
4319  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4320  MObjectSetResize(tb, True, False);
4321 
4322  DAS.Gui.ConfigPanel.FixTExp = MCreateRButton(tb, "Fix TExp. ", FIXED_SMALL);
4327 
4328  DAS.Gui.ConfigPanel.FixMeasNum = MCreateRButton(tb, "Fix Meas. Number", FIXED_SMALL);
4333 
4334  if(DAS.DOption.avgmode)
4335  {
4336  DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "TOT Exposure Time :", FIXED_SMALL);
4342 
4343  sprintf(buf, "%d", TOTTEXP);
4349  k = 111;
4350  p = (void *) k;
4353 
4355  }
4356  else
4357  {
4358  DAS.Gui.ConfigPanel.lblAvg = MCreateLabel(tb, "Repeat measure for: ", FIXED_SMALL);
4364 
4365  sprintf(buf, "%d",N_AVG);
4371  k = 111;
4372  p = (void *) k;
4375 
4377  }
4378  /***************************************************************************/
4379  /*********** END AVERAGING SECTION *******************************/
4380  /***************************************************************************/
4381  /***************************************************************************/
4382  /*********** START MEASURING mode SECTION *******************************/
4383  /***************************************************************************/
4384  lbl = MCreateLabel(obj, "MEASURING MODE", FIXED_SMALL);
4385  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4386  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4387  MObjectSetTransparency(lbl, 0);
4388  // MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4389  // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4390  // MObjectSetCompositeWidth(lbl, 200);
4391 
4392  //table for selecting Single or Averaged measurements
4393  tb = MCreateTableForm(obj, 2);
4394  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4395  MObjectSetResize(tb, True, False);
4396 
4397 
4398  rb = MCreateRButton(tb, "SINGLE", FIXED_SMALL);
4399  MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 0);
4401  MObjectSetForegroundRGB(rb, 255, 255, 255);
4402  //MObjectSetCompositeWidth(rb, 100);
4403  if(DAS.DOption.measmode == 0)
4404  MRButtonActivate(rb);
4405 
4406  rb = MCreateRButton(tb, "AVERAGE", FIXED_SMALL);
4407  MPButtonSetCallback(rb, DB_MeasMode_CB, (void *) 1);
4409  MObjectSetForegroundRGB(rb, 255, 255, 255);
4410  //MObjectSetCompositeWidth(rb, 90);
4411  if(DAS.DOption.measmode == 1)
4412  MRButtonActivate(rb);
4413 
4414 
4415 
4416  /***************************************************************************/
4417  /*********** END MEASURING mode SECTION *******************************/
4418  /***************************************************************************/
4419 
4420  /*******************************************************************************/
4421  /************* START Defective Pixel Correction SECTION ***********************/
4422  /*******************************************************************************/
4423  lbl = MCreateLabel(obj, "DEFECTIVE PIXELS", FIXED_SMALL);
4424  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4425  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4426  MObjectSetTransparency(lbl, 0);
4427 
4428  tb = MCreateTableForm(obj, 3);
4429  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4430  MObjectSetResize(tb, True, False);
4431 
4432  pb = MCreatePButton(tb, "Map UNDER Exp", FIXED_SMALL);
4433  MPButtonSetCallback(pb, UnderOverPixCB, (void *) 0);
4434  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4435  //MObjectSetCompositeWidth(pb, 250);
4436 
4437  pb = MCreatePButton(tb, "Map OVER Exp (T=0)", FIXED_SMALL);
4438  MPButtonSetCallback(pb, UnderOverPixCB, (void *) 1);
4439  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4440  //MObjectSetCompositeWidth(pb, 220);
4441 
4442  pb = MCreatePButton(tb, "Map OVER Exp (T=5)", FIXED_SMALL);
4443  MPButtonSetCallback(pb, UnderOverPixCB, (void *) 2);
4444  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4445  //MObjectSetCompositeWidth(pb, 220);
4446 
4447 
4448  lbl = MCreateLabel(obj, "Defective Pixel Correction:", FIXED_SMALL);
4449  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4450  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4451  MObjectSetTransparency(lbl, 0);
4452  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4453  MObjectSetCompositeWidth(lbl, 220);
4454 
4455  tb = MCreateTableForm(obj, 2);
4456  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4457  MObjectSetResize(tb, True, False);
4458 
4459  DAS.Gui.ConfigPanel.rbCorrPix[0] = MCreateRButton(tb, "DISABLE", FIXED_SMALL);
4464 
4465  DAS.Gui.ConfigPanel.rbCorrPix[1] = MCreateRButton(tb, "ENABLE", FIXED_SMALL);
4470 
4471  colform = MCreateColForm(obj);
4472  MObjectSetBackgroundRGB(colform, 112, 128, 112);
4473  MObjectSetResize(colform, True, False);
4474 
4475 
4480  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4481  //MObjectSetCompositeWidth(lbl, 220);
4482 
4483 
4489 
4490  if(!DAS.DOption.pixcorr)
4492  if(DAS.DOption.pixcorr)
4494 
4495 
4496  /*******************************************************************************/
4497  /************* END Defective Pixel Correction SECTION ***********************/
4498  /*******************************************************************************/
4499 
4500  /*---------------------------------------------------------------*/
4501  /*------ Dummy table ---------------------------------------*/
4502  tb = MCreateTableForm(obj, 2);
4503  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4504  MObjectSetResize(tb, True, True);
4506  /*------ Dummy table ---------------------------------------*/
4507  /*---------------------------------------------------------------*/
4508 
4509 
4510 }
#define RIGHT_ALIGN
Definition: Mguidefs.h:916
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
MOBJECT lblAvg
void DB_RadioModeSelCB(MOBJECT o, void *id, void *a_data)
Set the saving mode.
MOBJECT lbl
Definition: DFileMan.c:42
optionini DOption
Options for DAS execution.
int savingmode
Flag to set saving mode: 0=ASCII, 1=Binary.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
MOBJECT tbavg
table for avg section
#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 ...
int avgautor
autoranging for averaged measurement, 0 = NO AutoR before average; 1 = AutoR before average; ...
MOBJECT MCreateClippedEdit(MOBJECT parent, const char *text, int len, int clip_len, MTFont font)
#define UNDEF_ALIGN
Definition: Mguidefs.h:920
void MObjectSetText(MOBJECT obj, const char *text)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
int avgmode
Flag to set Averaging mode: 0 = Repeat measurements for fixed number, 1 = Repeat measurements for fix...
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)
void MRButtonActivate(MOBJECT o)
MOBJECT FixMeasNum
void SelDefPixFileCB(MOBJECT o, void *a, void *v)
MOBJECT MCreateColForm(MOBJECT parent)
das DAS
Definition: DAS_Spat_Conf.c:56
MOBJECT FixTExp
void DB_RadioFNSelCB(MOBJECT o, void *id, void *a_data)
Set the file name mode.
int TOTTEXP
Total Exposure time in Averaging mode.
Definition: DAS_Spat.c:115
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
void DB_MeasMode_CB(MOBJECT o, void *a, void *v)
configpanel ConfigPanel
Configuration panel structure.
static double p
Definition: SOLPOS.C:131
void MLabelSetAlignment(MOBJECT p, int align)
int pixcorr
Flag to set defective pixel correction: 0=NOT Corrected, 1=Corrected.
int imgtype
Flag to set Image type: 0=MONOINT, 1=RGB.
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
int measmode
measuring mode: 0 = Single; 1 = Averaged
void MObjectSetCompositeWidth(MOBJECT obj, int w)
void * MOBJECT
Definition: Mguidefs.h:192
MOBJECT rbCorrPix[2]
radio button for defective CCD Correction
#define True
Definition: Mguidefs.h:235
#define LEFT_ALIGN
Definition: Mguidefs.h:915
void DB_RadioPixCorrCB(MOBJECT o, void *id, void *a_data)
Set the image Correction flag.
int filename
Flag to set file name mode 0=Free choice, 1 = Automatic.
void DB_RadioAvgModeCB(MOBJECT o, void *id, void *a_data)
Set the Averaging mode flag.
void DB_ImgTypeCB(MOBJECT o, void *id, void *a_data)
Set the Image type.
void DB_AVGAutoR_CB(MOBJECT o, void *a, void *v)
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) ...
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
int N_AVG
Number of measurements for Averaging mode in fixed number of meas. mode.
Definition: DAS_Spat.c:113
MOBJECT lblCorrPixF
label for name file used for defec pix correction
#define WS_ETCHED_IN
Definition: Mguidefs.h:959
MOBJECT pbBrowseCorrPixF
Push button for file selection.
#define TOP_ALIGN
Definition: Mguidefs.h:918
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...
char DEFPIXFILENAME[_MAX_PATH]
defective pixel filename with path
+ Here is the caller graph for this function:

§ CONFP_opt_page2()

void CONFP_opt_page2 ( int  mod,
MOBJECT  obj 
)

Definition at line 4514 of file DAS_Spat_Conf.c.

References ActEditCB(), configpanel::BPDark, gui::ConfigPanel, optionini::darkremove, optionini::darksource, DB_RadDrkSourceCB(), DB_RadioDarkCB(), DB_SetCCDTargetTempCB(), DB_VMRsfCB(), das::DOption, configpanel::edmaxlvlar, False, configpanel::FFDark, FIXED_SMALL, das::Gui, lbl, LEFT_ALIGN, optionini::maxlvlar, MCreateClippedEdit(), MCreateLabel(), MCreatePButton(), MCreateRButton(), MCreateTableForm(), MEditSetActCallback(), MEditSetValCallback(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetSensitive(), MObjectSetShadow(), MObjectSetText(), MObjectSetTransparency(), MObjectSetUnsensitive(), ModifyConfFileCB(), MPButtonSetCallback(), MRButtonActivate(), p, flag::settempvar, TOP_ALIGN, True, UNDEF_ALIGN, ValidateCB(), flag::VMRsf, and WS_ETCHED_IN.

Referenced by CONFP_Options().

4515 {
4516 
4517 // MOBJECT rowform; // generic row form
4518  MOBJECT pb, rb ;
4519  MOBJECT lbl;
4520  MOBJECT tb ; // generic table object
4521  char buf[64];
4522  int i,k, *p;
4523 
4524  MObjectSetText(obj, "Page 2");
4525  /***************************************************************************/
4526  /***************************************************************************/
4527  /*********** START DARK MEASUREMENT SECTION *******************************/
4528  /***************************************************************************/
4529 
4530  lbl = MCreateLabel(obj, "DARK IMAGE", FIXED_SMALL);
4531  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4532  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4533  MObjectSetTransparency(lbl, 0);
4534 
4535  lbl = MCreateLabel(obj, "Remove Dark from Measurements ? ", FIXED_SMALL);
4536  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4537  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4538  MObjectSetTransparency(lbl, 0);
4539  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4540  MObjectSetCompositeWidth(lbl, 250);
4541 
4542  tb = MCreateTableForm(obj, 2);
4543  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4544  MObjectSetResize(tb, True, False);
4545 
4546  rb = MCreateRButton(tb, "Yes", FIXED_SMALL);
4548  MObjectSetForegroundRGB(rb, 255, 255, 255);
4549  MObjectSetCompositeWidth(rb, 85);
4550  if(DAS.DOption.darkremove)
4551  MRButtonActivate(rb);
4552  MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 1);
4553 
4554  rb = MCreateRButton(tb, "No", FIXED_SMALL);
4556  MObjectSetForegroundRGB(rb, 255, 255, 255);
4557  MObjectSetCompositeWidth(rb, 123);
4558  if(!DAS.DOption.darkremove)
4559  MRButtonActivate(rb);
4560  MPButtonSetCallback(rb, DB_RadioDarkCB, (void *) 0);
4561 
4562  lbl = MCreateLabel(obj, "Dark Source", FIXED_SMALL);
4563  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4564  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4565  MObjectSetTransparency(lbl, 0);
4566  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4567  MObjectSetCompositeWidth(lbl, 200);
4568 
4569  tb = MCreateTableForm(obj, 2);
4570  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4571  MObjectSetResize(tb, True, False);
4572 
4573  DAS.Gui.ConfigPanel.FFDark = MCreateRButton(tb, "Full Frame", FIXED_SMALL);
4578 // if(DAS.DOption.darkremove)
4579  if(DAS.DOption.darksource)
4581 
4582  DAS.Gui.ConfigPanel.BPDark = MCreateRButton(tb, "Blind Pixels", FIXED_SMALL);
4587 // if(DAS.DOption.darkremove)
4588  if(!DAS.DOption.darksource)
4590 
4591 
4592  if (DAS.DOption.darkremove==0)
4593  {
4596  }
4597  else
4598  {
4601  }
4602 
4603  /***************************************************************************/
4604  /*********** END DARK MEASUREMENT SECTION ****************************/
4605  /***************************************************************************/
4606  /*---------------------------------------------------------------*/
4607  /***************************************************************************/
4608  /*********** START CCD TARGET TEMPERATURE SECTION *********************/
4609  /***************************************************************************/
4610  lbl = MCreateLabel(obj, "CCD TARGET TEMPERATURE", FIXED_SMALL);
4612  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4613  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4614  MObjectSetTransparency(lbl, 0);
4615 
4616  tb = MCreateTableForm(obj, 2);
4617  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4618  MObjectSetResize(tb, True, False);
4620 
4621  rb = MCreateRButton(tb, "FIXED", FIXED_SMALL);
4622  MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 0);
4624  MObjectSetForegroundRGB(rb, 255, 255, 255);
4625  MObjectSetCompositeWidth(rb, 85);
4626  if(!FLAG.settempvar)
4627  MRButtonActivate(rb);
4628 
4629  rb = MCreateRButton(tb, "SZA DRIVED", FIXED_SMALL);
4630  MPButtonSetCallback(rb, DB_SetCCDTargetTempCB, (void *) 1);
4632  MObjectSetForegroundRGB(rb, 255, 255, 255);
4633  MObjectSetCompositeWidth(rb, 123);
4634  if(FLAG.settempvar)
4635  MRButtonActivate(rb);
4636 
4637  /***************************************************************************/
4638  /*********** END CCD TARGET TEMPERATURE SECTION *********************/
4639  /***************************************************************************/
4640  /*-----------------------------------------------------------------------*/
4641 
4642  /***************************************************************************/
4643  /***************************************************************************/
4644  /************** START AUTORANGING SECTION ************************/
4645  /***************************************************************************/
4646 
4647 
4648  lbl = MCreateLabel(obj, "AUTORANGING", FIXED_SMALL);
4649  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4650  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4651  MObjectSetTransparency(lbl, 0);
4652 
4653 
4654  tb = MCreateTableForm(obj, 2);
4655  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4656  //MObjectSetResize(tb, True, False);
4657 
4658  lbl = MCreateLabel(tb, "Max Autoranging value (<= 63000) ", FIXED_SMALL);
4659  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4660  //MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4661  MObjectSetTransparency(lbl, 0);
4662  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4664  MObjectSetCompositeWidth(lbl, 250);
4665 
4666  sprintf(buf, "%d",DAS.DOption.maxlvlar);
4672 
4673  k = 600;
4674  p = (void *) k;
4677 
4678 
4679 
4680  /***************************************************************************/
4681  /************** STOP AUTORANGING SECTION ************************/
4682  /***************************************************************************/
4683 
4684 
4685  /***************************************************************************/
4686  /***************************************************************************/
4687  /************** START CONFIGURATION FILES SECTION ************************/
4688  /***************************************************************************/
4689 
4690  lbl = MCreateLabel(obj, "CONFIG FILES", FIXED_SMALL);
4692  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4693  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4694  MObjectSetTransparency(lbl, 0);
4695 
4696  tb = MCreateTableForm(obj, 2);
4697  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4698  MObjectSetResize(tb, True, False);
4700 
4701  rb = MCreateRButton(tb, "View/Modify", FIXED_SMALL);
4702  MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 0);
4704  MObjectSetForegroundRGB(rb, 255, 255, 255);
4705  MObjectSetCompositeWidth(rb, 123);
4706  if(!FLAG.VMRsf)
4707  MRButtonActivate(rb);
4708 
4709  rb= MCreateRButton(tb, "ReLoad", FIXED_SMALL);
4710  MPButtonSetCallback(rb, DB_VMRsfCB, (void *) 1);
4712  MObjectSetForegroundRGB(rb, 255, 255, 255);
4713  MObjectSetCompositeWidth(rb, 123);
4715  if(FLAG.VMRsf)
4716  MRButtonActivate(rb);
4717 
4718  tb = MCreateTableForm(obj, 2);
4719  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4720  MObjectSetResize(tb, True, False);
4722 
4723  pb = MCreatePButton(tb, "Param.INI", FIXED_SMALL);
4724  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 0);
4725  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4726  MObjectSetCompositeWidth(pb, 150);
4727 
4728  pb = MCreatePButton(tb, "DASSysColor.INI", FIXED_SMALL);
4729  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 1);
4730  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4731  MObjectSetCompositeWidth(pb, 150);
4732 
4733  pb = MCreatePButton(tb, "Options.INI", FIXED_SMALL);
4734  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 2);
4735  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4736  MObjectSetCompositeWidth(pb, 150);
4737 
4738  pb = MCreatePButton(tb, "ccd_defect_Danbo.cor", FIXED_SMALL);
4739  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 3);
4740  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4741  MObjectSetCompositeWidth(pb, 150);
4742 
4743  pb = MCreatePButton(tb, "GeoCoord.INI", FIXED_SMALL);
4744  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 4);
4745  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4746  MObjectSetCompositeWidth(pb, 150);
4747 
4748  pb = MCreatePButton(tb, "AMS.INI", FIXED_SMALL);
4749  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 6);
4750  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4751  MObjectSetCompositeWidth(pb, 150);
4752 
4753  pb = MCreatePButton(tb, "Equipment.INI", FIXED_SMALL);
4754  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 7);
4755  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4756  MObjectSetCompositeWidth(pb, 150);
4757 
4758  pb = MCreatePButton(tb, "WlStep.INI", FIXED_SMALL);
4759  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 8);
4760  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4761  MObjectSetCompositeWidth(pb, 150);
4762 
4763  pb = MCreatePButton(tb, "Free Editor", FIXED_SMALL);
4764  MPButtonSetCallback(pb, ModifyConfFileCB, (void *) 5);
4765  MObjectSetBackgroundRGB(pb, 224, 224, 176);
4766  MObjectSetCompositeWidth(pb, 150);
4767 
4768 
4769  /***************************************************************************/
4770  /************** END CONFIGURATION FILES SECTION ************************/
4771  /***************************************************************************/
4772 
4773 
4774 
4775  /*---------------------------------------------------------------*/
4776  /*------ Dummy table ---------------------------------------*/
4777  tb = MCreateTableForm(obj, 2);
4778  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4779  MObjectSetResize(tb, True, True);
4781  /*------ Dummy table ---------------------------------------*/
4782  /*---------------------------------------------------------------*/
4783 
4784 
4785 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
MOBJECT lbl
Definition: DFileMan.c:42
MOBJECT edmaxlvlar
edit object maximum level for autoranging
flag FLAG
Definition: DAS_Spat_Conf.c:44
optionini DOption
Options for DAS execution.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
void MObjectSetUnsensitive(MOBJECT obj)
int VMRsf
ViewModifyReloadsystemfile: 0 = ViewModify, 1 = Reload.
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
int darkremove
Flag to set Dark Removal from measurements; motors0 = No Dark Removal, 1 = Dark Removal.
#define False
Definition: Mguidefs.h:236
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
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...
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 ...
void DB_SetCCDTargetTempCB(MOBJECT o, void *id, void *a_data)
Select the CCD temperature mode .
MOBJECT MCreateClippedEdit(MOBJECT parent, const char *text, int len, int clip_len, MTFont font)
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...
#define UNDEF_ALIGN
Definition: Mguidefs.h:920
void MObjectSetText(MOBJECT obj, const char *text)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
void DB_RadioDarkCB(MOBJECT o, void *id, void *a_data)
Set the dark removing from the measurements.
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
void MEditSetActCallback(MOBJECT edit, OBJ_STRING_CB cb, void *data)
#define FIXED_SMALL
Definition: Mguidefs.h:878
void DB_RadDrkSourceCB(MOBJECT o, void *a, void *v)
Set the dark source.
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)
void MRButtonActivate(MOBJECT o)
das DAS
Definition: DAS_Spat_Conf.c:56
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
configpanel ConfigPanel
Configuration panel structure.
static double p
Definition: SOLPOS.C:131
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
MOBJECT BPDark
void MObjectSetCompositeWidth(MOBJECT obj, int w)
int settempvar
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
#define LEFT_ALIGN
Definition: Mguidefs.h:915
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
int darksource
Flag to set Dark source: 0 = Blind Pixels, 1 = Full Frame.
void MObjectSetSensitive(MOBJECT obj)
#define WS_ETCHED_IN
Definition: Mguidefs.h:959
unsigned int maxlvlar
maximum level of autoranging (max 65000)
MOBJECT FFDark
#define TOP_ALIGN
Definition: Mguidefs.h:918
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CONFP_opt_page3()

void CONFP_opt_page3 ( int  mod,
MOBJECT  obj 
)

Definition at line 4789 of file DAS_Spat_Conf.c.

References ActEditCB(), gui::ConfigPanel, DB_DispBlindPixCB(), DB_PlotDisplayCB(), DB_PlotYAxisCB(), DB_SetXUnitsCB(), flag::DispBlindPix, das::DOption, False, FIXED_SMALL, das::Flag, das::Gui, configpanel::HiddenL, optionini::hlineafter, optionini::hlinebefore, lbl, LEFT_ALIGN, MCreateClippedEdit(), MCreateLabel(), MCreateRButton(), MCreateTableForm(), MEditSetActCallback(), MEditSetValCallback(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetText(), MObjectSetTransparency(), MPButtonSetCallback(), MRButtonActivate(), p, flag::plotW, flag::plotYRange, SZAMax, configpanel::SZAMax, TOP_ALIGN, True, ValidateCB(), flag::Wl, and WS_ETCHED_IN.

Referenced by CONFP_Options().

4790 {
4791 
4792 // MOBJECT rowform; // generic row form
4793  MOBJECT rb ;
4794  MOBJECT lbl;
4795  MOBJECT tb ; // generic table object
4796  int k, *p;
4797  char buf[64];
4798 
4799  MObjectSetText(obj, "Page 3");
4800  /***************************************************************************/
4801  /***************************************************************************/
4802  /******************* START PLOT OPTIONS SECTION **********************/
4803  /***************************************************************************/
4804  lbl = MCreateLabel(obj, "PLOT OPTIONS", FIXED_SMALL);
4806  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4807  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
4808  MObjectSetTransparency(lbl, 0);
4809 
4810  lbl = MCreateLabel(obj, "X Axis Units", FIXED_SMALL);
4811  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4812  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4813  MObjectSetTransparency(lbl, 0);
4814  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4815  MObjectSetCompositeWidth(lbl, 200);
4816 
4817  tb = MCreateTableForm(obj, 3);
4818  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4819  MObjectSetResize(tb, True, False);
4821 
4822  rb = MCreateRButton(tb, "PIXEL", FIXED_SMALL);
4823  MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 0);
4825  MObjectSetForegroundRGB(rb, 255, 255, 255);
4826  MObjectSetCompositeWidth(rb, 85);
4827  if(FLAG.Wl == 0)
4828  MRButtonActivate(rb);
4829 
4830  rb = MCreateRButton(tb, "WAVEL [A]", FIXED_SMALL);
4831  MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 1);
4833  MObjectSetForegroundRGB(rb, 255, 255, 255);
4834  MObjectSetCompositeWidth(rb, 100);
4835  if(FLAG.Wl == 1)
4836  MRButtonActivate(rb);
4837 
4838  rb = MCreateRButton(tb, "WAVEL [nm]", FIXED_SMALL);
4839  MPButtonSetCallback(rb, DB_SetXUnitsCB, (void *) 2);
4841  MObjectSetForegroundRGB(rb, 255, 255, 255);
4842  MObjectSetCompositeWidth(rb, 100);
4843  if(FLAG.Wl == 2)
4844  MRButtonActivate(rb);
4845 /*
4846 
4847  if(FLAG.Wl == 0)
4848  MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[0]);
4849  else if(FLAG.Wl == 1)
4850  MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[1]);
4851  else if(FLAG.Wl == 2)
4852  MRButtonActivate(DAS.Gui.ConfigPanel.XAxisU[2]);
4853 */
4854 /*----------------- DISPLAY or NOT Plot after measurement -----------------*/
4855 
4856  lbl = MCreateLabel(obj, "Display PLOT after measurement ?", FIXED_SMALL);
4857  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4858  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4859  MObjectSetTransparency(lbl, 0);
4860  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4861  MObjectSetCompositeWidth(lbl, 300);
4862 
4863  tb = MCreateTableForm(obj, 2);
4864  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4865  MObjectSetResize(tb, True, False);
4867 
4868  rb = MCreateRButton(tb, "No ", FIXED_SMALL);
4869  MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 0);
4871  MObjectSetForegroundRGB(rb, 255, 255, 255);
4872  MObjectSetCompositeWidth(rb, 85);
4873  if(DAS.Flag.plotW == 0)
4874  MRButtonActivate(rb);
4875 
4876  rb = MCreateRButton(tb, "Yes", FIXED_SMALL);
4877  MPButtonSetCallback(rb, DB_PlotDisplayCB, (void *) 1);
4879  MObjectSetForegroundRGB(rb, 255, 255, 255);
4880  MObjectSetCompositeWidth(rb, 100);
4881  if(DAS.Flag.plotW == 1)
4882  MRButtonActivate(rb);
4883 /*
4884  if(FLAG.plotW == 0)
4885  MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[0]);
4886  else if(FLAG.plotW == 1)
4887  MRButtonActivate(DAS.Gui.ConfigPanel.PlotDisp[1]);
4888 */
4889 /*-------------------------------------------------------------------------*/
4890  lbl = MCreateLabel(obj, " Y Axis", FIXED_SMALL);
4891  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4892  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4893  MObjectSetTransparency(lbl, 0);
4894  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4895  MObjectSetCompositeWidth(lbl, 200);
4896 
4897  tb = MCreateTableForm(obj, 2);
4898  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4899  MObjectSetResize(tb, True, False);
4901 
4902  rb = MCreateRButton(tb, "Full Range", FIXED_SMALL);
4903  MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 0);
4905  MObjectSetForegroundRGB(rb, 255, 255, 255);
4906  MObjectSetCompositeWidth(rb, 85);
4907  MObjectSetResize(rb, True, False);
4908  if(FLAG.plotYRange == 0)
4909  MRButtonActivate(rb);
4910 
4911  rb = MCreateRButton(tb, "Min/Max", FIXED_SMALL);
4912  MPButtonSetCallback(rb, DB_PlotYAxisCB, (void *) 1);
4914  MObjectSetForegroundRGB(rb, 255, 255, 255);
4915  MObjectSetCompositeWidth(rb, 100);
4916  MObjectSetResize(rb, True, False);
4917  if(FLAG.plotYRange == 1)
4918  MRButtonActivate(rb);
4919 /*
4920  if(FLAG.plotYRange == 0)
4921  MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[0]);
4922  else if(FLAG.plotYRange == 1)
4923  MRButtonActivate(DAS.Gui.ConfigPanel.PlotYAxis[1]);
4924 /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
4925 /*-------------------------------------------------------------------------*/
4926 /* Hidden Lines section */
4927 /*-------------------------------------------------------------------------*/
4928  lbl = MCreateLabel(obj, " Hidden lines ", FIXED_SMALL);
4929  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4930  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4931  MObjectSetTransparency(lbl, 0);
4932  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4933  MObjectSetCompositeWidth(lbl, 200);
4934 
4935  tb = MCreateTableForm(obj, 2);
4936  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4937  MObjectSetResize(tb, True, False);
4939 
4940  lbl = MCreateLabel(tb, "Before Central Line ", FIXED_SMALL);
4941  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4942  MObjectSetBackgroundRGB(lbl, 112, 128, 112);
4943  MObjectSetTransparency(lbl, 0);
4944  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4945  // MObjectSetCompositeWidth(lbl, 200);
4946 
4947  sprintf(buf, "%d",DAS.DOption.hlinebefore);
4953  k = 130;
4954  p = (void *) k;
4957 
4958  tb = MCreateTableForm(obj, 2);
4959  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4960  MObjectSetResize(tb, True, False);
4962 
4963  lbl = MCreateLabel(tb, "After Central Line ", FIXED_SMALL);
4964  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4965  MObjectSetBackgroundRGB(lbl, 112, 128, 112);
4966  MObjectSetTransparency(lbl, 0);
4967  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4968  // MObjectSetCompositeWidth(lbl, 200);
4969 
4970  sprintf(buf, "%d",DAS.DOption.hlineafter);
4976  k = 135;
4977  p = (void *) k;
4980 
4981 /*-------------------------------------------------------------------------*/
4982 /* Blind Pixel section */
4983 /*-------------------------------------------------------------------------*/
4984  lbl = MCreateLabel(obj, " Display Blind Pixel? ", FIXED_SMALL);
4985  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4986  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4987  MObjectSetTransparency(lbl, 0);
4988  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4989  MObjectSetCompositeWidth(lbl, 200);
4990 
4991  tb = MCreateTableForm(obj, 2);
4992  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4993  MObjectSetResize(tb, True, False);
4995 
4996  rb = MCreateRButton(tb, "No", FIXED_SMALL);
4997  MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 0);
4999  MObjectSetForegroundRGB(rb, 255, 255, 255);
5000  MObjectSetCompositeWidth(rb, 85);
5001  MObjectSetResize(rb, True, False);
5002  if(FLAG.DispBlindPix == 0)
5003  MRButtonActivate(rb);
5004 
5005 
5006  rb = MCreateRButton(tb, "Yes", FIXED_SMALL);
5007  MPButtonSetCallback(rb, DB_DispBlindPixCB, (void *) 1);
5009  MObjectSetForegroundRGB(rb, 255, 255, 255);
5010  MObjectSetCompositeWidth(rb, 100);
5011  MObjectSetResize(rb, True, False);
5012  if(FLAG.DispBlindPix == 1)
5013  MRButtonActivate(rb);
5014 
5015  /*-------------------------------------------------------------------------*/
5016  /***************************************************************************/
5017  /******************* END PLOT OPTIONS SECTION **********************/
5018  /***************************************************************************/
5019  /*-------------------------------------------------------------------------*/
5020  /* SZA Limit section */
5021  /*-------------------------------------------------------------------------*/
5022  lbl = MCreateLabel(obj, " SZA Limit ", FIXED_SMALL);
5023  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5024  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
5025  MObjectSetTransparency(lbl, 0);
5026  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5027  // MObjectSetCompositeWidth(lbl, 200);
5028 
5029  tb = MCreateTableForm(obj, 3);
5030  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5031  MObjectSetResize(tb, True, False);
5033 
5034  lbl = MCreateLabel(tb, "Perform Measurements for SZA <= ", FIXED_SMALL);
5035  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5036  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5037  MObjectSetTransparency(lbl, 0);
5038  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5039  // MObjectSetCompositeWidth(lbl, 200);
5040 
5041  sprintf(buf, "%d",SZAMax);
5047  k = 120;
5048  p = (void *) k;
5051 
5052  lbl = MCreateLabel(tb, " ° ", FIXED_SMALL);
5053  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5054  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5055  MObjectSetTransparency(lbl, 0);
5056  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5057 
5058  /**************************************************************/
5059  /***************************************************************************/
5060 
5061 
5062  /*---------------------------------------------------------------*/
5063  /*------ Dummy table ---------------------------------------*/
5064  tb = MCreateTableForm(obj, 2);
5065  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5066  MObjectSetResize(tb, True, True);
5068  /*------ Dummy table ---------------------------------------*/
5069  /*---------------------------------------------------------------*/
5070 
5071 
5072 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
MOBJECT lbl
Definition: DFileMan.c:42
flag FLAG
Definition: DAS_Spat_Conf.c:44
optionini DOption
Options for DAS execution.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
int Wl
Flag for the units on the X scale plot.
int plotW
Flag for the plot display.
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
flag Flag
Structure for different flags.
#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 ...
void DB_SetXUnitsCB(MOBJECT o, void *id, void *a_data)
Select the X axis Unit mode .
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...
MOBJECT MCreateClippedEdit(MOBJECT parent, const char *text, int len, int clip_len, MTFont font)
void MObjectSetText(MOBJECT obj, const char *text)
int SZAMax
Maximum SZA for performing measurements.
Definition: DAS_Spat.c:116
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
int hlinebefore
Number of HiddenLines before the central line in Plot.
void DB_PlotDisplayCB(MOBJECT o, void *id, void *a_data)
Select if the PLOT will be displayed after the measurement .
void MEditSetActCallback(MOBJECT edit, OBJ_STRING_CB cb, void *data)
#define FIXED_SMALL
Definition: Mguidefs.h:878
void DB_PlotYAxisCB(MOBJECT o, void *id, void *a_data)
Select the Y axis Unit mode .
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)
void MRButtonActivate(MOBJECT o)
int plotYRange
0 –> full range; 1 –> min/max
das DAS
Definition: DAS_Spat_Conf.c:56
int hlineafter
Number of HiddenLines after the central line in Plot.
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
configpanel ConfigPanel
Configuration panel structure.
static double p
Definition: SOLPOS.C:131
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
MOBJECT HiddenL
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
int DispBlindPix
Display Blind Pix: 0 = NO, 1 = Yes.
#define WS_ETCHED_IN
Definition: Mguidefs.h:959
#define TOP_ALIGN
Definition: Mguidefs.h:918
MOBJECT SZAMax
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CONFP_opt_page4()

void CONFP_opt_page4 ( int  mod,
MOBJECT  obj 
)

Definition at line 5076 of file DAS_Spat_Conf.c.

References ActEditCB(), CENTER_ALIGN, gui::ConfigPanel, DB_RadioFTPCB(), DB_TempHistCB(), das::DOption, dftp::edid, dftp::edpwd, dftp::edServerFTP, False, FIXED_SMALL, optionini::ftpbackup, dftp::ftppwd, dftp::ftpserver, dftp::ftpuser, das::Gui, lbl, LEFT_ALIGN, MCreateClippedEdit(), MCreateHiddenEdit(), MCreateLabel(), MCreatePButton(), MCreateRButton(), MCreateTableForm(), MEditEnableEditing(), MEditSetActCallback(), MLabelSetAlignment(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetText(), MObjectSetTransparency(), MPButtonSetCallback(), MRButtonActivate(), p, PbftpCB(), PBTempHistoCB(), configpanel::PID_edt, omuthr::PID_kd, omuthr::PID_ki, omuthr::PID_kp, omuthr::PID_On, optionini::refertemp, RIGHT_ALIGN, TOP_ALIGN, omuthr::TRType, True, and WS_ETCHED_IN.

Referenced by CONFP_Options().

5077 {
5078 
5079 // MOBJECT rowform; // generic row form
5080  MOBJECT pb, rb ;
5081  MOBJECT lbl;
5082  MOBJECT tb ; // generic table object
5083  int k, *p;
5084  char buf[64];
5085 
5086  MObjectSetText(obj, "Page 4");
5087 
5088 
5089  /***************************************************************************/
5090  /******************* BACK-UP SECTION *************************/
5091  /***************************************************************************/
5092  lbl = MCreateLabel(obj, "BACK-UP OPTIONS", FIXED_SMALL);
5094  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5095  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
5096  MObjectSetTransparency(lbl, 0);
5097 
5098  lbl = MCreateLabel(obj, "Perform FTP Back-Up", FIXED_SMALL);
5100  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5101  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5102  MObjectSetTransparency(lbl, 0);
5103  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5104  MObjectSetCompositeWidth(lbl, 200);
5105 
5106  tb = MCreateTableForm(obj, 2);
5107  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5108  MObjectSetResize(tb, True, False);
5110 
5111  rb = MCreateRButton(tb, "Yes", FIXED_SMALL);
5112  MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 0);
5114  MObjectSetForegroundRGB(rb, 255, 255, 255);
5115  MObjectSetCompositeWidth(rb, 85);
5116  if (DAS.DOption.ftpbackup)
5117  MRButtonActivate(rb);
5118 
5119  rb = MCreateRButton(tb, "No", FIXED_SMALL);
5120  MPButtonSetCallback(rb, DB_RadioFTPCB, (void *) 1);
5122  MObjectSetForegroundRGB(rb, 255, 255, 255);
5123  MObjectSetCompositeWidth(rb, 123);
5124  if (!DAS.DOption.ftpbackup)
5125  MRButtonActivate(rb);
5126 
5127  tb = MCreateTableForm(obj, 2);
5128  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5129  MObjectSetResize(tb, True, False);
5131 
5132  lbl = MCreateLabel(tb, "Server FTP Address:", FIXED_SMALL);
5135  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5136  MObjectSetBackgroundRGB(lbl, 112, 128, 112);
5137  MObjectSetTransparency(lbl, 0);
5138  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5139  MObjectSetCompositeWidth(lbl, 200);
5140 
5141  sprintf(buf, "%s",DFTP.ftpserver);
5142  DFTP.edServerFTP = MCreateClippedEdit(tb, buf, 15, 15, FIXED_SMALL);
5143  MObjectSetForegroundRGB(DFTP.edServerFTP, 255, 255, 255);
5145  // MObjectSetCompositeWidth(DFTP.edServerFTP, 35);
5147  k = 200;
5148  p = (void *) k;
5149  // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p);
5151  if (!DAS.DOption.ftpbackup)
5153 
5154  lbl = MCreateLabel(tb, "UserName:", FIXED_SMALL);
5157  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5158  MObjectSetBackgroundRGB(lbl, 112, 128, 112);
5159  MObjectSetTransparency(lbl, 0);
5160  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5161  MObjectSetCompositeWidth(lbl, 200);
5162 
5163  sprintf(buf, "%s",DFTP.ftpuser);
5164  DFTP.edid = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL);
5165  MObjectSetForegroundRGB(DFTP.edid, 255, 255, 255);
5166  MObjectSetBackgroundRGB(DFTP.edid, 40, 96, 72);
5167  // MObjectSetCompositeWidth(DFTP.edid, 35);
5169  k = 210;
5170  p = (void *) k;
5171  // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p);
5173 
5174 
5175  lbl = MCreateLabel(tb, "PWD:", FIXED_SMALL);
5178  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5179  MObjectSetBackgroundRGB(lbl, 112, 128, 112);
5180  MObjectSetTransparency(lbl, 0);
5181  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5182  MObjectSetCompositeWidth(lbl, 200);
5183 
5184  sprintf(buf, "%s",DFTP.ftppwd);
5185  DFTP.edpwd= MCreateHiddenEdit(tb, buf, 10, FIXED_SMALL, '*');
5186  MObjectSetForegroundRGB(DFTP.edpwd, 255, 255, 255);
5187  MObjectSetBackgroundRGB(DFTP.edpwd, 40, 96, 72);
5188  // MObjectSetCompositeWidth(DFTP.edpwd, 35);
5190  k = 220;
5191  p = (void *) k;
5192  // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p);
5194 /*
5195  if (DAS.DOption.ftpbackup)
5196  MRButtonActivate(DFTP.rb[0]);
5197  else
5198  MRButtonActivate(DFTP.rb[1]);
5199 */
5200  tb = MCreateTableForm(obj, 2);
5201  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5202  MObjectSetResize(tb, True, False);
5204 
5205  pb = MCreatePButton(tb, "Save FTP.INI", FIXED_SMALL);
5206  MPButtonSetCallback(pb, PbftpCB, (void *) 0);
5207  MObjectSetBackgroundRGB(pb, 224, 224, 176);
5208  MObjectSetCompositeWidth(pb, 94);
5209 
5210  pb = MCreatePButton(tb, "Test FTP", FIXED_SMALL);
5211  MPButtonSetCallback(pb, PbftpCB, (void *) 1);
5212  MObjectSetBackgroundRGB(pb, 224, 224, 176);
5213  MObjectSetCompositeWidth(pb, 94);
5214 
5215 /***************************************************************************/
5216 /**************** OMU Thermo-regulation SECTION ***********************/
5217 /***************************************************************************/
5218 
5219  lbl = MCreateLabel(obj, "OMU THERMO-REGULATION", FIXED_SMALL);
5221  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5222  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
5223  MObjectSetTransparency(lbl, 0);
5224 
5225  lbl = MCreateLabel(obj, "Choose the Reference temp", FIXED_SMALL);
5227  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5228  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5229  MObjectSetTransparency(lbl, 0);
5230  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5231  MObjectSetCompositeWidth(lbl, 200);
5232 
5233  tb = MCreateTableForm(obj, 3);
5234  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5235  MObjectSetResize(tb, True, False);
5237 
5238  rb = MCreateRButton(tb, "Pelt. Int.", FIXED_SMALL);
5239  MPButtonSetCallback(rb, DB_TempHistCB, (void *) 0);
5241  MObjectSetForegroundRGB(rb, 255, 255, 255);
5242  MObjectSetCompositeWidth(rb, 100);
5243  if(DAS.DOption.refertemp == 0)
5244  MRButtonActivate(rb);
5245 
5246  rb = MCreateRButton(tb, "Optic", FIXED_SMALL);
5247  MPButtonSetCallback(rb, DB_TempHistCB, (void *) 1);
5249  MObjectSetForegroundRGB(rb, 255, 255, 255);
5250  MObjectSetCompositeWidth(rb, 90);
5251  if(DAS.DOption.refertemp == 1)
5252  MRButtonActivate(rb);
5253 
5254  rb = MCreateRButton(tb, "Grating", FIXED_SMALL);
5255  MPButtonSetCallback(rb, DB_TempHistCB, (void *) 2);
5257  MObjectSetForegroundRGB(rb, 255, 255, 255);
5258  MObjectSetCompositeWidth(rb, 90);
5259  if(DAS.DOption.refertemp == 2)
5260  MRButtonActivate(rb);
5261 
5262  lbl = MCreateLabel(obj, "Choose the Thermo-regulation mode", FIXED_SMALL);
5264  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5265  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5266  MObjectSetTransparency(lbl, 0);
5267  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5268  MObjectSetCompositeWidth(lbl, 250);
5269 
5270  tb = MCreateTableForm(obj, 3);
5271  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5272  MObjectSetResize(tb, True, False);
5274 
5275  rb = MCreateRButton(tb, "Cold only", FIXED_SMALL);
5276  MPButtonSetCallback(rb, DB_TempHistCB, (void *) 3);
5278  MObjectSetForegroundRGB(rb, 255, 255, 255);
5279  MObjectSetCompositeWidth(rb, 100);
5280  if(OMUTHR.TRType == 0)
5281  MRButtonActivate(rb);
5282 
5283  rb = MCreateRButton(tb, "Heat only", FIXED_SMALL);
5284  MPButtonSetCallback(rb, DB_TempHistCB, (void *) 4);
5286  MObjectSetForegroundRGB(rb, 255, 255, 255);
5287  MObjectSetCompositeWidth(rb, 90);
5288  if(OMUTHR.TRType == 1)
5289  MRButtonActivate(rb);
5290 
5291  rb = MCreateRButton(tb, "Cold/Heat", FIXED_SMALL);
5292  MPButtonSetCallback(rb, DB_TempHistCB, (void *) 5);
5294  MObjectSetForegroundRGB(rb, 255, 255, 255);
5295  MObjectSetCompositeWidth(rb, 90);
5296  if(OMUTHR.TRType == 2)
5297  MRButtonActivate(rb);
5298 
5299 /***************/
5300  lbl = MCreateLabel(obj, "Choose the Thermo-reg. Algorithm", FIXED_SMALL);
5302  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5303  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5304  MObjectSetTransparency(lbl, 0);
5305  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5306  MObjectSetCompositeWidth(lbl, 250);
5307 
5308  tb = MCreateTableForm(obj, 2);
5309  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5310  MObjectSetResize(tb, True, False);
5312 
5313  rb = MCreateRButton(tb, "Progressive", FIXED_SMALL);
5314  MPButtonSetCallback(rb, DB_TempHistCB, (void *) 6);
5316  MObjectSetForegroundRGB(rb, 255, 255, 255);
5317  MObjectSetCompositeWidth(rb, 100);
5318  if(OMUTHR.PID_On == 0)
5319  MRButtonActivate(rb);
5320 
5321  rb = MCreateRButton(tb, "PID", FIXED_SMALL);
5322  MPButtonSetCallback(rb, DB_TempHistCB, (void *) 7);
5324  MObjectSetForegroundRGB(rb, 255, 255, 255);
5325  MObjectSetCompositeWidth(rb, 90);
5326  if(OMUTHR.PID_On == 1)
5327  MRButtonActivate(rb);
5328 
5329  if(OMUTHR.PID_On == 1) //Create the field for PID Parameters
5330  {
5331  tb = MCreateTableForm(obj, 3);
5332  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5333  MObjectSetResize(tb, True, False);
5335 
5336  lbl = MCreateLabel(tb, "Prop.", FIXED_SMALL);
5338  //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN);
5339  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5340  MObjectSetBackgroundRGB(lbl, 112, 128, 112);
5341  MObjectSetTransparency(lbl, 0);
5342  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5343  MObjectSetCompositeWidth(lbl, 90);
5344 
5345  lbl = MCreateLabel(tb, "Integral", FIXED_SMALL);
5347  //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN);
5348  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5349  MObjectSetBackgroundRGB(lbl, 112, 128, 112);
5350  MObjectSetTransparency(lbl, 0);
5351  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5352  MObjectSetCompositeWidth(lbl, 90);
5353 
5354  lbl = MCreateLabel(tb, "Deriv.", FIXED_SMALL);
5356  //MObjectAlign(lbl,LEFT_ALIGN, TOP_ALIGN);
5357  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5358  MObjectSetBackgroundRGB(lbl, 112, 128, 112);
5359  MObjectSetTransparency(lbl, 0);
5360  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5361  MObjectSetCompositeWidth(lbl, 90);
5362 
5363 
5364  sprintf(buf, "%.1lf",OMUTHR.PID_kp);
5365  DAS.Gui.ConfigPanel.PID_edt[0] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL);
5366  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[0], 255, 255, 255);
5368  k = 500;
5369  p = (void *) k;
5370  // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p);
5372 
5373 
5374  sprintf(buf, "%.3lf",OMUTHR.PID_ki);
5375  DAS.Gui.ConfigPanel.PID_edt[1] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL);
5376  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[1], 255, 255, 255);
5378  k = 501;
5379  p = (void *) k;
5380  // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p);
5382 
5383  sprintf(buf, "%.4lf",OMUTHR.PID_kd);
5384 
5385  DAS.Gui.ConfigPanel.PID_edt[2] = MCreateClippedEdit(tb, buf, 10, 10, FIXED_SMALL);
5386  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.PID_edt[2], 255, 255, 255);
5388  k = 502;
5389  p = (void *) k;
5390  // MEditSetValCallback(DAS.Gui.ConfigPanel.n_avg, ValidateCB, p);
5392  }
5393 
5394  pb = MCreatePButton(obj, "Temp History", FIXED_SMALL);
5395  MPButtonSetCallback(pb, PBTempHistoCB, (void *) 0);
5396  MObjectSetBackgroundRGB(pb, 224, 224, 176);
5397  MObjectSetCompositeWidth(pb, 123);
5398 
5399 
5400  /*---------------------------------------------------------------*/
5401  /*------ Dummy table ---------------------------------------*/
5402  tb = MCreateTableForm(obj, 2);
5403  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5404  MObjectSetResize(tb, True, True);
5406  /*------ Dummy table ---------------------------------------*/
5407  /*---------------------------------------------------------------*/
5408 
5409 
5410 
5411 }
MOBJECT PID_edt[3]
edit MObjects for PID parameters
#define RIGHT_ALIGN
Definition: Mguidefs.h:916
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
MOBJECT lbl
Definition: DFileMan.c:42
optionini DOption
Options for DAS execution.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
void DB_TempHistCB(MOBJECT o, void *a, void *v)
int TRType
Type of thermo regulation (0=TRTCOOL, 1 = TRTHEAT, 2= TRTBOTH)
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 ...
void PbftpCB(MOBJECT o, void *a, void *v)
MOBJECT MCreateClippedEdit(MOBJECT parent, const char *text, int len, int clip_len, MTFont font)
void MObjectSetText(MOBJECT obj, const char *text)
MOBJECT edid
edit for FTP server user
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
void MEditEnableEditing(MOBJECT edit)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
float PID_ki
#define CENTER_ALIGN
Definition: Mguidefs.h:917
MOBJECT edServerFTP
edit for FTP server address
omuthr OMUTHR
Definition: DAS_Spat_Conf.c:57
int PID_On
PID activation.
void MEditSetActCallback(MOBJECT edit, OBJ_STRING_CB cb, void *data)
#define FIXED_SMALL
Definition: Mguidefs.h:878
MOBJECT MCreateHiddenEdit(MOBJECT parent, const char *text, int len, MTFont font, char shown_char)
void MRButtonActivate(MOBJECT o)
char ftpuser[32]
FTP server users.
das DAS
Definition: DAS_Spat_Conf.c:56
char ftpserver[32]
FTP server address.
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
configpanel ConfigPanel
Configuration panel structure.
static double p
Definition: SOLPOS.C:131
void MLabelSetAlignment(MOBJECT p, int align)
int ftpbackup
Flag to set back up: 0 = NO FTP Back-UP; 1 = Perform FTP Back-UP.
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
float PID_kp
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
#define LEFT_ALIGN
Definition: Mguidefs.h:915
char ftppwd[32]
FTP server pwd.
MOBJECT edpwd
edit for FTP server pwd
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
int refertemp
Flag to set the reference temp for thermo-regulation: 0 = AVGPINT; 1 = OPTIC; 2 = GRATING...
void PBTempHistoCB(MOBJECT o, void *a, void *v)
#define WS_ETCHED_IN
Definition: Mguidefs.h:959
void DB_RadioFTPCB(MOBJECT o, void *a, void *v)
#define TOP_ALIGN
Definition: Mguidefs.h:918
dftp DFTP
Definition: DAS_Spat_Conf.c:49
float PID_kd
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CONFP_opt_page5()

void CONFP_opt_page5 ( int  mod,
MOBJECT  obj 
)

Definition at line 5414 of file DAS_Spat_Conf.c.

References optionini::aaopmode, optionini::amsprogbar, gui::ConfigPanel, DB_AMSposmode_CB(), DB_AMSProgBar_CB(), DB_MIGE_CB(), DB_MIGEopmode_CB(), DB_MIGEType_CB(), DB_MirrorImg_CB(), das::DOption, False, FIXED_SMALL, das::Gui, lbl, LEFT_ALIGN, mige::linked, MCreateLabel(), MCreateRButton(), MCreateTableForm(), das::MIGE, optionini::mirrorimg, MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetSensitive(), MObjectSetShadow(), MObjectSetText(), MObjectSetTransparency(), MObjectSetUnsensitive(), MPButtonSetCallback(), MRButtonActivate(), configpanel::rbMIGEopmode, configpanel::rbMIGEStatus, configpanel::rbMIGEtype, optionini::smposmode, tb1, TOP_ALIGN, True, mige::type, WS_ETCHED_IN, XAX, and YAX.

Referenced by CONFP_Options().

5415 {
5416 
5417 // MOBJECT rowform; // generic row form
5418  MOBJECT rb ;
5419  MOBJECT lbl;
5420  MOBJECT tb,tb1 ; // generic table object
5421 // int i,k, *p;
5422 // char buf[64];
5423 
5424  MObjectSetText(obj, "Page 5");
5425 
5426 
5427  lbl = MCreateLabel(obj, "MIRROR IMAGE", FIXED_SMALL);
5428  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5429  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
5430  MObjectSetTransparency(lbl, 0);
5431 
5432 
5433  tb1 = MCreateTableForm(obj, 2);
5434  MObjectSetBackgroundRGB(tb1, 112, 128, 112);
5435  MObjectSetResize(tb1, True, False);
5436 
5437 
5438  lbl = MCreateLabel(tb1, "Along the X Axis ?", FIXED_SMALL);
5439  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5440  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5441  MObjectSetTransparency(lbl, 0);
5442  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5443  // MObjectSetCompositeWidth(lbl, 250);
5444 
5445  lbl = MCreateLabel(tb1, "Along the Y Axis ?", FIXED_SMALL);
5446  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5447  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5448  MObjectSetTransparency(lbl, 0);
5449  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5450  // MObjectSetCompositeWidth(lbl, 250);
5451 
5452  tb = MCreateTableForm(tb1, 2);
5453  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5454  MObjectSetResize(tb, True, False);
5455 
5456  rb = MCreateRButton(tb, "Yes", FIXED_SMALL);
5457  MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 0);
5459  MObjectSetForegroundRGB(rb, 255, 255, 255);
5460  // MObjectSetCompositeWidth(rb, 100);
5461  if(DAS.DOption.mirrorimg[XAX] == 1)
5462  MRButtonActivate(rb);
5463 
5464  rb = MCreateRButton(tb, "No", FIXED_SMALL);
5465  MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 1);
5467  MObjectSetForegroundRGB(rb, 255, 255, 255);
5468  // MObjectSetCompositeWidth(rb, 90);
5469  if(DAS.DOption.mirrorimg[XAX] == 0)
5470  MRButtonActivate(rb);
5471 
5472 
5473  tb = MCreateTableForm(tb1, 2);
5474  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5475  MObjectSetResize(tb, True, False);
5476 
5477 
5478 
5479  rb = MCreateRButton(tb, "Yes", FIXED_SMALL);
5480  MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 2);
5482  MObjectSetForegroundRGB(rb, 255, 255, 255);
5483  // MObjectSetCompositeWidth(rb, 100);
5484  if(DAS.DOption.mirrorimg[YAX] == 1)
5485  MRButtonActivate(rb);
5486 
5487  rb = MCreateRButton(tb, "No", FIXED_SMALL);
5488  MPButtonSetCallback(rb, DB_MirrorImg_CB, (void *) 3);
5490  MObjectSetForegroundRGB(rb, 255, 255, 255);
5491  // MObjectSetCompositeWidth(rb, 90);
5492  if(DAS.DOption.mirrorimg[YAX] == 0)
5493  MRButtonActivate(rb);
5494 
5495 
5496  lbl = MCreateLabel(obj, "AMS OPTIONS", FIXED_SMALL);
5497  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5498  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
5499  MObjectSetTransparency(lbl, 0);
5500 
5501  lbl = MCreateLabel(obj, "Positioning Mode", FIXED_SMALL);
5502  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5503  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5504  MObjectSetTransparency(lbl, 0);
5505  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5506  MObjectSetCompositeWidth(lbl, 250);
5507 
5508  tb = MCreateTableForm(obj, 2);
5509  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5510  MObjectSetResize(tb, True, False);
5511 
5512  rb = MCreateRButton(tb, "Simultaneous", FIXED_SMALL);
5513  MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 0);
5515  MObjectSetForegroundRGB(rb, 255, 255, 255);
5516  MObjectSetResize(rb, True, False);
5517  //MObjectSetCompositeWidth(rb, 100);
5518  if(DAS.DOption.smposmode == 1)
5519  MRButtonActivate(rb);
5520 
5521  rb = MCreateRButton(tb, "Sequential", FIXED_SMALL);
5522  MPButtonSetCallback(rb, DB_AMSposmode_CB, (void *) 1);
5524  MObjectSetForegroundRGB(rb, 255, 255, 255);
5525  MObjectSetResize(rb, True, False);
5526  //MObjectSetCompositeWidth(rb, 90);
5527  if(DAS.DOption.smposmode == 0)
5528  MRButtonActivate(rb);
5529 
5530 
5531  lbl = MCreateLabel(obj, "Display progression bars?", FIXED_SMALL);
5532  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5533  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5534  MObjectSetTransparency(lbl, 0);
5535  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5536  MObjectSetCompositeWidth(lbl, 250);
5537 
5538  tb = MCreateTableForm(obj, 2);
5539  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5540  MObjectSetResize(tb, True, False);
5541 
5542  rb = MCreateRButton(tb, "Yes", FIXED_SMALL);
5543  MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 1);
5545  MObjectSetForegroundRGB(rb, 255, 255, 255);
5546  MObjectSetResize(rb, True, False);
5547  //MObjectSetCompositeWidth(rb, 100);
5548  if(DAS.DOption.amsprogbar == 1)
5549  MRButtonActivate(rb);
5550 
5551  rb = MCreateRButton(tb, "No", FIXED_SMALL);
5552  MPButtonSetCallback(rb, DB_AMSProgBar_CB, (void *) 0);
5554  MObjectSetForegroundRGB(rb, 255, 255, 255);
5555  MObjectSetResize(rb, True, False);
5556  //MObjectSetCompositeWidth(rb, 90);
5557  if(DAS.DOption.amsprogbar == 0)
5558  MRButtonActivate(rb);
5559 
5560  /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
5561  /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
5562  lbl = MCreateLabel(obj, "MIGE Platform OPTIONS", FIXED_SMALL);
5563  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5564  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
5565  MObjectSetTransparency(lbl, 0);
5566 
5567  lbl = MCreateLabel(obj, "MIGE Status", FIXED_SMALL);
5568  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5569  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5570  MObjectSetTransparency(lbl, 0);
5571  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5572  MObjectSetCompositeWidth(lbl, 250);
5573 
5574  tb = MCreateTableForm(obj, 2);
5575  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5576  MObjectSetResize(tb, True, False);
5577 
5578  DAS.Gui.ConfigPanel.rbMIGEStatus[0]=MCreateRButton(tb, "NOT Connected", FIXED_SMALL);
5582  //MObjectSetCompositeWidth(rb, 100);
5583  if(DAS.MIGE.linked == 0)
5586 
5587  DAS.Gui.ConfigPanel.rbMIGEStatus[1] = MCreateRButton(tb, "Connected", FIXED_SMALL);
5591  //MObjectSetCompositeWidth(rb, 100);
5592  if(DAS.MIGE.linked == 1)
5595 
5596 
5597  lbl = MCreateLabel(obj, "MIGE Type", FIXED_SMALL);
5598  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5599  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5600  MObjectSetTransparency(lbl, 0);
5601  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5602  MObjectSetCompositeWidth(lbl, 250);
5603 
5604  tb = MCreateTableForm(obj, 2);
5605  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5606  MObjectSetResize(tb, True, False);
5607 
5608  DAS.Gui.ConfigPanel.rbMIGEtype[0] = MCreateRButton(tb, "Ver. 0.5", FIXED_SMALL);
5613  //MObjectSetCompositeWidth(rb, 100);
5614  if(DAS.MIGE.type == 0 )
5616 
5617  DAS.Gui.ConfigPanel.rbMIGEtype[1] = MCreateRButton(tb, "Ver. 1.5", FIXED_SMALL);
5622  //MObjectSetCompositeWidth(rb, 100);
5623  if(DAS.MIGE.type == 1 )
5625 
5626  DAS.Gui.ConfigPanel.rbMIGEtype[2] = MCreateRButton(tb, "Ver. 2.0", FIXED_SMALL);
5631  //MObjectSetCompositeWidth(rb, 100);
5632  if(DAS.MIGE.type == 2 )
5634 
5635 
5636 
5637 
5638  lbl = MCreateLabel(obj, "Operating mode", FIXED_SMALL);
5639  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5640  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5641  MObjectSetTransparency(lbl, 0);
5642  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5643  MObjectSetCompositeWidth(lbl, 250);
5644 
5645  tb = MCreateTableForm(obj, 2);
5646  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5647  MObjectSetResize(tb, True, False);
5648 
5649 
5650  DAS.Gui.ConfigPanel.rbMIGEopmode[0] = MCreateRButton(tb, "Solar Tracker", FIXED_SMALL);
5655  //MObjectSetCompositeWidth(rb, 100);
5656  if(DAS.DOption.aaopmode == 0)
5658 
5659  DAS.Gui.ConfigPanel.rbMIGEopmode[1] = MCreateRButton(tb, "Anti Solar Tracker", FIXED_SMALL);
5664  //MObjectSetCompositeWidth(rb, 100);
5665  if(DAS.DOption.aaopmode == 1)
5667 
5668  DAS.Gui.ConfigPanel.rbMIGEopmode[2] = MCreateRButton(tb, "Free positions", FIXED_SMALL);
5673  //MObjectSetCompositeWidth(rb, 90);
5674  if(DAS.DOption.aaopmode == 2)
5676 
5677 
5678  if(DAS.MIGE.linked == 0)
5679  {
5684  }
5685  else
5690 
5691  /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
5692  /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
5693  /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
5694 
5695 
5696 
5697  /*---------------------------------------------------------------*/
5698  /*------ Dummy table ---------------------------------------*/
5699  tb = MCreateTableForm(obj, 2);
5700  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5701  MObjectSetResize(tb, True, True);
5703  /*------ Dummy table ---------------------------------------*/
5704  /*---------------------------------------------------------------*/
5705 
5706 
5707 }
void DB_MIGEopmode_CB(MOBJECT o, void *a, void *v)
callback selecting the operation mode for the AltAzPlatform
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
MOBJECT lbl
Definition: DFileMan.c:42
void DB_AMSposmode_CB(MOBJECT o, void *a, void *v)
callback selecting the positioning mode for stepper motors ( sequential or simulaneaous) ...
optionini DOption
Options for DAS execution.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
void MObjectSetUnsensitive(MOBJECT obj)
void DB_AMSProgBar_CB(MOBJECT o, void *a, void *v)
callback selecting if show or not the progress bar for motor positioning
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)
#define XAX
X Axis.
int type
void MObjectSetText(MOBJECT obj, const char *text)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
void DB_MIGE_CB(MOBJECT o, void *a, void *v)
callback selecting the operation mode for the AltAzPlatform
MOBJECT rbMIGEStatus[2]
radio button for MIGE status
#define FIXED_SMALL
Definition: Mguidefs.h:878
mige MIGE
void MRButtonActivate(MOBJECT o)
das DAS
Definition: DAS_Spat_Conf.c:56
void DB_MIGEType_CB(MOBJECT o, void *a, void *v)
int amsprogbar
display/hide prograssion bar, 0 = Hide, 1 = display
int linked
#define YAX
Y Axis.
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
configpanel ConfigPanel
Configuration panel structure.
int mirrorimg[2]
Flag to set the mirroring of the CCD image: 0 = NO Mirroring, 1= YES Mirroring (element 0 for X axis;...
MOBJECT tb1
Definition: DFileMan.c:41
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 ...
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
MOBJECT rbMIGEtype[5]
radio button for MIGE type
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
#define LEFT_ALIGN
Definition: Mguidefs.h:915
int aaopmode
operation mode for the Alt Az Platform, 0 = solar Traxker; 1 = Anti-Solar Tracker; 2 = Free Positioni...
int smposmode
positioning mode for stepper , 0 = sequential mode; 1 = simoultaneous mode
MOBJECT rbMIGEopmode[3]
radio button for MIGE operating mode
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
void MObjectSetSensitive(MOBJECT obj)
#define WS_ETCHED_IN
Definition: Mguidefs.h:959
#define TOP_ALIGN
Definition: Mguidefs.h:918
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CONFP_opt_page6()

void CONFP_opt_page6 ( int  mod,
MOBJECT  obj 
)

Definition at line 6436 of file DAS_Spat_Conf.c.

References CONFP_opt_ScheMeas(), DeviceTypeInput, paramini::EqType, False, FIXED_SMALL, GASCODNG4, lbl, LEFT_ALIGN, MCreateLabel(), MCreateOptionEdit(), MCreateRowForm(), MCreateTableForm(), MEditDisableEditing(), MFormSetSpacing(), Mir_Code, Mir_CodeTropo, MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetText(), MObjectSetTransparency(), MOptionEditGetList(), MSListAddItem(), MSListSelectElement(), das::Paramini, RIGHT_ALIGN, SPATRAM3, TOP_ALIGN, TROPOGAS, True, and WS_ETCHED_IN.

Referenced by CONFP_Options().

6437 {
6438 
6439  MOBJECT rowform; // generic row form
6440 // MOBJECT colform, colform1,colform2,colform3,colform4;
6441 // MOBJECT pb, rb ;
6442  MOBJECT lbl, list, optedit;
6443  MOBJECT tb ; // generic table object
6444  int i;
6445  int lenedit = 12;
6446  char buf[64], str[16];
6447  unsigned char lesseq = 242, greateq=241;
6448 
6449 
6450  MObjectSetText(obj, "Page 6");
6451 
6452  lbl = MCreateLabel(obj, "INPUTS <--> DEVICES", FIXED_SMALL);
6453  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6454  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
6455  MObjectSetTransparency(lbl, 0);
6456 
6457 /* lbl = MCreateLabel(obj, "Input <--> Device", FIXED_SMALL);
6458  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6459  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6460  MObjectSetTransparency(lbl, 0);
6461  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6462  MObjectSetCompositeWidth(lbl, 250);
6463 */
6464  tb = MCreateTableForm(obj, 4);
6465  MObjectSetBackgroundRGB(tb, 112, 128, 112);
6467 
6469  sprintf(str, "%s",Mir_CodeTropo[0]);
6470  else
6471  sprintf(str, "%s",Mir_Code[0]);
6472 
6473  sprintf(buf, "%s",str);
6474  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
6475  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6476  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6477  MObjectSetTransparency(lbl, 0);
6478  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6479 // MObjectSetCompositeWidth(lbl, 250);
6480 
6481 
6482  sprintf(buf, "%s",DeviceTypeInput[0]);
6483  optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL);
6484  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6485  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6486  MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN);
6487  MEditDisableEditing(optedit);
6488  list = MOptionEditGetList(optedit);
6489 
6490  for(i=0; i<8; i++)
6491  {
6492  sprintf(buf, "%s",DeviceTypeInput[i]);
6493  MSListAddItem(list, buf, 0L);
6494  }
6496  MSListSelectElement(list, 2);
6497  else
6498  MSListSelectElement(list, 0);
6499 
6500  sprintf(buf, "%s",Mir_Code[1]);
6501  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
6502  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6503  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6504  MObjectSetTransparency(lbl, 0);
6505  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6506 // MObjectSetCompositeWidth(lbl, 250);
6507 
6508  sprintf(buf, "%s",DeviceTypeInput[6]);
6509  optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL);
6510  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6511  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6512  MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN);
6513  MEditDisableEditing(optedit);
6514  list = MOptionEditGetList(optedit);
6515  for(i=0; i<8; i++)
6516  {
6517  sprintf(buf, "%s",DeviceTypeInput[i]);
6518  MSListAddItem(list, buf, 0L);
6519  }
6520  MSListSelectElement(list, 1);
6521 
6522 
6524  sprintf(str, "%s",Mir_CodeTropo[2]);
6525  else
6526  sprintf(str, "%s",Mir_Code[2]);
6527 
6528  sprintf(buf, "%s",str);
6529  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
6530  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6531  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6532  MObjectSetTransparency(lbl, 0);
6533  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6534 // MObjectSetCompositeWidth(lbl, 250);
6535 
6537  sprintf(buf, "%s",DeviceTypeInput[7]);
6538  else
6539  sprintf(buf, "%s",DeviceTypeInput[2]);
6540  optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL);
6541  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6542  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6543  MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN);
6544  MEditDisableEditing(optedit);
6545  list = MOptionEditGetList(optedit);
6546  for(i=0; i<8; i++)
6547  {
6548  sprintf(buf, "%s",DeviceTypeInput[i]);
6549  MSListAddItem(list, buf, 0L);
6550  }
6552  MSListSelectElement(list, 7);
6553  else
6554  MSListSelectElement(list, 2);
6555 
6556  sprintf(buf, "%s",Mir_Code[3]);
6557  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
6558  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6559  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6560  MObjectSetTransparency(lbl, 0);
6561  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6562 // MObjectSetCompositeWidth(lbl, 250);
6563 
6564  sprintf(buf, "%s",DeviceTypeInput[3]);
6565  optedit = MCreateOptionEdit(tb, buf, lenedit, lenedit, 8, FIXED_SMALL);
6566  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6567  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6568  MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN);
6569  MEditDisableEditing(optedit);
6570  list = MOptionEditGetList(optedit);
6571  for(i=0; i<8; i++)
6572  {
6573  sprintf(buf, "%s",DeviceTypeInput[i]);
6574  MSListAddItem(list, buf, 0L);
6575  }
6576  MSListSelectElement(list, 3);
6577 
6578 
6579  lbl = MCreateLabel(obj, "MEASUREMENTS SCHEDULING", FIXED_SMALL);
6580  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6581  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
6582  MObjectSetTransparency(lbl, 0);
6583 
6584 
6585 /***************************************************************/
6586 // 1 start
6587  rowform = MCreateRowForm(obj);
6588  MFormSetSpacing(rowform, 0);
6589  MObjectSetTransparency(rowform, 255);
6590 
6591 
6592  lbl = MCreateLabel(rowform, "ZenithSky", FIXED_SMALL);
6593  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6594  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6595  MObjectSetTransparency(lbl, 0);
6596  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6597  MObjectSetCompositeWidth(lbl, 250);
6598 
6599 
6600  CONFP_opt_ScheMeas(0, rowform);
6601 /*
6602  colform = MCreateColForm(rowform);
6603  MFormSetSpacing(colform, 0);
6604  MObjectSetResize(colform, False, False);
6605  MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN);
6606  MObjectSetTransparency(colform, 255);
6607  MObjectSetShadow(colform, WS_NONE, 0, 0);
6608 
6609 
6610 
6611  rowform1 = MCreateRowForm(colform);
6612  MFormSetSpacing(rowform1, 0);
6613  MObjectSetResize(rowform1, False, True);
6614  MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN);
6615  MObjectSetTransparency(rowform1, 255);
6616  MObjectSetShadow(rowform1, WS_NONE, 0, 0);
6617 
6618 
6619  rb = MCreateRButton(rowform1, "", FIXED_SMALL);
6620  MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0);
6621  MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN);
6622  MObjectSetForegroundRGB(rb, 255, 255, 255);
6623  MObjectSetTransparency(rb, 255);
6624  MObjectSetResize(rb, True, False);
6625  MObjectSetCompositeWidth(rb, 25);
6626 // if(DAS.DOption.mirrorimg == 1)
6627 // MRButtonActivate(rb);
6628 
6629 
6630  rb = MCreateRButton(rowform1, "", FIXED_SMALL);
6631  MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1);
6632  MObjectAlign(rb, LEFT_ALIGN, CENTER_ALIGN);
6633  MObjectSetForegroundRGB(rb, 255, 255, 255);
6634  MObjectSetResize(rb, True, False);
6635  MObjectSetTransparency(rb, 255);
6636  MObjectSetCompositeWidth(rb, 25);
6637 // if(DAS.DOption.mirrorimg == 0)
6638 // MRButtonActivate(rb);
6639 
6640 
6641 
6642  colform2 = MCreateColForm(colform);
6643  MFormSetSpacing(colform2, 0);
6644  MObjectSetResize(colform2, False, False);
6645  MObjectSetTransparency(colform2, 255);
6646  MObjectSetShadow(colform2, WS_NONE, 0, 0);
6647 
6648  rowform1 = MCreateRowForm(colform2);
6649  MFormSetSpacing(rowform1, 0);
6650  MObjectSetResize(rowform1, False, False);
6651  MObjectSetShadow(rowform1, WS_NONE, 0, 0);
6652  MObjectSetTransparency(rowform1, 255);
6653 
6654  colform3 = MCreateColForm(rowform1);
6655  MFormSetSpacing(colform3, 0);
6656  MObjectSetResize(colform3, False, False);
6657  MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN);
6658  MObjectSetTransparency(colform3, 255);
6659  MObjectSetShadow(colform3, WS_NONE, 0, 0);
6660 
6661  sprintf(buf, "0");
6662  optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL);
6663  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6664  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6665  MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN);
6666  MEditDisableEditing(optedit);
6667  list = MOptionEditGetList(optedit);
6668  for(i=0; i<96; i++)
6669  {
6670  sprintf(buf, "%d",i);
6671  MSListAddItem(list, buf, 0L);
6672  }
6673  MSListSelectElement(list, 0);
6674 
6675  lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL);
6676  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6677  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6678  MObjectSetTransparency(lbl, 0);
6679  MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN);
6680  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6681  MObjectSetResize(lbl, False, False);
6682 
6683  sprintf(buf, "95");
6684  optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL);
6685  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6686  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6687  MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN);
6688  MEditDisableEditing(optedit);
6689  list = MOptionEditGetList(optedit);
6690  for(i=0; i<96; i++)
6691  {
6692  sprintf(buf, "%d",i);
6693  MSListAddItem(list, buf, 0L);
6694  }
6695  MSListSelectElement(list, 95);
6696 
6697 
6698  colform4 = MCreateColForm(rowform1);
6699  MFormSetSpacing(colform4, 0);
6700  MObjectSetTransparency(colform4, 255);
6701  MObjectSetShadow(colform4, WS_NONE, 0, 0);
6702 
6703 
6704 
6705 
6706  sprintf(buf, "0");
6707  optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL);
6708  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6709  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6710  MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN);
6711  MEditDisableEditing(optedit);
6712  list = MOptionEditGetList(optedit);
6713  for(i=0; i<96; i++)
6714  {
6715  sprintf(buf, "%d",i);
6716  MSListAddItem(list, buf, 0L);
6717  }
6718  MSListSelectElement(list, 0);
6719 
6720 
6721  sprintf(buf, "<SZA<");
6722  lbl = MCreateLabel(colform4, buf, FIXED_SMALL);
6723  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6724  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6725  MObjectSetTransparency(lbl, 0);
6726  // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6727  MObjectSetResize(lbl, True, False);
6728 
6729  sprintf(buf, "50");
6730  optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL);
6731  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6732  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6733  MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN);
6734  MEditDisableEditing(optedit);
6735  list = MOptionEditGetList(optedit);
6736  for(i=0; i<96; i++)
6737  {
6738  sprintf(buf, "%d",i);
6739  MSListAddItem(list, buf, 0L);
6740  }
6741  MSListSelectElement(list, 50);
6742 
6743 
6744  lbl = MCreateLabel(colform4, "OR", FIXED_SMALL);
6745  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6746  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6747  MObjectSetTransparency(lbl, 0);
6748  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6749  MObjectSetResize(lbl, True, False);
6750 
6751  sprintf(buf, "75");
6752  optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL);
6753  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6754  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6755  MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN);
6756  MEditDisableEditing(optedit);
6757  list = MOptionEditGetList(optedit);
6758  for(i=0; i<96; i++)
6759  {
6760  sprintf(buf, "%d",i);
6761  MSListAddItem(list, buf, 0L);
6762  }
6763  MSListSelectElement(list, 75);
6764 
6765  lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL);
6766  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6767  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6768  MObjectSetTransparency(lbl, 0);
6769  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6770  MObjectSetResize(lbl, True, False);
6771 
6772  sprintf(buf, "95");
6773  optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL);
6774  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6775  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6776  MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN);
6777  MEditDisableEditing(optedit);
6778  list = MOptionEditGetList(optedit);
6779  for(i=0; i<96; i++)
6780  {
6781  sprintf(buf, "%d",i);
6782  MSListAddItem(list, buf, 0L);
6783  }
6784  MSListSelectElement(list, 95);
6785 
6786 
6787 // 1 End
6788 /***************************************************************/
6789 
6790 /***************************************************************/
6791 // 2 start
6792  rowform = MCreateRowForm(obj);
6793  MFormSetSpacing(rowform, 0);
6794  MObjectSetTransparency(rowform, 255);
6795 
6796 
6797  lbl = MCreateLabel(rowform, "Horizontal", FIXED_SMALL);
6798  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6799  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6800  MObjectSetTransparency(lbl, 0);
6801  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6802  MObjectSetCompositeWidth(lbl, 250);
6803 
6804 
6805  CONFP_opt_ScheMeas(1, rowform);
6806 
6807 /*
6808 
6809  lbl = MCreateLabel(obj, "Horizontal", FIXED_SMALL);
6810  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6811  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6812  MObjectSetTransparency(lbl, 0);
6813  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6814  MObjectSetCompositeWidth(lbl, 250);
6815 
6816 */
6817 
6818  rowform = MCreateRowForm(obj);
6819  MFormSetSpacing(rowform, 0);
6820  MObjectSetTransparency(rowform, 255);
6821 
6822 
6823  lbl = MCreateLabel(rowform, "Radiometric", FIXED_SMALL);
6824  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6825  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6826  MObjectSetTransparency(lbl, 0);
6827  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6828  MObjectSetCompositeWidth(lbl, 250);
6829 
6830 
6831  CONFP_opt_ScheMeas(0, rowform);
6832 
6833 /*
6834  lbl = MCreateLabel(obj, "Radiometric", FIXED_SMALL);
6835  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6836  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6837  MObjectSetTransparency(lbl, 0);
6838  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6839  MObjectSetCompositeWidth(lbl, 250);
6840 
6841 */
6842  rowform = MCreateRowForm(obj);
6843  MFormSetSpacing(rowform, 0);
6844  MObjectSetTransparency(rowform, 255);
6845 
6846 
6847  lbl = MCreateLabel(rowform, "Off-Axis", FIXED_SMALL);
6848  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6849  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6850  MObjectSetTransparency(lbl, 0);
6851  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6852  MObjectSetCompositeWidth(lbl, 250);
6853 
6854 
6855  CONFP_opt_ScheMeas(0, rowform);
6856 /*
6857 
6858  lbl = MCreateLabel(obj, "Off-Axis", FIXED_SMALL);
6859  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6860  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6861  MObjectSetTransparency(lbl, 0);
6862  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6863  MObjectSetCompositeWidth(lbl, 250);
6864 */
6865 
6866  /*---------------------------------------------------------------*/
6867  /*------ Dummy table ---------------------------------------*/
6868  tb = MCreateTableForm(obj, 2);
6869  MObjectSetBackgroundRGB(tb, 112, 128, 112);
6870  MObjectSetResize(tb, True, True);
6872  /*------ Dummy table ---------------------------------------*/
6873  /*---------------------------------------------------------------*/
6874 
6875 
6876 }
void MEditDisableEditing(MOBJECT edit)
#define RIGHT_ALIGN
Definition: Mguidefs.h:916
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT lbl
Definition: DFileMan.c:42
MOBJECT MOptionEditGetList(MOBJECT ce)
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
const char * Mir_Code[]
const char array for the realisation of the Mirrors buttons in the Mirror shell
Definition: DAS_Spat.c:231
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
const char * DeviceTypeInput[]
const char array for the Device type <-> Input association
Definition: DAS_Spat.c:247
#define False
Definition: Mguidefs.h:236
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
void MSListSelectElement(MOBJECT p, long n)
void CONFP_opt_ScheMeas(int mod, MOBJECT p)
MOBJECT MCreateOptionEdit(MOBJECT parent, const char *text, int len, int clip_len, int nrow, MTFont font)
void MObjectSetText(MOBJECT obj, const char *text)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
#define FIXED_SMALL
Definition: Mguidefs.h:878
das DAS
Definition: DAS_Spat_Conf.c:56
#define GASCODNG4
GASCODNG 4.
#define SPATRAM3
SPATRAM3.
void MFormSetSpacing(MOBJECT p, int offset)
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
int MSListAddItem(MOBJECT p, const char *item, void *data)
int EqType
Spectrometer Type.
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MCreateRowForm(MOBJECT parent)
#define WS_ETCHED_IN
Definition: Mguidefs.h:959
#define TOP_ALIGN
Definition: Mguidefs.h:918
const char * Mir_CodeTropo[]
const char array for the realisation of the Mirrors buttons in the Mirror shell for TROPOGAS ...
Definition: DAS_Spat.c:234
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:

§ CONFP_opt_page7()

void CONFP_opt_page7 ( int  mod,
MOBJECT  obj 
)

Definition at line 5845 of file DAS_Spat_Conf.c.

References _MAX_PATH, CENTER_ALIGN, gui::ConfigPanel, DB_FilterType_CB(), DB_ResetEnable_CB(), DB_ResetType_CB(), DB_Shutter_CB(), DB_ShutterType_CB(), das::DOption, configpanel::edtDASReset, edtDASReset_CB(), optionini::emshutter, False, FDOUBLE, optionini::filtertype, FIXED_SMALL, FPLUS, FSIMPLE, das::Gui, LIST_ACT::item, lbl, configpanel::lblReset, LEFT_ALIGN, configpanel::listReset, MCreateLabel(), MCreateOptionEdit(), MCreateRButton(), MCreateTableForm(), MEditDisableEditing(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetSensitive(), MObjectSetShadow(), MObjectSetText(), MObjectSetTransparency(), MObjectSetUnsensitive(), MOptionEditGetList(), MOptionEditSetListCallback(), MPButtonSetCallback(), MRButtonActivate(), MSListAddItem(), MSListGetSelected(), MSListSelectElement(), configpanel::rbDASResPer, configpanel::rbFilterType, configpanel::rbResetEnab, configpanel::rbSHUTStatus, configpanel::rbSHUTType, RDAY, optionini::resetEnabled, optionini::resetFreq, optionini::resetType, RHOUR, ROTSHUT, optionini::shuttertype, TOP_ALIGN, TORQUEM, True, VS25, and WS_ETCHED_IN.

Referenced by CONFP_Options().

5846 {
5847 
5848 // MOBJECT rowform; // generic row form
5849 // MOBJECT pb, rb ;
5850  MOBJECT lbl;
5851  MOBJECT tb; // generic table object
5852  int i,k;
5853 // char buf[64];
5854 // MOBJECT list;
5855 // int starti;
5856  float f=0;
5857  char str[80];
5858  char buff[_MAX_PATH];
5859 
5860  LIST_ACT * pla;
5861 
5862 
5863  MObjectSetText(obj, "Page 7");
5864 
5865 
5866 
5867  /******************************************************************/
5868  /*************** SHUTTER ******************************************/
5869  /******************************************************************/
5870 
5871  lbl = MCreateLabel(obj, "SHUTTER OPTIONS", FIXED_SMALL);
5872  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5873  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
5874  MObjectSetTransparency(lbl, 0);
5875 
5876  lbl = MCreateLabel(obj, "Is the EMShutter Installed?", FIXED_SMALL);
5877  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5878  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5879  MObjectSetTransparency(lbl, 0);
5880  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5881  MObjectSetCompositeWidth(lbl, 250);
5882 
5883  tb = MCreateTableForm(obj, 2);
5884  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5885  MObjectSetResize(tb, True, False);
5886 
5891  //MObjectSetCompositeWidth(rb, 100);
5892  if(DAS.DOption.emshutter == 1)
5895 
5896 
5901  //MObjectSetCompositeWidth(rb, 90);
5902  if(DAS.DOption.emshutter == 0)
5905 
5906  lbl = MCreateLabel(obj, "Choose Shutter Type", FIXED_SMALL);
5907  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5908  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5909  MObjectSetTransparency(lbl, 0);
5910  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5911  MObjectSetCompositeWidth(lbl, 250);
5912 
5913  tb = MCreateTableForm(obj, 3);
5914  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5915  MObjectSetResize(tb, True, False);
5916 
5917  DAS.Gui.ConfigPanel.rbSHUTType [0] = MCreateRButton(tb, "UniBlitz VS25", FIXED_SMALL);
5922  //MObjectSetCompositeWidth(rb, 100);
5923  if(DAS.DOption.shuttertype == VS25)
5925 
5926  DAS.Gui.ConfigPanel.rbSHUTType [1] = MCreateRButton(tb, "Rotating Sh.", FIXED_SMALL);
5931  //MObjectSetCompositeWidth(rb, 100);
5934 
5935  DAS.Gui.ConfigPanel.rbSHUTType[2] = MCreateRButton(tb, "Torque Motor", FIXED_SMALL);
5940  //MObjectSetCompositeWidth(rb, 100);
5943 
5944 
5945 
5946  if(DAS.DOption.emshutter == 0)
5947  {
5951  }
5952  else
5953  {
5957  }
5958  /******************************************************************/
5959  /*************** END SHUTTER **************************************/
5960  /******************************************************************/
5961 
5962 
5963 
5964  /******************************************************************/
5965  /*************** FILTER WHEEL *************************************/
5966  /******************************************************************/
5967 
5968  lbl = MCreateLabel(obj, "FILTER WHEEL OPTIONS", FIXED_SMALL);
5969  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5970  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
5971  MObjectSetTransparency(lbl, 0);
5972 
5973 
5974  lbl = MCreateLabel(obj, "Choose Installed Module", FIXED_SMALL);
5975  MObjectSetForegroundRGB(lbl, 255, 255, 255);
5976  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
5977  MObjectSetTransparency(lbl, 0);
5978  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
5979  MObjectSetCompositeWidth(lbl, 250);
5980 
5981  tb = MCreateTableForm(obj, 3);
5982  MObjectSetBackgroundRGB(tb, 112, 128, 112);
5983  MObjectSetResize(tb, True, False);
5984 
5985  DAS.Gui.ConfigPanel.rbFilterType [0] = MCreateRButton(tb, "Simple-SM3", FIXED_SMALL);
5990  //MObjectSetCompositeWidth(rb, 100);
5991  if(DAS.DOption.filtertype == FSIMPLE)
5993 
5994  DAS.Gui.ConfigPanel.rbFilterType [1] = MCreateRButton(tb, "Double-SM3+SM4", FIXED_SMALL);
5999  //MObjectSetCompositeWidth(rb, 100);
6000  if(DAS.DOption.filtertype == FDOUBLE)
6002 
6003  DAS.Gui.ConfigPanel.rbFilterType[2] = MCreateRButton(tb, "Plus-SM3+TM", FIXED_SMALL);
6008  //MObjectSetCompositeWidth(rb, 100);
6009  if(DAS.DOption.filtertype == FPLUS)
6011 
6012 
6013 /*
6014  if(DAS.DOption.emshutter == 0)
6015  {
6016  MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]);
6017  MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]);
6018  MObjectSetUnsensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]);
6019  }
6020  else
6021  {
6022  MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [0]);
6023  MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [1]);
6024  MObjectSetSensitive(DAS.Gui.ConfigPanel.rbSHUTType [2]);
6025  }
6026 
6027 */
6028 
6029  /******************************************************************/
6030  /*************** END FILTER WHEEL ********************************/
6031  /******************************************************************/
6032 
6033  /******************************************************************/
6034  /*************** RESET DAS Windows Restart ***********************/
6035  /******************************************************************/
6036 
6037  lbl = MCreateLabel(obj, "RESET WINDOWS OPTIONS", FIXED_SMALL);
6038  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6039  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
6040  MObjectSetTransparency(lbl, 0);
6041 
6042  /*----------------------------------------------------------------*/
6043 
6044  lbl = MCreateLabel(obj, "DAS/SYSTEM Reset ", FIXED_SMALL);
6045  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6046  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6047  MObjectSetTransparency(lbl, 0);
6048  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6049  MObjectSetCompositeWidth(lbl, 250);
6050 
6051  tb = MCreateTableForm(obj, 2);
6052  MObjectSetBackgroundRGB(tb, 112, 128, 112);
6053  MObjectSetResize(tb, True, False);
6054 
6055  DAS.Gui.ConfigPanel.rbResetEnab[0] = MCreateRButton(tb, "Disabled", FIXED_SMALL);
6059  //MObjectSetCompositeWidth(rb, 100);
6060  if(DAS.DOption.resetEnabled == 0)
6063 
6064 
6069  //MObjectSetCompositeWidth(rb, 100);
6070  if(DAS.DOption.resetEnabled == 1)
6073 
6074 
6075 
6076  /*----------------------------------------------------------------*/
6077  lbl = MCreateLabel(obj, "Reset Type", FIXED_SMALL);
6078  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6079  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6080  MObjectSetTransparency(lbl, 0);
6081  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6082  MObjectSetCompositeWidth(lbl, 250);
6083 
6084  tb = MCreateTableForm(obj, 2);
6085  MObjectSetBackgroundRGB(tb, 112, 128, 112);
6086  MObjectSetResize(tb, True, False);
6087 
6093  //MObjectSetCompositeWidth(rb, 100);
6094 
6100  //MObjectSetCompositeWidth(rb, 100);
6101 
6102 
6103  lbl = MCreateLabel(obj, "Reset Frequency", FIXED_SMALL);
6104  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6105  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6106  MObjectSetTransparency(lbl, 0);
6107  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6108  MObjectSetCompositeWidth(lbl, 250);
6109 
6110  tb = MCreateTableForm(obj, 3);
6111  MObjectSetBackgroundRGB(tb, 112, 128, 112);
6112  MObjectSetResize(tb, True, False);
6113 
6114  lbl = MCreateLabel(tb, "Re-start every ", FIXED_SMALL);
6115  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6116  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6117  MObjectSetTransparency(lbl, 0);
6118  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6119  //MObjectSetCompositeWidth(lbl, 250);
6120 
6121 
6122 
6123  sprintf(buff, "%d", (int)DAS.DOption.resetFreq);
6129 
6130 
6132  if (DAS.DOption.resetType) // Days
6133  {
6134  for(i=1; i<365; i++)
6135  {
6136  sprintf(str, "%.d",i);
6138  if( strcmp(str,buff) ==0 )
6139  k=i;
6140  }
6141  }
6142  else //hours
6143  {
6144  for(i=1; i<24; i++)
6145  {
6146  sprintf(str, "%.d",i);
6148  if( strcmp(str,buff) ==0 )
6149  k=i;
6150  }
6151 
6152  }
6153 /*
6154 
6155  list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDSZA);
6156  for(i=0; i<20; i++)
6157  {
6158  f = f+0.10;
6159  sprintf(str, "%.3f",f);
6160  MSListAddItem(list, str, 0L);
6161  if( strcmp(str,buff) ==0 )
6162  k=i;
6163 
6164  }
6165 
6166  MSListSelectElement(list, k);
6167  pla = MSListGetSelected(list);
6168  sprintf(str, "%s", pla->item );
6169  MObjectSetText(DAS.Gui.ConfigPanel.edtDSZA, str);
6170  MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDSZA, edtDSZA_CB, (void *) 0);
6171  SZADelta.DeltaSZA = atof(pla->item);
6172 
6173 
6174 */
6175 
6176 
6179  sprintf(str, "%s", pla->item );
6182  DAS.DOption.resetFreq = atoi(pla->item);
6183 
6184  if (DAS.DOption.resetType) // Days
6185  sprintf(buff, "Day(s)", DAS.DOption.resetFreq);
6186  else
6187  sprintf(buff, "Hour(s)", DAS.DOption.resetFreq);
6188 
6194 
6195  if(DAS.DOption.resetType == RHOUR)
6197 
6198  if(DAS.DOption.resetType == RDAY)
6200 
6201  /******************************************************************/
6202  /*************** END RESET DAS ********************************/
6203  /******************************************************************/
6204 
6205 
6206  /*---------------------------------------------------------------*/
6207  /*------ Dummy table ---------------------------------------*/
6208  tb = MCreateTableForm(obj, 2);
6209  MObjectSetBackgroundRGB(tb, 112, 128, 112);
6210  MObjectSetResize(tb, True, True);
6212  /*------ Dummy table ---------------------------------------*/
6213  /*---------------------------------------------------------------*/
6214 
6215 
6216 }
void MEditDisableEditing(MOBJECT edit)
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
MOBJECT rbFilterType[3]
radio button for SHUTTER type
MOBJECT lbl
Definition: DFileMan.c:42
MOBJECT MOptionEditGetList(MOBJECT ce)
optionini DOption
Options for DAS execution.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
void MObjectSetUnsensitive(MOBJECT obj)
#define TORQUEM
Torque Motor.
List Item Activation.
Definition: Mguidefs.h:1179
void MOptionEditSetListCallback(MOBJECT obj, LIST_ACT_CB cb, void *data)
#define RDAY
double filter wheel
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void DB_Shutter_CB(MOBJECT o, void *a, void *v)
callback selecting if the shutter is installed or not
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
int filtertype
type of installed filter module: 0=Simple-SM3, 1=Double-SM3+SM4, 2=simpleplus-SM3+TM) ...
#define False
Definition: Mguidefs.h:236
void DB_ResetEnable_CB(MOBJECT o, void *a, void *v)
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
void MSListSelectElement(MOBJECT p, long n)
#define ROTSHUT
Rotating Shutter.
char * item
Definition: Mguidefs.h:1181
MOBJECT rbResetEnab[2]
radio button for DAS Reset Enable/Disable
MOBJECT MCreateOptionEdit(MOBJECT parent, const char *text, int len, int clip_len, int nrow, MTFont font)
void MObjectSetText(MOBJECT obj, const char *text)
void DB_ShutterType_CB(MOBJECT o, void *a, void *v)
callback selecting the type of installed shutter
void DB_ResetType_CB(MOBJECT o, void *a, void *v)
MOBJECT rbDASResPer[2]
radio button for DAS Reset type (HOURs/DAYs)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
#define FDOUBLE
double filter wheel
#define FPLUS
Filter Wheel Torque Motor.
#define CENTER_ALIGN
Definition: Mguidefs.h:917
#define FIXED_SMALL
Definition: Mguidefs.h:878
int emshutter
Presence of the CCD Shutter, emshutter = 1 –> Shutter IS Installed, = 0 –> Shutter NOT Installed...
void edtDASReset_CB(MOBJECT p, LIST_ACT *la, void *ad)
void MRButtonActivate(MOBJECT o)
int resetFreq
frequency of DAS/Windows Reset
MOBJECT edtDASReset
edit box for DAS Reset
das DAS
Definition: DAS_Spat_Conf.c:56
#define VS25
Uniblitz Shutter VS25.
#define RHOUR
simple filter wheel
#define FSIMPLE
simple filter wheel
#define _MAX_PATH
Definition: Dildef.h:202
MOBJECT listReset
list for reset frequency
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
configpanel ConfigPanel
Configuration panel structure.
MOBJECT lblReset
label for reset frequency
MOBJECT rbSHUTType[3]
radio button for SHUTTER type
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
MOBJECT rbSHUTStatus[2]
radio button for SHUTTER status
int MSListAddItem(MOBJECT p, const char *item, void *data)
void DB_FilterType_CB(MOBJECT o, void *a, void *v)
callback selecting the type of installed filter wheel module
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
int resetEnabled
DAS/Windows reset option (1 = Enabled; 0 = disabled)
void MObjectSetSensitive(MOBJECT obj)
int resetType
type of period for DAS Reset: 0=Hours, 1=Days
#define WS_ETCHED_IN
Definition: Mguidefs.h:959
int shuttertype
type of installed shutter: 0 = VS25, 1 = Rotating Shutter, 2 = TorqueMotor
#define TOP_ALIGN
Definition: Mguidefs.h:918
LIST_ACT * MSListGetSelected(MOBJECT p)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CONFP_opt_ScheMeas()

void CONFP_opt_ScheMeas ( int  mod,
MOBJECT  p 
)

Definition at line 6220 of file DAS_Spat_Conf.c.

References CENTER_ALIGN, False, FIXED_SMALL, lbl, LEFT_ALIGN, MCreateColForm(), MCreateLabel(), MCreateOptionEdit(), MCreateRButton(), MCreateRowForm(), MEditDisableEditing(), MFormSetSpacing(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetTransparency(), MOptionEditGetList(), MSListAddItem(), MSListSelectElement(), TOP_ALIGN, True, and WS_NONE.

Referenced by CONFP_opt_page6().

6221 {
6222 
6223 // MOBJECT rowform; // generic row form
6224  MOBJECT rowform1;
6225  MOBJECT colform, colform2,colform3,colform4;
6226  MOBJECT rb ;
6227  MOBJECT lbl, list, optedit;
6228 // MOBJECT tb ; // generic table object
6229  int i;
6230  int lenedit = 12;
6231  char buf[64];
6232  int maxangle;
6233 
6234  if (mod == 1)
6235  maxangle = 181;
6236  else
6237  maxangle = 96;
6238 
6239  colform = MCreateColForm(p);
6240  MFormSetSpacing(colform, 0);
6241  MObjectSetResize(colform, False, False);
6242  MObjectAlign(colform, CENTER_ALIGN, TOP_ALIGN);
6243  MObjectSetTransparency(colform, 255);
6244  MObjectSetShadow(colform, WS_NONE, 0, 0);
6245 
6246 
6247 
6248  rowform1 = MCreateRowForm(colform);
6249  MFormSetSpacing(rowform1, 0);
6250  MObjectSetResize(rowform1, False, True);
6251  MObjectAlign(rowform1, LEFT_ALIGN, TOP_ALIGN);
6252  MObjectSetTransparency(rowform1, 255);
6253  MObjectSetShadow(rowform1, WS_NONE, 0, 0);
6254 
6255 
6256  rb = MCreateRButton(rowform1, "", FIXED_SMALL);
6257 // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 0);
6259  MObjectSetForegroundRGB(rb, 255, 255, 255);
6260  MObjectSetTransparency(rb, 255);
6261  MObjectSetResize(rb, True, False);
6262  MObjectSetCompositeWidth(rb, 25);
6263 // if(DAS.DOption.mirrorimg == 1)
6264 // MRButtonActivate(rb);
6265 
6266 
6267  rb = MCreateRButton(rowform1, "", FIXED_SMALL);
6268 // MPButtonSetCallback(rb, DB_MirrorImg_X_CB, (void *) 1);
6270  MObjectSetForegroundRGB(rb, 255, 255, 255);
6271  MObjectSetResize(rb, True, False);
6272  MObjectSetTransparency(rb, 255);
6273  MObjectSetCompositeWidth(rb, 25);
6274 // if(DAS.DOption.mirrorimg == 0)
6275 // MRButtonActivate(rb);
6276 
6277 
6278 
6279  colform2 = MCreateColForm(colform);
6280  MFormSetSpacing(colform2, 0);
6281  MObjectSetResize(colform2, False, False);
6282  MObjectSetTransparency(colform2, 255);
6283  MObjectSetShadow(colform2, WS_NONE, 0, 0);
6284 
6285  rowform1 = MCreateRowForm(colform2);
6286  MFormSetSpacing(rowform1, 0);
6287  MObjectSetResize(rowform1, False, False);
6288  MObjectSetShadow(rowform1, WS_NONE, 0, 0);
6289  MObjectSetTransparency(rowform1, 255);
6290 
6291  colform3 = MCreateColForm(rowform1);
6292  MFormSetSpacing(colform3, 0);
6293  MObjectSetResize(colform3, False, False);
6294  MObjectAlign(colform3, LEFT_ALIGN, TOP_ALIGN);
6295  MObjectSetTransparency(colform3, 255);
6296  MObjectSetShadow(colform3, WS_NONE, 0, 0);
6297 
6298  sprintf(buf, "0");
6299  optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL);
6300  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6301  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6302  MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN);
6303  MEditDisableEditing(optedit);
6304  list = MOptionEditGetList(optedit);
6305  for(i=0; i<maxangle; i++)
6306  {
6307  sprintf(buf, "%d",i);
6308  MSListAddItem(list, buf, 0L);
6309  }
6310  MSListSelectElement(list, 0);
6311 
6312  lbl = MCreateLabel(colform3, "<SZA<", FIXED_SMALL);
6313  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6314  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6315  MObjectSetTransparency(lbl, 0);
6316  MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN);
6317  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6318  MObjectSetResize(lbl, False, False);
6319 
6320  sprintf(buf, "95");
6321  optedit = MCreateOptionEdit(colform3, buf, 3, 3, 8, FIXED_SMALL);
6322  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6323  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6324  MObjectAlign(optedit, LEFT_ALIGN, TOP_ALIGN);
6325  MEditDisableEditing(optedit);
6326  list = MOptionEditGetList(optedit);
6327  for(i=0; i<maxangle; i++)
6328  {
6329  sprintf(buf, "%d",i);
6330  MSListAddItem(list, buf, 0L);
6331  }
6332  if (mod == 1)
6333  MSListSelectElement(list, 180);
6334  else
6335  MSListSelectElement(list, 95);
6336 
6337 
6338 
6339  colform4 = MCreateColForm(rowform1);
6340  MFormSetSpacing(colform4, 0);
6341  MObjectSetTransparency(colform4, 255);
6342  MObjectSetShadow(colform4, WS_NONE, 0, 0);
6343 
6344 
6345 
6346 
6347  sprintf(buf, "0");
6348  optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL);
6349  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6350  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6351  MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN);
6352  MEditDisableEditing(optedit);
6353  list = MOptionEditGetList(optedit);
6354  for(i=0; i<maxangle; i++)
6355  {
6356  sprintf(buf, "%d",i);
6357  MSListAddItem(list, buf, 0L);
6358  }
6359  MSListSelectElement(list, 0);
6360 
6361 
6362  sprintf(buf, "<SZA<");
6363  lbl = MCreateLabel(colform4, buf, FIXED_SMALL);
6364  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6365  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6366  MObjectSetTransparency(lbl, 0);
6367  // MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6368  MObjectSetResize(lbl, True, False);
6369 
6370  sprintf(buf, "50");
6371  optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL);
6372  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6373  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6374  MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN);
6375  MEditDisableEditing(optedit);
6376  list = MOptionEditGetList(optedit);
6377  for(i=0; i<maxangle; i++)
6378  {
6379  sprintf(buf, "%d",i);
6380  MSListAddItem(list, buf, 0L);
6381  }
6382  MSListSelectElement(list, 50);
6383 
6384 
6385  lbl = MCreateLabel(colform4, "OR", FIXED_SMALL);
6386  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6387  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6388  MObjectSetTransparency(lbl, 0);
6389  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6390  MObjectSetResize(lbl, True, False);
6391 
6392  sprintf(buf, "75");
6393  optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL);
6394  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6395  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6396  MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN);
6397  MEditDisableEditing(optedit);
6398  list = MOptionEditGetList(optedit);
6399  for(i=0; i<maxangle; i++)
6400  {
6401  sprintf(buf, "%d",i);
6402  MSListAddItem(list, buf, 0L);
6403  }
6404  MSListSelectElement(list, 75);
6405 
6406  lbl = MCreateLabel(colform4, "<SZA<", FIXED_SMALL);
6407  MObjectSetForegroundRGB(lbl, 255, 255, 255);
6408  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
6409  MObjectSetTransparency(lbl, 0);
6410  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
6411  MObjectSetResize(lbl, True, False);
6412 
6413  sprintf(buf, "95");
6414  optedit = MCreateOptionEdit(colform4, buf, 3, 3, 8, FIXED_SMALL);
6415  MObjectSetForegroundRGB(optedit, 255, 255, 255);
6416  MObjectSetBackgroundRGB(optedit, 40, 96, 72);
6417  MObjectAlign(optedit, CENTER_ALIGN, TOP_ALIGN);
6418  MEditDisableEditing(optedit);
6419  list = MOptionEditGetList(optedit);
6420  for(i=0; i<maxangle; i++)
6421  {
6422  sprintf(buf, "%d",i);
6423  MSListAddItem(list, buf, 0L);
6424  }
6425  if (mod == 1)
6426  MSListSelectElement(list, 180);
6427  else
6428  MSListSelectElement(list, 95);
6429 
6430 
6431 }
void MEditDisableEditing(MOBJECT edit)
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
#define WS_NONE
Definition: Mguidefs.h:956
MOBJECT lbl
Definition: DFileMan.c:42
MOBJECT MOptionEditGetList(MOBJECT ce)
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
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 MSListSelectElement(MOBJECT p, long n)
MOBJECT MCreateOptionEdit(MOBJECT parent, const char *text, int len, int clip_len, int nrow, MTFont font)
#define CENTER_ALIGN
Definition: Mguidefs.h:917
#define FIXED_SMALL
Definition: Mguidefs.h:878
MOBJECT MCreateColForm(MOBJECT parent)
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
static double p
Definition: SOLPOS.C:131
void MFormSetSpacing(MOBJECT p, int offset)
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
int MSListAddItem(MOBJECT p, const char *item, void *data)
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
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:

§ CONFP_Options()

void CONFP_Options ( int  mod,
MOBJECT  mo 
)

Definition at line 6881 of file DAS_Spat_Conf.c.

References CENTER_ALIGN, CloseConfigCB(), gui::ConfigPanel, CONFP_opt_page1(), CONFP_opt_page2(), CONFP_opt_page3(), CONFP_opt_page4(), CONFP_opt_page5(), CONFP_opt_page6(), CONFP_opt_page7(), False, FIXED_SMALL, das::Gui, MCreatePButton(), MCreateRowForm(), MCreateTabbedRowForm(), MCreateTableForm(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetText(), MPagedFormSetActivePage(), MPButtonSetCallback(), configpanel::ShellConfig, TOP_ALIGN, and WriteOptioniniCB().

Referenced by MDCreateDASConfig().

6882 {
6883 
6884 
6885  MOBJECT rowform; // generic row form
6886 
6887  MOBJECT rowform1; // generic row form
6888 // MOBJECT PFAMS; // paged form for AMS
6889  MOBJECT POPT; // paged form for AMS
6890 // MOBJECT edit; // generic edit object
6891 // MOBJECT radiobutt[2]; // generic radio button
6892 
6893 // MOBJECT RColButt;
6894  MOBJECT pb;
6895 // MOBJECT list;
6896 // MOBJECT _tbutton000;
6897 // MOBJECT _tbutton001;
6898 // MOBJECT form2;
6899 // MOBJECT lbl;
6900  MOBJECT tb; // generic table object
6901 // char buf[64];
6902 // int *p;
6903 
6904 
6905  MObjectSetText(mo, "Options");
6906 
6907  rowform = MCreateRowForm(mo);
6908  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
6909 // MObjectSetResize(rowform, True, True);
6910  MObjectSetCompositeWidth(rowform, 400);
6911  MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN);
6912 
6913  POPT = MCreateTabbedRowForm(rowform, 7, FIXED_SMALL);
6914  MObjectSetForegroundRGB(POPT, 255, 255, 255);
6915  MObjectSetBackgroundRGB(POPT, 112, 128, 112);
6917  MObjectSetCompositeWidth(POPT, 390);
6918  MObjectSetResize(POPT, False, False);
6919 
6920 
6921 
6922 
6923 
6924 
6925 
6926  //Creation page 1
6927  CONFP_opt_page1(0, POPT);
6928 
6929  MPagedFormSetActivePage(POPT, 1);
6930  //Creation page 2
6931  CONFP_opt_page2(0, POPT);
6932 
6933  MPagedFormSetActivePage(POPT, 2);
6934  //Creation page 3
6935  CONFP_opt_page3(0, POPT);
6936 
6937  MPagedFormSetActivePage(POPT, 3);
6938  //Creation page 4
6939  CONFP_opt_page4(0, POPT);
6940 
6941  MPagedFormSetActivePage(POPT, 4);
6942  //Creation page 5
6943  CONFP_opt_page5(0, POPT);
6944 
6945  MPagedFormSetActivePage(POPT, 5);
6946  //Creation page 6
6947  CONFP_opt_page6(0, POPT);
6948 
6949  MPagedFormSetActivePage(POPT, 6);
6950  //Creation page 7
6951  CONFP_opt_page7(0, POPT);
6952 
6953 
6954  MPagedFormSetActivePage(POPT, 0);
6955 
6956  // Command Button Section
6957  rowform1 = MCreateRowForm(mo);
6958  MObjectSetBackgroundRGB(rowform1, 112, 128, 112);
6959  //MObjectSetResize(rowform, False, True);
6960  MObjectSetCompositeWidth(rowform1, 357);
6961  MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN);
6962 
6963  tb = MCreateTableForm(rowform1, 2);
6964  MObjectSetBackgroundRGB(tb, 56, 112, 112);
6966  MObjectSetCompositeWidth(tb, 347);
6967 
6968  pb = MCreatePButton(tb, "Save", FIXED_SMALL);
6969  MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0);
6970  MObjectSetBackgroundRGB(pb, 224, 224, 176);
6971  MObjectSetCompositeWidth(pb, 74);
6972 
6973 
6974  pb = MCreatePButton(tb, "Close", FIXED_SMALL);
6976  MObjectSetBackgroundRGB(pb, 224, 224, 176);
6977  MObjectSetCompositeWidth(pb, 74);
6978 
6979 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
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 CONFP_opt_page5(int mod, MOBJECT obj)
void MObjectSetText(MOBJECT obj, const char *text)
int WriteOptioniniCB(MOBJECT shell, void *od, void *ad)
Write Options.ini file .
void CONFP_opt_page4(int mod, MOBJECT obj)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define CENTER_ALIGN
Definition: Mguidefs.h:917
#define FIXED_SMALL
Definition: Mguidefs.h:878
das DAS
Definition: DAS_Spat_Conf.c:56
configpanel ConfigPanel
Configuration panel structure.
void CONFP_opt_page6(int mod, MOBJECT obj)
MOBJECT ShellConfig
Shell configuration panel.
void CONFP_opt_page3(int mod, MOBJECT obj)
void MPagedFormSetActivePage(MOBJECT form, int page)
void CONFP_opt_page1(int mod, MOBJECT obj)
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
void CONFP_opt_page2(int mod, MOBJECT obj)
void * MOBJECT
Definition: Mguidefs.h:192
void CONFP_opt_page7(int mod, MOBJECT obj)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MCreateRowForm(MOBJECT parent)
#define TOP_ALIGN
Definition: Mguidefs.h:918
MOBJECT MCreateTabbedRowForm(MOBJECT parent, int npage, MTFont f)
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 i...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CONFP_Param()

void CONFP_Param ( int  mod,
MOBJECT  mo 
)

Definition at line 3961 of file DAS_Spat_Conf.c.

References CENTER_ALIGN, CONFP_param_page1(), CONFP_param_page2(), CONFP_param_page3(), CONFP_param_page4(), CONFP_param_page5(), False, FIXED_SMALL, MCreateRowForm(), MCreateTabbedRowForm(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetText(), MPagedFormSetActivePage(), and TOP_ALIGN.

Referenced by MDCreateDASConfig().

3962 {
3963 
3964  MOBJECT rowform; // generic row form
3965 // MOBJECT rowform1; // generic row form
3966 // MOBJECT edit; // generic edit object
3967 
3968 // MOBJECT pb; // generic pushbutton and radiobutton
3969 // MOBJECT lbl; //generic label
3970 // MOBJECT tb; // generic table object
3971  MOBJECT PPARAM;
3972 // char buf[64];
3973 // int k;
3974 
3975 
3976 
3977  MObjectSetText(mo, "Parametrs");
3978 
3979  rowform = MCreateRowForm(mo);
3980  MObjectSetBackgroundRGB(rowform, 56, 112, 112);
3981  MObjectSetResize(rowform, False, False);
3982  MObjectSetCompositeWidth(rowform, 357); //357
3983  MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN);
3984 
3985 
3986 
3987  PPARAM = MCreateTabbedRowForm(rowform, 5, FIXED_SMALL);
3988  MObjectSetForegroundRGB(PPARAM, 255, 255, 255);
3989  MObjectSetBackgroundRGB(PPARAM, 56, 112, 112);
3991  MObjectSetCompositeWidth(PPARAM, 357);
3992  MObjectSetResize(PPARAM, False, False);
3993 
3994  CONFP_param_page1(0, PPARAM);
3995 
3996  MPagedFormSetActivePage(PPARAM, 1);
3997  //Creation page 2
3998  CONFP_param_page2(0, PPARAM);
3999 
4000  MPagedFormSetActivePage(PPARAM, 2);
4001  //Creation page 3
4002  CONFP_param_page3(0, PPARAM);
4003 
4004  MPagedFormSetActivePage(PPARAM, 3);
4005  //Creation page 4
4006  CONFP_param_page4(0, PPARAM);
4007 
4008  MPagedFormSetActivePage(PPARAM, 4);
4009  //Creation page 5
4010  CONFP_param_page5(0, PPARAM);
4011 
4012  MPagedFormSetActivePage(PPARAM, 0);
4013 
4014 
4015 }
void CONFP_param_page4(int mod, MOBJECT obj)
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
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 CONFP_param_page1(int mod, MOBJECT obj)
void MObjectSetText(MOBJECT obj, const char *text)
void CONFP_param_page2(int mod, MOBJECT obj)
#define CENTER_ALIGN
Definition: Mguidefs.h:917
#define FIXED_SMALL
Definition: Mguidefs.h:878
void MPagedFormSetActivePage(MOBJECT form, int page)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
void * MOBJECT
Definition: Mguidefs.h:192
void CONFP_param_page3(int mod, MOBJECT obj)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MCreateRowForm(MOBJECT parent)
#define TOP_ALIGN
Definition: Mguidefs.h:918
MOBJECT MCreateTabbedRowForm(MOBJECT parent, int npage, MTFont f)
void CONFP_param_page5(int mod, MOBJECT obj)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CONFP_param_page1()

void CONFP_param_page1 ( int  mod,
MOBJECT  obj 
)

Definition at line 3427 of file DAS_Spat_Conf.c.

References _MAX_PATH, ActEditCB(), ApplyChCB(), CCDSetupCB(), paramini::ccdWx, paramini::ccdWy, paramini::ccdXoff, paramini::ccdYoff, CENTER_ALIGN, CloseConfigCB(), gui::ConfigPanel, paramini::CoolPw, DB_EqTypeCB(), DOASMODE, edtCCDOffSet_CB(), paramini::EqType, flag::exemode, False, FIXED_SMALL, das::Flag, das::Gui, LIST_ACT::item, paramini::ITemp, lbl, LEFT_ALIGN, das::Marconi, paramini::maxtexp, MButtonSetImageMaskByPixel(), MCreateClippedEdit(), MCreateEdit(), MCreateImagePButtonExt(), MCreateLabel(), MCreateOptionEdit(), MCreatePButton(), MCreateRButton(), MCreateRowForm(), MCreateTableForm(), MEditDisableEditing(), MEditSetActCallback(), MEditSetValCallback(), MFormSetFocusHighlight(), MLabelSetAlignment(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetText(), MObjectSetTransparency(), MObjectSetUnsensitive(), MOptionEditGetList(), MOptionEditSetListCallback(), MPButtonSetCallback(), MRButtonActivate(), MSListAddItem(), MSListGetSelected(), MSListSelectElement(), MTableFormSetColAlign(), MTableFormSetRowAlign(), marconi::Offset, p, das::Paramini, PB_H_CB(), omuthr::PCPower, config::Platform, RIGHT_ALIGN, configpanel::ShellConfig, TOP_ALIGN, paramini::TPelt, True, UNDEF_ALIGN, ValidateCB(), paramini::VBin, WriteParaminiCB(), and WS_NONE.

Referenced by CONFP_Param().

3428 {
3429 
3430  MOBJECT rowform1; // generic row form
3431  MOBJECT edit; // generic edit object
3432 
3433  MOBJECT pb, rb ;
3434 // MOBJECT list;
3435 // MOBJECT _tbutton000;
3436 // MOBJECT _tbutton001;
3437 // MOBJECT form2;
3438  MOBJECT lbl;
3439  MOBJECT tb; // generic table object
3440  char buf[64];
3441  int i, k, *p;
3442 
3443  MOBJECT list;
3444 
3445  int t=0;
3446  char str[80];
3447  char buff[_MAX_PATH];
3448 
3449  LIST_ACT * pla;
3450 
3451 
3452 
3453 
3454 
3455  MObjectSetText(obj, "Page 1");
3456 
3457 /******************************************************************************************************************/
3458 
3459  //Equipment Type section
3460  /*--------- Start ----------------*/
3461  lbl = MCreateLabel(obj, "Equipment Type", FIXED_SMALL);
3462  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3463  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
3464  MObjectSetTransparency(lbl, 0);
3466 
3467  tb = MCreateTableForm(obj, 3);
3469  MObjectSetBackgroundRGB(tb, 112, 128, 112);
3470  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3471  MObjectSetResize(tb, True, False);
3473 
3474  // Instrument Type(0 = SPATRAM,
3475  // 1 = TROPOGAS, 2 = LIS,
3476  // 3 = SPATRAMPLUS, 4 = GASCODNG, )
3477 
3478  rb = MCreateRButton(tb, "SPATRAMPLUS", FIXED_SMALL);
3479  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 3);
3481  MObjectSetForegroundRGB(rb, 255, 255, 255);
3482  MObjectSetCompositeWidth(rb, 105);
3483  if(DAS.Paramini.EqType == 3)
3484  MRButtonActivate(rb);
3485 
3486  rb = MCreateRButton(tb, "SPATRAM2", FIXED_SMALL);
3487  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 9);
3489  MObjectSetForegroundRGB(rb, 255, 255, 255);
3490  MObjectSetCompositeWidth(rb, 105);
3491  if(DAS.Paramini.EqType == 9)
3492  MRButtonActivate(rb);
3493 
3494  rb = MCreateRButton(tb, "SPATRAM3", FIXED_SMALL);
3495  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 10);
3497  MObjectSetForegroundRGB(rb, 255, 255, 255);
3498  MObjectSetCompositeWidth(rb, 105);
3499  if(DAS.Paramini.EqType == 10)
3500  MRButtonActivate(rb);
3501 
3502  /* rb = MCreateRButton(tb, "SPATRAM", FIXED_SMALL);
3503  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 0);
3504  MObjectAlign(rb, LEFT_ALIGN, TOP_ALIGN);
3505  MObjectSetForegroundRGB(rb, 255, 255, 255);
3506  MObjectSetCompositeWidth(rb, 85);
3507  if( DAS.Paramini.EqType == 0)
3508  MRButtonActivate(rb);
3509  */
3510  rb = MCreateRButton(tb, "TROPOGAS", FIXED_SMALL);
3511  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 1);
3513  MObjectSetForegroundRGB(rb, 255, 255, 255);
3514  MObjectSetCompositeWidth(rb, 85);
3515  if(DAS.Paramini.EqType == 1)
3516  MRButtonActivate(rb);
3517 
3518  rb = MCreateRButton(tb, "LIS", FIXED_SMALL);
3519  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 2);
3521  MObjectSetForegroundRGB(rb, 255, 255, 255);
3522  MObjectSetCompositeWidth(rb, 85);
3523  if(DAS.Paramini.EqType == 2)
3524  MRButtonActivate(rb);
3525 
3526  rb = MCreateRButton(tb, "GASCODNG1", FIXED_SMALL);
3527  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 4);
3529  MObjectSetForegroundRGB(rb, 255, 255, 255);
3530  MObjectSetCompositeWidth(rb, 85);
3531  if(DAS.Paramini.EqType == 4)
3532  MRButtonActivate(rb);
3533 
3534  /* rb = MCreateRButton(tb, "GASCODOffAxis", FIXED_SMALL);
3535  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 5);
3536  MObjectAlign(rb, LEFT_ALIGN, UNDEF_ALIGN);
3537  MObjectSetForegroundRGB(rb, 255, 255, 255);
3538  MObjectSetCompositeWidth(rb, 105);
3539  if(DAS.Paramini.EqType == 5)
3540  MRButtonActivate(rb);
3541  */
3542 
3543 
3544  rb = MCreateRButton(tb, "GASCODNG2", FIXED_SMALL);
3545  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 6);
3547  MObjectSetForegroundRGB(rb, 255, 255, 255);
3548  MObjectSetCompositeWidth(rb, 105);
3549  if(DAS.Paramini.EqType == 6)
3550  MRButtonActivate(rb);
3551 
3552  rb = MCreateRButton(tb, "GASCODNG3", FIXED_SMALL);
3553  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 7);
3555  MObjectSetForegroundRGB(rb, 255, 255, 255);
3556  MObjectSetCompositeWidth(rb, 105);
3557  if(DAS.Paramini.EqType == 7)
3558  MRButtonActivate(rb);
3559 
3560  rb = MCreateRButton(tb, "GASCODNG4", FIXED_SMALL);
3561  MPButtonSetCallback(rb, DB_EqTypeCB, (void *) 8);
3563  MObjectSetForegroundRGB(rb, 255, 255, 255);
3564  MObjectSetCompositeWidth(rb, 105);
3565  if(DAS.Paramini.EqType == 8)
3566  MRButtonActivate(rb);
3567 
3568 /*
3569  pb = MCreatePButton(tb, "Save", FIXED_SMALL);
3570  MPButtonSetCallback(pb, WriteEquipiniCB, 0);
3571  MObjectAlign(pb, LEFT_ALIGN, UNDEF_ALIGN);
3572  //MObjectSetForegroundRGB(pb, 255, 255, 255);
3573  MObjectSetCompositeWidth(pb, 105);
3574 */
3575 
3576  //CCD & OMU Temperature section
3577  /*--------- Start ----------------*/
3578 
3579 
3580  lbl = MCreateLabel(obj, "CCD & OMU Temp", FIXED_SMALL);
3581  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3582  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
3583  MObjectSetTransparency(lbl, 0);
3585 
3586 
3587  tb = MCreateTableForm(obj, 2);
3591  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3592  MObjectSetResize(tb, True, False);
3593  MObjectSetCompositeWidth(tb, 347);
3594 
3595  lbl = MCreateLabel(tb, "CCD Target Temperature:", FIXED_SMALL);
3598  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3599  MObjectSetTransparency(lbl, 0);
3600 
3601  sprintf(buf, "%.1lf", DAS.Paramini.ITemp);
3602  edit = MCreateEdit(tb, buf, 5, FIXED_SMALL);
3604  MObjectSetForegroundRGB(edit, 255, 255, 255);
3605  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3606  MEditSetValCallback(edit, ValidateCB, (void *) 1);
3607  MEditSetActCallback(edit, ActEditCB, (void *) 1);
3608 
3609  lbl = MCreateLabel(tb, "CCD Peltier Init Power:", FIXED_SMALL);
3612  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3613  MObjectSetTransparency(lbl, 0);
3614 
3615  sprintf(buf, "%.1lf%%",(double)DAS.Paramini.CoolPw / 10);
3616  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
3618  MObjectSetForegroundRGB(edit, 255, 255, 255);
3619  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3620  MObjectSetCompositeWidth(edit, 70);
3621  MEditSetValCallback(edit, ValidateCB, (void *) 2);
3622  MEditSetActCallback(edit, ActEditCB, (void *) 2);
3623 
3624 
3625  lbl = MCreateLabel(tb, "Optical Unit Target Temp:", FIXED_SMALL);
3628  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3629 
3630  sprintf(buf, "%.1lf", DAS.Paramini.TPelt);
3631  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
3633  MObjectSetForegroundRGB(edit, 255, 255, 255);
3634  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3635  MObjectSetCompositeWidth(edit, 70);
3636  MEditSetValCallback(edit, ValidateCB, (void *) 3);
3637  MEditSetActCallback(edit, ActEditCB, (void *) 3);
3638 
3639  lbl = MCreateLabel(tb, "OMU Peltier Init Power:", FIXED_SMALL);
3642  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3643  MObjectSetTransparency(lbl, 0);
3644 
3645  sprintf(buf, "%.1lf%%",(double)OMUTHR.PCPower / 10);
3646  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
3648  MObjectSetForegroundRGB(edit, 255, 255, 255);
3649  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3650  MObjectSetCompositeWidth(edit, 70);
3651  MEditSetValCallback(edit, ValidateCB, (void *) 2000);
3652  MEditSetActCallback(edit, ActEditCB, (void *) 2000);
3653 
3654  /*------------------- End CCD & OMU Temperature section -------------*/
3655 
3656  //CCD Window and vertical binning section
3657  /*##################### Start ##################################################*/
3658  lbl = MCreateLabel(obj, "CCD WINDOW - SETUP", FIXED_SMALL);
3659  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3660  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
3661  MObjectSetTransparency(lbl, 0);
3662  MObjectSetCompositeWidth(lbl, 347);
3663 
3664  rowform1 = MCreateRowForm(obj);
3665  MObjectSetBackgroundRGB(rowform1, 56, 112, 112);
3666  MObjectSetResize(rowform1, False, False);
3667  MObjectSetCompositeWidth(rowform1, 347); //357
3668  MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN);
3669 
3670  tb = MCreateTableForm(rowform1, 4);
3671  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3673  MObjectSetResize(tb, True, True);
3674 // MObjectSetCompositeWidth(tb, 347);
3675  MObjectSetShadow(tb, WS_NONE, 0, 0);
3676 
3677 
3678  lbl = MCreateLabel(tb, "X Start:", FIXED_SMALL);
3680  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3681  MObjectSetTransparency(lbl, 0);
3682  MObjectSetResize(lbl, False, False);
3684 
3685  sprintf(buf, "%d",DAS.Paramini.ccdXoff);
3686  //sprintf(buf, "%d",(DC_CCD.dx - DC_CCD.dx));
3687  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
3688  MObjectSetForegroundRGB(edit, 255, 255, 255);
3689  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3690  MObjectSetCompositeWidth(edit, 70);
3692  MEditSetValCallback(edit, ValidateCB, (void *) 4);
3693  MEditSetActCallback(edit, ActEditCB, (void *) 4);
3694  //MEditDisableEditing(edit);
3695 
3696  lbl = MCreateLabel(tb, "X End:", FIXED_SMALL);
3698  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3699  MObjectSetTransparency(lbl, 0);
3700  MObjectSetResize(lbl, False, False);
3702 
3703  sprintf(buf, "%d",DAS.Paramini.ccdWx);
3704  //sprintf(buf, "%d",DC_CCD.dx);
3705  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
3706  MObjectSetForegroundRGB(edit, 255, 255, 255);
3707  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3708  MObjectSetCompositeWidth(edit, 70);
3710  MEditSetValCallback(edit, ValidateCB, (void *) 5);
3711  MEditSetActCallback(edit, ActEditCB, (void *) 5);
3712  // MEditDisableEditing(edit);
3713 
3714  lbl = MCreateLabel(tb, "Y Start:", FIXED_SMALL);
3716  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3717  MObjectSetTransparency(lbl, 0);
3718  MObjectSetResize(lbl, False, False);
3720 
3721  sprintf(buf, "%d",DAS.Paramini.ccdYoff);
3722  //sprintf(buf, "%d", (DC_CCD.dy-DC_CCD.dy));
3723  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
3724  MObjectSetForegroundRGB(edit, 255, 255, 255);
3725  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3726  MObjectSetCompositeWidth(edit, 70);
3728  MEditSetValCallback(edit, ValidateCB, (void *) 6);
3729  MEditSetActCallback(edit, ActEditCB, (void *) 6);
3730  // MEditDisableEditing(edit);
3731 
3732  lbl = MCreateLabel(tb, "Y End:", FIXED_SMALL);
3734  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3735  MObjectSetTransparency(lbl, 0);
3736  MObjectSetResize(lbl, False, False);
3738 
3739  sprintf(buf, "%d",DAS.Paramini.ccdWy);
3740  //sprintf(buf, "%d",DC_CCD.dy);
3741  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
3742  MObjectSetForegroundRGB(edit, 255, 255, 255);
3743  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3744  MObjectSetCompositeWidth(edit, 70);
3746  MEditSetValCallback(edit, ValidateCB, (void *) 7);
3747  MEditSetActCallback(edit, ActEditCB, (void *) 7);
3748  // MEditDisableEditing(edit);
3749 
3750  tb = MCreateTableForm(rowform1, 3);
3752  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3754  MObjectSetCompositeWidth(tb, 347);
3755  MObjectSetShadow(tb, WS_NONE, 0, 0);
3756 
3757  lbl = MCreateLabel(tb, "Vertical Binning:", FIXED_SMALL);
3759  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3760  MObjectSetTransparency(lbl, 0);
3762  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
3763 
3764  sprintf(buf, "%d",DAS.Paramini.VBin);
3765  edit = MCreateClippedEdit(tb, buf, 3, 3, FIXED_SMALL);
3767  MObjectSetForegroundRGB(edit, 255, 255, 255);
3768  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3769  MEditSetValCallback(edit, ValidateCB, (void *) 8);
3770  MEditSetActCallback(edit, ActEditCB, (void *) 8);
3771 
3772  pb = MCreatePButton(tb, "CCD Setup (DCS)", FIXED_SMALL);
3773  MPButtonSetCallback(pb, CCDSetupCB, (void *) 0);
3774  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3775 
3776 
3777 
3778 /* tb = MCreateTableForm(rowform1, 3);
3779  MTableFormSetColAlign(tb, 0, LEFT_ALIGN);
3780  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3781  MObjectSetResize(tb, False, False);
3782  MObjectSetCompositeWidth(tb, 347);
3783 */
3784  lbl = MCreateLabel(tb, "Max. Exp. Time (s) :", FIXED_SMALL);
3786  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3787  MObjectSetTransparency(lbl, 0);
3788  MObjectSetResize(lbl, False, False);
3791 
3792  sprintf(buf, "%.1lf", DAS.Paramini.maxtexp);
3793  edit = MCreateClippedEdit(tb, buf, 5, 5, FIXED_SMALL);
3794  MObjectSetForegroundRGB(edit, 255, 255, 255);
3795  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3796  //MObjectSetCompositeWidth(edit, 35);
3798  k = 123;
3799  p = (void *) k;
3800  MEditSetValCallback(edit, ValidateCB, p);
3801  MEditSetActCallback(edit, ActEditCB, p);
3802 
3803  pb = MCreateImagePButtonExt(tb, "sys\\qmarkyellow.bmp", "sys\\qmarkblue.bmp", "", "sys\\qmarkred.bmp", "", "");
3804  MButtonSetImageMaskByPixel(pb, 0, 0);
3805  MObjectSetTransparency(pb, 255);
3806  MObjectSetShadow(pb, WS_NONE, 0, 0);
3807  MObjectSetBackgroundRGB(pb, 56, 112, 112);
3808  MPButtonSetCallback(pb, PB_H_CB, (void *) 0);
3809 
3810 
3811  /* End CCD Window and vertical binning section ###############*/
3812 /*
3813  lbl = MCreateLabel(obj, "Devices Offsets", FIXED_SMALL);
3814  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3815  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
3816  MObjectSetTransparency(lbl, 0);
3817 */
3818  rowform1 = MCreateRowForm(obj);
3819  MObjectSetBackgroundRGB(rowform1, 56, 112, 112);
3820  MObjectSetResize(rowform1, True, True);
3821  MObjectSetCompositeWidth(rowform1, 347);
3822 
3823 /**************************************************************************/
3824  //OFFSET HIRES 5 SECTION
3825  if (Cfg.Platform == 28)
3826  {
3827  lbl = MCreateLabel(rowform1, "HiresV OFFSET", FIXED_SMALL);
3828  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3829  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
3830  MObjectSetTransparency(lbl, 0);
3831 
3832 
3833  tb = MCreateTableForm(rowform1, 2);
3834  MObjectSetBackgroundRGB(tb, 112, 128, 112);
3835  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3837 
3838 
3839  lbl = MCreateLabel(tb, "Offset", FIXED_SMALL);
3840  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3841  //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255);
3842  MObjectSetTransparency(lbl, 0);
3843 
3844  if(DAS.Paramini.EqType == 9) //SPATRAM2
3845  DAS.Marconi.Offset = 250;
3846  if(DAS.Paramini.EqType == 8) //GASCODNG4
3847  DAS.Marconi.Offset = 270;
3848 
3849 
3850 
3851  sprintf(buff, "%d", DAS.Marconi.Offset);
3852  edit = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL);
3853  MObjectSetForegroundRGB(edit, 255, 255, 255);
3854  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3856  MEditDisableEditing(edit);
3857 
3858 
3859  list = MOptionEditGetList(edit);
3860  for(i=0; i<512; i++)
3861  {
3862 
3863  t = i;
3864 
3865  sprintf(str, "%d", t);
3866  MSListAddItem(list, str, 0L);
3867  if( strcmp(str,buff) ==0 )
3868  k=i;
3869 
3870  }
3871 
3872  MSListSelectElement(list, k);
3873  pla = MSListGetSelected(list);
3874  sprintf(str, "%s", pla->item );
3875  MObjectSetText(edit, str);
3876  MOptionEditSetListCallback(edit, edtCCDOffSet_CB, (void *) 0);
3877  DAS.Marconi.Offset = atoi(pla->item);
3878 
3879  }
3880 /**************************************************************************/
3881 /*************************************************************************/
3882 
3883 /*
3884  lbl = MCreateLabel(rowform1, "Input Mirror", FIXED_SMALL);
3885  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3886  MObjectSetTransparency(lbl, 0);
3887  MObjectSetCompositeWidth(lbl, 347);
3888 
3889  tb = MCreateTableForm(rowform1, 5);
3890  MTableFormSetColAlign(tb, 0, LEFT_ALIGN);
3891  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3892  MObjectSetResize(tb, False, False);
3893  MObjectSetCompositeWidth(tb, 347);
3894 
3895  lbl = MCreateLabel(tb, "Home", FIXED_SMALL);
3896  MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN);
3897  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3898  MObjectSetTransparency(lbl, 0);
3899  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
3900 
3901  for(i=0;i<4;i++)
3902  {
3903  if (DAS.Paramini.EqType != TROPOGAS)
3904  sprintf(buf, "%s",Mir_Code[i]);
3905  else
3906  sprintf(buf, "%s",Mir_CodeTropo[i]);
3907 
3908  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3909  MObjectAlign(lbl, LEFT_ALIGN, TOP_ALIGN);
3910  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3911  MObjectSetTransparency(lbl, 0);
3912  //MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
3913  }
3914 
3915  for(i=0;i<5;i++)
3916  {
3917  sprintf(buf, "%d",DAS.Paramini.Offset[i]);
3918  edit = MCreateClippedEdit(tb, buf, 10, 5, FIXED_SMALL);
3919  MObjectAlign(edit, LEFT_ALIGN, TOP_ALIGN);
3920  MObjectSetForegroundRGB(edit, 255, 255, 255);
3921  MObjectSetBackgroundRGB(edit, 40, 96, 72);
3922  MObjectSetCompositeWidth(edit, 65);
3923  k= i + 300;
3924  MEditSetValCallback(edit, ValidateCB, (void *) k);
3925  MEditSetActCallback(edit, ActEditCB, (void *) k);
3926  }
3927 /*
3928  // Command Button Section
3929  /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/
3930  rowform1 = MCreateTableForm(obj, 3);
3931  MObjectSetBackgroundRGB(rowform1, 56, 112, 112);
3932 // MObjectSetResize(rowform1, False, False);
3933  MObjectSetCompositeWidth(rowform1, 347);
3934 
3935  pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL);
3936  MPButtonSetCallback(pb, ApplyChCB, (void *) 0);
3937  if((DAS.Flag.exemode == DOASMODE) )
3938  MObjectSetUnsensitive(pb); // Set the button as Unensitive
3939  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3940  MObjectSetCompositeWidth(pb, 74);
3941 
3942  pb = MCreatePButton(rowform1, "Store", FIXED_SMALL);
3943  MPButtonSetCallback(pb, WriteParaminiCB, (void *) 1);
3944  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3945  MObjectSetCompositeWidth(pb, 84);
3946 
3947  pb = MCreatePButton(rowform1, "Close", FIXED_SMALL);
3949  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3950  MObjectSetCompositeWidth(pb, 74);
3951  /* End Command Button Section æææææææææææææææææææææææææææææææææææ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ /**************************************************************************************************************/ } */
3952  /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */
3953 
3954 /**************************************************************************************************************/
3955 
3956 }
void MEditDisableEditing(MOBJECT edit)
#define RIGHT_ALIGN
Definition: Mguidefs.h:916
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
#define WS_NONE
Definition: Mguidefs.h:956
MOBJECT lbl
Definition: DFileMan.c:42
void PB_H_CB(MOBJECT p, void *od, void *ad)
Quick Help Callback.
MOBJECT MOptionEditGetList(MOBJECT ce)
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
void edtCCDOffSet_CB(MOBJECT p, LIST_ACT *la, void *ad)
MOBJECT MCreateEdit(MOBJECT parent, const char *text, int len, MTFont font)
void MObjectSetUnsensitive(MOBJECT obj)
int PCPower
Power to the Peltier for Cooling.
List Item Activation.
Definition: Mguidefs.h:1179
void MOptionEditSetListCallback(MOBJECT obj, LIST_ACT_CB cb, void *data)
void MFormSetFocusHighlight(MOBJECT f, int true_false)
int ccdWx
CCD X End.
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
#define DOASMODE
execution for DOAS Processing
flag Flag
Structure for different flags.
#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 ...
int ccdXoff
CCD X Start.
void MTableFormSetColAlign(MOBJECT form, int col, int al)
void MSListSelectElement(MOBJECT p, long n)
char * item
Definition: Mguidefs.h:1181
MOBJECT MCreateClippedEdit(MOBJECT parent, const char *text, int len, int clip_len, MTFont font)
MOBJECT MCreateOptionEdit(MOBJECT parent, const char *text, int len, int clip_len, int nrow, MTFont font)
#define UNDEF_ALIGN
Definition: Mguidefs.h:920
void ApplyChCB(MOBJECT shell, void *od, void *ad)
Apply changes in DAS Config callback.
void MObjectSetText(MOBJECT obj, const char *text)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
int ccdWy
CCD Y End.
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
config Cfg
Definition: DAS_Spat_Conf.c:43
int WriteParaminiCB(MOBJECT shell, void *od, void *ad)
Write Param.ini file .
#define CENTER_ALIGN
Definition: Mguidefs.h:917
void DB_EqTypeCB(MOBJECT o, void *a, void *v)
int VBin
CCD Vertical Binning.
omuthr OMUTHR
Definition: DAS_Spat_Conf.c:57
void MEditSetActCallback(MOBJECT edit, OBJ_STRING_CB cb, void *data)
int CoolPw
CCD Init Power.
#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)
void MRButtonActivate(MOBJECT o)
das DAS
Definition: DAS_Spat_Conf.c:56
void MButtonSetImageMaskByPixel(MOBJECT obj, int x, int y)
#define _MAX_PATH
Definition: Dildef.h:202
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
configpanel ConfigPanel
Configuration panel structure.
static double p
Definition: SOLPOS.C:131
void MTableFormSetRowAlign(MOBJECT form, int row, int al)
void MLabelSetAlignment(MOBJECT p, int align)
MOBJECT ShellConfig
Shell configuration panel.
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
double maxtexp
Maximum exposure time (used in Autorange())
int MSListAddItem(MOBJECT p, const char *item, void *data)
int EqType
Spectrometer Type.
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
U32 Platform
(R/W) Platform code Camera platform definitions
Definition: dcldef.h:1065
MOBJECT MCreateRowForm(MOBJECT parent)
int ccdYoff
CCD Y Start.
MOBJECT MCreateImagePButtonExt(MOBJECT parent, const char *npf, const char *apf, const char *upf, const char *non, const char *aon, const char *uon)
double ITemp
CCD Target Temperature.
#define TOP_ALIGN
Definition: Mguidefs.h:918
int exemode
Set the Execution MODE (Execution modes)
double TPelt
OMU Target Temperature.
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 i...
void CCDSetupCB(MOBJECT shell, void *od, void *ad)
CCD setup Callback. Execute DCS.exe (DTA Camera Select)
marconi Marconi
CCD Sensor struct.
paramini Paramini
structure for the parameters defined in param.ini configuration file
LIST_ACT * MSListGetSelected(MOBJECT p)
+ Here is the caller graph for this function:

§ CONFP_param_page2()

void CONFP_param_page2 ( int  mod,
MOBJECT  obj 
)

Definition at line 3233 of file DAS_Spat_Conf.c.

References CloseConfigCB(), gui::ConfigPanel, False, FIXED_SMALL, das::Gui, lbl, LEFT_ALIGN, MCreateColForm(), MCreateEdit(), MCreateLabel(), MCreatePButton(), MCreateTableForm(), MEditSetValCallback(), MLabelSetAlignment(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetText(), MObjectSetTransparency(), MObjectSetUnsensitive(), MPButtonSetCallback(), MTableFormSetColAlign(), configpanel::ShellConfig, TOP_ALIGN, True, valstedt(), valwledt(), wav, wl, and WritewlstepiniCB().

Referenced by CONFP_Param().

3234 {
3235 
3236  MOBJECT rowform, rowform1; // generic row form
3237  MOBJECT wledt; // generic edit object
3238  MOBJECT stedt; // generic edit object
3239  MOBJECT pb ;
3240 // MOBJECT list;
3241 // MOBJECT _tbutton000;
3242 // MOBJECT _tbutton001;
3243 // MOBJECT form2;
3244  MOBJECT lbl;
3245  MOBJECT tb; // generic table object
3246  char buf[64];
3247  int i;
3248 
3249  MObjectSetText(obj, "Page 2");
3250 
3251 
3252 
3253  lbl = MCreateLabel(obj, "Ref. Wavelength and Grating positioning", FIXED_SMALL);
3254  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3255  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
3256  MObjectSetTransparency(lbl, 0);
3257 
3258  rowform = MCreateColForm(obj);
3259  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
3260  MObjectSetBackgroundRGB(rowform, 56, 112, 112);
3261  MObjectAlign(rowform, LEFT_ALIGN, TOP_ALIGN);
3262 
3263 
3264  tb = MCreateTableForm(rowform, 3);
3265  MObjectSetBackgroundRGB(tb, 112, 128, 112);
3266  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3269  MObjectSetResize(tb, False, True);
3270 
3271  //for(i=0;i<2;i++)
3272  //{
3273  sprintf(buf, "Win" );
3274  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3277  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3278  MObjectSetTransparency(lbl, 0);
3279 
3280  sprintf(buf, "Cent.Wl" );
3281  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3284  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3285  MObjectSetTransparency(lbl, 0);
3286 
3287  sprintf(buf, "Steps" );
3288  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3291  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3292  MObjectSetTransparency(lbl, 0);
3293 // }
3294  for(i=0;i<9;i++)
3295  {
3296 
3297  sprintf(buf, "%d", i);
3298  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3301  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3302  MObjectSetTransparency(lbl, 0);
3303 
3304  sprintf(buf, "%d", wl[i]);
3305  wledt = MCreateEdit(tb, buf, 5, FIXED_SMALL);
3307  MObjectSetForegroundRGB(wledt, 255, 255, 255);
3308  MObjectSetBackgroundRGB(wledt, 40, 96, 72);
3309  MEditSetValCallback(wledt, valwledt, (void *) i);
3310  //MEditSetActCallback(wledt, wledtCB, (void *) i);
3311 
3312  sprintf(buf, "%d", wav[i]);
3313  stedt = MCreateEdit(tb, buf, 8, FIXED_SMALL);
3315  MObjectSetForegroundRGB(stedt, 255, 255, 255);
3316  MObjectSetBackgroundRGB(stedt, 40, 96, 72);
3317  MEditSetValCallback(stedt, valstedt, (void *) i);
3318  //MEditSetActCallback(stedt, stedtCB, (void *) i);
3319 
3320  }
3321 
3322  tb = MCreateTableForm(rowform, 3);
3323  MObjectSetBackgroundRGB(tb, 112, 128, 112);
3324  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3327  MObjectSetResize(tb, False, True);
3328 
3329  sprintf(buf, "Win" );
3330  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3333  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3334  MObjectSetTransparency(lbl, 0);
3335 
3336  sprintf(buf, "Cent.Wl" );
3337  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3340  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3341  MObjectSetTransparency(lbl, 0);
3342 
3343  sprintf(buf, "Steps" );
3344  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3347  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3348  MObjectSetTransparency(lbl, 0);
3349 
3350  for(i=9;i<18;i++)
3351  {
3352 
3353  sprintf(buf, "%d", i);
3354  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3357  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3358  MObjectSetTransparency(lbl, 0);
3359 
3360  sprintf(buf, "%d", wl[i]);
3361  wledt = MCreateEdit(tb, buf, 5, FIXED_SMALL);
3363  MObjectSetForegroundRGB(wledt, 255, 255, 255);
3364  MObjectSetBackgroundRGB(wledt, 40, 96, 72);
3365  MEditSetValCallback(wledt, valwledt, (void *) i);
3366  //MEditSetActCallback(wledt, wledtCB, (void *) i);
3367 
3368  sprintf(buf, "%d", wav[i]);
3369  stedt = MCreateEdit(tb, buf, 8, FIXED_SMALL);
3371  MObjectSetForegroundRGB(stedt, 255, 255, 255);
3372  MObjectSetBackgroundRGB(stedt, 40, 96, 72);
3373  MEditSetValCallback(stedt, valstedt, (void *) i);
3374  //MEditSetActCallback(stedt, stedtCB, (void *) i);
3375 
3376  }
3377  // Command Button Section
3378  /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/
3379  rowform1 = MCreateTableForm(obj, 3);
3380  MObjectSetBackgroundRGB(rowform1, 56, 112, 112);
3381 // MObjectSetResize(rowform1, False, False);
3382  MObjectSetCompositeWidth(rowform1, 347);
3383 
3384  pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL);
3385  //MPButtonSetCallback(pb, ApplyChCB, (void *) 0);
3386  //if((DAS.Flag.exemode == DOASMODE) | (DAS.Flag.exemode == DBDEMO))
3387  MObjectSetUnsensitive(pb); // Set the button as Unensitive
3388  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3389  MObjectSetCompositeWidth(pb, 74);
3390 
3391  pb = MCreatePButton(rowform1, "Store", FIXED_SMALL);
3392  MPButtonSetCallback(pb, WritewlstepiniCB, (void *) 0);
3393  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3394  MObjectSetCompositeWidth(pb, 84);
3395 
3396  pb = MCreatePButton(rowform1, "Close", FIXED_SMALL);
3398  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3399  MObjectSetCompositeWidth(pb, 74);
3400  /* End Command Button Section æææææææææææææææææææææææææææææææææææ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } */
3401  /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */
3402 
3403 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
MOBJECT lbl
Definition: DFileMan.c:42
MOBJECT MCreateEdit(MOBJECT parent, const char *text, int len, MTFont font)
void MObjectSetUnsensitive(MOBJECT obj)
int WritewlstepiniCB(MOBJECT shell, void *od, void *ad)
Write wlstep.ini file .
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 MTableFormSetColAlign(MOBJECT form, int col, int al)
void valstedt(MOBJECT edit, EDIT_VAL *ev, void *ii)
void MObjectSetText(MOBJECT obj, const char *text)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define FIXED_SMALL
Definition: Mguidefs.h:878
void valwledt(MOBJECT edit, EDIT_VAL *ev, void *ii)
void MEditSetValCallback(MOBJECT edit, EDIT_VAL_CB cb, void *data)
MOBJECT MCreateColForm(MOBJECT parent)
das DAS
Definition: DAS_Spat_Conf.c:56
configpanel ConfigPanel
Configuration panel structure.
void MLabelSetAlignment(MOBJECT p, int align)
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
MOBJECT ShellConfig
Shell configuration panel.
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 MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
long wav[]
Step Number definition - for SD_Grating.
Definition: DAS_Spat.c:195
#define TOP_ALIGN
Definition: Mguidefs.h:918
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 i...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CONFP_param_page3()

void CONFP_param_page3 ( int  mod,
MOBJECT  obj 
)

Definition at line 3009 of file DAS_Spat_Conf.c.

References AddStCB(), d_geo::alititude, ApplyGeoCB(), BOTTOM_ALIGN, CENTER_ALIGN, CloseConfigCB(), gui::ConfigPanel, DB_GeocoordCB(), DB_StorePB(), DeleteGeoCB(), das::DGeo, DGeoeditCB(), DOASMODE, d_geo::edit, EM_MOTION, flag::exemode, False, FIXED_SMALL, das::Flag, das::Gui, d_geo::latitude, lbl, LEFT_ALIGN, d_geo::longitude, MCreateEdit(), MCreateLabel(), MCreatePButton(), MCreateRButton(), MCreateTableForm(), MEditSetValCallback(), MLabelSetAlignment(), MObjectAddEventNotifyCallback(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetPopupHelp(), MObjectSetResize(), MObjectSetText(), MObjectSetTransparency(), MObjectSetUnsensitive(), MPButtonSetCallback(), MRButtonActivate(), d_geo::news_name, d_geo::nitem, d_geo::rb, d_geo::s_name, d_geo::selitem, configpanel::ShellConfig, StoreGeoCB(), d_geo::tbrb, d_geo::timezone, TOP_ALIGN, True, and UNDEF_ALIGN.

Referenced by CONFP_Param().

3010 {
3011 
3012  MOBJECT rowform1; // generic row form
3013 // MOBJECT wledt; // generic edit object
3014 // MOBJECT stedt; // generic edit object
3015  MOBJECT pb;
3016 // MOBJECT list;
3017 // MOBJECT _tbutton000;
3018 // MOBJECT _tbutton001;
3019 // MOBJECT form2;
3020  MOBJECT lbl;
3021  MOBJECT tb; // generic table object
3022  char buf[64];
3023  int i, k=0;
3024 // FILE *fd;
3025 // char str[80];
3026 // char buff[_MAX_PATH];
3027 
3028  MObjectSetText(obj, "Page 3");
3029 
3030 
3031  lbl = MCreateLabel(obj, "Station Geo. Coordinates", FIXED_SMALL);
3032  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3033  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
3034  MObjectSetTransparency(lbl, 0);
3035 
3036  sprintf(buf, "Actual Setting" );
3037  lbl = MCreateLabel(obj, buf, FIXED_SMALL);
3040  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3041  MObjectSetTransparency(lbl, 0);
3042 
3043 
3044 
3045  tb = MCreateTableForm(obj, 5);
3046  MObjectSetBackgroundRGB(tb, 112, 128, 112);
3047  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3048  MObjectSetResize(tb, True, False);
3049 
3050  sprintf(buf, "Stat." );
3051  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3054  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3055  MObjectSetTransparency(lbl, 0);
3056 
3057  sprintf(buf, "Lat." );
3058  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3061  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3062  MObjectSetTransparency(lbl, 0);
3063 
3064  sprintf(buf, "Long." );
3065  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3068  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3069  MObjectSetTransparency(lbl, 0);
3070 
3071  sprintf(buf, "TZ" );
3072  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3075  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3076  MObjectSetTransparency(lbl, 0);
3077 
3078  sprintf(buf, "Alt." );
3079  lbl = MCreateLabel(tb, buf, FIXED_SMALL);
3082  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3083  MObjectSetTransparency(lbl, 0);
3084 
3085  sprintf(buf, "%s", DAS.DGeo.s_name );
3086  DAS.DGeo.edit[0] = MCreateEdit(tb, buf, 3, FIXED_SMALL);
3088  MObjectSetForegroundRGB(DAS.DGeo.edit[0] , 255, 255, 255);
3089  MObjectSetBackgroundRGB(DAS.DGeo.edit[0] , 40, 96, 72);
3090  MEditSetValCallback(DAS.DGeo.edit[0] , DGeoeditCB, (void *) 0);
3091 
3092  sprintf(buf, "%.2f", DAS.DGeo.latitude );
3093  DAS.DGeo.edit[1] = MCreateEdit(tb, buf, 7, FIXED_SMALL);
3095  MObjectSetForegroundRGB(DAS.DGeo.edit[1] , 255, 255, 255);
3096  MObjectSetBackgroundRGB(DAS.DGeo.edit[1] , 40, 96, 72);
3097  MEditSetValCallback(DAS.DGeo.edit[1] , DGeoeditCB, (void *) 1);
3098 
3099  sprintf(buf, "%.2f", DAS.DGeo.longitude );
3100  DAS.DGeo.edit[2] = MCreateEdit(tb, buf, 7, FIXED_SMALL);
3102  MObjectSetForegroundRGB(DAS.DGeo.edit[2] , 255, 255, 255);
3103  MObjectSetBackgroundRGB(DAS.DGeo.edit[2] , 40, 96, 72);
3104  MEditSetValCallback(DAS.DGeo.edit[2] , DGeoeditCB, (void *) 2);
3105 
3106  sprintf(buf, "%d", DAS.DGeo.timezone );
3107  DAS.DGeo.edit[3] = MCreateEdit(tb, buf, 4, FIXED_SMALL);
3109  MObjectSetForegroundRGB(DAS.DGeo.edit[3] , 255, 255, 255);
3110  MObjectSetBackgroundRGB(DAS.DGeo.edit[3] , 40, 96, 72);
3111  MEditSetValCallback(DAS.DGeo.edit[3] , DGeoeditCB, (void *) 3);
3112 
3113  sprintf(buf, "%.1f", DAS.DGeo.alititude);
3114  DAS.DGeo.edit[4] = MCreateEdit(tb, buf, 7, FIXED_SMALL);
3116  MObjectSetForegroundRGB(DAS.DGeo.edit[4] , 255, 255, 255);
3117  MObjectSetBackgroundRGB(DAS.DGeo.edit[4] , 40, 96, 72);
3118  MEditSetValCallback(DAS.DGeo.edit[4] , DGeoeditCB, (void *) 4);
3119 
3120 
3121 
3122 
3123 
3124  DAS.DGeo.tbrb = MCreateTableForm(obj, 3);
3125  MObjectSetBackgroundRGB(DAS.DGeo.tbrb, 112, 128, 112);
3126  MObjectSetBackgroundRGB(DAS.DGeo.tbrb, 56, 112, 112);
3128 
3129 // sprintf(buff, "%s\\GeoDB.ini", BIL.DFILEM.CONFIGDIREQUIPMENT);
3130 // fd = fopen(buff, "r");
3131 // if(fd == NULL) return 1;
3132 
3133 // fgets(str, 80, fd); // Read Header
3134 
3135 // fscanf(fd, "%d", &DAS.DGeo.nitem);
3136 // fgets(str, 80, fd);
3137 
3138  for (i=0; i<DAS.DGeo.nitem; i++)
3139  {
3140 
3141 // fscanf(fd, "%hs",&DAS.DGeo.news_name[i]);
3143  MPButtonSetCallback(DAS.DGeo.rb[i], DB_GeocoordCB, (void *) i);
3145  MObjectSetForegroundRGB(DAS.DGeo.rb[i], 255, 255, 255);
3147 
3148 
3149 
3150 // fscanf(fd, "%lf %lf %lf %d", &DAS.DGeo.newlatitude[i],
3151 // &DAS.DGeo.newlongitude[i],&DAS.DGeo.newalititude[i],&DAS.DGeo.newtimezone[i]);
3152  if( strcmp(DAS.DGeo.s_name,DAS.DGeo.news_name[i]) ==0 )
3153  {
3155  DAS.DGeo.selitem = i;
3156  }
3157  }
3158 
3159 // fclose(fd);
3160 
3161 /*
3162  sprintf(buf, "%s", "New St.");
3163  DAS.DGeo.rb[DAS.DGeo.nitem] = MCreateRButton(DAS.DGeo.tbrb, buf, FIXED_SMALL);
3164  MPButtonSetCallback(DAS.DGeo.rb[DAS.DGeo.nitem], DB_GeocoordCB, (void *) 100);
3165  MObjectAlign(DAS.DGeo.rb[DAS.DGeo.nitem], LEFT_ALIGN, UNDEF_ALIGN);
3166  MObjectSetForegroundRGB(DAS.DGeo.rb[DAS.DGeo.nitem], 255, 255, 255);
3167  MObjectSetCompositeWidth(DAS.DGeo.rb[DAS.DGeo.nitem], 85);
3168 */
3169 
3170 
3171  tb = MCreateTableForm(obj, 2);
3172  MObjectSetBackgroundRGB(tb, 112, 128, 112);
3173  MObjectSetBackgroundRGB(tb, 56, 112, 112);
3174  MObjectSetResize(tb, True, True);
3175 
3176 
3177  pb = MCreatePButton(tb, "Add St.", FIXED_SMALL);
3178  //MObjectSetUnsensitive(pb);
3179  MPButtonSetCallback(pb, AddStCB, (void *) 0);
3180  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3181  MObjectSetCompositeWidth(pb, 70);
3182  //MObjectAddEventNotifyCallback(pb, (OBJ_EVENT_CB) DB_StorePB, EM_MOTION, NULL);
3183  MObjectSetPopupHelp(pb,"Add a new station " , 200, 5000);
3185 
3186  pb = MCreatePButton(tb, "Delete", FIXED_SMALL);
3187  //MObjectSetUnsensitive(pb);
3188  MPButtonSetCallback(pb, DeleteGeoCB, (void *) 0);
3189  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3190  MObjectSetCompositeWidth(pb, 70);
3191  //MObjectAddEventNotifyCallback(pb, (OBJ_EVENT_CB) DB_StorePB, EM_MOTION, NULL);
3192  MObjectSetPopupHelp(pb,"Delete the selected station" , 200, 5000);
3194 
3195 
3196  // Command Button Section
3197  /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/
3198  rowform1 = MCreateTableForm(obj, 3);
3199  MObjectSetBackgroundRGB(rowform1, 56, 112, 112);
3200 // MObjectSetResize(rowform1, False, False);
3201  MObjectSetCompositeWidth(rowform1, 347);
3202 
3203  pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL);
3204  MPButtonSetCallback(pb, ApplyGeoCB, (void *) 0);
3205  if((DAS.Flag.exemode == DOASMODE))
3206  MObjectSetUnsensitive(pb); // Set the button as Unensitive
3207  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3208  MObjectSetCompositeWidth(pb, 70);
3209  MObjectSetPopupHelp(pb,"Apply the selected setting to DAS (and write to file ..GeoCoord.ini)" , 200, 5000);
3210 
3211 
3212 
3213 
3214  pb = MCreatePButton(rowform1, "Store", FIXED_SMALL);
3216  MPButtonSetCallback(pb, StoreGeoCB, (void *) 0);
3217  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3218  MObjectSetCompositeWidth(pb, 70);
3220  MObjectSetPopupHelp(pb,"If a new station has been created store it in ..GeoDB.ini" , 200, 5000);
3221 
3222 
3223  pb = MCreatePButton(rowform1, "Close", FIXED_SMALL);
3225  MObjectSetBackgroundRGB(pb, 224, 224, 176);
3226  MObjectSetCompositeWidth(pb, 70);
3227  MObjectSetPopupHelp(pb,"Close Config Panel" , 200, 5000);
3228  /* End Command Button Section æææææææææææææææææææææææææææææææææææ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } */
3229  /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */
3230 
3231 }
MOBJECT tbrb
Table Object for rbuttons.
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
MOBJECT lbl
Definition: DFileMan.c:42
double alititude
Station altitude.
MOBJECT MCreateEdit(MOBJECT parent, const char *text, int len, MTFont font)
MOBJECT edit[5]
Edit Object.
void MObjectSetUnsensitive(MOBJECT obj)
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
double latitude
Station latitude.
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
#define DOASMODE
execution for DOAS Processing
flag Flag
Structure for different flags.
#define False
Definition: Mguidefs.h:236
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
void MObjectSetPopupHelp(MOBJECT obj, const char *str, int delay, int duration)
int ApplyGeoCB(MOBJECT shell, void *od, void *ad)
int selitem
#define UNDEF_ALIGN
Definition: Mguidefs.h:920
void MObjectSetText(MOBJECT obj, const char *text)
d_geo DGeo
struct for Station location
#define EM_MOTION
Definition: Mguidefs.h:319
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
MOBJECT rb[21]
Maximum number of station 21.
int timezone
Station timezone.
char s_name[4]
Station name.
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define CENTER_ALIGN
Definition: Mguidefs.h:917
#define FIXED_SMALL
Definition: Mguidefs.h:878
int StoreGeoCB(MOBJECT shell, void *od, void *ad)
void MEditSetValCallback(MOBJECT edit, EDIT_VAL_CB cb, void *data)
void(* OBJ_EVENT_CB)(MOBJECT obj, MEvent *e, void *ad)
Definition: Mguidefs.h:1456
void MRButtonActivate(MOBJECT o)
das DAS
Definition: DAS_Spat_Conf.c:56
void MObjectAddEventNotifyCallback(MOBJECT obj, OBJ_EVENT_CB cb, CARD32 event_mask, void *a_data)
int DeleteGeoCB(MOBJECT shell, void *od, void *ad)
char news_name[20][4]
New Station name.
int nitem
Number of items of the GeoDB.ini.
void DB_GeocoordCB(MOBJECT o, void *a, void *v)
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
configpanel ConfigPanel
Configuration panel structure.
void MLabelSetAlignment(MOBJECT p, int align)
MOBJECT ShellConfig
Shell configuration panel.
double longitude
Station longitude.
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
void * MOBJECT
Definition: Mguidefs.h:192
#define BOTTOM_ALIGN
Definition: Mguidefs.h:919
#define True
Definition: Mguidefs.h:235
#define LEFT_ALIGN
Definition: Mguidefs.h:915
void DGeoeditCB(MOBJECT edit, EDIT_VAL *ev, void *ii)
int AddStCB(MOBJECT shell, void *od, void *ad)
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
void DB_StorePB(MOBJECT obj, MAnyWindowEvent *pe, void *a_data)
#define TOP_ALIGN
Definition: Mguidefs.h:918
int exemode
Set the Execution MODE (Execution modes)
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 i...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CONFP_param_page4()

void CONFP_param_page4 ( int  mod,
MOBJECT  obj 
)

Definition at line 2803 of file DAS_Spat_Conf.c.

References _MAX_PATH, CENTER_ALIGN, CloseConfigCB(), gui::ConfigPanel, flag::DeltaSZA, dsza::DeltaSZA, DSZArb_CB(), configpanel::edtDSZA, edtDSZA_CB(), configpanel::edtSZA, edtSZA_CB(), False, FIXED_SMALL, das::Flag, das::Gui, LIST_ACT::item, lbl, configpanel::lblSZA, LEFT_ALIGN, dsza::MaxSZA, MCreateLabel(), MCreateOptionEdit(), MCreatePButton(), MCreateRButton(), MCreateTableForm(), MEditDisableEditing(), dsza::MinSZA, MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetPopupHelp(), MObjectSetResize(), MObjectSetText(), MObjectSetTransparency(), MOptionEditGetList(), MOptionEditSetListCallback(), MPButtonSetCallback(), MRButtonActivate(), MSListAddItem(), MSListGetSelected(), MSListSelectElement(), configpanel::rbDSZA, configpanel::ShellConfig, SZADelta, TOP_ALIGN, True, UNDEF_ALIGN, and WriteOptioniniCB().

Referenced by CONFP_Param().

2804 {
2805 
2806  MOBJECT rowform1; // generic row form
2807 // MOBJECT wledt; // generic edit object
2808 // MOBJECT stedt; // generic edit object
2809 // MOBJECT colform;
2810  MOBJECT pb;
2811 // MOBJECT list;
2812 // MOBJECT _tbutton000;
2813 // MOBJECT _tbutton001;
2814 // MOBJECT form2;
2815  MOBJECT lbl, list;
2816  MOBJECT tb; // generic table object
2817 // char buf[64];
2818  int i, k=0, starti;
2819  float f=0;
2820 // FILE *fd;
2821  char str[80];
2822  char buff[_MAX_PATH];
2823 
2824  LIST_ACT * pla;
2825 
2826  MObjectSetText(obj, "Page 4");
2827 
2828 
2829  lbl = MCreateLabel(obj, "Measurement Scheduling", FIXED_SMALL);
2830  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2831  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
2832  MObjectSetTransparency(lbl, 0);
2833 
2834 
2835  tb = MCreateTableForm(obj, 3);
2836  MObjectSetBackgroundRGB(tb, 112, 128, 112);
2837  MObjectSetBackgroundRGB(tb, 56, 112, 112);
2839 
2840  DAS.Gui.ConfigPanel.rbDSZA[0] = MCreateRButton(tb, "Continuous", FIXED_SMALL);
2843  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[0], 255, 255, 255);
2845 
2846 
2847  DAS.Gui.ConfigPanel.rbDSZA[1] = MCreateRButton(tb, "DeltaSZA", FIXED_SMALL);
2850  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[1], 255, 255, 255);
2852 
2853 
2854 
2855  tb = MCreateTableForm(obj, 2);
2856  MObjectSetBackgroundRGB(tb, 112, 128, 112);
2857  MObjectSetBackgroundRGB(tb, 56, 112, 112);
2859 
2860 
2861  DAS.Gui.ConfigPanel.lblSZA[0] = MCreateLabel(tb, "DeltaSZA (deg):", FIXED_SMALL);
2862  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 255, 255, 255);
2863  //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255);
2865 
2866  sprintf(buff, "%.3f", SZADelta.DeltaSZA);
2867  DAS.Gui.ConfigPanel.edtDSZA = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL);
2872 
2873 
2875  for(i=0; i<20; i++)
2876  {
2877  f = f+(float)0.10;
2878  sprintf(str, "%.3f",f);
2879  MSListAddItem(list, str, 0L);
2880  if( strcmp(str,buff) ==0 )
2881  k=i;
2882 
2883  }
2884 
2885  MSListSelectElement(list, k);
2886  pla = MSListGetSelected(list);
2887  sprintf(str, "%s", pla->item );
2890  SZADelta.DeltaSZA = atof(pla->item);
2891 
2892 
2893 
2894 
2895 
2896  DAS.Gui.ConfigPanel.lblSZA[1] = MCreateLabel(tb, "SZA Min. (deg):", FIXED_SMALL);
2897  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[1], 255, 255, 255);
2898  //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255);
2900 
2901 
2902  sprintf(buff, "%d", (int)SZADelta.MinSZA);
2903  DAS.Gui.ConfigPanel.edtSZA[0] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL);
2904  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 255, 255, 255);
2909  for(i=0; i<21; i++)
2910  {
2911 
2912  sprintf(str, "%d",i);
2913  MSListAddItem(list, str, 0L);
2914  if( strcmp(str,buff) ==0 )
2915  k=i;
2916  }
2917  MSListSelectElement(list, k);
2918  pla = MSListGetSelected(list);
2919  sprintf(str, "%s", pla->item );
2922  SZADelta.MinSZA = atof(pla->item);
2923 
2924 
2925 
2926  DAS.Gui.ConfigPanel.lblSZA[2] = MCreateLabel(tb, "SZA Max. (deg):", FIXED_SMALL);
2927  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[2], 255, 255, 255);
2928  //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255);
2930 
2931  sprintf(buff, "%d", (int)SZADelta.MaxSZA);
2932  DAS.Gui.ConfigPanel.edtSZA[1] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL);
2933  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 255, 255, 255);
2938  starti = 20;
2939  for(i=starti; i<161; i++)
2940  {
2941 
2942  sprintf(str, "%d",i);
2943  MSListAddItem(list, str, 0L);
2944  if( strcmp(str,buff) ==0 )
2945  k=i - starti;
2946 
2947  }
2948  MSListSelectElement(list, k);
2949  pla = MSListGetSelected(list);
2950  sprintf(str, "%s", pla->item );
2953  SZADelta.MaxSZA = atof(pla->item);
2954 
2955 
2956 
2957  if(DAS.Flag.DeltaSZA)
2959  else
2961 
2962 
2963 
2964 
2965  tb = MCreateTableForm(obj, 2);
2966  MObjectSetBackgroundRGB(tb, 112, 128, 112);
2967  MObjectSetBackgroundRGB(tb, 56, 112, 112);
2968  MObjectSetResize(tb, True, True);
2969 
2970 
2971 
2972  // Command Button Section
2973  /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/
2974  rowform1 = MCreateTableForm(obj, 3);
2975  MObjectSetBackgroundRGB(rowform1, 56, 112, 112);
2976 // MObjectSetResize(rowform1, False, False);
2977  MObjectSetCompositeWidth(rowform1, 347);
2978 /*
2979  pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL);
2980  MPButtonSetCallback(pb, ApplyGeoCB, (void *) 0);
2981  if((DAS.Flag.exemode == DOASMODE))
2982  MObjectSetUnsensitive(pb); // Set the button as Unensitive
2983  MObjectSetBackgroundRGB(pb, 224, 224, 176);
2984  MObjectSetCompositeWidth(pb, 70);
2985  MObjectSetPopupHelp(pb,"Apply the selected setting to DAS (and write to file ..GeoCoord.ini)" , 200, 5000);
2986 
2987 */
2988 
2989 
2990  pb = MCreatePButton(rowform1, "Save", FIXED_SMALL);
2991  MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0);
2992  MObjectSetBackgroundRGB(pb, 224, 224, 176);
2993  MObjectSetCompositeWidth(pb, 74);
2994 
2995  pb = MCreatePButton(rowform1, "Close", FIXED_SMALL);
2997  MObjectSetBackgroundRGB(pb, 224, 224, 176);
2998  MObjectSetCompositeWidth(pb, 74);
2999  MObjectSetPopupHelp(pb,"Close Config Panel" , 200, 5000);
3000  /* End Command Button Section æææææææææææææææææææææææææææææææææææ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } */
3001  /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */
3002 
3003 
3004 }
void MEditDisableEditing(MOBJECT edit)
MOBJECT edtDSZA
edit box for delta SZA
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
MOBJECT lbl
Definition: DFileMan.c:42
MOBJECT MOptionEditGetList(MOBJECT ce)
dsza SZADelta
Definition: DAS_Spat.c:76
void edtDSZA_CB(MOBJECT p, LIST_ACT *la, void *ad)
List Item Activation.
Definition: Mguidefs.h:1179
void MOptionEditSetListCallback(MOBJECT obj, LIST_ACT_CB cb, void *data)
MOBJECT rbDSZA[2]
radio button for delta SZA measurements
MOBJECT edtSZA[2]
edit boxes for limits for delta sza measurements (0–> szamin; 1–>sza max)
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
flag Flag
Structure for different flags.
#define False
Definition: Mguidefs.h:236
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
void MSListSelectElement(MOBJECT p, long n)
char * item
Definition: Mguidefs.h:1181
void MObjectSetPopupHelp(MOBJECT obj, const char *str, int delay, int duration)
MOBJECT MCreateOptionEdit(MOBJECT parent, const char *text, int len, int clip_len, int nrow, MTFont font)
#define UNDEF_ALIGN
Definition: Mguidefs.h:920
void MObjectSetText(MOBJECT obj, const char *text)
int WriteOptioniniCB(MOBJECT shell, void *od, void *ad)
Write Options.ini file .
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define CENTER_ALIGN
Definition: Mguidefs.h:917
#define FIXED_SMALL
Definition: Mguidefs.h:878
double MaxSZA
Maximum SZA.
double DeltaSZA
DeltaSZA.
int DeltaSZA
= 1 Delta SZA measurements activated, = 0 Continous measurements
void MRButtonActivate(MOBJECT o)
das DAS
Definition: DAS_Spat_Conf.c:56
MOBJECT lblSZA[3]
labels for delta sza measurements
#define _MAX_PATH
Definition: Dildef.h:202
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
configpanel ConfigPanel
Configuration panel structure.
void DSZArb_CB(MOBJECT o, void *a, void *v)
MOBJECT ShellConfig
Shell configuration panel.
void edtSZA_CB(MOBJECT p, LIST_ACT *la, void *ad)
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
int MSListAddItem(MOBJECT p, const char *item, void *data)
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
#define TOP_ALIGN
Definition: Mguidefs.h:918
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 i...
double MinSZA
Minimum SZA.
LIST_ACT * MSListGetSelected(MOBJECT p)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CONFP_param_page5()

void CONFP_param_page5 ( int  mod,
MOBJECT  obj 
)

Definition at line 2598 of file DAS_Spat_Conf.c.

References CloseConfigCB(), gui::ConfigPanel, FIXED_SMALL, das::Gui, lbl, MCreateLabel(), MCreatePButton(), MCreateTableForm(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetPopupHelp(), MObjectSetResize(), MObjectSetText(), MObjectSetTransparency(), MPButtonSetCallback(), configpanel::ShellConfig, True, and WriteOptioniniCB().

Referenced by CONFP_Param().

2599 {
2600 
2601  MOBJECT rowform1; // generic row form
2602 // MOBJECT wledt; // generic edit object
2603 // MOBJECT stedt; // generic edit object
2604 // MOBJECT colform;
2605  MOBJECT pb;
2606 // MOBJECT list;
2607 // MOBJECT _tbutton000;
2608 // MOBJECT _tbutton001;
2609 // MOBJECT form2;
2610  MOBJECT lbl;
2611  MOBJECT tb; // generic table object
2612 // char buf[64];
2613  int k=0;
2614  float f=0;
2615 // FILE *fd;
2616 // char str[80];
2617 // char buff[_MAX_PATH];
2618 
2619 // LIST_ACT * pla;
2620 
2621  MObjectSetText(obj, "Page 5");
2622 
2623 
2624  lbl = MCreateLabel(obj, "INSTALLED FILTERS", FIXED_SMALL);
2625  MObjectSetForegroundRGB(lbl, 255, 255, 255);
2626  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
2627  MObjectSetTransparency(lbl, 0);
2628 
2629 
2630 /* tb = MCreateTableForm(obj, 3);
2631  MObjectSetBackgroundRGB(tb, 112, 128, 112);
2632  MObjectSetBackgroundRGB(tb, 56, 112, 112);
2633  MObjectSetResize(tb, True,False);
2634 
2635  DAS.Gui.ConfigPanel.rbDSZA[0] = MCreateRButton(tb, "Continuous", FIXED_SMALL);
2636  MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDSZA[0], DSZArb_CB, (void *) 0);
2637  MObjectAlign(DAS.Gui.ConfigPanel.rbDSZA[0], LEFT_ALIGN, UNDEF_ALIGN);
2638  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[0], 255, 255, 255);
2639  MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbDSZA[0], 100);
2640 
2641 
2642  DAS.Gui.ConfigPanel.rbDSZA[1] = MCreateRButton(tb, "DeltaSZA", FIXED_SMALL);
2643  MPButtonSetCallback(DAS.Gui.ConfigPanel.rbDSZA[1], DSZArb_CB, (void *) 1);
2644  MObjectAlign(DAS.Gui.ConfigPanel.rbDSZA[1], LEFT_ALIGN, UNDEF_ALIGN);
2645  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.rbDSZA[1], 255, 255, 255);
2646  MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.rbDSZA[1], 100);
2647 
2648 
2649 
2650  tb = MCreateTableForm(obj, 2);
2651  MObjectSetBackgroundRGB(tb, 112, 128, 112);
2652  MObjectSetBackgroundRGB(tb, 56, 112, 112);
2653  MObjectSetResize(tb, True,False);
2654 
2655 
2656  DAS.Gui.ConfigPanel.lblSZA[0] = MCreateLabel(tb, "DeltaSZA (deg):", FIXED_SMALL);
2657  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 255, 255, 255);
2658  //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255);
2659  MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[0], 0);
2660 
2661  sprintf(buff, "%.3f", SZADelta.DeltaSZA);
2662  DAS.Gui.ConfigPanel.edtDSZA = MCreateOptionEdit(tb, buff, 4, 4, 8, FIXED_SMALL);
2663  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 255, 255, 255);
2664  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtDSZA, 40, 96, 72);
2665  MObjectAlign(DAS.Gui.ConfigPanel.edtDSZA, CENTER_ALIGN, TOP_ALIGN);
2666  MEditDisableEditing(DAS.Gui.ConfigPanel.edtDSZA);
2667 
2668 
2669  list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtDSZA);
2670  for(i=0; i<20; i++)
2671  {
2672  f = f+0.10;
2673  sprintf(str, "%.3f",f);
2674  MSListAddItem(list, str, 0L);
2675  if( strcmp(str,buff) ==0 )
2676  k=i;
2677 
2678  }
2679 
2680  MSListSelectElement(list, k);
2681  pla = MSListGetSelected(list);
2682  sprintf(str, "%s", pla->item );
2683  MObjectSetText(DAS.Gui.ConfigPanel.edtDSZA, str);
2684  MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtDSZA, edtDSZA_CB, (void *) 0);
2685  SZADelta.DeltaSZA = atof(pla->item);
2686 
2687 
2688 
2689 
2690 
2691  DAS.Gui.ConfigPanel.lblSZA[1] = MCreateLabel(tb, "SZA Min. (deg):", FIXED_SMALL);
2692  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[1], 255, 255, 255);
2693  //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255);
2694  MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[1], 0);
2695 
2696 
2697  sprintf(buff, "%d", (int)SZADelta.MinSZA);
2698  DAS.Gui.ConfigPanel.edtSZA[0] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL);
2699  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 255, 255, 255);
2700  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 40, 96, 72);
2701  MObjectAlign(DAS.Gui.ConfigPanel.edtSZA[0], CENTER_ALIGN, TOP_ALIGN);
2702  MEditDisableEditing(DAS.Gui.ConfigPanel.edtSZA[0]);
2703  list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtSZA[0]);
2704  for(i=0; i<21; i++)
2705  {
2706 
2707  sprintf(str, "%d",i);
2708  MSListAddItem(list, str, 0L);
2709  if( strcmp(str,buff) ==0 )
2710  k=i;
2711  }
2712  MSListSelectElement(list, k);
2713  pla = MSListGetSelected(list);
2714  sprintf(str, "%s", pla->item );
2715  MObjectSetText(DAS.Gui.ConfigPanel.edtSZA[0], str);
2716  MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtSZA[0], edtSZA_CB, (void *) 0);
2717  SZADelta.MinSZA = atof(pla->item);
2718 
2719 
2720 
2721  DAS.Gui.ConfigPanel.lblSZA[2] = MCreateLabel(tb, "SZA Max. (deg):", FIXED_SMALL);
2722  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.lblSZA[2], 255, 255, 255);
2723  //MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblSZA[0], 48, 20, 255);
2724  MObjectSetTransparency(DAS.Gui.ConfigPanel.lblSZA[2], 0);
2725 
2726  sprintf(buff, "%d", (int)SZADelta.MaxSZA);
2727  DAS.Gui.ConfigPanel.edtSZA[1] = MCreateOptionEdit(tb, buff, 3, 3, 8, FIXED_SMALL);
2728  MObjectSetForegroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 255, 255, 255);
2729  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 40, 96, 72);
2730  MObjectAlign(DAS.Gui.ConfigPanel.edtSZA[1], CENTER_ALIGN, TOP_ALIGN);
2731  MEditDisableEditing(DAS.Gui.ConfigPanel.edtSZA[1]);
2732  list = MOptionEditGetList(DAS.Gui.ConfigPanel.edtSZA[1]);
2733  starti = 20;
2734  for(i=starti; i<161; i++)
2735  {
2736 
2737  sprintf(str, "%d",i);
2738  MSListAddItem(list, str, 0L);
2739  if( strcmp(str,buff) ==0 )
2740  k=i - starti;
2741 
2742  }
2743  MSListSelectElement(list, k);
2744  pla = MSListGetSelected(list);
2745  sprintf(str, "%s", pla->item );
2746  MObjectSetText(DAS.Gui.ConfigPanel.edtSZA[1], str);
2747  MOptionEditSetListCallback(DAS.Gui.ConfigPanel.edtSZA[1], edtSZA_CB, (void *) 1);
2748  SZADelta.MaxSZA = atof(pla->item);
2749 
2750 
2751 
2752  if(DAS.Flag.DeltaSZA)
2753  MRButtonActivate(DAS.Gui.ConfigPanel.rbDSZA[1]);
2754  else
2755  MRButtonActivate(DAS.Gui.ConfigPanel.rbDSZA[0]);
2756 
2757 */
2758 
2759 
2760  tb = MCreateTableForm(obj, 2);
2761  MObjectSetBackgroundRGB(tb, 112, 128, 112);
2762  MObjectSetBackgroundRGB(tb, 56, 112, 112);
2763  MObjectSetResize(tb, True, True);
2764 
2765 
2766 
2767  // Command Button Section
2768  /* Start ææææææææææææææææææææææææææææææææææææææææææææææææææææææ*/
2769  rowform1 = MCreateTableForm(obj, 3);
2770  MObjectSetBackgroundRGB(rowform1, 56, 112, 112);
2771 // MObjectSetResize(rowform1, False, False);
2772  MObjectSetCompositeWidth(rowform1, 347);
2773 /*
2774  pb = MCreatePButton(rowform1, "Apply", FIXED_SMALL);
2775  MPButtonSetCallback(pb, ApplyGeoCB, (void *) 0);
2776  if((DAS.Flag.exemode == DOASMODE))
2777  MObjectSetUnsensitive(pb); // Set the button as Unensitive
2778  MObjectSetBackgroundRGB(pb, 224, 224, 176);
2779  MObjectSetCompositeWidth(pb, 70);
2780  MObjectSetPopupHelp(pb,"Apply the selected setting to DAS (and write to file ..GeoCoord.ini)" , 200, 5000);
2781 
2782 */
2783 
2784 
2785  pb = MCreatePButton(rowform1, "Save", FIXED_SMALL);
2786  MPButtonSetCallback(pb, WriteOptioniniCB, (void *) 0);
2787  MObjectSetBackgroundRGB(pb, 224, 224, 176);
2788  MObjectSetCompositeWidth(pb, 74);
2789 
2790  pb = MCreatePButton(rowform1, "Close", FIXED_SMALL);
2792  MObjectSetBackgroundRGB(pb, 224, 224, 176);
2793  MObjectSetCompositeWidth(pb, 74);
2794  MObjectSetPopupHelp(pb,"Close Config Panel" , 200, 5000);
2795  /* End Command Button Section æææææææææææææææææææææææææææææææææææ /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */ } */
2796  /* æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ */
2797 
2798 
2799 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
MOBJECT lbl
Definition: DFileMan.c:42
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
void MObjectSetPopupHelp(MOBJECT obj, const char *str, int delay, int duration)
void MObjectSetText(MOBJECT obj, const char *text)
int WriteOptioniniCB(MOBJECT shell, void *od, void *ad)
Write Options.ini file .
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define FIXED_SMALL
Definition: Mguidefs.h:878
das DAS
Definition: DAS_Spat_Conf.c:56
configpanel ConfigPanel
Configuration panel structure.
MOBJECT ShellConfig
Shell configuration panel.
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
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
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 i...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_2DPlot()

void DB_2DPlot ( char *  title,
int  x,
int  y,
int  dx,
int  dy,
int  mode 
)

2D_Plot panel callback.

Definition at line 371 of file DAS_Spat_Conf.c.

References MDCreate2DPlot().

Referenced by BrowseLog(), and RunLogMode().

372 {
373 
374  MDCreate2DPlot(title, x, y, dx, dy, mode);
375 
376 }
MOBJECT MDCreate2DPlot(char *title, int x, int y, int dx, int dy, int mode)
create the 2D_Plot panel via the MDCreate_2DPlot.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_AVGAutoR_CB()

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

Definition at line 4055 of file DAS_Spat_Conf.c.

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

Referenced by CONFP_opt_page1().

4056 {
4057 
4058  int er = 0;
4059  int c = (int) v;
4060 
4061 
4063 
4064  if(er)
4065  {
4066  switch (c)
4067  {
4068  case 0:
4069  DAS.DOption.avgautor = 1; //Autorange before average
4070  break;
4071  case 1:
4072  DAS.DOption.avgautor = 0; //NO Autorange before average
4073  break;
4074 
4075  }
4076  }
4077 
4078 }
optionini DOption
Options for DAS execution.
int avgautor
autoranging for averaged measurement, 0 = NO AutoR before average; 1 = AutoR before average; ...
int MRButtonGetActivationStatus(MOBJECT o)
das DAS
Definition: DAS_Spat_Conf.c:56
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_EqTypeCB()

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

Definition at line 584 of file DAS_Spat_Conf.c.

References d_fileman::CONFIGDIRCOMMON, d_fileman::CONFIGDIREQUIPMENT, bil::DFILEM, paramini::EqType, LoadDB_DispCoeff(), MRButtonGetActivationStatus(), das::Paramini, and WriteEquipini().

Referenced by CONFP_param_page1().

585 {
586 
587  int er = 0;
588  int c = (int) v;
589 
590 
592 
593  if(er)
594  {
595  switch (c)
596  {
597  case 0:
598  DAS.Paramini.EqType = 0; //SPATRAM;
599  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\SPATRAM",BIL.DFILEM.CONFIGDIRCOMMON);
600  break;
601  case 1:
602  DAS.Paramini.EqType = 1; //TROPOGAS;
603  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\TROPOGAS",BIL.DFILEM.CONFIGDIRCOMMON);
604  break;
605  case 2:
606  DAS.Paramini.EqType = 2; //LIS;
608  break;
609  case 3:
610  DAS.Paramini.EqType = 3; //SPATRAMPLUS;
611  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\SPATRAMPLUS",BIL.DFILEM.CONFIGDIRCOMMON);
612  break;
613  case 4:
614  DAS.Paramini.EqType = 4; //GASCODNG1;
615  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\GASCODNG1",BIL.DFILEM.CONFIGDIRCOMMON);
616  break;
617  case 5:
618  DAS.Paramini.EqType = 5; //GASCODOffAxis;
619  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\GASCODOA",BIL.DFILEM.CONFIGDIRCOMMON);
620  break;
621  case 6:
622  DAS.Paramini.EqType = 6; //GASCODNG2;
623  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\GASCODNG2",BIL.DFILEM.CONFIGDIRCOMMON);
624  break;
625  case 7:
626  DAS.Paramini.EqType = 7; //GASCODNG3;
627  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\GASCODNG3",BIL.DFILEM.CONFIGDIRCOMMON);
628  break;
629  case 8:
630  DAS.Paramini.EqType = 8; //GASCODNG4;
631  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\GASCODNG4",BIL.DFILEM.CONFIGDIRCOMMON);
632  break;
633  case 9:
634  DAS.Paramini.EqType = 9; //SPATRAM2;
635  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\SPATRAM2",BIL.DFILEM.CONFIGDIRCOMMON);
636  break;
637  case 10:
638  DAS.Paramini.EqType = 10; //SPATRAM3;
639  sprintf(BIL.DFILEM.CONFIGDIREQUIPMENT, "%s\\SPATRAM3",BIL.DFILEM.CONFIGDIRCOMMON);
640  break;
641  }
642  }
643  WriteEquipini();
644 
645  er = LoadDB_DispCoeff();
646 
647 
648 
649 }
int WriteEquipini(void)
Write equipment.ini file .
int MRButtonGetActivationStatus(MOBJECT o)
d_fileman DFILEM
Definition: bildef.h:257
bil BIL
Definition: DAS_Spat_Conf.c:51
char CONFIGDIREQUIPMENT[_MAX_PATH]
Definition: bildef.h:208
das DAS
Definition: DAS_Spat_Conf.c:56
int LoadDB_DispCoeff(void)
Load dispersion parameters. Procedure that load the dispersion parameters from file {homedir}/DOAS/Di...
Definition: Load.c:234
int EqType
Spectrometer Type.
char CONFIGDIRCOMMON[_MAX_PATH]
Definition: bildef.h:206
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:

§ DB_GeocoordCB()

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

Definition at line 2280 of file DAS_Spat_Conf.c.

References d_geo::alititude, das::DGeo, d_geo::edit, d_geo::latitude, d_geo::longitude, MObjectSetText(), MRButtonGetActivationStatus(), d_geo::newalititude, d_geo::newlatitude, d_geo::newlongitude, d_geo::news_name, d_geo::newtimezone, d_geo::s_name, d_geo::selitem, and d_geo::timezone.

Referenced by CONFP_param_page3(), and Rebuildrb().

2281 {
2282 
2283  int er = 0;
2284  int c = (int) v;
2285  char str[16];
2286 
2287 
2289 
2290  if(er)
2291  {
2292  if (c==100)
2293  {
2294 /* sprintf(str, "%s"," ");
2295  for(i=0;i<5;i++)
2296  MObjectSetText(DAS.DGeo.edit[i], str);
2297 
2298 
2299  MSelectObject(DAS.DGeo.edit[0]);
2300 
2301  DAS.DGeo.flagnewstation = 1;
2302  DAS.DGeo.selitem = DAS.DGeo.nitem;
2303 
2304 */
2305 
2306  }
2307  else
2308  {
2309 
2310  DAS.DGeo.selitem = c;
2311  sprintf(DAS.DGeo.s_name, "%s", DAS.DGeo.news_name[c]);
2313 
2315  _gcvt(DAS.DGeo.latitude , 6, str );
2316  MObjectSetText(DAS.DGeo.edit[1], str);
2317 
2319  _gcvt(DAS.DGeo.longitude , 6, str );
2320  MObjectSetText(DAS.DGeo.edit[2], str);
2321 
2323  itoa(DAS.DGeo.timezone ,str, 10 );
2324  MObjectSetText(DAS.DGeo.edit[3], str);
2325 
2326 
2328  _gcvt(DAS.DGeo.alititude , 6, str );
2329  MObjectSetText(DAS.DGeo.edit[4], str);
2330 
2331  }
2332  }
2333 
2334 }
double alititude
Station altitude.
double newlatitude[20]
New Station latitude.
MOBJECT edit[5]
Edit Object.
double newlongitude[20]
New Station longitude.
double latitude
Station latitude.
int selitem
void MObjectSetText(MOBJECT obj, const char *text)
d_geo DGeo
struct for Station location
int MRButtonGetActivationStatus(MOBJECT o)
int timezone
Station timezone.
char s_name[4]
Station name.
das DAS
Definition: DAS_Spat_Conf.c:56
int newtimezone[20]
Station timezone.
char news_name[20][4]
New Station name.
double newalititude[20]
New Station altitude.
double longitude
Station longitude.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_HomeTypeCB()

void DB_HomeTypeCB ( MOBJECT  p,
LIST_ACT la,
void *  ad 
)

Definition at line 654 of file DAS_Spat_Conf.c.

References stepm::hometype, LIST_ACT::pos, and das::StepM.

Referenced by CONFP_AMS_TabSingMotor(), FrmNOVA_IO_Test(), and FrmStepperHomeMode().

655 {
656  int er = 0;
657  int c = (int) ad;
658  int i = 3;
659 
660 
661  //er = MRButtonGetActivationStatus(p);
662 // DAS.StepM.hometype[id][snum]
663 
664 
665  switch (c)
666  {
667  case 0:
668  if (la->pos ==0)
669  DAS.StepM.hometype[0][0] = 0;
670  if (la->pos ==1)
671  DAS.StepM.hometype[0][0] = 1;
672  if (la->pos ==2)
673  DAS.StepM.hometype[0][0] = 2;
674  break;
675  case 1:
676  if (la->pos ==0)
677  DAS.StepM.hometype[0][1] = 0;
678  if (la->pos ==1)
679  DAS.StepM.hometype[0][1] = 1;
680  if (la->pos ==2)
681  DAS.StepM.hometype[0][1] = 2;
682  break;
683  case 2:
684  if (la->pos ==0)
685  DAS.StepM.hometype[1][0] = 0;
686  if (la->pos ==1)
687  DAS.StepM.hometype[1][0] = 1;
688  if (la->pos ==2)
689  DAS.StepM.hometype[1][0] = 2;
690  break;
691 
692  case 3:
693  if (la->pos ==0)
694  DAS.StepM.hometype[1][1] = 0;
695  if (la->pos ==1)
696  DAS.StepM.hometype[1][1] = 1;
697  if (la->pos ==2)
698  DAS.StepM.hometype[1][1] = 2;
699  break;
700  case 4:
701  if (la->pos ==0)
702  DAS.StepM.hometype[2][0] = 0;
703  if (la->pos ==1)
704  DAS.StepM.hometype[2][0] = 1;
705  if (la->pos ==2)
706  DAS.StepM.hometype[2][0] = 2;
707  break;
708 
709  case 5:
710  if (la->pos ==0)
711  DAS.StepM.hometype[2][1] = 0;
712  if (la->pos ==1)
713  DAS.StepM.hometype[2][1] = 1;
714  if (la->pos ==2)
715  DAS.StepM.hometype[2][1] = 2;
716  break;
717 
718  }
719 
720 
721 
722 }
stepm StepM
Stepper motors parameters structure.
int hometype[AMSMAX][2]
long pos
Definition: Mguidefs.h:1185
das DAS
Definition: DAS_Spat_Conf.c:56
+ Here is the caller graph for this function:

§ DB_MeasMode_CB()

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

Definition at line 4017 of file DAS_Spat_Conf.c.

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

Referenced by CONFP_opt_page1().

4018 {
4019 
4020  int er = 0;
4021  int c = (int) v;
4022 
4023 
4025 
4026  if(er)
4027  {
4028  switch (c)
4029  {
4030  case 0:
4031  DAS.DOption.measmode = 0; //Single Meas
4033  //if (DAS.Marconi.AVGmat != 0)
4034  // free(DAS.Marconi.AVGmat);
4035  break;
4036  case 1:
4037  DAS.DOption.measmode = 1; //Average
4039  //if (DAS.Marconi.AVGmat != 0)
4040  //DAS.Marconi.AVGmat = AllocFloatMat(IDX, IDY);
4041  //np = (long) IDX * IDY * 2;
4042 
4043  //AVGmat = malloc(np * 4);
4044  //memset(AVGmat, 0, np * 4);
4045 
4046  break;
4047 
4048  }
4049  }
4050 
4051 }
gui Gui
Graphic User Interface Structure.
optionini DOption
Options for DAS execution.
void MObjectSetUnsensitive(MOBJECT obj)
MOBJECT tbavg
table for avg section
int MRButtonGetActivationStatus(MOBJECT o)
das DAS
Definition: DAS_Spat_Conf.c:56
configpanel ConfigPanel
Configuration panel structure.
int measmode
measuring mode: 0 = Single; 1 = Averaged
void MObjectSetSensitive(MOBJECT obj)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_RadioFTPCB()

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

Definition at line 260 of file DAS_Spat_Conf.c.

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

Referenced by CONFP_opt_page4().

261 {
262 
263  int er = 0;
264  int c = (int) v;
265 // char buf[32];
266 
267 
269 
270  if(er)
271  {
272  switch (c)
273  {
274  case 0:
275  DAS.DOption.ftpbackup = 1;
276 /*
277  LoadFTPSetting();
278  MEditEnableEditing(DFTP.edServerFTP);
279  sprintf(buf, "%s",DFTP.ftpserver);
280  MObjectSetText(DFTP.edServerFTP, buf);
281  MObjectSetBackgroundRGB(DFTP.edServerFTP, 40, 96, 72);
282 
283  sprintf(buf, "%s",DFTP.ftppwd);
284  MObjectSetText(DFTP.edpwd, buf);
285  MEditEnableEditing(DFTP.edpwd);
286  MObjectSetBackgroundRGB(DFTP.edpwd, 40, 96, 72);
287 
288  sprintf(buf, "%s",DFTP.ftpuser);
289  MObjectSetText(DFTP.edid, buf);
290  MEditEnableEditing(DFTP.edid);
291  MObjectSetBackgroundRGB(DFTP.edid, 40, 96, 72);
292 */
293  break;
294  case 1:
295  DAS.DOption.ftpbackup = 0;
296 /* sprintf(buf, "%s"," ");
297  MObjectSetText(DFTP.edServerFTP, buf);
298  MEditDisableEditing(DFTP.edServerFTP);
299  MObjectSetBackgroundRGB(DFTP.edServerFTP, 192, 192, 192);
300 
301  sprintf(buf, "%s"," ");
302  MObjectSetText(DFTP.edpwd, buf);
303  MEditDisableEditing(DFTP.edpwd);
304  MObjectSetBackgroundRGB(DFTP.edpwd, 192, 192, 192);
305 
306  sprintf(buf, "%s"," ");
307  MObjectSetText(DFTP.edid, buf);
308  MEditDisableEditing(DFTP.edid);
309  MObjectSetBackgroundRGB(DFTP.edid, 192, 192, 192);
310 */
311  break;
312 
313  }
314  }
315 
316 }
optionini DOption
Options for DAS execution.
int MRButtonGetActivationStatus(MOBJECT o)
das DAS
Definition: DAS_Spat_Conf.c:56
int ftpbackup
Flag to set back up: 0 = NO FTP Back-UP; 1 = Perform FTP Back-UP.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_ResetEnable_CB()

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

Definition at line 5722 of file DAS_Spat_Conf.c.

References gui::ConfigPanel, das::DOption, configpanel::edtDASReset, das::Gui, configpanel::lblReset, configpanel::listReset, MObjectSetSensitive(), MObjectSetUnsensitive(), MRButtonGetActivationStatus(), configpanel::rbDASResPer, and optionini::resetEnabled.

Referenced by CONFP_opt_page7().

5723 {
5724 
5725  int er = 0;
5726  int c = (int) v;
5727 // char buff[64], str[32];
5728 
5730 
5731  if(er)
5732  {
5733  switch (c)
5734  {
5735  case 0:
5736 
5737  DAS.DOption.resetEnabled = 0;
5738 
5744 
5745 
5746  break;
5747  case 1:
5748  DAS.DOption.resetEnabled = 1;
5749 
5755  break;
5756 
5757  }
5758 
5759 
5760  }
5761 
5762 }
gui Gui
Graphic User Interface Structure.
optionini DOption
Options for DAS execution.
void MObjectSetUnsensitive(MOBJECT obj)
MOBJECT rbDASResPer[2]
radio button for DAS Reset type (HOURs/DAYs)
int MRButtonGetActivationStatus(MOBJECT o)
MOBJECT edtDASReset
edit box for DAS Reset
das DAS
Definition: DAS_Spat_Conf.c:56
MOBJECT listReset
list for reset frequency
configpanel ConfigPanel
Configuration panel structure.
MOBJECT lblReset
label for reset frequency
int resetEnabled
DAS/Windows reset option (1 = Enabled; 0 = disabled)
void MObjectSetSensitive(MOBJECT obj)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_ResetType_CB()

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

Definition at line 5765 of file DAS_Spat_Conf.c.

References gui::ConfigPanel, das::DOption, configpanel::edtDASReset, edtDASReset_CB(), das::Gui, LIST_ACT::item, configpanel::lblReset, configpanel::listReset, MObjectSetText(), MOptionEditSetListCallback(), MRButtonGetActivationStatus(), MSListAddItem(), MSListClear(), MSListGetSelected(), MSListSelectElement(), RDAY, optionini::resetFreq, optionini::resetType, and RHOUR.

Referenced by CONFP_opt_page7().

5766 {
5767 
5768  int er = 0;
5769  int c = (int) v,i,k;
5770  char buff[64], str[32];
5771 
5772  LIST_ACT * pla;
5773 
5774 
5775 
5776 
5778 
5779  if(er)
5780  {
5781  switch (c)
5782  {
5783  case RHOUR:
5785 
5786  if (DAS.Gui.ConfigPanel.lblReset != 0)
5787  {
5788  sprintf(buff, "%d", (int)DAS.DOption.resetFreq);
5790  for(i=1; i<24; i++)
5791  {
5792  sprintf(str, "%.d",i);
5794  if( strcmp(str,buff) ==0 )
5795  k=i;
5796  }
5799  sprintf(str, "%s", pla->item );
5802  DAS.DOption.resetFreq = atoi(pla->item);
5803 
5804  sprintf(buff, "Hour(s)");
5806  }
5807  break;
5808  case RDAY:
5810 
5811  if (DAS.Gui.ConfigPanel.lblReset != 0)
5812  {
5813  sprintf(buff, "%d", (int)DAS.DOption.resetFreq);
5815  for(i=1; i<365; i++)
5816  {
5817  sprintf(str, "%.d",i);
5819  if( strcmp(str,buff) ==0 )
5820  k=i;
5821  }
5824  sprintf(str, "%s", pla->item );
5827  DAS.DOption.resetFreq = atoi(pla->item);
5828 
5829 
5830  sprintf(buff, "Day(s)");
5832  }
5833  break;
5834 
5835  }
5836 
5837 
5838  }
5839 
5840 }
gui Gui
Graphic User Interface Structure.
optionini DOption
Options for DAS execution.
List Item Activation.
Definition: Mguidefs.h:1179
void MOptionEditSetListCallback(MOBJECT obj, LIST_ACT_CB cb, void *data)
#define RDAY
double filter wheel
void MSListSelectElement(MOBJECT p, long n)
char * item
Definition: Mguidefs.h:1181
void MObjectSetText(MOBJECT obj, const char *text)
int MRButtonGetActivationStatus(MOBJECT o)
void MSListClear(MOBJECT p)
void edtDASReset_CB(MOBJECT p, LIST_ACT *la, void *ad)
int resetFreq
frequency of DAS/Windows Reset
MOBJECT edtDASReset
edit box for DAS Reset
das DAS
Definition: DAS_Spat_Conf.c:56
#define RHOUR
simple filter wheel
MOBJECT listReset
list for reset frequency
configpanel ConfigPanel
Configuration panel structure.
MOBJECT lblReset
label for reset frequency
int MSListAddItem(MOBJECT p, const char *item, void *data)
int resetType
type of period for DAS Reset: 0=Hours, 1=Days
LIST_ACT * MSListGetSelected(MOBJECT p)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_StorePB()

void DB_StorePB ( MOBJECT  obj,
MAnyWindowEvent pe,
void *  a_data 
)

Definition at line 2509 of file DAS_Spat_Conf.c.

References das::DGeo, d_geo::flagnewstation, MObjectSetSensitive(), and MObjectSetUnsensitive().

Referenced by CONFP_param_page3().

2510 {
2511 
2512  if(DAS.DGeo.flagnewstation)
2513  MObjectSetSensitive(obj);
2514  else
2515  MObjectSetUnsensitive(obj);
2516 
2517 
2518 }
void MObjectSetUnsensitive(MOBJECT obj)
d_geo DGeo
struct for Station location
das DAS
Definition: DAS_Spat_Conf.c:56
int flagnewstation
New Station Flag.
void MObjectSetSensitive(MOBJECT obj)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_TempHistCB()

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

Definition at line 540 of file DAS_Spat_Conf.c.

References das::DOption, MRButtonGetActivationStatus(), omuthr::PID_On, optionini::refertemp, TRTBOTH, TRTCOOL, TRTHEAT, and omuthr::TRType.

Referenced by CONFP_opt_page4().

541 {
542 
543  int er = 0;
544  int c = (int) v;
545 
546 
548 
549  if(er)
550  {
551  switch (c)
552  {
553  case 0:
554  DAS.DOption.refertemp = 0; //AVGPINT;
555  break;
556  case 1:
557  DAS.DOption.refertemp = 1; //OPTIC;
558  break;
559  case 2:
560  DAS.DOption.refertemp = 2; //GRATING;
561  break;
562 
563  case 3:
564  OMUTHR.TRType = TRTCOOL; //;
565  break;
566  case 4:
567  OMUTHR.TRType = TRTHEAT; //;
568  break;
569  case 5:
570  OMUTHR.TRType = TRTBOTH; //;
571  break;
572  case 6:
573  OMUTHR.PID_On = 0; //;
574  break;
575  case 7:
576  OMUTHR.PID_On = 1; //;
577  break;
578  }
579  }
580 
581 }
optionini DOption
Options for DAS execution.
int TRType
Type of thermo regulation (0=TRTCOOL, 1 = TRTHEAT, 2= TRTBOTH)
int MRButtonGetActivationStatus(MOBJECT o)
#define TRTHEAT
Thermoregulation mode: heat only.
#define TRTCOOL
Thermoregulation mode: cool only.
omuthr OMUTHR
Definition: DAS_Spat_Conf.c:57
int PID_On
PID activation.
das DAS
Definition: DAS_Spat_Conf.c:56
#define TRTBOTH
Thermoregulation mode: cool and heat.
int refertemp
Flag to set the reference temp for thermo-regulation: 0 = AVGPINT; 1 = OPTIC; 2 = GRATING...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_TestHomeTypeCB()

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

Definition at line 724 of file DAS_Spat_Conf.c.

References HomeAzimFast(), HomeFiltersFast(), HomeGratingFast(), HomeMirror(), and HomeZenithFast().

Referenced by CONFP_AMS_TabSingMotor(), FrmNOVA_IO_Test(), and FrmStepperHomeMode().

725 {
726 
727  int c = (int) ad;
728 // int id;
729 
730 
731  switch (c)
732  {
733  case 0:
734  HomeMirror();
735  break;
736  case 1:
737  HomeGratingFast(0);
738  break;
739  case 2:
740  HomeFiltersFast();
741  break;
742  case 3:
743 
744  break;
745  case 4:
746  HomeZenithFast();
747 
748  break;
749  case 5:
750  HomeAzimFast();
751  break;
752  }
753 
754 }
int HomeMirror(void)
Input Mirror in the reference Position. The Input Mirror reaches the reference Position.
Definition: Init.c:685
int HomeGratingFast(int mod)
(Fastest) Grating in the reference Position. The Grating reaches the reference Position. Similar to HomeGrating(void), but faster
Definition: Init.c:780
int HomeAzimFast(void)
Home for Azimuth Axis.
Definition: Init.c:1229
int HomeFiltersFast(void)
(Fastest) Fliter wheel in the reference Position. The Fliter wheel reaches the reference Position...
Definition: Init.c:853
int HomeZenithFast(void)
Home for Zenith Axis.
Definition: Init.c:1143
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DeleteGeoCB()

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

Definition at line 2415 of file DAS_Spat_Conf.c.

References das::DGeo, d_geo::newalititude, d_geo::newlatitude, d_geo::newlongitude, d_geo::news_name, d_geo::newtimezone, d_geo::nitem, Rebuildrb(), d_geo::selitem, and WriteGeo().

Referenced by CONFP_param_page3().

2416 {
2417 
2418  int c,i;
2419  char buf[80];
2420 
2421  c=DAS.DGeo.selitem;
2422 
2423  for (i=0;i<c-1;i++)
2424  {
2425 
2426  DAS.DGeo.news_name[i];
2427 
2428  }
2429 
2430  for (i=c+1;i<DAS.DGeo.nitem;i++)
2431  {
2432  sprintf(buf,"%s", DAS.DGeo.news_name[i]);
2433  sprintf(DAS.DGeo.news_name[i-1], "%s",buf);
2434 
2435  DAS.DGeo.newlatitude[i-1] = DAS.DGeo.newlatitude[i];
2438  DAS.DGeo.newtimezone[i-1] = DAS.DGeo.newtimezone[i];
2439 
2440 
2441 
2442  }
2443 
2444  sprintf(buf,"%s", DAS.DGeo.news_name[DAS.DGeo.nitem]);
2445  sprintf(DAS.DGeo.news_name[DAS.DGeo.nitem-1], "%s",buf);
2446 
2451 
2452 
2453 
2454 
2455 
2456  DAS.DGeo.nitem--;
2457 
2458  DAS.DGeo.selitem = c;
2459 
2460  WriteGeo(0);
2461 
2462  Rebuildrb(1);
2463 
2464 /*
2465  sprintf(str, "%.3f %.3f %.3f %d\n", DAS.DGeo.newlatitude[i],
2466  DAS.DGeo.newlongitude[i],DAS.DGeo.newalititude[i],DAS.DGeo.newtimezone[i]);
2467  fprintf(fs,str);
2468 */
2469 
2470  return 0;
2471 
2472 }
double newlatitude[20]
New Station latitude.
double newlongitude[20]
New Station longitude.
int selitem
d_geo DGeo
struct for Station location
int WriteGeo(int mode)
das DAS
Definition: DAS_Spat_Conf.c:56
int newtimezone[20]
Station timezone.
char news_name[20][4]
New Station name.
double newalititude[20]
New Station altitude.
int nitem
Number of items of the GeoDB.ini.
void Rebuildrb(int mode)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DGeoeditCB()

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

Definition at line 2476 of file DAS_Spat_Conf.c.

References das::DGeo, d_geo::newalititude, d_geo::newlatitude, d_geo::newlongitude, d_geo::news_name, d_geo::newtimezone, d_geo::selitem, and EDIT_VAL::text.

Referenced by CONFP_param_page3().

2477 {
2478  int c = (int) ii;
2479 
2480  switch (c)
2481  {
2482  case 0:
2483  sprintf(DAS.DGeo.news_name[DAS.DGeo.selitem ], "%s", ev->text);
2484  break;
2485  case 1:
2486  DAS.DGeo.newlatitude[DAS.DGeo.selitem ] = (float)strtod( ev->text, &ev->text );
2487  break;
2488  case 2:
2489  DAS.DGeo.newlongitude[DAS.DGeo.selitem] = (float)strtod( ev->text, &ev->text );
2490 
2491  break;
2492  case 3:
2493  DAS.DGeo.newtimezone[DAS.DGeo.selitem ] = atoi( ev->text);
2494 
2495  break;
2496  case 4:
2497  DAS.DGeo.newalititude[DAS.DGeo.selitem] = (float)strtod( ev->text, &ev->text );
2498  break;
2499 
2500  }
2501 
2502 }
double newlatitude[20]
New Station latitude.
char * text
Definition: Mguidefs.h:1389
double newlongitude[20]
New Station longitude.
int selitem
d_geo DGeo
struct for Station location
das DAS
Definition: DAS_Spat_Conf.c:56
int newtimezone[20]
Station timezone.
char news_name[20][4]
New Station name.
double newalititude[20]
New Station altitude.
+ Here is the caller graph for this function:

§ DMessage()

void DMessage ( char *  str)

Definition at line 1099 of file DAS_Spat_Conf.c.

References MMessageDialog().

Referenced by MDQuitCB(), and PBH_CB().

1100 {
1101 
1102  MMessageDialog("AMS Informations", str, "OK", NULL);
1103 }
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:

§ DSZArb_CB()

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

Definition at line 2522 of file DAS_Spat_Conf.c.

References gui::ConfigPanel, flag::DeltaSZA, configpanel::edtDSZA, configpanel::edtSZA, das::Flag, das::Gui, configpanel::lblSZA, MObjectSetBackgroundRGB(), MObjectSetSensitive(), and MObjectSetUnsensitive().

Referenced by CONFP_param_page4().

2523 {
2524 
2525  int er = 0;
2526  int c = (int) v;
2527 // char str[16];
2528 
2529 
2530  switch (c)
2531  {
2532  case 0:
2533  DAS.Flag.DeltaSZA = 0;
2538  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[0], 192, 192, 192);
2539  MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.edtSZA[1], 192, 192, 192);
2543 
2544  break;
2545 
2546  case 1:
2547  DAS.Flag.DeltaSZA = 1;
2557 
2558  break;
2559  }
2560 }
MOBJECT edtDSZA
edit box for delta SZA
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
void MObjectSetUnsensitive(MOBJECT obj)
MOBJECT edtSZA[2]
edit boxes for limits for delta sza measurements (0–> szamin; 1–>sza max)
flag Flag
Structure for different flags.
int DeltaSZA
= 1 Delta SZA measurements activated, = 0 Continous measurements
das DAS
Definition: DAS_Spat_Conf.c:56
MOBJECT lblSZA[3]
labels for delta sza measurements
configpanel ConfigPanel
Configuration panel structure.
void MObjectSetSensitive(MOBJECT obj)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ edtCCDOffSet_CB()

void edtCCDOffSet_CB ( MOBJECT  p,
LIST_ACT la,
void *  ad 
)

Definition at line 3408 of file DAS_Spat_Conf.c.

References DBDEMO, DC_SetUsrGain(), flag::exemode, das::Flag, LIST_ACT::item, das::Marconi, and marconi::Offset.

Referenced by CONFP_param_page1().

3409 {
3410 
3411  int c = (int) ad;
3412  int er = 0;
3413 
3414 
3415  DAS.Marconi.Offset = atoi(la->item);
3416 
3417 
3418  if(DAS.Flag.exemode != DBDEMO)
3419  DC_SetUsrGain(0, 0 , DAS.Marconi.Offset , 0);
3420 
3421 
3422 
3423 }
flag Flag
Structure for different flags.
#define DBDEMO
execution in demo mode
char * item
Definition: Mguidefs.h:1181
das DAS
Definition: DAS_Spat_Conf.c:56
CTYPE void DLL DC_SetUsrGain(int Gain, int Range, int Offset, int Camera)
Procedure that allows you to set the ccd gain. Procedure that allows you to set the ccd gain...
int exemode
Set the Execution MODE (Execution modes)
marconi Marconi
CCD Sensor struct.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ edtDASReset_CB()

void edtDASReset_CB ( MOBJECT  p,
LIST_ACT la,
void *  ad 
)

Definition at line 5710 of file DAS_Spat_Conf.c.

References das::DOption, LIST_ACT::item, and optionini::resetFreq.

Referenced by CONFP_opt_page7(), and DB_ResetType_CB().

5711 {
5712 
5713  int c = (int) ad;
5714  int er = 0;
5715 
5716 
5717  DAS.DOption.resetFreq = atoi(la->item);
5718 
5719 
5720 }
optionini DOption
Options for DAS execution.
char * item
Definition: Mguidefs.h:1181
int resetFreq
frequency of DAS/Windows Reset
das DAS
Definition: DAS_Spat_Conf.c:56
+ Here is the caller graph for this function:

§ edtDSZA_CB()

void edtDSZA_CB ( MOBJECT  p,
LIST_ACT la,
void *  ad 
)

Definition at line 2563 of file DAS_Spat_Conf.c.

References dsza::DeltaSZA, LIST_ACT::item, and SZADelta.

Referenced by CONFP_param_page4().

2564 {
2565 
2566  int c = (int) ad;
2567  int er = 0;
2568 
2569 
2570  SZADelta.DeltaSZA = atof(la->item);
2571 
2572 
2573 }
dsza SZADelta
Definition: DAS_Spat.c:76
char * item
Definition: Mguidefs.h:1181
double DeltaSZA
DeltaSZA.
+ Here is the caller graph for this function:

§ edtSZA_CB()

void edtSZA_CB ( MOBJECT  p,
LIST_ACT la,
void *  ad 
)

Definition at line 2576 of file DAS_Spat_Conf.c.

References LIST_ACT::item, dsza::MaxSZA, dsza::MinSZA, and SZADelta.

Referenced by CONFP_param_page4().

2577 {
2578 
2579  int c = (int) ad;
2580  int er = 0;
2581 
2582 
2583  switch (c)
2584  {
2585  case 0:
2586  SZADelta.MinSZA=atof(la->item);
2587  break;
2588 
2589  case 1:
2590  SZADelta.MaxSZA=atof(la->item);
2591 
2592  break;
2593  }
2594 
2595 
2596 }
dsza SZADelta
Definition: DAS_Spat.c:76
char * item
Definition: Mguidefs.h:1181
double MaxSZA
Maximum SZA.
double MinSZA
Minimum SZA.
+ Here is the caller graph for this function:

§ FrmNOVA_IO_Test()

void FrmNOVA_IO_Test ( int  mod,
MOBJECT  obj 
)

Definition at line 1523 of file DAS_Spat_Conf.c.

References DB_HomeTypeCB(), DB_TestHomeTypeCB(), FIXED_SMALL, stepm::hometype, lbl, LEFT_ALIGN, MCreateLabel(), MCreatePButton(), MCreateRButton(), MCreateRowForm(), MCreateTableForm(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetForegroundRGB(), MObjectSetPopupHelp(), MObjectSetTransparency(), MPButtonSetCallback(), MRButtonActivate(), das::StepM, and TOP_ALIGN.

1524 {
1525 
1526  MOBJECT lbl, tb, rowfrm, rb, pb;
1527 // char buf[32];
1528  int c = mod;
1529  int i = 3;
1530 // int k;
1531 
1532  const char *lblstring[] = {{"Mirror"}, {"Grating"}, {"Filter Wheel"}, {"Not Conn."}, {"Zenith"}, {"Azimut"}};
1533  const char *helpoutput[] = {{"Standard - This command search the reference position of the device (Home).\nThe motor moves in the CCW direction until the input port became active.\nThe process is done with 2000 s/r and 1KHz of frequency.\nThe scanning for the end-run is done each 1 ms "},
1534  {"Default - As the standard command, but with the actual values of step, power and frequancy "},
1535  {"Fast - The frequency is setted in the program (see AMS User Guide and contact DanBo for modifications)"}};
1536 
1537  rowfrm = MCreateRowForm(obj);
1538  MObjectSetBackgroundRGB(rowfrm, 80, 60, 0);
1539 
1540  lbl = MCreateLabel(rowfrm, lblstring[mod], FIXED_SMALL);
1541  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1542  MObjectSetBackgroundRGB(lbl, 192, 80, 80);
1543  MObjectSetTransparency(lbl, 0);
1544 
1545  tb = MCreateTableForm(rowfrm,2);
1546  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1547 
1548 
1549  rb= MCreateRButton(tb, "Standard", FIXED_SMALL);
1550  MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+0));
1552  MObjectSetForegroundRGB(rb, 255, 255, 255);
1553  MObjectSetPopupHelp(rb, helpoutput[0], 200, 5000);
1554 // MObjectSetCompositeWidth(rb, 123);
1555  if(DAS.StepM.hometype[mod] == 0)
1556  MRButtonActivate(rb);
1557 
1558  pb= MCreatePButton(tb, "Test", FIXED_SMALL);
1559  MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+0));
1561  MObjectSetForegroundRGB(pb, 0, 0, 0);
1562  MObjectSetBackgroundRGB(pb, 127, 220, 120);
1563 
1564 
1565  rb= MCreateRButton(tb, "Default", FIXED_SMALL);
1566  MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+1));
1568  MObjectSetForegroundRGB(rb, 255, 255, 255);
1569  MObjectSetPopupHelp(rb, helpoutput[1], 200, 5000);
1570 // MObjectSetCompositeWidth(rb, 123);
1571 // if(DAS.DAS.StepM.hometype[mod] == 1)
1572 // MRButtonActivate(rb);
1573 
1574  pb= MCreatePButton(tb, "Test", FIXED_SMALL);
1575  MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+1));
1577  MObjectSetForegroundRGB(pb, 0, 0, 0);
1578  MObjectSetBackgroundRGB(pb, 127, 220, 120);
1579 
1580  rb= MCreateRButton(tb, "Fast ", FIXED_SMALL);
1581  MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+2));
1583  MObjectSetForegroundRGB(rb, 255, 255, 255);
1584  MObjectSetPopupHelp(rb, helpoutput[2], 200, 5000);
1585 // MObjectSetCompositeWidth(rb, 123);
1586 // if(DAS.DAS.StepM.hometype[mod] == 2)
1587 // MRButtonActivate(rb);
1588 
1589  pb= MCreatePButton(tb, "Test", FIXED_SMALL);
1590  MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+2));
1592  MObjectSetForegroundRGB(pb, 0, 0, 0);
1593  MObjectSetBackgroundRGB(pb, 127, 220, 120);
1594 
1595 
1596 }
stepm StepM
Stepper motors parameters structure.
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
int hometype[AMSMAX][2]
MOBJECT lbl
Definition: DFileMan.c:42
void DB_TestHomeTypeCB(MOBJECT p, void *od, void *ad)
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
void MObjectSetPopupHelp(MOBJECT obj, const char *str, int delay, int duration)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define FIXED_SMALL
Definition: Mguidefs.h:878
void MRButtonActivate(MOBJECT o)
das DAS
Definition: DAS_Spat_Conf.c:56
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void * MOBJECT
Definition: Mguidefs.h:192
#define LEFT_ALIGN
Definition: Mguidefs.h:915
void DB_HomeTypeCB(MOBJECT p, LIST_ACT *la, void *ad)
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MCreateRowForm(MOBJECT parent)
#define TOP_ALIGN
Definition: Mguidefs.h:918
+ Here is the call graph for this function:

§ FrmStepperHomeMode()

void FrmStepperHomeMode ( int  mod,
MOBJECT  obj 
)

Definition at line 1447 of file DAS_Spat_Conf.c.

References DB_HomeTypeCB(), DB_TestHomeTypeCB(), FIXED_SMALL, stepm::hometype, lbl, LEFT_ALIGN, MCreateLabel(), MCreatePButton(), MCreateRButton(), MCreateRowForm(), MCreateTableForm(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetForegroundRGB(), MObjectSetPopupHelp(), MObjectSetTransparency(), MPButtonSetCallback(), MRButtonActivate(), das::StepM, and TOP_ALIGN.

1448 {
1449 
1450  MOBJECT lbl, tb, rowfrm, rb, pb;
1451 // char buf[32];
1452  int c = mod;
1453  int i = 3;
1454 // int k;
1455 
1456  const char *lblstring[] = {{"Mirror"}, {"Grating"}, {"Filter Wheel"}, {"Not Conn."}, {"Zenith"}, {"Azimut"}};
1457  const char *helpoutput[] = {{"Standard - This command search the reference position of the device (Home).\nThe motor moves in the CCW direction until the input port became active.\nThe process is done with 2000 s/r and 1KHz of frequency.\nThe scanning for the end-run is done each 1 ms "},
1458  {"Default - As the standard command, but with the actual values of step, power and frequancy "},
1459  {"Fast - The frequency is setted in the program (see AMS User Guide and contact DanBo for modifications)"}};
1460 
1461  rowfrm = MCreateRowForm(obj);
1462  MObjectSetBackgroundRGB(rowfrm, 80, 60, 0);
1463 
1464  lbl = MCreateLabel(rowfrm, lblstring[mod], FIXED_SMALL);
1465  MObjectSetForegroundRGB(lbl, 255, 255, 255);
1466  MObjectSetBackgroundRGB(lbl, 192, 80, 80);
1467  MObjectSetTransparency(lbl, 0);
1468 
1469  tb = MCreateTableForm(rowfrm,2);
1470  MObjectSetBackgroundRGB(tb, 80, 60, 0);
1471 
1472 
1473  rb= MCreateRButton(tb, "Standard", FIXED_SMALL);
1474  MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+0));
1476  MObjectSetForegroundRGB(rb, 255, 255, 255);
1477  MObjectSetPopupHelp(rb, helpoutput[0], 200, 5000);
1478 // MObjectSetCompositeWidth(rb, 123);
1479  if(DAS.StepM.hometype[mod] == 0)
1480  MRButtonActivate(rb);
1481 
1482  pb= MCreatePButton(tb, "Test", FIXED_SMALL);
1483  MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+0));
1485  MObjectSetForegroundRGB(pb, 0, 0, 0);
1486  MObjectSetBackgroundRGB(pb, 127, 220, 120);
1487 
1488 
1489  rb= MCreateRButton(tb, "Default", FIXED_SMALL);
1490  MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+1));
1492  MObjectSetForegroundRGB(rb, 255, 255, 255);
1493  MObjectSetPopupHelp(rb, helpoutput[1], 200, 5000);
1494 // MObjectSetCompositeWidth(rb, 123);
1495 // if(DAS.DAS.StepM.hometype[mod] == 1)
1496 // MRButtonActivate(rb);
1497 
1498  pb= MCreatePButton(tb, "Test", FIXED_SMALL);
1499  MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+1));
1501  MObjectSetForegroundRGB(pb, 0, 0, 0);
1502  MObjectSetBackgroundRGB(pb, 127, 220, 120);
1503 
1504  rb= MCreateRButton(tb, "Fast ", FIXED_SMALL);
1505  MPButtonSetCallback(rb, DB_HomeTypeCB, (void *) (c*i+2));
1507  MObjectSetForegroundRGB(rb, 255, 255, 255);
1508  MObjectSetPopupHelp(rb, helpoutput[2], 200, 5000);
1509 // MObjectSetCompositeWidth(rb, 123);
1510 // if(DAS.DAS.StepM.hometype[mod] == 2)
1511 // MRButtonActivate(rb);
1512 
1513  pb= MCreatePButton(tb, "Test", FIXED_SMALL);
1514  MPButtonSetCallback(pb, DB_TestHomeTypeCB, (void *) (c*i+2));
1516  MObjectSetForegroundRGB(pb, 0, 0, 0);
1517  MObjectSetBackgroundRGB(pb, 127, 220, 120);
1518 
1519 
1520 }
stepm StepM
Stepper motors parameters structure.
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
int hometype[AMSMAX][2]
MOBJECT lbl
Definition: DFileMan.c:42
void DB_TestHomeTypeCB(MOBJECT p, void *od, void *ad)
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
void MObjectSetPopupHelp(MOBJECT obj, const char *str, int delay, int duration)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define FIXED_SMALL
Definition: Mguidefs.h:878
void MRButtonActivate(MOBJECT o)
das DAS
Definition: DAS_Spat_Conf.c:56
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void * MOBJECT
Definition: Mguidefs.h:192
#define LEFT_ALIGN
Definition: Mguidefs.h:915
void DB_HomeTypeCB(MOBJECT p, LIST_ACT *la, void *ad)
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MCreateRowForm(MOBJECT parent)
#define TOP_ALIGN
Definition: Mguidefs.h:918
+ Here is the call graph for this function:

§ MDCreate2DPlot()

MOBJECT MDCreate2DPlot ( char *  title,
int  x,
int  y,
int  dx,
int  dy,
int  mode 
)

create the 2D_Plot panel via the MDCreate_2DPlot.

Definition at line 343 of file DAS_Spat_Conf.c.

References _MAX_PATH, CloseShTempCB(), bil::DFILEM, d_fileman::HOMEDIRECTORY, MDCreate_2DPlot(), MShellRealize(), MShellSetWMCloseCallback(), SetWorkDirMGUIenv(), and omutemp::sh.

Referenced by DB_2DPlot().

344 {
345 
346  char buf[_MAX_PATH];
347  int er = 0;
348 
349 
350  OMUTEMP.sh = MDCreate_2DPlot(title);
352  //Close shell CB
354 
355 
356  // DAS Working directory and MGUI Environment
357  sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "DAS.exe");
358  er = SetWorkDirMGUIenv(buf);
359  if (er == -1)
360  {
361  //Unable to set the enviromental variable
362  }
363 
364 
365 
366 // DrawAreaTempCB(datatemp.drawarea000);
367  return 0;
368 
369 }
void MShellRealize(MOBJECT obj)
omutemp OMUTEMP
structure for OMU temperatures
Definition: DAS_Spat_Conf.c:50
char HOMEDIRECTORY[_MAX_PATH]
Definition: bildef.h:200
d_fileman DFILEM
Definition: bildef.h:257
MOBJECT MDCreate_2DPlot(char *title)
2DPlot Panel. Procedure that build the shell for the plotting of the LOG files.
Definition: 2DPlot.c:473
bil BIL
Definition: DAS_Spat_Conf.c:51
#define _MAX_PATH
Definition: Dildef.h:202
int SetWorkDirMGUIenv(char *buff)
set DAS and MGUI enviroment when the program is launched undirectly (for offlineplot or log or auto o...
Definition: DAS_Spat.c:3353
void MShellSetWMCloseCallback(MOBJECT p, WM_CLOSE_CB cb, void *a_data)
void CloseShTempCB(MOBJECT p, void *od, void *ad)
MOBJECT sh
Definition: bildef.h:108
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ MDCreateDASConfig()

void MDCreateDASConfig ( void  )

DAS Config shell. Procedure that build the shell for the DAS Config panels. The DAS Config allow for setting a lot of the application parameters.

Returns
void

Definition at line 7017 of file DAS_Spat_Conf.c.

References adtester::ADInflbl, adtester::ADpb, adtester::ADrb, ADTesterCB(), AMS_AdvancedCB(), ApplyChCB(), b_c, b_label, b_sbar, cell_color, CENTER_ALIGN, CloseConfigCB(), ColObjCB(), ColorAssignCB(), ColPickBackForeGCB(), gui::ConfigPanel, CONFP_AMS(), CONFP_AMS_NOVA(), CONFP_AMS_Utility(), CONFP_Options(), CONFP_Param(), D_UndoCB(), DB_CellExposeCB(), DB_CellResizeCB(), DB_ChangeColorCellCB(), DB_SelOutModeCB(), DOASMODE, drawarea_bgc, DrawAreaExpFontCB(), e_fname, e_fsize, flag::exemode, F_PREF_ATT_COL, False, FIXED_SMALL, das::Flag, FontOBJSelCB(), frm3_dr1, configpanel::frm4_dr1, g_c, g_label, g_sbar, das::Gui, lbl, adtester::lblADch, adtester::lblADsetup, adtester::lblADvalue, LEFT_ALIGN, LoadFontCB(), LoadGeoDB(), LoadPaletteCB(), MAllocCell(), MAllocColor(), MCreateDrawArea(), MCreateLabel(), MCreateOptionEdit(), MCreatePButton(), MCreateRButton(), MCreateRowForm(), MCreateScrollBar(), MCreateShell(), MCreateTabbedRowForm(), MCreateTableForm(), MCreateTButton(), MDrawAreaSetExposeCallback(), MDrawAreaSetResizeCallback(), MEditDisableEditing(), MFormSetFocusHighlight(), MFormSetPrefAtt(), MGetDefaultBackgroundRGB(), MGetFirstFontFamily(), MGetNextFontFamily(), MLabelSetAlignment(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeHeight(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetText(), MObjectSetTransparency(), MOptionEditGetList(), MPagedFormSetActivePage(), MPButtonSetCallback(), MRButtonActivate(), MRButtonSetCallback(), MScrollBarSetPosCallback(), MShellRealize(), MSListAddItem(), MSListSetSortCallback(), MTableFormSetColAlign(), MTableFormSetRowAlign(), MTButtonSetCallback(), stepm::NAMS, adtester::OutputMode, PFAMS, r_c, r_label, r_sbar, configpanel::RBColObj, RIGHT_ALIGN, SBT_HOR, SetBoldCB(), SetItalicCB(), configpanel::ShellConfig, das::StepM, TestFontCB(), TOP_ALIGN, True, UNDEF_ALIGN, UndoFCB(), WriteAMSCB(), WriteColorsCB(), WriteFontCB(), and WS_ETCHED_OUT.

Referenced by ConfigCB(), D_PButt_CB(), and DB_PasWd().

7018 {
7019 
7020 // MOBJECT _shell000;
7021  MOBJECT POCF; //Paged form for configuration panel
7022 // MOBJECT POPT; //Paged form for options
7023  MOBJECT rowform; // generic row form
7024 
7025  MOBJECT rowform1; // generic row form
7026 // MOBJECT PFAMS; // paged form for AMS
7027 // MOBJECT edit; // generic edit object
7028 // MOBJECT radiobutt[2]; // generic radio button
7029 
7030  MOBJECT RColButt;
7031  MOBJECT pb; // generic push button
7032 // MOBJECT rb; // generic radio button
7033  MOBJECT list;
7034  MOBJECT _tbutton000;
7035  MOBJECT _tbutton001;
7036  MOBJECT form2;
7037  MOBJECT label, lbl;
7038  MOBJECT tb; // generic table object
7039 // MOBJECT frm2_tb4;
7040  int r, g, b;
7041  int i;
7042  char buf[64];
7043 // double percentuale,speedhz;
7044  const char *fontfamily;
7045 
7046 // struct confp *pconfp;
7047 
7048  LoadGeoDB();
7049 
7050  MGetDefaultBackgroundRGB(&r, &g, &b);
7051  drawarea_bgc = MAllocColor(r, g, b);
7052 /********************************************************/
7053 /************* MAIN SHELL *************************/
7054 /********************************************************/
7055  DAS.Gui.ConfigPanel.ShellConfig = MCreateShell("DAS Config", 0);
7061 // MObjectSetCompositeWidth(DAS.Gui.ConfigPanel.ShellConfig, 670);
7062 // MObjectSetCompositeHeight(DAS.Gui.ConfigPanel.ShellConfig, 483);
7063 
7064 
7065 /********************************************************/
7066 /************* CONFIG PAGED FORM **********************/
7067 /********************************************************/
7069  MObjectSetForegroundRGB(POCF, 255, 255, 255);
7070  MObjectSetBackgroundRGB(POCF, 96, 132, 152);
7071  MObjectSetResize(POCF, True, True);
7073 // MObjectSetCompositeWidth(POCF, 457); //457
7074 
7075 /* Activation of POCF page 0 - Parameters*/
7076 /* 00000000000000000000000000000000000000000000000000000000 */
7077  MPagedFormSetActivePage(POCF, 0);
7078 
7079  // Creation page 0 - Parameters
7080  CONFP_Param(0, POCF);
7081 
7082 /* End Activation and creation of page 0 */
7083 /* 0000000000000000000000000000000000000000000000000000000 */
7084 
7085 /* Activation of POCF page 1 - Option */
7086 /* 11111111111111111111111111111111111111111111111111111111 */
7087 
7088 /* Start Creation of page 1 111111111111111111111*/
7089 /* 11111111111111111111111111111111111111111111111111111111111111111*/
7090  MPagedFormSetActivePage(POCF, 1);
7091 
7092  // Creation Page 1 - Options
7093  CONFP_Options(0, POCF);
7094 
7095 /* End Activation and creation of page 1 11111111111111111111*/
7096 /* 11111111111111111111111111111111111111111111111111111111111111*/
7097 
7098 /****************************************************************************/
7099 
7100 /* Start Activation and creation of page 2 - Colors 2222222222*/
7101 /* 22222222222222222222222222222222222222222222222222222222222222*/
7102 
7103  MPagedFormSetActivePage(POCF, 2);
7104 
7105  MObjectSetText(POCF, "Colors");
7106  rowform = MCreateRowForm(POCF);
7107  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
7108  MObjectSetResize(rowform, False, False);
7109  MObjectSetCompositeWidth(rowform, 357);
7110  MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN);
7111 
7112  lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL);
7114  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7115  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
7116  MObjectSetTransparency(lbl, 0);
7117 
7118  tb = MCreateTableForm(rowform, 2);
7120  MObjectSetBackgroundRGB(tb, 112, 68, 72);
7121  MObjectSetResize(tb, True, False);
7122 
7123 
7124  DAS.Gui.ConfigPanel.RBColObj[0] = MCreateRButton(tb, "Unsel. Push Button", FIXED_SMALL);
7127 
7128  DAS.Gui.ConfigPanel.RBColObj[1] = MCreateRButton(tb, "Sel. Push Button", FIXED_SMALL);
7131 
7132  DAS.Gui.ConfigPanel.RBColObj[2] = MCreateRButton(tb, "Active Labels", FIXED_SMALL);
7135 
7136  DAS.Gui.ConfigPanel.RBColObj[3] = MCreateRButton(tb, "Passive LAbels", FIXED_SMALL);
7139 
7143 
7144  DAS.Gui.ConfigPanel.RBColObj[5] = MCreateRButton(tb, "Capital Labels", FIXED_SMALL);
7147 
7148  if (DAS.Flag.exemode == DOASMODE )
7149  {
7150  DAS.Gui.ConfigPanel.RBColObj[6] = MCreateRButton(tb, "Radio Button", FIXED_SMALL);
7153  }
7154 /*
7155 
7156  RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL);
7157  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7158  MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 0);
7159 
7160  RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL);
7161  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7162  MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 1);
7163 
7164  RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL);
7165  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7166  MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 2);
7167 
7168  RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL);
7169  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7170  MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 3);
7171 
7172  RColButt = MCreateRButton(tb, "Forms", FIXED_SMALL);
7173  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7174  MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 4);
7175 
7176  RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL);
7177  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7178  MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 5);
7179 
7180 if (DAS.Flag.exemode == DOASMODE )
7181 {
7182 
7183  RColButt = MCreateRButton(tb, "Radio Buttons", FIXED_SMALL);
7184  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7185  MPButtonSetCallback(RColButt, ColorOBJSelCB, (void *) 6);
7186 }
7187 */
7188  tb = MCreateTableForm(rowform, 2);
7190  MObjectSetBackgroundRGB(tb, 160, 112, 112);
7191  MObjectSetResize(tb, True, False);
7192 
7193  RColButt = MCreateRButton(tb, "Background", FIXED_SMALL);
7194  MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 0);
7195  MObjectAlign(RColButt, CENTER_ALIGN, TOP_ALIGN);
7196  MRButtonActivate(RColButt);
7197  MObjectSetForegroundRGB(RColButt, 255, 255, 0);
7198 
7199  RColButt = MCreateRButton(tb, "Foreground", FIXED_SMALL);
7200  MRButtonSetCallback(RColButt, (OBJ_VALUE_CB) ColPickBackForeGCB, (void *) 1);
7201  MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN);
7202  MObjectSetForegroundRGB(RColButt, 255, 255, 0);
7203 
7204  rowform1 = MCreateRowForm(rowform);
7205  MObjectSetBackgroundRGB(rowform1 , 80, 56, 56);
7206  MObjectSetResize(rowform1 , True, True);
7207 
7208  lbl = MCreateLabel(rowform1 , "COLORS", FIXED_SMALL);
7209  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7210  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
7211  MObjectSetTransparency(lbl, 0);
7212 
7213  tb = MCreateTableForm(rowform1 , 1);
7214  MObjectSetBackgroundRGB(tb, 112, 68, 72);
7215  MObjectSetResize(tb, True, False);
7216 
7217 /******************************************/
7218 
7219  form2 = MCreateRowForm(tb);
7221  label = MCreateLabel(form2, "Red: ", FIXED_SMALL);
7222  MObjectSetForegroundRGB(label, 255, 0, 0);
7223  r_label = MCreateLabel(form2, "000", FIXED_SMALL);
7224  MObjectSetForegroundRGB(r_label, 255, 0, 0);
7225  MObjectSetResize(label, False, False);
7227  r_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32);
7229 
7230  form2 = MCreateRowForm(tb);
7232  label = MCreateLabel(form2, "Green: ", FIXED_SMALL);
7233  MObjectSetForegroundRGB(label, 0, 105, 0);
7234  g_label = MCreateLabel(form2, "000", FIXED_SMALL);
7235  MObjectSetForegroundRGB(g_label, 0, 105, 0);
7236  MObjectSetResize(label, False, False);
7238  g_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32);
7240 
7241  form2 = MCreateRowForm(tb);
7243  label = MCreateLabel(form2, "Blue: ", FIXED_SMALL);
7244  MObjectSetForegroundRGB(label, 0, 0, 255);
7245  b_label = MCreateLabel(form2, "000", FIXED_SMALL);
7246  MObjectSetForegroundRGB(b_label, 0, 0, 255);
7247  MObjectSetResize(label, False, False);
7249  b_sbar = MCreateScrollBar(form2, SBT_HOR, (long) 32, (long) 255 + 32);
7251 /************************************/
7252 
7253 
7254 
7255 
7256 
7257  frm3_dr1 = MCreateDrawArea(rowform, 347, 30);
7262  r_c = g_c = b_c = 0;
7263  cell_color = MAllocCell(0, 0, 0);
7264 
7265  rowform1 = MCreateRowForm(rowform);
7266  MObjectAlign(rowform1, CENTER_ALIGN, TOP_ALIGN);
7267  MObjectSetForegroundRGB(rowform1, 56, 84, 128);
7268  MObjectSetBackgroundRGB(rowform1, 112, 68, 72);
7269  MObjectSetResize(rowform1, False, False);
7270  MObjectSetCompositeWidth(rowform1, 347);
7271 
7272  lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL);
7273  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7274  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
7275  MObjectSetTransparency(lbl, 0);
7276 
7277  pb = MCreatePButton(rowform1, "Load Palette", FIXED_SMALL);
7279  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7280 
7281 
7282  tb = MCreateTableForm(rowform1, 4);
7284  MObjectSetBackgroundRGB(tb, 112, 68, 72);
7285  MObjectSetResize(tb, True, False);
7286 
7287  pb = MCreatePButton(tb, "Preview", FIXED_SMALL);
7289  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7290 
7291  pb = MCreatePButton(tb, "Undo", FIXED_SMALL);
7292  MPButtonSetCallback(pb, D_UndoCB, 0L);
7293  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7294  MObjectSetCompositeWidth(pb, 84);
7295 
7296  pb = MCreatePButton(tb, "Store", FIXED_SMALL);
7297  MPButtonSetCallback(pb, WriteColorsCB, (void *) 0);
7298  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7299  MObjectSetCompositeWidth(pb, 84);
7300 
7301  pb = MCreatePButton(tb, "Close", FIXED_SMALL);
7303  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7304  MObjectSetCompositeWidth(pb, 84);
7305 
7306 /* End Activation and creation of page 2 Colors 22222222222222222222*/
7307 /* 22222222222222222222222222222222222222222222222222222222222222*/
7308 
7309  /*********************** FONTS ***********************/
7310  MPagedFormSetActivePage(POCF, 3);
7311 
7312  MObjectSetText(POCF, "Fonts");
7313  rowform = MCreateRowForm(POCF);
7314  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
7315  MObjectSetResize(rowform, False, False);
7316  MObjectSetCompositeWidth(rowform, 357);
7317  MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN);
7318 
7319  lbl = MCreateLabel(rowform, "SELECT OBJECT", FIXED_SMALL);
7321  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7322  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
7323  MObjectSetTransparency(lbl, 0);
7324  MObjectSetCompositeWidth(lbl, 347);
7325 
7326  tb = MCreateTableForm(rowform, 2);
7329  MObjectSetBackgroundRGB(tb, 56, 84, 128);
7331  MObjectSetCompositeWidth(tb, 347);
7332 
7333  RColButt = MCreateRButton(tb, "UnSel. Comm.", FIXED_SMALL);
7334  MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 0);
7335  MObjectAlign(RColButt, LEFT_ALIGN, TOP_ALIGN);
7336  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7337  MObjectSetTransparency(RColButt, 0);
7338  MRButtonActivate(RColButt);
7339 
7340  RColButt = MCreateRButton(tb, "Sel. Comm.", FIXED_SMALL);
7341  MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 1);
7342  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7343  MObjectSetTransparency(RColButt, 0);
7344 
7345  RColButt = MCreateRButton(tb, "Active labels", FIXED_SMALL);
7346  MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 2);
7347  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7348  MObjectSetTransparency(RColButt, 0);
7349 
7350  RColButt = MCreateRButton(tb, "Passive labels", FIXED_SMALL);
7351  MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 3);
7352  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7353  MObjectSetTransparency(RColButt, 0);
7354 
7355  RColButt = MCreateRButton(tb, "K_labelsUP", FIXED_SMALL);
7356  MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 4);
7357  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7358  MObjectSetTransparency(RColButt, 0);
7359 
7360  RColButt = MCreateRButton(tb, "K_labelsDW", FIXED_SMALL);
7361  MPButtonSetCallback(RColButt, FontOBJSelCB, (void *) 5);
7362  MObjectSetForegroundRGB(RColButt, 255, 255, 255);
7363  MObjectSetTransparency(RColButt, 0);
7364 
7365  DAS.Gui.ConfigPanel.frm4_dr1 = MCreateDrawArea(rowform, 347, 62);
7370 
7371 
7372  rowform1 = MCreateRowForm(rowform);
7373  MObjectSetBackgroundRGB(rowform1, 56, 84, 128);
7374  MObjectSetResize(rowform1, False, False);
7375  MObjectSetCompositeWidth(rowform1, 347);
7376 
7377  lbl = MCreateLabel(rowform1, "FONTS", FIXED_SMALL);
7378  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7379  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
7380  MObjectSetTransparency(lbl, 0);
7381 
7382  tb = MCreateTableForm(rowform1, 2);
7384  MObjectSetBackgroundRGB(tb, 56, 84, 128);
7385  MObjectSetResize(tb, True, False);
7386 
7387  lbl = MCreateLabel(tb, "Type:", FIXED_SMALL);
7390  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7391  MObjectSetTransparency(lbl, 0);
7392 
7393  fontfamily = MGetFirstFontFamily ();
7394  e_fname = MCreateOptionEdit (tb, fontfamily, 22, 10, 6, FIXED_SMALL);
7395  MObjectSetForegroundRGB(e_fname, 255, 255, 255);
7396  MObjectSetBackgroundRGB(e_fname, 0, 24, 96);
7398  list = MOptionEditGetList (e_fname);
7399  MSListSetSortCallback (list, stricmp);
7400 
7401  while (fontfamily)
7402  {
7403  MSListAddItem (list, fontfamily, 0L);
7404  fontfamily = MGetNextFontFamily ();
7405  }
7406 
7407  lbl = MCreateLabel(tb, "Dim.:", FIXED_SMALL);
7409  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7410  MObjectSetTransparency(lbl, 0);
7411 
7412 
7413  e_fsize = MCreateOptionEdit(tb, "22", 22, 10, 6, FIXED_SMALL);
7414  MObjectSetForegroundRGB(e_fsize, 255, 255, 255);
7415  MObjectSetBackgroundRGB(e_fsize, 0, 24, 96);
7416  list = MOptionEditGetList(e_fsize);
7417  MSListAddItem(list, "12", 0L);
7418  MSListAddItem(list, "14", 0L);
7419  MSListAddItem(list, "16", 0L);
7420  MSListAddItem(list, "18", 0L);
7421  MSListAddItem(list, "20", 0L);
7422  MSListAddItem(list, "22", 0L);
7423  MSListAddItem(list, "24", 0L);
7424  MSListAddItem(list, "26", 0L);
7425  MSListAddItem(list, "28", 0L);
7426  MSListAddItem(list, "30", 0L);
7427  MSListAddItem(list, "32", 0L);
7428  MSListAddItem(list, "34", 0L);
7429  MSListAddItem(list, "36", 0L);
7430  MSListAddItem(list, "38", 0L);
7431  MSListAddItem(list, "40", 0L);
7432  MSListAddItem(list, "42", 0L);
7433 
7434 
7435  _tbutton000 = MCreateTButton(tb, "Bold", FIXED_SMALL);
7436  MTButtonSetCallback(_tbutton000, SetBoldCB, 0L);
7437  MObjectSetForegroundRGB(_tbutton000, 255, 255, 0);
7438 
7439  _tbutton001 = MCreateTButton(tb, "Italic", FIXED_SMALL);
7440  MTButtonSetCallback(_tbutton001, SetItalicCB, 0L);
7441  MObjectSetForegroundRGB(_tbutton001, 255, 255, 0);
7442 /*******************/
7443  rowform1 = MCreateRowForm(rowform);
7444  MObjectSetForegroundRGB(rowform1, 56, 84, 128);
7445  MObjectSetBackgroundRGB(rowform1, 56, 84, 128);
7446  MObjectSetResize(rowform1, False, False);
7447  MObjectSetCompositeWidth(rowform1, 347);
7448 
7449  lbl = MCreateLabel(rowform1, "COMMANDS", FIXED_SMALL);
7450  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7451  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
7452  MObjectSetTransparency(lbl, 0);
7453 
7454  tb = MCreateTableForm(rowform1, 5);
7455  MObjectSetBackgroundRGB(tb, 56, 84, 128);
7456  MObjectSetResize(tb, True, False);
7457 
7458 
7459 
7460  pb = MCreatePButton(tb, "Test", FIXED_SMALL);
7462  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7463 // MObjectSetCompositeWidth(pb, 84);
7464 
7465  pb = MCreatePButton(tb, "Preview", FIXED_SMALL);
7467  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7468 // MObjectSetCompositeWidth(pb, 84);
7469 
7470  pb = MCreatePButton(tb, "Undo", FIXED_SMALL);
7471  MPButtonSetCallback(pb, UndoFCB, 0L);
7472  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7473 // MObjectSetCompositeWidth(pb, 84);
7474 
7475  pb = MCreatePButton(tb, "Store", FIXED_SMALL);
7477  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7478 // MObjectSetCompositeWidth(pb, 84);
7479 
7480  pb = MCreatePButton(tb, "Close", FIXED_SMALL);
7482  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7483 // MObjectSetCompositeWidth(pb, 84);
7484 
7485 
7486 /******************* STEPPER MOTORS ***************************/
7487  MPagedFormSetActivePage(POCF, 4);
7488 
7489  MObjectSetText(POCF, "Motors");
7490  rowform = MCreateRowForm(POCF);
7491  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
7492  MObjectSetResize(rowform, False, False);
7493  MObjectSetCompositeWidth(rowform, 457);
7494  MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN);
7495 
7496 
7497 /***************************************************************************/
7498 /**************** STEPPER MOTORS SECTION ***********************************/
7499 
7500  lbl = MCreateLabel(rowform, "STEPPER MOTORS", FIXED_SMALL);
7501  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7502  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
7503  MObjectSetTransparency(lbl, 0);
7504 // MObjectSetCompositeWidth(lbl, 447);
7505 
7506  PFAMS = MCreateTabbedRowForm(rowform, (DAS.StepM.NAMS + 2), FIXED_SMALL);
7507  MObjectSetForegroundRGB(PFAMS, 255, 255, 255);
7508  MObjectSetBackgroundRGB(PFAMS, 80, 60, 0);
7511 
7512 // MObjectSetResize(PFAMS, True, True);
7513 
7514  for (i=0;i<DAS.StepM.NAMS; i++)
7515  {
7517  CONFP_AMS(PFAMS, i);
7518  //FrmStepperConfP(PFAMS, i);
7519  }
7520 
7523 
7526 
7528 
7529 /*
7530  if (DAS.Paramini.EqType == TROPOGAS)
7531  {
7532  PFAMS = MCreateTabbedRowForm(rowform, 4, FIXED_SMALL);
7533  MObjectSetForegroundRGB(PFAMS, 255, 255, 255);
7534  MObjectSetBackgroundRGB(PFAMS, 80, 60, 0);
7535  MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2);
7536  }
7537  else
7538  {
7539  PFAMS = MCreateTabbedRowForm(rowform, 3, FIXED_SMALL);
7540  MObjectSetForegroundRGB(PFAMS, 255, 255, 255);
7541  MObjectSetBackgroundRGB(PFAMS, 80, 60, 0);
7542  MObjectSetShadow(PFAMS, WS_ETCHED_OUT, 2, 2);
7543  }
7544  MPagedFormSetActivePage(PFAMS, 0);
7545 
7546  FrmStepperConfP(PFAMS, AMS1, &STEPM, &CONFP, &CPL);
7547 
7548  MPagedFormSetActivePage(PFAMS, 1);
7549 
7550  FrmStepperConfP(PFAMS, AMS2, &STEPM, &CONFP, &CPL);
7551 
7552  if (DAS.Paramini.EqType == TROPOGAS)
7553  {
7554  MPagedFormSetActivePage(PFAMS, 2);
7555 
7556  FrmStepperConfP(PFAMS, AMS3, &STEPM, &CONFP, &CPL);
7557 
7558  MPagedFormSetActivePage(PFAMS, 3);
7559 
7560  FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL);
7561  }
7562  else
7563  {
7564  MPagedFormSetActivePage(PFAMS, 2);
7565 
7566  FrmAMS_Utility(PFAMS, &STEPM, &CONFP, &CPL);
7567  }
7568 */
7570 
7571  /*++++++++++++++++++++++++++++++++++++++++++++++++++++*/
7572 
7573  tb = MCreateTableForm(rowform, 4);
7574  MObjectSetBackgroundRGB(tb, 56, 112, 112);
7576  MObjectSetCompositeWidth(tb, 347);
7577 
7578 
7579  pb = MCreatePButton(tb, "Apply", FIXED_SMALL);
7580  MPButtonSetCallback(pb, ApplyChCB, (void *) 1);
7581  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7582  MObjectSetCompositeWidth(pb, 74);
7583 
7584  pb = MCreatePButton(tb, "Store", FIXED_SMALL);
7585  MPButtonSetCallback(pb, WriteAMSCB, (void *) 1);
7586  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7587  MObjectSetCompositeWidth(pb, 84);
7588 
7589  pb = MCreatePButton(tb, "Close", FIXED_SMALL);
7591  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7592  MObjectSetCompositeWidth(pb, 74);
7593 
7594  pb = MCreatePButton(tb, "ADVANCED", FIXED_SMALL);
7595  MPButtonSetCallback(pb, AMS_AdvancedCB, (void *) 0);
7596  MObjectSetBackgroundRGB(pb, 24, 24, 255);
7597  MObjectSetForegroundRGB(pb, 255, 245, 255);
7598  MObjectSetCompositeWidth(pb, 74);
7599 
7600 /*********************************************************/
7601 
7602 /*********************************************************/
7603 /*************** TEST AD Converter **************/
7604 /*********************************************************/
7605 
7606  MPagedFormSetActivePage(POCF, 5);
7607 
7608  MObjectSetText(POCF, "TEST AD Converter");
7609 
7610  rowform = MCreateRowForm(POCF);
7611  MObjectSetBackgroundRGB(rowform, 112, 128, 112);
7612  MObjectSetResize(rowform, False, False);
7613  MObjectSetCompositeWidth(rowform, 357);
7614  MObjectAlign(rowform, CENTER_ALIGN, TOP_ALIGN);
7615 
7616  /*+++++++++++++++++ START CURRENT SETUP ++++++++++*/
7617 
7618  lbl = MCreateLabel(rowform , "AD Converter Current Setup", FIXED_SMALL);
7619  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7620  MObjectSetBackgroundRGB(lbl, 48, 20, 255);
7622  MObjectSetTransparency(lbl, 0);
7623 
7624  tb = MCreateTableForm(rowform, 4);
7627  MObjectSetBackgroundRGB(tb, 56, 112, 112);
7629  MObjectSetCompositeWidth(tb, 347);
7630 
7631  lbl = MCreateLabel(tb , "Board Type:", FIXED_SMALL);
7632  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7634 
7635 // sprintf(buf, "%s", DSCCB2STR());
7636  ADTESTER.lblADsetup[0] = MCreateLabel(tb , "DMM", FIXED_SMALL);
7637  MObjectSetForegroundRGB(ADTESTER.lblADsetup[0], 255, 255, 255);
7641 
7642  lbl = MCreateLabel(tb , "Base Addr:", FIXED_SMALL);
7643  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7645 
7646  ADTESTER.lblADsetup[1] = MCreateLabel(tb , "0x300", FIXED_SMALL);
7647  MObjectSetForegroundRGB(ADTESTER.lblADsetup[1], 255, 255, 255);
7651 
7652  lbl = MCreateLabel(tb , "Int.Lvl:", FIXED_SMALL);
7653  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7655 
7656  ADTESTER.lblADsetup[2] = MCreateLabel(tb , "3", FIXED_SMALL);
7657  MObjectSetForegroundRGB(ADTESTER.lblADsetup[2], 255, 255, 255);
7661 
7662  lbl = MCreateLabel(tb , "DMA Lvl:", FIXED_SMALL);
7663  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7665 
7666  ADTESTER.lblADsetup[3] = MCreateLabel(tb , "3", FIXED_SMALL);
7667  MObjectSetForegroundRGB(ADTESTER.lblADsetup[3], 255, 255, 255);
7671 
7672  lbl = MCreateLabel(tb , "ClockFreq:", FIXED_SMALL);
7673  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7675 
7676  ADTESTER.lblADsetup[4] = MCreateLabel(tb , "10MHz", FIXED_SMALL);
7677  MObjectSetForegroundRGB(ADTESTER.lblADsetup[4], 255, 255, 255);
7681 
7682  lbl = MCreateLabel(tb , "Range:", FIXED_SMALL);
7683  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7685 
7686  ADTESTER.lblADsetup[5] = MCreateLabel(tb , "5V", FIXED_SMALL);
7687  MObjectSetForegroundRGB(ADTESTER.lblADsetup[5], 255, 255, 255);
7691 
7692  lbl = MCreateLabel(tb , "Pol.:", FIXED_SMALL);
7693  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7695 
7696  ADTESTER.lblADsetup[6] = MCreateLabel(tb , "UNIPOL", FIXED_SMALL);
7697  MObjectSetForegroundRGB(ADTESTER.lblADsetup[6], 255, 255, 255);
7701 
7702  lbl = MCreateLabel(tb , "Gain:", FIXED_SMALL);
7703  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7705 
7706  ADTESTER.lblADsetup[7] = MCreateLabel(tb , "2", FIXED_SMALL);
7707  MObjectSetForegroundRGB(ADTESTER.lblADsetup[7], 255, 255, 255);
7711 
7712  lbl = MCreateLabel(tb , "LowCh:", FIXED_SMALL);
7713  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7715 
7716  ADTESTER.lblADsetup[8] = MCreateLabel(tb , "0", FIXED_SMALL);
7717  MObjectSetForegroundRGB(ADTESTER.lblADsetup[8], 255, 255, 255);
7721 
7722  lbl = MCreateLabel(tb , "HighCh:", FIXED_SMALL);
7723  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7725 
7726  ADTESTER.lblADsetup[9] = MCreateLabel(tb , "15", FIXED_SMALL);
7727  MObjectSetForegroundRGB(ADTESTER.lblADsetup[9], 255, 255, 255);
7731 
7732 
7733 // LoadDMMSetup();
7734 /*+++++++++++++++++ END CURRENT SETUP ++++++++++*/
7735 
7736  tb = MCreateTableForm(rowform, 2);
7739  MObjectSetBackgroundRGB(tb, 56, 112, 112);
7741  MObjectSetCompositeWidth(tb, 347);
7742 
7743 
7744  ADTESTER.ADrb[0]= MCreateRButton(tb, "Volts", FIXED_SMALL);
7747  MObjectSetForegroundRGB(ADTESTER.ADrb[0], 255, 255, 255);
7749 
7750  ADTESTER.ADrb[1] = MCreateRButton(tb, "Celsius", FIXED_SMALL);
7753  MObjectSetForegroundRGB(ADTESTER.ADrb[1], 255, 255, 255);
7755 
7756 
7757  if(ADTESTER.OutputMode == 0)
7759  else
7761 
7762 
7763 
7764  lbl = MCreateLabel(rowform , "Output", FIXED_SMALL);
7765  MObjectSetForegroundRGB(lbl, 255, 255, 255);
7767 
7768  tb = MCreateTableForm(rowform, 4);
7771  MObjectSetBackgroundRGB(tb, 56, 112, 112);
7773  MObjectSetCompositeWidth(tb, 347);
7774 
7775 
7776 
7777  for(i=0;i<16;i++)
7778  {
7779 
7780  sprintf(buf, "Ch.%d:", i);
7781  ADTESTER.lblADch[i] = MCreateLabel(tb, buf, FIXED_SMALL);
7783  MObjectSetForegroundRGB(ADTESTER.lblADch[i], 255, 255, 255);
7787 
7788 // MObjectSetBackgroundRGB(DAS.Gui.ConfigPanel.lblADch[i], 40, 96, 72);
7789 
7790  ADTESTER.lblADvalue[i] = MCreateLabel(tb, " 0.0", FIXED_SMALL);
7792  MObjectSetForegroundRGB(ADTESTER.lblADvalue[i], 255, 255, 255);
7797 
7798  }
7799 
7800 
7801  tb = MCreateTableForm(rowform, 3);
7804  MObjectSetBackgroundRGB(tb, 56, 112, 112);
7806  MObjectSetCompositeWidth(tb, 347);
7807 
7808 
7809  ADTESTER.ADpb = MCreatePButton(tb, "Start", FIXED_SMALL);
7811  MObjectSetBackgroundRGB(ADTESTER.ADpb, 224, 224, 176);
7812 // MObjectSetBackgroundRGB(ADTESTER.ADpb, 192, 192, 192);
7814 
7815  ADTESTER.ADInflbl = MCreateLabel(tb, "Click Start to test ", FIXED_SMALL);
7816 // MPButtonSetCallback(ADTESTER.ADpb, ADTesterCB, (void *) 0);
7817  MObjectSetForegroundRGB(ADTESTER.ADInflbl, 255, 255, 255);
7819 
7820 
7821  pb = MCreatePButton(tb, "Close", FIXED_SMALL);
7823  MObjectSetBackgroundRGB(pb, 224, 224, 176);
7824  MObjectSetCompositeWidth(pb, 84);
7825 
7826 
7827 /*********************************************************/
7828  MPagedFormSetActivePage(POCF, 0);
7830 // MShellRealizeXYWH(DAS.Gui.ConfigPanel.ShellConfig, 0,0,600,800);
7831 
7832  return 0;
7833 }
void MEditDisableEditing(MOBJECT edit)
stepm StepM
Stepper motors parameters structure.
#define RIGHT_ALIGN
Definition: Mguidefs.h:916
void ADTesterCB(MOBJECT shell, void *od, void *ad)
Test Temperature AD Converter callback.
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
void ColPickBackForeGCB(MOBJECT o, void *a, void *v)
select if the foreground or background color of the selected object will be picked ...
MOBJECT MCreateTButton(MOBJECT parent, const char *text, MTFont font)
void CONFP_Options(int mod, MOBJECT mo)
MOBJECT lbl
Definition: DFileMan.c:42
MTColor MAllocCell(int r, int g, int b)
int LoadPaletteCB(MOBJECT o, void *o_data, void *a_data)
Callback for LoadTestPalette.
MOBJECT r_label
Definition: DAS_Spatram.h:3058
void ColorAssignCB(MOBJECT o, void *o_data, void *a_data)
void DB_CellExposeCB(MOBJECT obj, MEvent *pexp, void *a_data)
display selected Color
MOBJECT MOptionEditGetList(MOBJECT ce)
void DB_ChangeColorCellCB(MOBJECT o, MVALUE o_data, void *a_data)
draw the object &#39;o&#39; with the selected color
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
MOBJECT b_sbar
Definition: DAS_Spatram.h:3057
void MShellRealize(MOBJECT obj)
void LoadFontCB(MOBJECT obj, void *a, void *data)
This callback tries to load the specified font.
int NAMS
Number of AMSs Devices.
void WriteFontCB(MOBJECT obj, void *a, void *v)
This callback write on file the selected font (Not implemented yet)
MOBJECT r_sbar
Definition: DAS_Spatram.h:3057
#define WS_ETCHED_OUT
Definition: Mguidefs.h:960
void MFormSetFocusHighlight(MOBJECT f, int true_false)
void D_UndoCB(MOBJECT o, void *a, void *v)
Undo the previous color setting operation.
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
#define DOASMODE
execution for DOAS Processing
flag Flag
Structure for different flags.
#define False
Definition: Mguidefs.h:236
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
void MTableFormSetColAlign(MOBJECT form, int col, int al)
MOBJECT frm4_dr1
adtester ADTESTER
Definition: DAS_Spat_Conf.c:48
int LoadGeoDB(void)
Definition: Load.c:1432
void SetItalicCB(MOBJECT obj, MVALUE a, void *data)
This callback toggles the Italic attribute.
void MDrawAreaSetResizeCallback(MOBJECT obj, DRAWAREA_PREF_CB cb, void *ad)
MOBJECT MCreateOptionEdit(MOBJECT parent, const char *text, int len, int clip_len, int nrow, MTFont font)
#define UNDEF_ALIGN
Definition: Mguidefs.h:920
void ApplyChCB(MOBJECT shell, void *od, void *ad)
Apply changes in DAS Config callback.
void MObjectSetText(MOBJECT obj, const char *text)
MOBJECT e_fsize
Definition: DAS_Spatram.h:3064
void DB_CellResizeCB(MOBJECT obj, DRAWAREA_PREF *pref, void *a_data)
display selected Color
MOBJECT g_label
Definition: DAS_Spatram.h:3058
MOBJECT lblADsetup[10]
void CONFP_Param(int mod, MOBJECT mo)
void UndoFCB(MOBJECT obj, void *a, void *v)
This callback UnDo the font choice (Not implemented yet)
MOBJECT RBColObj[7]
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
void DB_SelOutModeCB(MOBJECT o, void *id, void *a_data)
Select the Output for the Temperature AD Converter .
int WriteColorsCB(MOBJECT o, void *a, void *v)
Write selected color in DASSysColor.INI.
MOBJECT lblADvalue[16]
void MTButtonSetCallback(MOBJECT button, OBJ_VALUE_CB cb, void *data)
void MRButtonSetCallback(MOBJECT button, OBJ_VALUE_CB cb, void *data)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
void FontOBJSelCB(MOBJECT obj, void *a, void *v)
This callback select the object for applying font.
#define CENTER_ALIGN
Definition: Mguidefs.h:917
const char * MGetNextFontFamily(void)
MOBJECT ADrb[3]
void MObjectSetCompositeHeight(MOBJECT obj, int h)
MOBJECT MCreateScrollBar(MOBJECT parent, int type, long n, long max)
void CONFP_AMS_NOVA(MOBJECT pf)
#define FIXED_SMALL
Definition: Mguidefs.h:878
MOBJECT ADInflbl
#define SBT_HOR
Definition: Mguidefs.h:1139
void SetBoldCB(MOBJECT obj, MVALUE a, void *data)
This callback toggles the Bold attribute.
void DrawAreaExpFontCB(MOBJECT obj, MEvent *pe, void *data)
This callback draws strings using the selected font.
int b_c
Definition: DAS_Spatram.h:3060
MTColor MAllocColor(int r, int g, int b)
void MRButtonActivate(MOBJECT o)
MOBJECT MCreateDrawArea(MOBJECT parent, int width, int height)
das DAS
Definition: DAS_Spat_Conf.c:56
int r_c
Definition: DAS_Spatram.h:3060
void MDrawAreaSetExposeCallback(MOBJECT obj, OBJ_EVENT_CB cb, void *ad)
MOBJECT g_sbar
Definition: DAS_Spatram.h:3057
MOBJECT MCreateShell(const char *title, int flags)
MTColor cell_color
Definition: DAS_Spatram.h:3059
MOBJECT frm3_dr1
Definition: DAS_Spatram.h:3058
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
configpanel ConfigPanel
Configuration panel structure.
void AMS_AdvancedCB(MOBJECT o, void *od, void *ad)
void MSListSetSortCallback(MOBJECT obj, STRCMP_CB cb)
void ColObjCB(MOBJECT o, void *a, void *v)
select the object to consider for color picking
void MTableFormSetRowAlign(MOBJECT form, int row, int al)
void(* OBJ_VALUE_CB)(MOBJECT obj, MVALUE value, void *ad)
Definition: Mguidefs.h:1458
void CONFP_AMS(MOBJECT pf, int amsn)
void MGetDefaultBackgroundRGB(int *pr, int *pg, int *pb)
void MLabelSetAlignment(MOBJECT p, int align)
MOBJECT ShellConfig
Shell configuration panel.
void MPagedFormSetActivePage(MOBJECT form, int page)
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
MOBJECT PFAMS
Definition: DAS_Spat_Conf.c:96
void TestFontCB(MOBJECT obj, void *a, void *data)
This callback tries to load the specified font.
void MObjectSetCompositeWidth(MOBJECT obj, int w)
int g_c
Definition: DAS_Spatram.h:3060
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
MOBJECT e_fname
Definition: DAS_Spatram.h:3064
#define LEFT_ALIGN
Definition: Mguidefs.h:915
MOBJECT b_label
Definition: DAS_Spatram.h:3058
MOBJECT ADpb
MOBJECT lblADch[16]
int MSListAddItem(MOBJECT p, const char *item, void *data)
#define F_PREF_ATT_COL
Definition: Mguidefs.h:1098
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MCreateRowForm(MOBJECT parent)
#define TOP_ALIGN
Definition: Mguidefs.h:918
MOBJECT MCreateTabbedRowForm(MOBJECT parent, int npage, MTFont f)
void MScrollBarSetPosCallback(MOBJECT p, OBJ_VALUE_CB cb, void *data)
int exemode
Set the Execution MODE (Execution modes)
const char * MGetFirstFontFamily(void)
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 i...
MTColor drawarea_bgc
Definition: DAS_Spatram.h:3062
int WriteAMSCB(MOBJECT shell, void *od, void *ad)
Write AMS.ini file .
void CONFP_AMS_Utility(MOBJECT pf)
void MFormSetPrefAtt(MOBJECT p, int pref_att)
+ Here is the caller graph for this function:

§ NOVAIn_CB()

void NOVAIn_CB ( MOBJECT  obj,
void *  od,
void *  ad 
)

Definition at line 1603 of file DAS_Spat_Conf.c.

References ChkDigIO(), nova::DigIn, nova::INP, MPixmapSetImageFile(), das::Nova, NOVA_In(), and nova::type.

Referenced by CONFP_AMS_NOVA().

1604 {
1605 
1606  int c = (int) ad;
1607  int i, er, tmp;
1608 // int actadd;
1609 // char buf[16];
1610 
1611  tmp = c;
1612 
1613  er = NOVA_In(DAS.Nova.type, DAS.Nova.DigIn);
1614 
1615  //DAS.Nova.DigIn = 7;
1616  for (i=3;i>=0;i--)
1617  {
1618  er = ChkDigIO(DAS.Nova.DigIn, i);
1619 
1620  if(er==1)
1621  MPixmapSetImageFile(DAS.Nova.INP[i], "SYS\\ledon.bmp");
1622  else if(er==0)
1623  MPixmapSetImageFile(DAS.Nova.INP[i], "SYS\\ledoff.bmp");
1624  }
1625 
1626 }
void MPixmapSetImageFile(MOBJECT pixmap, const char *fname)
int ChkDigIO(unsigned char word, int bitn)
check for digital I/O Status
das DAS
Definition: DAS_Spat_Conf.c:56
MOBJECT INP[4]
Input widgets.
nova Nova
NOVA structure.
int NOVA_In(int novatype, unsigned int DigIn)
Read the NOVA Input port.
Definition: DAS_Spat.c:1306
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:

§ NOVAOut_CB()

void NOVAOut_CB ( MOBJECT  obj,
MVALUE  value,
void *  ad 
)

Definition at line 1630 of file DAS_Spat_Conf.c.

References ChkDigIO(), nova::DigOut, MPixmapSetImageFile(), das::Nova, NOVA_Out(), and nova::type.

Referenced by CONFP_AMS_NOVA().

1631 {
1632 
1633  int c = (int) ad;
1634  int er, tmp;
1635 // int actadd;
1636 // char buf[16];
1637 
1638  tmp = c;
1639 
1640  er = ChkDigIO((unsigned char)DAS.Nova.DigOut, tmp);
1641 
1642 
1643  if ( er == 1)
1644  {
1645  DAS.Nova.DigOut &= ~((unsigned char) pow(2,(double)(tmp)));
1646  MPixmapSetImageFile(obj, "SYS\\ledoff.bmp");
1647 
1648  }
1649  else if (er == 0)
1650  {
1651  DAS.Nova.DigOut |= (unsigned char) pow(2,(double)(tmp));
1652  MPixmapSetImageFile(obj, "SYS\\ledon.bmp");
1653 
1654  }
1655 
1656 
1657  //OutByte(576, DAS.Nova.DigOut);
1658  er = NOVA_Out(DAS.Nova.type, DAS.Nova.DigOut);
1659 
1660 }
void MPixmapSetImageFile(MOBJECT pixmap, const char *fname)
unsigned short DigOut
Digital Output.
int ChkDigIO(unsigned char word, int bitn)
check for digital I/O Status
int NOVA_Out(int novatype, unsigned int out)
Write the NOVA Output port.
Definition: DAS_Spat.c:1375
das DAS
Definition: DAS_Spat_Conf.c:56
nova Nova
NOVA structure.
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:

§ OOP_CB()

void OOP_CB ( MOBJECT  obj,
MVALUE  value,
void *  ad 
)

Definition at line 1025 of file DAS_Spat_Conf.c.

References stepm::Addr, AMS_wopto(), ChkDigIO(), gui::ConfigPanel, delay(), das::Gui, MPagedFormGetActivePage(), MPixmapSetImageFile(), configpanel::OOP, stepm::OOP, PFAMS, and das::StepM.

Referenced by CONFP_AMS_IOPort().

1026 {
1027 
1028  int c = (int) ad;
1029  int er, id, tmp;
1030  int actadd;
1031 // char buf[16];
1032 
1033  actadd = MPagedFormGetActivePage(PFAMS);
1034 
1035 
1036 
1037  id = DAS.StepM.Addr[actadd];
1038 
1039  tmp = c;
1040  er = ChkDigIO(DAS.StepM.OOP[id], tmp);
1041 
1042 
1043  if ( er == 1)
1044  {
1045  DAS.StepM.OOP[id] &= ~((unsigned char) pow(2,(double)(tmp)));
1046  MPixmapSetImageFile(DAS.Gui.ConfigPanel.OOP[id][tmp], "SYS\\ledoff.bmp");
1047 
1048  }
1049  else if (er == 0)
1050  {
1051  DAS.StepM.OOP[id] |= (unsigned char) pow(2,(double)(tmp));
1052  MPixmapSetImageFile(DAS.Gui.ConfigPanel.OOP[id][tmp], "SYS\\ledon.bmp");
1053 
1054  }
1055  DAS.StepM.OOP[id] = ~DAS.StepM.OOP[id];
1056  AMS_wopto(id, DAS.StepM.OOP[id]);
1057  delay(50);
1058  DAS.StepM.OOP[id] = ~DAS.StepM.OOP[id];
1059 
1060 
1061 }
stepm StepM
Stepper motors parameters structure.
gui Gui
Graphic User Interface Structure.
void MPixmapSetImageFile(MOBJECT pixmap, const char *fname)
MOBJECT OOP[AMSMAX][8]
OptoOutput Port N (N=0,1...,7), for AMSx (x=0,1,...AMSMAX-1)
int ChkDigIO(unsigned char word, int bitn)
check for digital I/O Status
unsigned char OOP[AMSMAX]
2 byte Word for AMS Opto insulated Output Port Status
int Addr[AMSMAX]
address of AMs
void delay(unsigned long d)
Pauses for a specified number of milliseconds. .
Definition: Dxl.c:1113
das DAS
Definition: DAS_Spat_Conf.c:56
configpanel ConfigPanel
Configuration panel structure.
int AMS_wopto(int id, unsigned int w)
write the value on the optoinsulated port write the value on the optoinsulated port.
Definition: Dxl.c:911
int MPagedFormGetActivePage(MOBJECT form)
MOBJECT PFAMS
Definition: DAS_Spat_Conf.c:96
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ PbftpCB()

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

Definition at line 241 of file DAS_Spat_Conf.c.

References TestFTP(), and WriteFTPINI().

Referenced by CONFP_opt_page4().

242 {
243  int er = 0;
244  int c = (int) v;
245 
246  switch (c)
247  {
248  case 0: // Save FTP.INI
249  WriteFTPINI();
250  break;
251  case 1: // Test FTP Connection
252  TestFTP();
253  break;
254  }
255 }
int TestFTP(void)
int WriteFTPINI(void)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ PBH_CB()

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

Definition at line 1108 of file DAS_Spat_Conf.c.

References DMessage(), paramini::EqType, GASCODNG1, das::Paramini, SPATRAMPLUS, and TROPOGAS.

Referenced by CONFP_AMS(), and CONFP_AMS_IOPort().

1109 {
1110  int c = (int) ad;
1111  char buf[4096];
1112  switch (c)
1113  {
1114  case 0:
1115  sprintf(buf, "Set the power for the motors\n\
1116 Min = 0.02A; Max = 2.00A.");
1117  DMessage(buf);
1118  break;
1119  case 1:
1120  sprintf(buf, "Set the step fraction for the motors\n\
1121 1/n = 200*n steps/round\n\
1122 n = 2,4,5,8,10,16,25,32,50,64,125,128,250,256.\n\
1123 Min = 400 s/r; Max = 51200 s/r");
1124  DMessage(buf);
1125 
1126  break;
1127 
1128  case 2:
1129  sprintf(buf, "Set the number of step used for slope");
1130  DMessage(buf);
1131  break;
1132 
1133  case 3:
1134  sprintf(buf, "Set the speed of positioning of the motors ( 0.125 - 32 KHz)\n\
1135 The value is obtained with the formula F2 (Hz) = F1(Hz) * (n + 1);\n n = 0, 1, ... 255. - Hex 00_FF.\n\n\
1136 (i.e. n=1 --> F2 = 250 Hz)\n\
1137 WARNING - The formula is valid only if F1 = 125Hz");
1138  DMessage(buf);
1139  break;
1140  case 4:
1141  sprintf(buf, "Set the multiplier for the stepper motors.");
1142  DMessage(buf);
1143  break;
1144  case 5:
1145  sprintf(buf, "Set and Test the Home for the Motors\n\n - Standard: the stepper rounds counterclockwise with \
1146 2000 s/r (1/10) and f = 1KHz.\nThe sampling is done 1000 times per second (1KHZ)\n\n\
1147  - Default: similar to ""Standard"", but using the actual setted stepping and frequency\n\n\
1148  - Track: the tracking procedure is used.\n The stepper rounds fast since when the optoswitch is found,\n then the stepper\
1149  inverts the direction and rounds slowly\n since when the status bit change again.\n\n");
1150  DMessage(buf);
1151  break;
1152  case 6:
1153  sprintf(buf, "Read the Input port of AMS.");
1154  DMessage(buf);
1155  break;
1156  case 7:
1157  if (DAS.Paramini.EqType == SPATRAMPLUS)
1158  {
1159  sprintf(buf, "Set and Read the Output port of the AMS.\n\n\
1160 AMS1:\n\
1161 OOP[0] --> Peltier\n\
1162 OOP[1] --> Fan Peltier\n\
1163 OOP[2] --> HG Lamp\n\
1164 OOP[3] --> QJ Lamp\n\
1165 OOP[4] --> Peltier Power Supply\n\
1166 OOP[5] --> Hires Power Supply\n\
1167 OOP[6] --> SPARE\n\
1168 OOP[7] --> SPARE\n");
1169  }
1170  if (DAS.Paramini.EqType == GASCODNG1)
1171  {
1172  sprintf(buf, "Set and Read the Output port of the AMS.\n\n\
1173 AMS1:\n\
1174 OOP[0] - Peltier\n\
1175 OOP[1] - Fan Peltier\n\
1176 OOP[2] - HG Lamp\n\
1177 OOP[3] - QJ Lamp\n\
1178 OOP[4] - Peltier Power Supply\n\
1179 OOP[5] - Hires Power Supply\n\
1180 OOP[6] - Ext. Shutter or Torque Motor Shutter\n\
1181 OOP[7] - Ext. Lamp\n\
1182 AMS2:\n\
1183 OOP[0] - Duty Cycle Peltier\n\
1184 OOP[1] - SPARE\n\
1185 OOP[2] - SPARE\n\
1186 OOP[3] - SPARE\n\
1187 OOP[4] - SPARE\n\
1188 OOP[5] - SPARE\n\
1189 OOP[6] - SPARE\n\
1190 OOP[7] - SPARE\n\
1191 AMS3:\n\
1192 OOP[0] - SPARE\n\
1193 OOP[1] - Fan ECU\n\
1194 OOP[2] - SPARE\n\
1195 OOP[3] - SPARE\n\
1196 OOP[4] - SPARE\n\
1197 OOP[5] - SPARE\n\
1198 OOP[6] - SPARE\n\
1199 OOP[7] - SPARE\n");
1200  }
1201  if (DAS.Paramini.EqType == TROPOGAS)
1202  {
1203  sprintf(buf, "Set and Read the Output port of the AMS.\n\n\
1204 AMS1:\n\
1205 OOP[0] --> Peltier\n\
1206 OOP[1] --> Fan Peltier\n\
1207 OOP[2] --> HG Lamp\n\
1208 OOP[3] --> QJ Lamp\n\
1209 OOP[4] --> Peltier Power Supply\n\
1210 OOP[5] --> Hires Power Supply\n\
1211 OOP[6] --> Ext. Shutter\n\
1212 OOP[7] --> Ext. Lamp\n");
1213  }
1214 
1215  DMessage(buf);
1216  break;
1217  case 8:
1218  sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\
1219 set the polarity for HOME and WORK Positions.");
1220  DMessage(buf);
1221  break;
1222  case 9:
1223  sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\
1224 set the polarity for HOME and WORK Positions.");
1225  DMessage(buf);
1226  break;
1227  case 10:
1228  sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\
1229 set the polarity for HOME and WORK Positions.");
1230  DMessage(buf);
1231  break;
1232  case 11:
1233  sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\
1234 set the polarity for HOME and WORK Positions.");
1235  DMessage(buf);
1236  break;
1237  case 12:
1238  sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\
1239 set the polarity for HOME and WORK Positions.");
1240  DMessage(buf);
1241  break;
1242  case 13:
1243  sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\
1244 set the polarity for HOME and WORK Positions.");
1245  DMessage(buf);
1246  break;
1247  case 14:
1248  sprintf(buf, "Allows for the selection of the Linear or Angular positioning mode\n\
1249 set the polarity for HOME and WORK Positions.");
1250  DMessage(buf);
1251  break;
1252 
1253  }
1254 
1255 }
void DMessage(char *str)
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
#define SPATRAMPLUS
As SPATRAM plus AltAzimuth platform.
das DAS
Definition: DAS_Spat_Conf.c:56
#define GASCODNG1
GASCODNG 1 (with ATX power supply & HiresIV)
int EqType
Spectrometer Type.
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:

§ PBTempHistoCB()

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

Definition at line 527 of file DAS_Spat_Conf.c.

References BrowseLog().

Referenced by CONFP_opt_page4(), and MDCreateDOAS_MainSh().

528 {
529 
530  int er = 0;
531 
532  er = BrowseLog();
533 
534 
535 
536 
537 }
int BrowseLog(void)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ReadInputCB()

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

Definition at line 1063 of file DAS_Spat_Conf.c.

References stepm::Addr, AMS_chkbitsts(), gui::ConfigPanel, das::Gui, configpanel::IOP, Message(), MPagedFormGetActivePage(), MPixmapSetImageFile(), PFAMS, and das::StepM.

Referenced by CONFP_AMS_IOPort().

1064 {
1065 
1066  int i, er;
1067 // char buf[80];
1068  int actadd, id;
1069 
1070  actadd = MPagedFormGetActivePage(PFAMS);
1071  id = DAS.StepM.Addr[actadd];
1072 
1073 /* if (!CONFP.InitF[id])
1074  {
1075  MMessageDialog("AMS Tester Inf.", "AMS Not Initialized!.\nPlease push ""Init"" button first", "OK", NULL);
1076  return ;
1077  }
1078 */
1079 
1080 
1081  for (i=7;i>=0;i--)
1082  {
1083  er = AMS_chkbitsts(id, i);
1084  if(er==1)
1085  MPixmapSetImageFile(DAS.Gui.ConfigPanel.IOP[id][i], "SYS\\ledon.bmp");
1086  else if(er==0)
1087  MPixmapSetImageFile(DAS.Gui.ConfigPanel.IOP[id][i], "SYS\\ledoff.bmp");
1088  else
1089  Message("Unable to read AMS\nPlease check if AMS Switched ON", er);
1090 
1091 
1092 
1093  }
1094 
1095 
1096 
1097 }
stepm StepM
Stepper motors parameters structure.
gui Gui
Graphic User Interface Structure.
void MPixmapSetImageFile(MOBJECT pixmap, const char *fname)
MOBJECT IOP[AMSMAX][8]
OptoInput Port N (N=0,1...,7), for AMSx (x=0,1,...AMSMAX-1)
int Addr[AMSMAX]
address of AMs
das DAS
Definition: DAS_Spat_Conf.c:56
void Message(char *str, int er)
Create a message shell for the AMS errors (Debug Use). .
Definition: Dxl.c:1085
configpanel ConfigPanel
Configuration panel structure.
int MPagedFormGetActivePage(MOBJECT form)
MOBJECT PFAMS
Definition: DAS_Spat_Conf.c:96
int AMS_chkbitsts(int id, int bitn)
check bit status Procedure for the determination of the bit number status.
Definition: Dxl.c:192
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ReadLogFile()

int ReadLogFile ( int  mod,
char *  dir,
char *  filename,
int  nx,
int  ny,
struct omutemp  datatemp 
)

Read DAS LOG File.
.

Parameters
mod
  • = 0 –> Count number of items
  • = 1 –> Read and assign items to omutemp structure
*dir= pointer to directory name
*filename= pointer to filename
nx= number of items
ny= number of rows of temperature matrix
structomutemp datatemp = Temperature Structure for Optical Mechanical Unit
Returns
int = 0

Definition at line 379 of file DAS_Spat_Conf.c.

References _MAX_PATH, omutemp::CCDPwr, omutemp::CCDTemp, ch, omutemp::PltPwr, omutemp::pTempMat, omutemp::ptimeMat, ReadLine(), dtime::ti_hour, dtime::ti_min, and dtime::ti_sec.

Referenced by BrowseLog(), and RunLogMode().

380 {
381  FILE *fs;
382  char fileorigin[_MAX_PATH];
383 
384  char str[255], ch;
385  int k= 0, t=0;
386  int x, y, l;
387  char ttime[8], timetemp[2];
388 
389  timetemp[0] = '\0';
390 
391  sprintf(fileorigin,"%s%s", dir, filename);
392 
393  fs = fopen(fileorigin, "r");
394  if(fs < 0) return -1;
395  if(mod==0)
396  {
397  //Init the reading of the file
398  do
399  {
400  ReadLine(str, 255, fs);
401  k++;
402  }while(!feof(fs));
403 
404  fclose(fs);
405  return k - 2; //Number of data
406  }
407  if(mod)
408  {
409 
410 
411  //Init the reading of the file
412  //FlushLine (the first)
413  t=0;
414  do
415  {
416  str[t] = (unsigned char)ch;
417  ch = getc(fs);
418  t++;
419  }while (ch != 10);
420 
421  for (x = 0; x < nx; x++)
422  {
423  ReadLine(str, 32, fs);
424  sscanf(str, "%s %f %f% %f% ", &ttime, &datatemp.CCDTemp[x], &datatemp.CCDPwr[x], &datatemp.PltPwr[x]);
425  //if(str[0] != numero --> messAGGIO ED esci
426  l = strlen(ttime);
427  // Build time
428  strncpy(timetemp, ttime, 2);
429  datatemp.ptimeMat[x].ti_hour = (unsigned char) atoi(timetemp);
430  strncpy(timetemp, ttime + 3, 2);
431  datatemp.ptimeMat[x].ti_min = (unsigned char) atoi(timetemp);
432  strncpy(timetemp, ttime + 6, 2);
433  datatemp.ptimeMat[x].ti_sec = (unsigned char) atoi(timetemp);
434 
435  for(y = 0; y < ny; y++)
436  {
437 
438  fscanf(fs, "%f", &datatemp.pTempMat[x * ny + y] );
439 
440  }
441  //FlushLine
442  t=0;
443  do
444  {
445  str[t] = (unsigned char)ch;
446  ch = getc(fs);
447  t++;
448  }while (ch != 10);
449 
450  }
451 
452  fclose(fs);
453  }
454  return 0;
455 }
struct dtime * ptimeMat
Definition: bildef.h:101
unsigned char ti_hour
Definition: bildef.h:79
float * CCDPwr
Definition: bildef.h:103
static double ch
Definition: SOLPOS.C:120
void ReadLine(char *buf, int nc, FILE *f)
Read Line on a file Read one record of nc character on the file f.
Definition: Load.c:72
unsigned char ti_sec
Definition: bildef.h:81
#define _MAX_PATH
Definition: Dildef.h:202
unsigned char ti_min
Definition: bildef.h:78
float * PltPwr
Definition: bildef.h:104
float * CCDTemp
Definition: bildef.h:102
float * pTempMat
Definition: bildef.h:100
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ Rebuildrb()

void Rebuildrb ( int  mode)

Definition at line 2337 of file DAS_Spat_Conf.c.

References DB_GeocoordCB(), das::DGeo, FIXED_SMALL, LEFT_ALIGN, MCreateRButton(), MObjectAlign(), MObjectDestroy(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MPButtonSetCallback(), MRButtonActivate(), d_geo::news_name, d_geo::nitem, d_geo::rb, d_geo::selitem, d_geo::tbrb, and UNDEF_ALIGN.

Referenced by DeleteGeoCB(), and StoreGeoCB().

2338 {
2339 
2340  int i;
2341 // char buf[16];
2342 
2343 
2344 
2345  if (mode) //Delete Station
2346  for (i=0; i<DAS.DGeo.nitem+1; i++)
2347  MObjectDestroy(DAS.DGeo.rb[i]);
2348  else //Add Station
2349  for (i=0; i<DAS.DGeo.nitem-1; i++)
2350  MObjectDestroy(DAS.DGeo.rb[i]);
2351 
2352  for (i=0; i<DAS.DGeo.nitem; i++)
2353  {
2355  MPButtonSetCallback(DAS.DGeo.rb[i], DB_GeocoordCB, (void *) i);
2357  MObjectSetForegroundRGB(DAS.DGeo.rb[i], 255, 255, 255);
2359  }
2360  if(DAS.DGeo.selitem>0)
2361  DAS.DGeo.selitem = DAS.DGeo.selitem -1;
2362  else
2365 
2366 
2367 
2368 /*
2369  sprintf(buf, "%s", "New St.");
2370  DAS.DGeo.rb[DAS.DGeo.nitem] = MCreateRButton(DAS.DGeo.tbrb, buf, FIXED_SMALL);
2371  MPButtonSetCallback(DAS.DGeo.rb[DAS.DGeo.nitem], DB_GeocoordCB, (void *) 100);
2372  MObjectAlign(DAS.DGeo.rb[DAS.DGeo.nitem], LEFT_ALIGN, UNDEF_ALIGN);
2373  MObjectSetForegroundRGB(DAS.DGeo.rb[DAS.DGeo.nitem], 255, 255, 255);
2374  MObjectSetCompositeWidth(DAS.DGeo.rb[DAS.DGeo.nitem], 85);
2375 */
2376 }
MOBJECT tbrb
Table Object for rbuttons.
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
int selitem
#define UNDEF_ALIGN
Definition: Mguidefs.h:920
d_geo DGeo
struct for Station location
MOBJECT rb[21]
Maximum number of station 21.
#define FIXED_SMALL
Definition: Mguidefs.h:878
void MRButtonActivate(MOBJECT o)
das DAS
Definition: DAS_Spat_Conf.c:56
char news_name[20][4]
New Station name.
int nitem
Number of items of the GeoDB.ini.
void DB_GeocoordCB(MOBJECT o, void *a, void *v)
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
#define LEFT_ALIGN
Definition: Mguidefs.h:915
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
void MObjectDestroy(MOBJECT obj)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ SelDefPixFileCB()

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

Definition at line 4081 of file DAS_Spat_Conf.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, gui::ConfigPanel, optionini::DEFPIXFILENAME, bil::DFILEM, das::DOption, False, FB_PREFS::font, das::Gui, HELV_SMALL, d_fileman::HOMEDIRECTORY, configpanel::lblCorrPixF, LoadDB_DefectPixel(), MFileBrowseExt(), MGetCurrentDirectory(), MMessageDialog(), MObjectSetText(), FB_PREFS::transparent_tree, and True.

Referenced by CONFP_opt_page1().

4082 {
4083 
4084  int er = 0;
4085  int c = (int) v;
4086 
4087  char buf[_MAX_PATH];
4088  char fname[_MAX_PATH], dirname[_MAX_PATH];
4089  char str[_MAX_PATH];
4090 // unsigned long ns;
4091 
4092 
4093  FB_PREFS fbp;
4094  strcpy (dirname, MGetCurrentDirectory ());
4095  fname[0] = '\0';
4096  memset (&fbp, 0, sizeof (fbp));
4097 
4098  fbp.change_cwd = True;
4099  fbp.allow_dir_create = True;
4100  fbp.allow_dir_rename = True;
4101  fbp.allow_dir_delete = True;
4102  fbp.transparent_tree = False;
4103  fbp.font = HELV_SMALL;
4104  fbp.button_font = HELV_SMALL;
4105  //Set Img file
4106  sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "sys\\Tile2.bmp" );
4107  fbp.bg_image_file =buf;
4108 
4109 
4110  er = MFileBrowseExt ("Select CCD Mask File", "*.cor", fname, dirname, &fbp);
4111  sprintf(DAS.DOption.DEFPIXFILENAME, "%s", fname);
4112 
4113  sprintf(buf, "%s%s", dirname, DAS.DOption.DEFPIXFILENAME);
4114  //if(DI_FileExist(buff)) // DI_FileExist --> Return: 1 if PATH exist, else return 0
4115  // return 37;
4117  //Load File
4118  er = LoadDB_DefectPixel(buf);
4119  if (er)
4120  {
4121  sprintf (str, "File: %s, Not FOUND", buf);
4122  MMessageDialog("DAS Inf.", str, "OK", NULL);
4123 
4124  }
4125 
4126 
4127 
4128 
4129 }
gui Gui
Graphic User Interface Structure.
optionini DOption
Options for DAS execution.
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
void MObjectSetText(MOBJECT obj, const char *text)
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
bil BIL
Definition: DAS_Spat_Conf.c:51
int LoadDB_DefectPixel(char *buff)
Load Defective pixel mask. Procedure that load the Defective pixel mask in the file {homedir}/config/...
Definition: Load.c:182
const char * MGetCurrentDirectory(void)
int MFileBrowseExt(const char *t, const char *ext, char *fname, char *dname, FB_PREFS *prefs)
das DAS
Definition: DAS_Spat_Conf.c:56
const char * bg_image_file
Definition: Mguidefs.h:1519
#define _MAX_PATH
Definition: Dildef.h:202
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
configpanel ConfigPanel
Configuration panel structure.
#define True
Definition: Mguidefs.h:235
CARD8 allow_dir_rename
Definition: Mguidefs.h:1490
MOBJECT lblCorrPixF
label for name file used for defec pix correction
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:

§ stedtCB()

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

Definition at line 2146 of file DAS_Spat_Conf.c.

References paramini::ITemp, and das::Paramini.

2147 {
2148 
2149  int c = (int) ed;
2150 
2151  switch (c)
2152  {
2153 
2154  case 1:
2155  {
2156  DAS.Paramini.ITemp = strtod( text, &text );
2157  break;
2158  }
2159  }
2160 
2161 }
das DAS
Definition: DAS_Spat_Conf.c:56
double ITemp
CCD Target Temperature.
paramini Paramini
structure for the parameters defined in param.ini configuration file

§ StoreGeoCB()

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

Definition at line 2379 of file DAS_Spat_Conf.c.

References Rebuildrb(), and WriteGeo().

Referenced by CONFP_param_page3().

2380 {
2381 
2382  int er = 0;
2383 
2384  er = WriteGeo(1);
2385  Rebuildrb(0);
2386 
2387  return 0;
2388 
2389 
2390 }
int WriteGeo(int mode)
void Rebuildrb(int mode)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ TestFTP()

int TestFTP ( void  )

Definition at line 194 of file DAS_Spat_Conf.c.

References d_fileman::CONFIGDIREQUIPMENT, bil::DFILEM, dftp::ftppwd, dftp::ftpserver, dftp::ftpuser, and MMessageDialog().

Referenced by PbftpCB().

195 {
196 
197  int er = 0;
198  char COMANDO[255];
199  char buff[255];
200 
201  FILE *fd;
202 
203  sprintf(buff, "%s\\%s", BIL.DFILEM.CONFIGDIREQUIPMENT, "TestFTP.txt");
204  fd = fopen(buff, "w");
205 
206  if(fd == NULL)
207  {
208  MMessageDialog("DAS information", "Problems in opening file", " Ok ", NULL);
209  return 1;
210  }
211 
212  sprintf(buff, "%s\n", DFTP.ftpuser);
213  fprintf(fd,buff);
214  sprintf(buff, "%s\n", DFTP.ftppwd);
215  fprintf(fd,buff);
216 // sprintf(buff, "%s\n", "bi");
217 // fprintf(fd,buff);
218 
219  fclose(fd);
220 
221 
222  COMANDO[0] = '\0';
223 
224  //Write Command file
225  sprintf(buff, "%s\\%s", BIL.DFILEM.CONFIGDIREQUIPMENT, "TestFTP.txt");
226 
227  sprintf(COMANDO, "ftp -i -s:%s %s",buff, DFTP.ftpserver);
228 
229  er = WinExec(COMANDO, SW_SHOW); // or SW_HIDE
230 
231 // sprintf(COMANDO, "del %s",buff);
232 
233 // system(COMANDO);
234 
235  return 0;
236 }
d_fileman DFILEM
Definition: bildef.h:257
bil BIL
Definition: DAS_Spat_Conf.c:51
char CONFIGDIREQUIPMENT[_MAX_PATH]
Definition: bildef.h:208
char ftpuser[32]
FTP server users.
char ftpserver[32]
FTP server address.
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
char ftppwd[32]
FTP server pwd.
dftp DFTP
Definition: DAS_Spat_Conf.c:49
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ valstedt()

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

Definition at line 2163 of file DAS_Spat_Conf.c.

References EDIT_VAL::focus_leave, EDIT_VAL::text, True, and wav.

Referenced by CONFP_param_page2().

2164 {
2165  int c = (int) ii;
2166 
2167 
2168  if (ev->focus_leave == True)
2169  wav[c] = (long)strtod( ev->text, &ev->text );
2170 
2171 
2172 }
char * text
Definition: Mguidefs.h:1389
#define True
Definition: Mguidefs.h:235
unsigned focus_leave
Definition: Mguidefs.h:1397
long wav[]
Step Number definition - for SD_Grating.
Definition: DAS_Spat.c:195
+ Here is the caller graph for this function:

§ valwledt()

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

Definition at line 2134 of file DAS_Spat_Conf.c.

References EDIT_VAL::focus_leave, EDIT_VAL::text, True, and wl.

Referenced by CONFP_param_page2().

2135 {
2136  int c = (int) ii;
2137 
2138 
2139  if (ev->focus_leave == True)
2140  wl[c] = (int) strtod( ev->text, &ev->text );
2141 
2142 
2143 }
char * text
Definition: Mguidefs.h:1389
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
#define True
Definition: Mguidefs.h:235
unsigned focus_leave
Definition: Mguidefs.h:1397
+ Here is the caller graph for this function:

§ wledtCB()

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

Definition at line 2124 of file DAS_Spat_Conf.c.

References wl.

2125 {
2126 
2127  int c = (int) ed;
2128 
2129  wl[c] = (int) strtod( text, &text );
2130 
2131 }
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182

§ WriteFTPINI()

int WriteFTPINI ( void  )

Definition at line 135 of file DAS_Spat_Conf.c.

References _MAX_PATH, d_fileman::CONFIGDIREQUIPMENT, bil::DFILEM, dftp::ftppwd, dftp::ftpserver, dftp::ftpuser, and MMessageDialog().

Referenced by PbftpCB().

136 {
137 
138  FILE *fs;
139  char str[255];
140 
141  char buff[_MAX_PATH];
142 
143  sprintf(buff, "%s\\FTP.INI", BIL.DFILEM.CONFIGDIREQUIPMENT);
144 
145  fs = fopen(buff, "w");
146 
147  if(fs == NULL)
148  {
149  MMessageDialog("DAS information", "Problems in opening file", " Ok ", NULL);
150  return 1;
151  }
152 
153  sprintf(str, "####################################################\n");
154  fprintf(fs,str);
155  sprintf(str, "# Configuration file for FTP Setting. #\n");
156  fprintf(fs,str);
157  sprintf(str, "####################################################\n");
158  fprintf(fs,str);
159  sprintf(str, "# FTP Server Address #\n");
160  fprintf(fs,str);
161 
162  sprintf(str, "%s\n", DFTP.ftpserver);
163  fprintf(fs,str);
164 
165  sprintf(str, "# FTP User Name #\n");
166  fprintf(fs,str);
167 
168  sprintf(str, "%s\n", DFTP.ftpuser);
169  fprintf(fs,str);
170 
171  sprintf(str, "# FTP pwd #\n");
172  fprintf(fs,str);
173 
174  sprintf(str, "%s\n", DFTP.ftppwd);
175  fprintf(fs,str);
176 
177  sprintf(str, "####################################################\n");
178  fprintf(fs,str);
179 
180  fclose (fs);
181 
182  sprintf(str, "%s\\%s", BIL.DFILEM.CONFIGDIREQUIPMENT, "FTP.INI");
183 
184  sprintf(buff,"The settings for FTP Server have been saved in the file:\n '%s'", str);
185  MMessageDialog("DAS information", buff, " Ok ", NULL);
186 
187 
188  return 0;
189 }
d_fileman DFILEM
Definition: bildef.h:257
bil BIL
Definition: DAS_Spat_Conf.c:51
char CONFIGDIREQUIPMENT[_MAX_PATH]
Definition: bildef.h:208
char ftpuser[32]
FTP server users.
char ftpserver[32]
FTP server address.
#define _MAX_PATH
Definition: Dildef.h:202
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
char ftppwd[32]
FTP server pwd.
dftp DFTP
Definition: DAS_Spat_Conf.c:49
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ WriteGeo()

int WriteGeo ( int  mode)

Definition at line 2221 of file DAS_Spat_Conf.c.

References _MAX_PATH, d_fileman::CONFIGDIREQUIPMENT, bil::DFILEM, das::DGeo, d_geo::flagnewstation, MMessageDialog(), d_geo::newalititude, d_geo::newlatitude, d_geo::newlongitude, d_geo::news_name, d_geo::newtimezone, and d_geo::nitem.

Referenced by DeleteGeoCB(), and StoreGeoCB().

2222 {
2223 
2224  FILE *fs;
2225  char str[180];
2226  char buff[_MAX_PATH];
2227  int i;
2228 
2229 // if (mode)
2230 // DAS.DGeo.nitem++;
2231 
2232  sprintf(buff, "%s\\GeoDB.ini", BIL.DFILEM.CONFIGDIREQUIPMENT);
2233  fs = fopen(buff, "w");
2234 
2235 /*********************************/
2236 
2237 
2238  if(fs == NULL)
2239  {
2240  MMessageDialog("DAS information", "Problems in opening file", " Ok ", NULL);
2241  return 1;
2242  }
2243 
2244  sprintf(str, "Geographical Coordinates file.\n");
2245  fprintf(fs,str);
2246  sprintf(str, "the format is: \n");
2247  fprintf(fs,str);
2248  sprintf(str, "Station name ( Max 3 CHAR)\n");
2249  fprintf(fs,str);
2250  sprintf(str, "Latitude[90N,-90S] Longitude[0,180E],[-180W,0] Altitude(m/asl) TimeZone\n");
2251  fprintf(fs,str);
2252 
2253  for (i=0;i<DAS.DGeo.nitem;i++)
2254  {
2255 
2256  sprintf(str, "%s\n",DAS.DGeo.news_name[i]);
2257  fprintf(fs,str);
2258 
2259  sprintf(str, "%.3f %.3f %.3f %d\n", DAS.DGeo.newlatitude[i],
2261  fprintf(fs,str);
2262 
2263 
2264 
2265  }
2266 
2267 
2268  fclose(fs);
2269 
2270  DAS.DGeo.flagnewstation = 0;
2271  sprintf(str,"The current coordinates have been saved in '%s\\GeoDB.ini' file", BIL.DFILEM.CONFIGDIREQUIPMENT);
2272  MMessageDialog("DAS information", str, " Ok ", NULL);
2273 
2274  return 0;
2275 
2276 
2277 
2278 }
double newlatitude[20]
New Station latitude.
double newlongitude[20]
New Station longitude.
d_geo DGeo
struct for Station location
d_fileman DFILEM
Definition: bildef.h:257
bil BIL
Definition: DAS_Spat_Conf.c:51
char CONFIGDIREQUIPMENT[_MAX_PATH]
Definition: bildef.h:208
das DAS
Definition: DAS_Spat_Conf.c:56
int newtimezone[20]
Station timezone.
char news_name[20][4]
New Station name.
double newalititude[20]
New Station altitude.
#define _MAX_PATH
Definition: Dildef.h:202
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
int nitem
Number of items of the GeoDB.ini.
int flagnewstation
New Station Flag.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

§ ADTESTER

adtester ADTESTER

Definition at line 48 of file DAS_Spat_Conf.c.

§ BIL

bil BIL

Definition at line 51 of file DAS_Spat_Conf.c.

§ bold

int bold = False

Definition at line 88 of file DAS_Spat_Conf.c.

Referenced by DB_TestF(), and SetBoldCB().

§ cc

ccd cc

Definition at line 32 of file DAS_Spat_Conf.c.

§ Cfg

config Cfg

Definition at line 43 of file DAS_Spat_Conf.c.

§ DAS

das DAS

Definition at line 56 of file DAS_Spat_Conf.c.

§ DC_CCD

ccd DC_CCD

Definition at line 41 of file DAS_Spat_Conf.c.

§ DC_HP

ptf DC_HP

Definition at line 42 of file DAS_Spat_Conf.c.

§ DFTP

dftp DFTP

Definition at line 49 of file DAS_Spat_Conf.c.

§ DPAL

palette DPAL

Definition at line 39 of file DAS_Spat_Conf.c.

§ dsccb

DSCCB dsccb

Definition at line 45 of file DAS_Spat_Conf.c.

§ DXL

DXL_par DXL

Definition at line 33 of file DAS_Spat_Conf.c.

§ FLAG

flag FLAG

Definition at line 44 of file DAS_Spat_Conf.c.

§ FlgBG

int FlgBG = True

§ FlgFG

int FlgFG = False

§ FlgOBJ

int FlgOBJ = -1

Definition at line 93 of file DAS_Spat_Conf.c.

Referenced by ColObjCB(), ColorAssignCB(), and FontOBJSelCB().

§ IDS

ids IDS

ID tasks.

Definition at line 47 of file DAS_Spat_Conf.c.

§ italic

int italic = False

Definition at line 89 of file DAS_Spat_Conf.c.

Referenced by DB_TestF(), and SetItalicCB().

§ lfraz

char lfraz[6]

Definition at line 94 of file DAS_Spat_Conf.c.

Referenced by CONFP_AMS_TabSingMotor(), and listval2fraz().

§ LISTF

listf LISTF

Definition at line 38 of file DAS_Spat_Conf.c.

§ NOVA

nova NOVA

Definition at line 54 of file DAS_Spat_Conf.c.

§ OMUTEMP

omutemp OMUTEMP

structure for OMU temperatures

Definition at line 50 of file DAS_Spat_Conf.c.

§ OMUTHR

omuthr OMUTHR

Definition at line 57 of file DAS_Spat_Conf.c.

§ PARAM

paramini PARAM

Definition at line 36 of file DAS_Spat_Conf.c.

§ PFAMS

MOBJECT PFAMS

Definition at line 96 of file DAS_Spat_Conf.c.

Referenced by MDCreateDASConfig(), OOP_CB(), and ReadInputCB().

§ Relais_Code

const char* Relais_Code[]
Initial value:
= {{"b0 - Peltier"},
{"b1 - FANPelt "},
{"b2 - HG"},
{"b3 - QJ"},
{"b4 - Spare"},
{"b5 - Spare"},
{"b6 - Spare"},
{"b7 - Spare"},
{"b0 - spare"},
{"b1 - Spare "},
{"b2 - Spare"},
{"b3 - Spare"},
{"b4 - Spare"},
{"b5 - Spare"},
{"b6 - Spare"},
{"b7 - Spare"},
{"b0 - Spare"},
{"b1 - Spare"},
{"b2 - Spare"},
{"b3 - Spare"},
{"b4 - Spare"},
{"b5 - Spare"},
{"b6 - Spare"},
{"b7 - Spare"}}

Definition at line 98 of file DAS_Spat_Conf.c.

§ UDPAL

undopal UDPAL

Definition at line 34 of file DAS_Spat_Conf.c.

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