/* ************************************************************* */ /* INCLUDE FILES */ #include #include #include #include "imag.h" #include "imagparam.h" #include "imagui.h" /* ************************************************************* */ /* PRIVATE FUNCTIONS */ void imagop_init(void); void imagop_exit(void); /* ************************************************************* */ int main(int argc, char *argv[]) { /* Perform all initialization for the program */ imagop_init(); /* Run the user interface */ RunUserInterface(); /* Message */ printf("\nDone\n"); /* Done */ return 0; } /* ************************************************************** */ void imagop_init(void) { /* Declare variables */ FILE* file_ptr; char log_file[80]; struct imag_param_struct imag_param; /* Initialize all files */ strcpy(log_file, "testlog.ru1"); file_ptr = fopen(log_file, "w"); if (file_ptr == NULL) return; fclose(file_ptr); /* Get the IMAG parameters */ imagparam_fill_param_struct(&imag_param); /* Initialize the user interface */ SetStdioWindowPosition(470, 75); SetStdioWindowSize(260, 700); imagui_init(50, 75, imag_param); imagopui_init(50, 75 + 350); /* Initialize the magnet current system */ imag_init(log_file, imag_param); /* Done */ return; } /* ************************************************************** */ void imagop_exit(void) { /* Exit the coil measurement system */ imag_exit(); /* Done */ return; }