Commit 2717d2df authored by implantador1's avatar implantador1
Browse files

2 Módulos funcionando(foram adaptadas todas as funções)

Roi, aquisição, zoom, gráficas, adicionado alguns frames,arrumado bug
do autoscale, timer.
parent d3bcae7a
......@@ -5,9 +5,8 @@
#
# The board number
BOARD_NUM 0
BOARD_NUM 1
#
# path to the executable file of gnuplot
GNUPLOT_PATH ""
......@@ -17,7 +16,7 @@ LOG_TO_FILE 1
#
# Readout data Output Filename ( meaningful only for LOG_TO_FILE!= 0)
LOG_FILENAME "data.log"
#LOG_FILENAME "data.log"
#
# Maximum number of samples to acquire (-1 means no limit)
......@@ -41,9 +40,17 @@ LLD_THR_VAL 30
#
# Gnu plot refresh rate (msec)
GNU_PLOT_REFRESH 2000
#GNU_PLOT_REFRESH 2000
#
# Gnu plot X scale factor
GNU_PLOT_X_SCALE 0.3
#GNU_PLOT_X_SCALE 0.3
......@@ -16,52 +16,72 @@ from pylab import *
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from matplotlib.figure import Figure
##############################################################################
##############################################################################
# GLOBAL VARIABLES AND DEFINITIONS
f = plt.figure()
f2 = plt.figure()
a = f.add_subplot(111)
a2 = f2.add_subplot(111)
t = f.suptitle('# 1')
t2 = f2.suptitle('# 2')
Control = dict(t=600, bmin=0, bmax=8192, bmaxold=512, j=0, filename='temp', count=0, paused=True, ROIctrl=list(),CALIctrl=list(), start=False)
PlotLimControl = dict(limupdtx=True,limupdty=True,limupdt=True, limctrl=False, x0=0, y0=0, x1=512, y1=0, pressx=0., pressy=0., limtrans=False, dx=0., dy=0., limupdt_b=True, limupdt_bx=True, limupdt_by=True, limctrl_b=False, x0_b=0, y0_b=0, x1_b=512, y1_b=0, pressx_b=0., pressy_b=0., limtrans_b=False, dx_b=0., dy_b=0.)
FocusControl = dict( graphic1= True, graphic2=False)
Data=dict(a=list(),b=list())
ROIs=list()
for j in range(8192):
Data['a'].insert(j, 0)
Data['b'].insert(j, 0)
Interface = dict(frames=list(), buttons=list(), labels=list(), spinboxes=list(), entries=list(), labelframes=list())
Livetime = dict(ADC_Conversion=0 , Time=0. , LiveTime=0.)
##############################################################################
##############################################################################
# Subprocess variable
def change_conf(parametro, valor): # modifica um parametro da execução n957 (apartir do arquivo N957Run.confi)
arq=open('N957Run.conf','r+')
arq_temp = list(arq)
for line in range(len(arq_temp)):
if any( parametro in arq_temp[line]):
arq_temp[line]= parametro +" " + str(valor)+"\n"
arq.seek(0)
for line in arq_temp:
arq.write(line)
arq.close()
##############################################################################
##############################################################################
# Subprocess variable
change_conf('BOARD_NUM',0)
child = pexpect.spawn('./N957Run')
time.sleep(3.3)
time.sleep(0.5)
change_conf('BOARD_NUM',1)
child2 = pexpect.spawn('./N957Run')
time.sleep(2)
sys.setrecursionlimit(5000)
def start():
global child
print 'teste'
global child , child2
child.send('s')
time.sleep(0.2)
if testeerro(child.readline()):
print 'True'
return True
child2.send('s')
if testeerro(child.readline().strip("\r\n")):
if not testeerro(child2.readline().strip("\r\n")):
return False
else:
print 'false'
return False
return True
def teste():
child.send('teste')
##############################################################################
##############################################################################
# Histrogram
f = plt.figure()
f2 = plt.figure()
a = f.add_subplot(111)
a2 = f2.add_subplot(111)
Control = dict(t=600, bmin=0, bmax=8192, bmaxold=512, j=0, filename='temp', count=0, paused=True, ROIctrl=list(),CALIctrl=list(), start=False)
PlotLimControl = dict(limupdtx=True,limupdty=True,limupdt=True, limctrl=False, x0=0, y0=0, x1=512, y1=0, pressx=0., pressy=0., limtrans=False, dx=0., dy=0., limupdt_b=True, limupdt_bx=True, limupdt_by=True, limctrl_b=False, x0_b=0, y0_b=0, x1_b=512, y1_b=0, pressx_b=0., pressy_b=0., limtrans_b=False, dx_b=0., dy_b=0.)
FocusControl = dict( graphic1= True, graphic2=False)
Data=list()
ROIs=list()
for j in range(8192):
Data.insert(j, 0)
##############################################################################
##############################################################################
# Main window
......@@ -112,8 +132,9 @@ def updateroi(fator):
class InterestRegion:
def __init__(self, labfrm, j):
self.Area = 0
self.Area2 = 0
self.xmin = 0
self.xmax = Control['bmax']
self.xmax = Control['bmax']-1
self.xmine = tk.Entry(labfrm)
self.xmine.pack(side='left')
self.xmine.insert(0, self.xmin)
......@@ -122,27 +143,35 @@ class InterestRegion:
self.xmaxe = tk.Entry(labfrm)
self.xmaxe.pack(side='left')
self.xmaxe.insert(0, self.xmax)
self.label2 = tk.Label(labfrm, text='Total counts: %d' %self.Area)
self.label2 = tk.Label(labfrm, text=('Counts #1: %d\n' %self.Area + 'Counts #2: %d' %self.Area2))
self.label2.pack(side='bottom')
def ROIme(self):
if self.xmine.get().isdigit() and self.xmaxe.get().isdigit() and int(self.xmine.get()) >= 0 and int(self.xmaxe.get()) >= 0:
if int(self.xmaxe.get()) >= int(self.xmine.get()) and int(self.xmaxe.get()) <= int(Interface['spinboxes'][0].get()):
if self.xmine.get().isdigit() and self.xmaxe.get().isdigit() and int(self.xmine.get()) >= 0 and int(self.xmaxe.get()) >= 0 and int(self.xmaxe.get()) < int(Interface['spinboxes'][0].get()) and int(self.xmine.get()) < int(Interface['spinboxes'][0].get()):
if int(self.xmaxe.get()) >= int(self.xmine.get()):
self.xmin = int(self.xmine.get())
self.xmax = int(self.xmaxe.get())
self.Area = 0
elif int(self.xmaxe.get()) < int(self.xmine.get()) and int(self.xmine.get()) <= int(Interface['spinboxes'][0].get()):
self.Area2 = 0
elif int(self.xmaxe.get()) < int(self.xmine.get()):
self.xmin = int(self.xmaxe.get())
self.xmax = int(self.xmine.get())
self.Area = 0
for n in range(self.xmin, (self.xmax)):
self.Area = self.Area + Data[n]
self.label2['text']='Total counts: %d' %self.Area
self.Area2 = 0
if int(self.xmax) == int(self.xmin):
self.Area = Data['a'][int(self.xmax)]
self.Area2 = Data['b'][int(self.xmax)]
else:
for n in range(self.xmin, self.xmax+1):
self.Area = self.Area + Data['a'][n]
self.Area2 = self.Area2 + Data['b'][n]
self.label2['text']=('Counts #1: %d\n' %self.Area + 'Counts #2: %d' %self.Area2)
else:
self.label2['text']="Invalid values"
#tkMessageBox.showinfo("Error", "Invalid values")
def roiroi():
def roiroi():
global ROIs
Control['j'] = 0
Labelsf = list()
......@@ -166,59 +195,69 @@ def roiroi():
##############################################################################
##############################################################################
Interface = dict(frames=list(), buttons=list(), labels=list(), spinboxes=list(), entries=list(), labelframes=list())
Livetime = dict(ADC_Conversion=0 , Time=0. , LiveTime=0. )
def set_fator(canais): # Define o fator para conversao do numero de canais
global Interface, child
global Interface,child,child2
if int(canais) == 8192:
child.send('a')
child2.send('a')
Control['bmax'] = 8192
updateroi(8192)
elif int(canais) == 4096:
elif int(canais) == 4096:
child.send('b')
child2.send('b')
Control['bmax'] = 4096
updateroi(4096)
elif int(canais) == 2048:
child.send('c')
child2.send('c')
updateroi(2048)
Control['bmax'] = 2048
elif int(canais) == 1024:
child.send('d')
child2.send('d')
Control['bmax'] = 1024
updateroi(1024)
elif int(canais) == 512:
child.send('e')
child2.send('e')
Control['bmax'] = 512
updateroi(512)
elif int(canais) == 256:
child.send('f')
child2.send('f')
Control['bmax'] = 256
updateroi(256)
elif int(canais) == 128:
child.send('g')
child2.send('g')
Control['bmax'] = 128
updateroi(128)
elif int(canais) == 64:
child.send('h')
child2.send('h')
Control['bmax'] = 64
updateroi(64)
def settime():
def settime(child, y):
Livetime['ADC_Conversion'] = int(child.readline().strip("\r\n"))
Livetime['Time'] = float(child.readline().strip("\r\n"))
Livetime['LiveTime'] = float(child.readline().strip("\r\n"))
Interface['labels'][0].configure(text='ADC Conversions: %s' %str(Livetime['ADC_Conversion']))
Interface['labels'][1].configure(text='Total Time: %ss' %str(Livetime['Time']/1000))
Interface['labels'][2].configure(text='Live Time: %ss' %str(Livetime['LiveTime']/1000))
def testeerro(Data):
if y == 0:
Interface['labels'][0].configure(text='ADC : %s' %str(Livetime['ADC_Conversion']))
Interface['labels'][1].configure(text='Total Time: %ss' %str(Livetime['Time']/1000))
Interface['labels'][2].configure(text='Live Time: %ss' %str(Livetime['LiveTime']/1000))
elif y == 1:
Interface['labels'][3].configure(text='ADC : %s' %str(Livetime['ADC_Conversion']))
Interface['labels'][4].configure(text='Total Time: %ss' %str(Livetime['Time']/1000))
Interface['labels'][5].configure(text='Live Time: %ss' %str(Livetime['LiveTime']/1000))
def testeerro(Data): # mensagens de erros
if not Data == 'OK':
if Data == 'error_1':
print 'erro_1'
tkMessageBox.showinfo("Erro", "user_settings_open erro! ")
return False
elif Data == 'erro_2':
elif Data == 'erro_2': # Módulo não esta ligado, não esta rodando como root
print 'erro_2'
tkMessageBox.showinfo("Erro", "user_settings_parse_input_param error!")
return False
......@@ -248,14 +287,17 @@ def testeerro(Data):
elif Data == 'erro_9':
tkMessageBox.showinfo("Erro", "N957_ReadData")
return False
else:
tkMessageBox.showinfo("Erro_default", Data)
return False
else:
return True
def graphic2(Data): #Plot
def graphic2(Data, Data2): #Plot
temp.set_xdata(range(int(Interface['spinboxes'][0].get())))
temp.set_ydata(Data)
temp2.set_xdata(range(int(Interface['spinboxes'][0].get())))
temp2.set_ydata(Data)
temp2.set_ydata(Data2)
if PlotLimControl['limupdtx'] or PlotLimControl['limupdty']:
a.relim()
a.autoscale_view(scaley=PlotLimControl['limupdty'],scalex=PlotLimControl['limupdtx'])
......@@ -270,15 +312,19 @@ def graphic2(Data): #Plot
f2.canvas.draw()
def graphic(): # Le os dados
global child, Data
Data = eval(child.readline().strip("\r\n"))
#testeerro(Data)
graphic2(Data)
settime()
global child, Data, child2
testeerro(child.readline().strip("\r\n"))
Data['a'] = eval(child.readline().strip("\r\n"))
settime(child, 0)
testeerro(child2.readline().strip("\r\n"))
Data['b'] = eval(child2.readline().strip("\r\n"))
settime(child2, 1)
graphic2(Data['a'], Data['b'])
def dump(): # Sinal para programa coletor enviar os dados
global child
global child , child2
child.send('i')
child2.send('i')
def realtimeplot(): # Funcao recursiva para plot em tempo real
global ROIs
......@@ -297,31 +343,36 @@ def realtimeplot(): # Funcao recursiva para plot em tempo real
##############################################################################
# Control functions
def reset(): # Zera o vetor de aquisicao
global child, Data
for a in range(int(Interface['spinboxes'][0].get())):
Data[a] = 0
graphic2(Data)
child.send('r')
def reset(i, ii): # Zera o vetor de aquisicao
if i:
for k in range(int(Interface['spinboxes'][0].get())):
Data['a'][k] = 0
child.send('r')
if ii:
for a in range(int(Interface['spinboxes'][0].get())):
Data['b'][a] = 0
child2.send('r')
graphic2(Data['a'],Data['b'])
def pause(): # Para/Continua a aquisicao de dados
global child
global child,child2
if not Control['start']:
start()
Control['paused']= not Control['paused']
Control['start']= not Control['start']
Interface['buttons'][1]['text'] = 'Pause'
Interface['labels'][3]['text'] = 'Acquiring'
realtimeplot()
if start():
Control['paused']= not Control['paused']
Control['start']= not Control['start']
Interface['buttons'][1]['text'] = 'Pause'
Interface['labels'][6]['text'] = 'Acquiring'
realtimeplot()
else:
Control['paused'] = not Control['paused']
child.send('p')
child2.send('p')
if Control['paused']:
Interface['buttons'][1]['text'] = 'Resume'
Interface['labels'][3]['text'] = 'Paused'
Interface['labels'][6]['text'] = 'Paused'
else:
Interface['buttons'][1]['text'] = 'Pause'
Interface['labels'][3]['text'] = 'Acquiring'
Interface['labels'][6]['text'] = 'Acquiring'
realtimeplot()
def save(): # Salva os dados no arquivo selecionado
......@@ -381,7 +432,7 @@ def refreshrate(): # Define a frequencia de atualizacao do grafico
rrbut.pack(side='left')
rrwin.mainloop()
def str_cali():
def str_cali(): #definir a reta de calibração ainda não implementado
caliwin = tk.Tk()
caliwin.title('Straight Calibration')
calient = tk.Entry(caliwin)
......@@ -409,7 +460,7 @@ def str_cali():
def lldt():
def lldt(): #Definir o lower level detection trueshot
Interface['buttons'][1].invoke()
lldtwin = tk.Tk()
lldtwin.title('Low level Detect Treshold')
......@@ -452,14 +503,9 @@ Interface['labelframes'].insert(1,tk.LabelFrame(Interface['frames'][0], relief='
for i in range(2):
Interface['labelframes'][i].pack(side='right')
Interface['labels'].insert(0,tk.Label(Interface['labelframes'][1], text='ADC Conversions: %s' %Livetime['ADC_Conversion'], width=20, height=1, bg='grey'))
Interface['labels'].insert(1,tk.Label(Interface['labelframes'][1], text='Total Time: %s' %Livetime['Time'], width=18, height=1, bg='grey'))
Interface['labels'].insert(2,tk.Label(Interface['labelframes'][1], text='Live Time: %s' %Livetime['LiveTime'], width=18, height=1, bg='grey'))
for i in range(3):
Interface['frames'].insert((i+4), tk.Frame(Interface['labelframes'][0]))
Interface['frames'][(i+4)].pack(side='left')
Interface['labels'][i].pack(side='left')
Interface['spinboxes'].insert(0, tk.Spinbox(Interface['labelframes'][0], command = lambda i=i: set_fator(Interface['spinboxes'][0].get()), values=[64,128,256,512,1024,2048,4096,8192], state = 'readonly', bg='grey'))
Interface['spinboxes'][0].pack()
......@@ -484,32 +530,44 @@ root.config(menu=menubar)
Interface['buttons'].insert(0, tk.Button(Interface['frames'][0], text = 'Start', command = lambda i=i: realtimeplot(), bd=2, height=2, bg='grey'))
Interface['buttons'].insert(1, tk.Button(Interface['frames'][0], text = 'Start', command = lambda i=i: pause(), bd=2, height=2, bg='grey'))
Interface['buttons'].insert(2, tk.Button(Interface['frames'][0], text = 'Clear', command = lambda i=i: reset(), bd=2, height=2, bg='grey'))
Interface['buttons'].insert(3, tk.Button(Interface['frames'][0], text = 'Save', command = lambda i=i: save(), bd=2, height=2, bg='grey'))
Interface['buttons'].insert(4, tk.Button(Interface['frames'][0], text = 'Save As', command = lambda i=i: saveas(), bd=2, height=2, bg='grey'))
Interface['buttons'].insert(2, tk.Button(Interface['frames'][0], text = 'Clear 1', command = lambda i=i: reset(True,False), bd=2, height=2, bg='grey'))
Interface['buttons'].insert(3, tk.Button(Interface['frames'][0], text = 'Clear 2', command = lambda i=i: reset(False, True), bd=2, height=2, bg='grey'))
Interface['buttons'].insert(4, tk.Button(Interface['frames'][0], text = 'Save', command = lambda i=i: save(), bd=2, height=2, bg='grey'))
Interface['buttons'].insert(5, tk.Button(Interface['frames'][0], text = 'Save As', command = lambda i=i: saveas(), bd=2, height=2, bg='grey'))
for i in range(4):
for i in range(5):
Interface['buttons'][i+1].pack(side = 'left', fill='both', expand=1)
#JULIO TESTE
Interface['buttons'].insert(5, tk.Button(Interface['frames'][0], text = 'Teste', command = lambda i=i: teste(), bd=2, height=2, bg='grey'))
Interface['buttons'][5].pack(side = 'left', fill='both', expand=1)
for i in range(3):
Interface['frames'].insert(i+7, tk.Frame(Interface['frames'][3]))
Interface['frames'][i+7].pack(side = 'left', fill='x', expand=1)
Interface['labels'].insert(3,tk.Label(Interface['frames'][7], text='Waiting to Start', anchor='w'))
Interface['labels'].insert(4,tk.Label(Interface['frames'][8], text='Plot Refresh Rate %dms' %Control['t'], anchor='center'))
Interface['labels'].insert(5,tk.Label(Interface['frames'][9], text='%s.%d' %(Control['filename'], Control['count']), anchor='e'))
for n in arange(3,6):
Interface['labels'][n].pack(fill='x')
Interface['frames'].insert(10, tk.Frame(Interface['frames'][2]))
Interface['frames'][10].place(anchor='nw',relheight=0.99, relwidth=0.5)
Interface['frames'].insert(11, tk.Frame(Interface['frames'][2]))
Interface['frames'][11].place(anchor='nw',relheight=0.99, relwidth=0.5, relx = 0.5)
Interface['frames'].insert(12, tk.Frame(Interface['labelframes'][1]))
Interface['frames'].insert(13, tk.Frame(Interface['labelframes'][1]))
Interface['frames'][12].pack(side='top',fill='both', expand=1)
Interface['frames'][13].pack(side='top',fill='both', expand=1)
Interface['labels'].insert(0,tk.Label(Interface['frames'][12], text='ADC: %s' %Livetime['ADC_Conversion'], width=13, height=1, bg='grey'))
Interface['labels'].insert(1,tk.Label(Interface['frames'][12], text='Total Time: %s' %Livetime['Time'], width=18, height=1, bg='grey'))
Interface['labels'].insert(2,tk.Label(Interface['frames'][12], text='Live Time: %s' %Livetime['LiveTime'], width=18, height=1, bg='grey'))
Interface['labels'].insert(3,tk.Label(Interface['frames'][13], text='ADC: %s' %Livetime['ADC_Conversion'], width=13, height=1, bg='grey'))
Interface['labels'].insert(4,tk.Label(Interface['frames'][13], text='Total Time: %s' %Livetime['Time'], width=18, height=1, bg='grey'))
Interface['labels'].insert(5,tk.Label(Interface['frames'][13], text='Live Time: %s' %Livetime['LiveTime'], width=18, height=1, bg='grey'))
Interface['labels'].insert(6,tk.Label(Interface['frames'][7], text='Waiting to Start', anchor='w'))
Interface['labels'].insert(7,tk.Label(Interface['frames'][8], text='Plot Refresh Rate %dms' %Control['t'], anchor='center'))
Interface['labels'].insert(8,tk.Label(Interface['frames'][9], text='%s.%d' %(Control['filename'], Control['count']), anchor='e'))
for i in range(6):
Interface['labels'][i].pack(side='left')
for n in arange(6,9):
Interface['labels'][n].pack(fill='x')
##############################################################################
##############################################################################
# Key Bindings
......@@ -517,7 +575,7 @@ Interface['frames'][11].place(anchor='nw',relheight=0.99, relwidth=0.5, relx = 0
def key_1(event):
Interface['buttons'][1].invoke()
def key_2(event):
Interface['buttons'][2].invoke()
reset(True,True)
def key_3(event):
roiroi()
def key_4(event):
......@@ -527,18 +585,19 @@ def key_4(event):
if event.button == 3:#dir
if PlotLimControl['limupdtx'] == True:
PlotLimControl['x1'] = int(Control['bmax'])
PlotLimControl['y1'] = max(Data)*1.2
PlotLimControl['y1'] = max(Data['a'])*1.2
PlotLimControl['limupdtx'] = False
PlotLimControl['limupdty'] = False
PlotLimControl['limctrl'] = True
elif event.button == 2:#mid
PlotLimControl['limupdty'] = True
PlotLimControl['limupdtx'] = True
PlotLimControl['limctrl'] = False
PlotLimControl['limtrans'] = False
PlotLimControl['x0'] = 0
PlotLimControl['x1'] = int(Interface['spinboxes'][0].get())
PlotLimControl['y0'] = 0
PlotLimControl['y1'] = max(Data)*1.2
PlotLimControl['y1'] = max(Data['a'])*1.2
f.canvas.draw()
elif event.button == 1:#esq
PlotLimControl['limupdtx'] = False
......@@ -551,18 +610,19 @@ def key_4_b(event):
if event.button == 3: #Dir
if PlotLimControl['limupdt_bx'] == True:
PlotLimControl['x1_b'] = int(Control['bmax'])
PlotLimControl['y1_b'] = max(Data)*1.2
PlotLimControl['y1_b'] = max(Data['b'])*1.2
PlotLimControl['limupdt_bx'] = False
PlotLimControl['limupdt_by'] = False
PlotLimControl['limctrl_b'] = True
elif event.button == 2: # Mid
PlotLimControl['limupdt_by'] = True
PlotLimControl['limupdt_bx'] = True
PlotLimControl['limctrl_b'] = False
PlotLimControl['limtrans_b'] = False
PlotLimControl['x0_b'] = 0
PlotLimControl['x1_b'] = int(Interface['spinboxes'][0].get())
PlotLimControl['y0_b'] = 0
PlotLimControl['y1_b'] = max(Data)*1.2
PlotLimControl['y1_b'] = max(Data['b'])*1.2
f2.canvas.draw()
elif event.button == 1: #Esq
PlotLimControl['limupdt_bx'] = False
......@@ -722,6 +782,7 @@ f2.canvas.mpl_connect('button_release_event', key_6_b)
# Paralel mainloop and initiations
for n in range(3):
time.sleep(0.6)
Interface['spinboxes'][0].invoke('buttonup')
#Interface['buttons'][0].invoke()
root.mainloop()
......
......@@ -58,22 +58,11 @@ BOOL user_settings_open( user_setting_data* p_data)
// module variable init
p_data->m_log_filename= (char*)malloc( MAX_FILENAME_LENGHT);
p_data->m_config_filename= (char*)malloc( MAX_FILENAME_LENGHT);
// gnuplot path
// JULIO p_data->m_gnu_plot_path= (char*)malloc( MAX_FILENAME_LENGHT);;
// setting default values ...
/*JULIOif( p_data->m_log_filename== NULL)
TRACE("ME11:user setting module: insufficient memory!\n");
else
strcpy( p_data->m_log_filename, DEF_LOG_FILENAME);*/
if( p_data->m_config_filename== NULL)
TRACE("ME12:user setting module: insufficient memory !\n");
else
strcpy( p_data->m_config_filename, DEF_CONFIG_FILENAME);
// JULIO if( p_data->m_gnu_plot_path== NULL)
// JULIO TRACE("ME13user setting module: insufficient memory !\n");
// JULIO else
// JULIO strcpy( p_data->m_gnu_plot_path, DEF_GNU_PLOT_PATH);
p_data->m_max_num_samples= DEF_MAX_NUM_SAMPLES;
p_data->m_debug= N957_FALSE;
......@@ -82,8 +71,7 @@ BOOL user_settings_open( user_setting_data* p_data)
p_data->m_N957_handle= N957_INVALID_HANDLE_VALUE;
p_data->m_log_to_file= N957_FALSE;
p_data->m_bd_num= 0;
// JULIO p_data->m_gnu_plot_refresh= DEF_GNU_PLOT_REFRESH;
// JULIO p_data->m_gnu_plot_x_scale= DEF_GNU_PLOT_X_SCALE;
return TRUE;
}
......@@ -199,27 +187,7 @@ BOOL parse_config_file( user_setting_data* p_data) {
}
continue;
}
// GNUplot path
//JULIOif (strstr(str, "GNUPLOT_PATH")!=NULL) {
//fscanf( p_conf_file, "%s", p_data->m_gnu_plot_path);
//JULIO fscanf( p_conf_file, "%s", tmp_filename);
//JULIO strcpy( p_data->m_gnu_plot_path, trim( trim_text_charset, sizeof( trim_text_charset), tmp_filename));
//JULIO continue;
//JULIO }
// Write Data to output file
//JULIO if (strstr(str, "LOG_TO_FILE")!=NULL){
//JULIO int tmp= 0;
//JULIO fscanf(p_conf_file, "%d", &tmp);
//JULIO p_data->m_log_to_file= tmp!= 0;
//JULIO continue;
//JULIO}
// log filename
//JULIOif (strstr(str, "LOG_FILENAME")!=NULL){
//JULIO //fscanf( p_conf_file, "%s", p_data->m_log_filename);
//JULIO fscanf( p_conf_file, "%s", tmp_filename);
//JULIO strcpy( p_data->m_log_filename, trim( trim_text_charset, sizeof( trim_text_charset), tmp_filename));
//JULIO continue;
// JULIO }
// Number of samples to acquire
if (strstr(str, "MAX_NUM_SAMPLES")!=NULL) {
fscanf(p_conf_file, "%ld", &p_data->m_max_num_samples);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment