Commit 4a7b870c authored by Rafaela Meissner's avatar Rafaela Meissner
Browse files

no warnings

parent 2e4101ff
......@@ -22,11 +22,11 @@
/*!
* Win 32 section
*/
/* #pragma once
#pragma once
#define WIN32_LEAN_AND_MEAN /* !< /brief Exclude rarely-used stuff from Windows headers */
/*!
/*
* Windows Header Files:
*/
#include <windows.h>
......@@ -43,7 +43,7 @@
#else
#error No operating system defined
#endif*/
#endif
#endif
......@@ -17,7 +17,7 @@
////////////////////////////////////////////
// Global defines
////////////////////////////////////////////
/*#if defined(WIN32)
#if defined(WIN32)
/*!
* Win 32 section
......@@ -29,7 +29,7 @@
/*!
* Windows Header Files:
*/
/* #include <windows.h>
#include <windows.h>
#include <winioctl.h>
#define N957_API N957ErrorCodes __stdcall
......@@ -41,9 +41,9 @@
*/
#define N957_API N957ErrorCodes
/*#else
#else
#error No operating system defined
#endif*/
#endif
#endif
No preview for this file type
......@@ -71,8 +71,8 @@ BOOL user_settings_close( user_setting_data* p_data);
* RETURN: TRUE: input parameter parsing ok
* USAGE:
************************************************************************************************/
BOOL user_settings_parse_input_param( user_setting_data* p_data, int argc, char* argv[]);
//BOOL user_settings_parse_input_param( user_setting_data* p_data, int argc, char* argv[]);
BOOL parse_config_file( user_setting_data* p_data);
......
......@@ -12,8 +12,8 @@
// File includes
////////////////////////////////////////////
#include "common_defs.h"
#include "./include/N957oslib.h"
#include "./include/N957types.h"
#include "../N957/N957oslib.h"
#include "../N957/N957types.h"
////////////////////////////////////////////
// Global defines
......
......@@ -48,7 +48,7 @@ Control system_state;
void init_system(N957_UINT16 *data_buff, unsigned long *histo_buff, unsigned int *histogram);
void start(N957_UINT32 data32);
void dump(N957_UINT32 data32, short int factor, unsigned int *histogram, unsigned int nmr_ADC_pause, unsigned int paused_time, unsigned int tempo_pause_vivo, N957_UINT16 data_buff);
void pause_system(N957_UINT32 *data32, unsigned int *nmr_ADC_pause, unsigned int *paused_time, unsigned int *tempo_pause_vivo, N957_UINT16 data_buff, unsigned long histo_buff);
void pause_system(N957_UINT32 *data32, unsigned int *nmr_ADC_pause, unsigned int *paused_time, unsigned int *tempo_pause_vivo, N957_UINT16 *data_buff, unsigned long *histo_buff);
int determine_factor(int command);
void save_file(unsigned int *histogram);
void load_file(short int factor, unsigned int *histogram);
......@@ -75,7 +75,6 @@ int main(int argc, char **argv)
//auxiliaries
int w, i, command;
unsigned int temp = 0;
char aux_string[ 100];
unsigned int lldt=10; //?????
......@@ -161,7 +160,7 @@ int main(int argc, char **argv)
tempo_pause_vivo=0;
break;
case 'p':
pause_system(&data32, &nmr_ADC_pause, &paused_time, &tempo_pause_vivo, *data_buff, *histo_buff);
pause_system(&data32, &nmr_ADC_pause, &paused_time, &tempo_pause_vivo, data_buff, histo_buff);
if(system_state.do_exit == TRUE)
goto exit_point;
break;
......@@ -358,7 +357,7 @@ void dump(N957_UINT32 data32, short int factor, unsigned int *histogram, unsigne
TRACE1("%d\n",tamanho);*/ // mostra se quntas contagens tem no buffer
}
void pause_system(N957_UINT32 *data32, unsigned int *nmr_ADC_pause, unsigned int *paused_time, unsigned int *tempo_pause_vivo, N957_UINT16 data_buff, unsigned long histo_buff)
void pause_system(N957_UINT32 *data32, unsigned int *nmr_ADC_pause, unsigned int *paused_time, unsigned int *tempo_pause_vivo, N957_UINT16 *data_buff, unsigned long *histo_buff)
{
if(!system_state.paused)
{
......@@ -370,11 +369,11 @@ void pause_system(N957_UINT32 *data32, unsigned int *nmr_ADC_pause, unsigned int
}
else //if(system_state.paused)
{
N957_GetScaler(user_setting.m_N957_handle, &data32);
N957_GetScaler(user_setting.m_N957_handle, data32);
*nmr_ADC_pause= *nmr_ADC_pause + *data32;
N957_GetTimer(user_setting.m_N957_handle, &data32);
N957_GetTimer(user_setting.m_N957_handle, data32);
*paused_time = *paused_time + *data32;
N957_GetLiveTime(user_setting.m_N957_handle, &data32);
N957_GetLiveTime(user_setting.m_N957_handle, data32);
*tempo_pause_vivo = *tempo_pause_vivo + *data32;
if((N957_StartAcquire(user_setting.m_N957_handle,user_setting.m_mode)))
......@@ -391,13 +390,13 @@ void pause_system(N957_UINT32 *data32, unsigned int *nmr_ADC_pause, unsigned int
system_state.do_exit = TRUE;
}
}
data_buff= (N957_UINT16*) malloc( user_setting.m_bldim* sizeof( N957_UINT16));
data_buff= malloc( user_setting.m_bldim* sizeof( N957_UINT16)); //(N957_UINT16*)
if( data_buff== NULL)
{
TRACE("erro_8\n");
system_state.do_exit = TRUE;
}
histo_buff= (unsigned int*) malloc( N957_MAX_HISTO_SAMPLES* sizeof( histo_buff));
histo_buff= malloc( N957_MAX_HISTO_SAMPLES* sizeof( histo_buff));//(unsigned int*)
if( histo_buff== NULL)
{
TRACE("erro_8\n");
......
This diff is collapsed.
No preview for this file type
......@@ -128,7 +128,7 @@ BOOL user_settings_close( user_setting_data* p_data) {
if( !parse_config_file( p_data))
return FALSE;
return TRUE;
}
}*/
/**************************************************
**************************************************/
BOOL parse_config_file( user_setting_data* p_data) {
......@@ -214,7 +214,7 @@ BOOL parse_config_file( user_setting_data* p_data) {
}
//Set LLD Threshold
if (strstr(str, "LLD_THR_VAL")!=NULL) {
fscanf(p_conf_file, "%d", &p_data->m_lld);
fscanf(p_conf_file, "%c", &p_data->m_lld);
if( ( N957_error_code= N957_SetLLD( p_data->m_N957_handle, p_data->m_lld))!=N957Success){
TRACE( N957_DecodeError( N957_error_code));
ret_val= FALSE;
......
......@@ -15,7 +15,7 @@
#include <string.h>
#include "common_defs.h"
#include "user_settings.h"
#include "./include/N957Lib.h"
#include "../N957/N957Lib.h"
////////////////////////////////////////////
// File local defines
......@@ -128,7 +128,7 @@ BOOL user_settings_close( user_setting_data* p_data) {
if( !parse_config_file( p_data))
return FALSE;
return TRUE;
}
}*/
/**************************************************
**************************************************/
BOOL parse_config_file( user_setting_data* p_data) {
......@@ -214,7 +214,7 @@ BOOL parse_config_file( user_setting_data* p_data) {
}
//Set LLD Threshold
if (strstr(str, "LLD_THR_VAL")!=NULL) {
fscanf(p_conf_file, "%d", &p_data->m_lld);
fscanf(p_conf_file, "%c", &p_data->m_lld);
if( ( N957_error_code= N957_SetLLD( p_data->m_N957_handle, p_data->m_lld))!=N957Success){
TRACE( N957_DecodeError( N957_error_code));
ret_val= FALSE;
......
No preview for this file type
MCA = 113
MCA = 175
#MCB = 175
#MCC = 174
#MCD = xxx
No preview for this file type
#MCA = 113
MCB = 175
MCA = 113
#MCB = 175
#MCC = 174
#MCD = xxx
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