iCub-main
Macros | Functions | Variables
calibrate_window.cpp File Reference
#include "downloader.h"
#include "calibrate_window.h"
#include <canProtocolLib/iCubCanProtocol.h>
#include <canProtocolLib/iCubCanProto_types.h>
#include <fstream>
#include <yarp/os/Log.h>
+ Include dependency graph for calibrate_window.cpp:

Go to the source code of this file.

Macros

#define START_TIMER   timer_refresh = g_timeout_add (500, timer_func, NULL);
 
#define STOP_TIMER   {if (timer_refresh>0) g_source_remove(timer_refresh); timer_refresh=0;}
 
#define HEX_VALC   0x8000
 

Functions

gboolean timer_func (gpointer data)
 
void save_click (GtkButton *button, gpointer user_data)
 
void auto_click (GtkButton *button, gpointer user_data)
 
void close_window (GtkDialog *window, gpointer user_data)
 
void slider_changed (GtkButton *button, gpointer ch_p)
 
void file_save_click (GtkButton *button, gpointer ch_p)
 
void reset_matrix_click (GtkButton *button, gpointer ch_p)
 
void set_curr_bias_click (GtkButton *button, gpointer ch_p)
 
void reset_curr_bias_click (GtkButton *button, gpointer ch_p)
 
void set_calib_bias_click (GtkButton *button, gpointer ch_p)
 
void reset_calib_bias_click (GtkButton *button, gpointer ch_p)
 
bool calibration_load_v2 (char *filename, int selected_bus, int selected_id)
 
void file_load_click (GtkButton *button, gpointer ch_p)
 
void file_import_click (GtkButton *button, gpointer ch_p)
 
void zero_changed (GtkButton *button, gpointer ch_p)
 
void matrix_change (GtkEntry *entry, gpointer index)
 
void serial_number_change (GtkEntry *entry, gpointer index)
 
void serial_number_send (GtkEntry *entry, gpointer index)
 
void matrix_send (GtkEntry *entry, gpointer index)
 
void calibrate_click (GtkButton *button, gpointer user_data)
 

Variables

cDownloader downloader
 
GtkWidget * window
 
int selected = 0
 
unsigned int calibration_value =32767
 
int ch [6] ={0,1,2,3,4,5}
 
unsigned int offset [6]
 
unsigned int amp_gain1 [6]
 
unsigned int amp_gain2 [6]
 
unsigned int adc [6] ={0,0,0,0,0,0}
 
unsigned int maxadc [6] ={0,0,0,0,0,0}
 
int calib_bias [6] ={0,0,0,0,0,0}
 
int curr_bias [6] ={0,0,0,0,0,0}
 
unsigned int minadc [6] ={65535,65535,65535,65535,65535,65535}
 
unsigned int matrix [6][6]
 
unsigned int calib_matrix [6][6]
 
guint timer_refresh = 0
 
GtkWidget * curr_measure [6]
 
GtkWidget * max_measure [6]
 
GtkWidget * min_measure [6]
 
GtkWidget * diff_measure [6]
 
GtkWidget * newton_measure [6]
 
GtkWidget * edit_matrix [6][6]
 
GtkWidget * edit_matrix_gain
 
GtkWidget * label_matrix_gain
 
GtkWidget * slider_gain [6]
 
GtkWidget * slider_zero
 
GtkWidget * info_dlg
 
GtkWidget * picker_calib
 
GtkWidget * save_button
 
GtkWidget * matrix_reset_button
 
GtkWidget * check_raw_vals
 
GtkWidget * set_calib_bias_button
 
GtkWidget * reset_calib_bias_button
 
GtkWidget * set_curr_bias_button
 
GtkWidget * reset_curr_bias_button
 
GtkWidget * curr_bias_label [6]
 
GtkWidget * calib_bias_label [6]
 
GtkWidget * full_scale_label [6]
 
GtkWidget * edit_serial_number
 
unsigned int calib_const =0
 
unsigned int full_scale_const [6] ={0,0,0,0,0,0}
 
char serial_no [8] ={'U','N','D','E','F',0,0,0}
 
bool matrix_changed
 
bool serial_number_changed
 
bool something_changed
 
bool eeprom_saved_status
 
bool first_time [6] ={1,1,1,1,1,1}
 

Macro Definition Documentation

◆ HEX_VALC

#define HEX_VALC   0x8000

Definition at line 71 of file calibrate_window.cpp.

◆ START_TIMER

#define START_TIMER   timer_refresh = g_timeout_add (500, timer_func, NULL);

Definition at line 69 of file calibrate_window.cpp.

◆ STOP_TIMER

#define STOP_TIMER   {if (timer_refresh>0) g_source_remove(timer_refresh); timer_refresh=0;}

Definition at line 70 of file calibrate_window.cpp.

Function Documentation

◆ auto_click()

void auto_click ( GtkButton *  button,
gpointer  user_data 
)

Definition at line 86 of file calibrate_window.cpp.

◆ calibrate_click()

void calibrate_click ( GtkButton *  button,
gpointer  user_data 
)

Definition at line 849 of file calibrate_window.cpp.

◆ calibration_load_v2()

bool calibration_load_v2 ( char *  filename,
int  selected_bus,
int  selected_id 
)

Definition at line 545 of file calibrate_window.cpp.

◆ close_window()

void close_window ( GtkDialog *  window,
gpointer  user_data 
)

Definition at line 412 of file calibrate_window.cpp.

◆ file_import_click()

void file_import_click ( GtkButton *  button,
gpointer  ch_p 
)

Definition at line 708 of file calibrate_window.cpp.

◆ file_load_click()

void file_load_click ( GtkButton *  button,
gpointer  ch_p 
)

Definition at line 645 of file calibrate_window.cpp.

◆ file_save_click()

void file_save_click ( GtkButton *  button,
gpointer  ch_p 
)

Definition at line 441 of file calibrate_window.cpp.

◆ matrix_change()

void matrix_change ( GtkEntry *  entry,
gpointer  index 
)

Definition at line 802 of file calibrate_window.cpp.

◆ matrix_send()

void matrix_send ( GtkEntry *  entry,
gpointer  index 
)

Definition at line 826 of file calibrate_window.cpp.

◆ reset_calib_bias_click()

void reset_calib_bias_click ( GtkButton *  button,
gpointer  ch_p 
)

Definition at line 539 of file calibrate_window.cpp.

◆ reset_curr_bias_click()

void reset_curr_bias_click ( GtkButton *  button,
gpointer  ch_p 
)

Definition at line 528 of file calibrate_window.cpp.

◆ reset_matrix_click()

void reset_matrix_click ( GtkButton *  button,
gpointer  ch_p 
)

Definition at line 502 of file calibrate_window.cpp.

◆ save_click()

void save_click ( GtkButton *  button,
gpointer  user_data 
)

Definition at line 75 of file calibrate_window.cpp.

◆ serial_number_change()

void serial_number_change ( GtkEntry *  entry,
gpointer  index 
)

Definition at line 810 of file calibrate_window.cpp.

◆ serial_number_send()

void serial_number_send ( GtkEntry *  entry,
gpointer  index 
)

Definition at line 818 of file calibrate_window.cpp.

◆ set_calib_bias_click()

void set_calib_bias_click ( GtkButton *  button,
gpointer  ch_p 
)

Definition at line 533 of file calibrate_window.cpp.

◆ set_curr_bias_click()

void set_curr_bias_click ( GtkButton *  button,
gpointer  ch_p 
)

Definition at line 523 of file calibrate_window.cpp.

◆ slider_changed()

void slider_changed ( GtkButton *  button,
gpointer  ch_p 
)

Definition at line 419 of file calibrate_window.cpp.

◆ timer_func()

gboolean timer_func ( gpointer  data)

Definition at line 115 of file calibrate_window.cpp.

◆ zero_changed()

void zero_changed ( GtkButton *  button,
gpointer  ch_p 
)

Definition at line 796 of file calibrate_window.cpp.

Variable Documentation

◆ adc

unsigned int adc[6] ={0,0,0,0,0,0}

Definition at line 27 of file calibrate_window.cpp.

◆ amp_gain1

unsigned int amp_gain1[6]

Definition at line 25 of file calibrate_window.cpp.

◆ amp_gain2

unsigned int amp_gain2[6]

Definition at line 26 of file calibrate_window.cpp.

◆ calib_bias

int calib_bias[6] ={0,0,0,0,0,0}

Definition at line 29 of file calibrate_window.cpp.

◆ calib_bias_label

GtkWidget* calib_bias_label[6]

Definition at line 55 of file calibrate_window.cpp.

◆ calib_const

unsigned int calib_const =0

Definition at line 60 of file calibrate_window.cpp.

◆ calib_matrix

unsigned int calib_matrix[6][6]

Definition at line 33 of file calibrate_window.cpp.

◆ calibration_value

unsigned int calibration_value =32767

Definition at line 22 of file calibrate_window.cpp.

◆ ch

int ch[6] ={0,1,2,3,4,5}

Definition at line 23 of file calibrate_window.cpp.

◆ check_raw_vals

GtkWidget* check_raw_vals

Definition at line 49 of file calibrate_window.cpp.

◆ curr_bias

int curr_bias[6] ={0,0,0,0,0,0}

Definition at line 30 of file calibrate_window.cpp.

◆ curr_bias_label

GtkWidget* curr_bias_label[6]

Definition at line 54 of file calibrate_window.cpp.

◆ curr_measure

GtkWidget* curr_measure[6]

Definition at line 35 of file calibrate_window.cpp.

◆ diff_measure

GtkWidget* diff_measure[6]

Definition at line 38 of file calibrate_window.cpp.

◆ downloader

cDownloader downloader

Definition at line 188 of file main.cpp.

◆ edit_matrix

GtkWidget* edit_matrix[6][6]

Definition at line 40 of file calibrate_window.cpp.

◆ edit_matrix_gain

GtkWidget* edit_matrix_gain

Definition at line 41 of file calibrate_window.cpp.

◆ edit_serial_number

GtkWidget* edit_serial_number

Definition at line 57 of file calibrate_window.cpp.

◆ eeprom_saved_status

bool eeprom_saved_status

Definition at line 66 of file calibrate_window.cpp.

◆ first_time

bool first_time[6] ={1,1,1,1,1,1}

Definition at line 67 of file calibrate_window.cpp.

◆ full_scale_const

unsigned int full_scale_const[6] ={0,0,0,0,0,0}

Definition at line 61 of file calibrate_window.cpp.

◆ full_scale_label

GtkWidget* full_scale_label[6]

Definition at line 56 of file calibrate_window.cpp.

◆ info_dlg

GtkWidget* info_dlg

Definition at line 45 of file calibrate_window.cpp.

◆ label_matrix_gain

GtkWidget* label_matrix_gain

Definition at line 42 of file calibrate_window.cpp.

◆ matrix

unsigned int matrix[6][6]

Definition at line 32 of file calibrate_window.cpp.

◆ matrix_changed

bool matrix_changed

Definition at line 63 of file calibrate_window.cpp.

◆ matrix_reset_button

GtkWidget* matrix_reset_button

Definition at line 48 of file calibrate_window.cpp.

◆ max_measure

GtkWidget* max_measure[6]

Definition at line 36 of file calibrate_window.cpp.

◆ maxadc

unsigned int maxadc[6] ={0,0,0,0,0,0}

Definition at line 28 of file calibrate_window.cpp.

◆ min_measure

GtkWidget* min_measure[6]

Definition at line 37 of file calibrate_window.cpp.

◆ minadc

unsigned int minadc[6] ={65535,65535,65535,65535,65535,65535}

Definition at line 31 of file calibrate_window.cpp.

◆ newton_measure

GtkWidget* newton_measure[6]

Definition at line 39 of file calibrate_window.cpp.

◆ offset

unsigned int offset[6]

Definition at line 24 of file calibrate_window.cpp.

◆ picker_calib

GtkWidget* picker_calib

Definition at line 46 of file calibrate_window.cpp.

◆ reset_calib_bias_button

GtkWidget* reset_calib_bias_button

Definition at line 51 of file calibrate_window.cpp.

◆ reset_curr_bias_button

GtkWidget* reset_curr_bias_button

Definition at line 53 of file calibrate_window.cpp.

◆ save_button

GtkWidget* save_button

Definition at line 47 of file calibrate_window.cpp.

◆ selected

int selected = 0

Definition at line 21 of file calibrate_window.cpp.

◆ serial_no

char serial_no[8] ={'U','N','D','E','F',0,0,0}

Definition at line 62 of file calibrate_window.cpp.

◆ serial_number_changed

bool serial_number_changed

Definition at line 64 of file calibrate_window.cpp.

◆ set_calib_bias_button

GtkWidget* set_calib_bias_button

Definition at line 50 of file calibrate_window.cpp.

◆ set_curr_bias_button

GtkWidget* set_curr_bias_button

Definition at line 52 of file calibrate_window.cpp.

◆ slider_gain

GtkWidget* slider_gain[6]

Definition at line 43 of file calibrate_window.cpp.

◆ slider_zero

GtkWidget* slider_zero

Definition at line 44 of file calibrate_window.cpp.

◆ something_changed

bool something_changed

Definition at line 65 of file calibrate_window.cpp.

◆ timer_refresh

guint timer_refresh = 0

Definition at line 34 of file calibrate_window.cpp.

◆ window

GtkWidget* window

Definition at line 152 of file main.cpp.