2008-06-22 17:53:20 +02:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 06/2008 by Olaf Rempel *
|
|
|
|
* razzor@kopf-tisch.de *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; version 2 of the License *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program; if not, write to the *
|
|
|
|
* Free Software Foundation, Inc., *
|
|
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
|
|
***************************************************************************/
|
2009-06-13 15:40:07 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
2008-06-22 17:53:20 +02:00
|
|
|
#include <string.h>
|
|
|
|
|
2009-06-13 15:40:07 +02:00
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
|
2008-06-22 17:53:20 +02:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#include "gtk2-gui.h"
|
|
|
|
#include "i2c.h"
|
|
|
|
|
|
|
|
static GtkWidget *combobox101;
|
|
|
|
static GtkWidget *spinbutton101;
|
|
|
|
static GtkWidget *textview101;
|
|
|
|
|
|
|
|
static GtkWidget *filechooserbutton201;
|
|
|
|
static GtkWidget *filechooserbutton202;
|
|
|
|
static GtkWidget *progressbar201;
|
|
|
|
|
|
|
|
static GtkWidget *spinbutton301;
|
|
|
|
static GtkWidget *spinbutton302;
|
|
|
|
static GtkWidget *spinbutton303;
|
|
|
|
static GtkWidget *spinbutton304;
|
|
|
|
static GtkWidget *spinbutton305;
|
|
|
|
static GtkWidget *spinbutton306;
|
|
|
|
static GtkWidget *spinbutton307;
|
|
|
|
static GtkWidget *spinbutton308;
|
|
|
|
static GtkWidget *spinbutton309;
|
|
|
|
static GtkWidget *spinbutton310;
|
|
|
|
|
|
|
|
static GtkWidget *entry401;
|
|
|
|
static GtkWidget *entry402;
|
|
|
|
static GtkWidget *entry403;
|
|
|
|
static GtkWidget *entry404;
|
|
|
|
static GtkWidget *entry405;
|
|
|
|
static GtkWidget *vscale401;
|
|
|
|
static GtkWidget *togglebutton401;
|
|
|
|
|
|
|
|
static int i2c_fd = -1;
|
|
|
|
static struct blmc_parameter blmc_parameters;
|
|
|
|
static int parameter_update_in_progress = 0;
|
|
|
|
|
|
|
|
static void add_message(const char *msg)
|
|
|
|
{
|
|
|
|
if (msg == NULL)
|
|
|
|
msg = "EMPTY MESSAGE\n";
|
|
|
|
|
|
|
|
GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview101));
|
|
|
|
gtk_text_buffer_insert_at_cursor(buffer, msg, strlen(msg));
|
|
|
|
GtkTextMark *mark = gtk_text_buffer_get_insert(buffer);
|
|
|
|
gtk_text_view_scroll_mark_onscreen(GTK_TEXT_VIEW(textview101), mark);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void update_parameter_boxes(void)
|
|
|
|
{
|
|
|
|
parameter_update_in_progress = 1;
|
|
|
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton301), blmc_parameters.spinup_ticks);
|
|
|
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton302), blmc_parameters.spinup_tick);
|
|
|
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton303), blmc_parameters.spinup_step);
|
|
|
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton304), blmc_parameters.spinup_wait);
|
|
|
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton305), blmc_parameters.spinup_pwm);
|
|
|
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton306), blmc_parameters.pwm_min);
|
|
|
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton307), blmc_parameters.pwm_max);
|
|
|
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton308), blmc_parameters.current_limit);
|
|
|
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton309), blmc_parameters.current_max);
|
|
|
|
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton310), blmc_parameters.voltage_min);
|
|
|
|
parameter_update_in_progress = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void update_status_boxes(struct blmc_status *status)
|
|
|
|
{
|
|
|
|
char buf[16];
|
|
|
|
|
|
|
|
snprintf(buf, sizeof(buf), "%d", status->pwm);
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(entry401), buf);
|
|
|
|
|
|
|
|
snprintf(buf, sizeof(buf), "%d", status->pwm_real);
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(entry402), buf);
|
|
|
|
|
2009-06-13 15:29:38 +02:00
|
|
|
snprintf(buf, sizeof(buf), "%d", status->rpm * 60 / 42);
|
2008-06-22 17:53:20 +02:00
|
|
|
gtk_entry_set_text(GTK_ENTRY(entry403), buf);
|
|
|
|
|
|
|
|
snprintf(buf, sizeof(buf), "%d", status->current);
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(entry404), buf);
|
|
|
|
|
2008-06-22 23:50:55 +02:00
|
|
|
double voltage = (status->voltage * 5.00 * (18000 + 4700)) / (6 * 1024 * 4700);
|
|
|
|
|
|
|
|
snprintf(buf, sizeof(buf), "%2.3f", voltage);
|
2008-06-22 17:53:20 +02:00
|
|
|
gtk_entry_set_text(GTK_ENTRY(entry405), buf);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void on_spinbutton101_value_changed(GtkSpinButton *spinbutton, gpointer user_data)
|
|
|
|
{
|
|
|
|
int address = gtk_spin_button_get_value_as_int(spinbutton);
|
|
|
|
if (i2c_fd != -1)
|
|
|
|
i2c_set_address(i2c_fd, address);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* CONNECT Button */
|
|
|
|
static void on_button101_clicked(GtkButton *button, gpointer user_data)
|
|
|
|
{
|
|
|
|
if (!i2c_isconnected()) {
|
|
|
|
/* not connected, so this is a CONNECT */
|
|
|
|
char *path = gtk_combo_box_get_active_text(GTK_COMBO_BOX(combobox101));
|
|
|
|
int address = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinbutton101));
|
|
|
|
|
|
|
|
i2c_fd = i2c_open(path);
|
|
|
|
if (i2c_fd != -1)
|
|
|
|
i2c_set_address(i2c_fd, address);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
i2c_close(i2c_fd);
|
|
|
|
i2c_fd = -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (i2c_isconnected()) {
|
|
|
|
gtk_button_set_label(button, "Disconnect");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
gtk_button_set_label(GTK_BUTTON(button), "Connect");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-06-13 15:29:38 +02:00
|
|
|
/* fetch bootloader info 150ms after bootloader was requested */
|
2008-06-22 17:53:20 +02:00
|
|
|
static gint bootloader_cb(gpointer data)
|
|
|
|
{
|
|
|
|
char info_buf[16];
|
|
|
|
unsigned char sig_buf[4];
|
|
|
|
|
|
|
|
i2c_cmd_getinfo(i2c_fd, info_buf, sizeof(info_buf));
|
|
|
|
i2c_cmd_getsignature(i2c_fd, sig_buf, sizeof(sig_buf));
|
|
|
|
|
|
|
|
char msg_buf[64];
|
2009-06-13 15:29:38 +02:00
|
|
|
snprintf(msg_buf, sizeof(msg_buf), "bootloader: %-16s (sig: 0x%02x%02x%02x)\n",
|
2008-06-22 17:53:20 +02:00
|
|
|
info_buf, sig_buf[0], sig_buf[1], sig_buf[2]);
|
|
|
|
|
|
|
|
add_message(msg_buf);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Bootloader Button */
|
|
|
|
static void on_button102_clicked(GtkButton *button, gpointer user_data)
|
|
|
|
{
|
|
|
|
i2c_cmd_bootloader(i2c_fd);
|
|
|
|
g_timeout_add(150, bootloader_cb, NULL);
|
|
|
|
}
|
|
|
|
|
2009-06-13 15:29:38 +02:00
|
|
|
/* fetch application info 150ms after application was started */
|
2008-06-22 17:53:20 +02:00
|
|
|
static gint application_cb(gpointer data)
|
|
|
|
{
|
|
|
|
char info_buf[16];
|
|
|
|
|
|
|
|
i2c_cmd_getinfo(i2c_fd, info_buf, sizeof(info_buf));
|
|
|
|
i2c_cmd_getparameters(i2c_fd, &blmc_parameters);
|
|
|
|
|
|
|
|
char msg_buf[64];
|
2009-06-13 15:29:38 +02:00
|
|
|
snprintf(msg_buf, sizeof(msg_buf), "application: %-16s\n", info_buf);
|
2008-06-22 17:53:20 +02:00
|
|
|
add_message(msg_buf);
|
|
|
|
|
|
|
|
update_parameter_boxes();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Application Button */
|
|
|
|
static void on_button103_clicked(GtkButton *button, gpointer user_data)
|
|
|
|
{
|
|
|
|
i2c_cmd_application(i2c_fd);
|
|
|
|
g_timeout_add(150, application_cb, NULL);
|
|
|
|
}
|
|
|
|
|
2009-06-13 15:29:38 +02:00
|
|
|
/* progress-bar callback */
|
|
|
|
static void progress_cb(int pos, int size)
|
2008-06-22 17:53:20 +02:00
|
|
|
{
|
|
|
|
char buf[16];
|
2009-06-13 15:29:38 +02:00
|
|
|
snprintf(buf, sizeof(buf), "%3d%%", pos * 100 / size);
|
2008-06-22 17:53:20 +02:00
|
|
|
|
|
|
|
gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progressbar201), buf);
|
2009-06-13 15:29:38 +02:00
|
|
|
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progressbar201), (double)pos / (double)size);
|
2008-06-22 17:53:20 +02:00
|
|
|
gdk_window_process_updates(gtk_widget_get_parent_window(progressbar201), 1);
|
|
|
|
}
|
|
|
|
|
2009-06-13 15:40:07 +02:00
|
|
|
static char * load_file(const char *filename, int *filesize)
|
|
|
|
{
|
|
|
|
int fd = open(filename, O_RDONLY);
|
|
|
|
if (fd < 0) {
|
|
|
|
perror("open()");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct stat statbuf;
|
|
|
|
if (fstat(fd, &statbuf) == -1) {
|
|
|
|
perror("stat()");
|
|
|
|
close(fd);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
*filesize = statbuf.st_size;
|
|
|
|
|
|
|
|
char *data = malloc(*filesize);
|
|
|
|
if (data == NULL) {
|
|
|
|
perror("malloc()");
|
|
|
|
close(fd);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
read(fd, data, *filesize);
|
|
|
|
close(fd);
|
|
|
|
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* FLASH-READ Button */
|
|
|
|
static void on_button201_clicked(GtkButton *button, gpointer user_data)
|
|
|
|
{
|
|
|
|
add_message("sorry, not implemented yet\n");
|
|
|
|
}
|
|
|
|
|
2008-06-22 17:53:20 +02:00
|
|
|
/* FLASH-WRITE Button */
|
|
|
|
static void on_button202_clicked(GtkButton *button, gpointer user_data)
|
|
|
|
{
|
|
|
|
char *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(filechooserbutton201));
|
|
|
|
|
2009-06-13 15:40:07 +02:00
|
|
|
int filesize;
|
|
|
|
char *filedata = load_file(filename, &filesize);
|
|
|
|
if (filedata != NULL) {
|
|
|
|
int size = i2c_write_flash(i2c_fd, filedata, filesize, progress_cb);
|
|
|
|
free(filedata);
|
|
|
|
|
|
|
|
char msg_buf[64];
|
|
|
|
snprintf(msg_buf, sizeof(msg_buf), "FLASH: %d bytes written\n", size);
|
|
|
|
add_message(msg_buf);
|
|
|
|
}
|
2008-06-22 17:53:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* FLASH-VERIFY Button */
|
|
|
|
static void on_button203_clicked(GtkButton *button, gpointer user_data)
|
|
|
|
{
|
2009-06-13 15:40:07 +02:00
|
|
|
char *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(filechooserbutton201));
|
|
|
|
|
|
|
|
int filesize;
|
|
|
|
char *filedata = load_file(filename, &filesize);
|
|
|
|
if (filedata != NULL) {
|
|
|
|
int size = i2c_verify_flash(i2c_fd, filedata, filesize, progress_cb);
|
|
|
|
free(filedata);
|
|
|
|
|
|
|
|
char msg_buf[64];
|
|
|
|
snprintf(msg_buf, sizeof(msg_buf), "FLASH: %d bytes verified\n", size);
|
|
|
|
add_message(msg_buf);
|
|
|
|
}
|
2008-06-22 17:53:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* FLASH-CLEAR Button */
|
|
|
|
static void on_button204_clicked(GtkButton *button, gpointer user_data)
|
|
|
|
{
|
|
|
|
add_message("sorry, not implemented yet\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* EEPROM-READ Button */
|
|
|
|
static void on_button205_clicked(GtkButton *button, gpointer user_data)
|
|
|
|
{
|
|
|
|
add_message("sorry, not implemented yet\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* EEPROM-WRITE Button */
|
|
|
|
static void on_button206_clicked(GtkButton *button, gpointer user_data)
|
|
|
|
{
|
|
|
|
add_message("sorry, not implemented yet\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* EEPROM-VERIFY Button */
|
|
|
|
static void on_button207_clicked(GtkButton *button, gpointer user_data)
|
|
|
|
{
|
|
|
|
add_message("sorry, not implemented yet\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* EEPROM-CLEAR Button */
|
|
|
|
static void on_button208_clicked(GtkButton *button, gpointer user_data)
|
|
|
|
{
|
|
|
|
add_message("sorry, not implemented yet\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
static void on_parameter_value_changed(GtkSpinButton *spinbutton, gpointer user_data)
|
|
|
|
{
|
|
|
|
if (parameter_update_in_progress)
|
|
|
|
return;
|
|
|
|
|
|
|
|
blmc_parameters.spinup_ticks = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinbutton301));
|
|
|
|
blmc_parameters.spinup_tick = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinbutton302));
|
|
|
|
blmc_parameters.spinup_step = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinbutton303));
|
|
|
|
blmc_parameters.spinup_wait = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinbutton304));
|
|
|
|
blmc_parameters.spinup_pwm = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinbutton305));
|
|
|
|
blmc_parameters.pwm_min = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinbutton306));
|
|
|
|
blmc_parameters.pwm_max = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinbutton307));
|
|
|
|
blmc_parameters.current_limit = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinbutton308));
|
|
|
|
blmc_parameters.current_max = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinbutton309));
|
|
|
|
blmc_parameters.voltage_min = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinbutton310));
|
|
|
|
|
|
|
|
i2c_cmd_setparameters(i2c_fd, &blmc_parameters, 0);
|
|
|
|
add_message("parameter updated\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Revert parameters to default */
|
|
|
|
static void on_button301_clicked(GtkButton *button, gpointer user_data)
|
|
|
|
{
|
|
|
|
add_message("sorry, not implemented yet\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* save parameters */
|
|
|
|
static void on_button302_clicked(GtkButton *button, gpointer user_data)
|
|
|
|
{
|
|
|
|
i2c_cmd_setparameters(i2c_fd, &blmc_parameters, 1);
|
|
|
|
add_message("parameter saved\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
static gint pwm_update_cb(gpointer data)
|
|
|
|
{
|
|
|
|
int active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(togglebutton401));
|
|
|
|
int pwm = gtk_range_get_value(GTK_RANGE(vscale401));
|
|
|
|
|
|
|
|
if (!active)
|
|
|
|
pwm = 0;
|
|
|
|
|
|
|
|
i2c_cmd_setpwm(i2c_fd, pwm);
|
|
|
|
|
|
|
|
struct blmc_status status;
|
|
|
|
i2c_cmd_getstatus(i2c_fd, &status);
|
|
|
|
update_status_boxes(&status);
|
|
|
|
return active;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Motor Togglebutton */
|
|
|
|
static void on_togglebutton401_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
|
|
|
{
|
2009-06-13 15:29:38 +02:00
|
|
|
g_timeout_add(250, pwm_update_cb, NULL);
|
2008-06-22 17:53:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static unsigned int i2c_interface_count;
|
|
|
|
|
|
|
|
void gui_add_i2c_interface(const char *path)
|
|
|
|
{
|
|
|
|
gtk_combo_box_append_text(GTK_COMBO_BOX(combobox101), path);
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(combobox101), 0);
|
|
|
|
i2c_interface_count++;
|
|
|
|
}
|
|
|
|
|
|
|
|
void gui_flush_i2c_interfaces(void) {
|
|
|
|
while (i2c_interface_count-- > 0)
|
|
|
|
gtk_combo_box_remove_text(GTK_COMBO_BOX(combobox101), 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
GtkWidget * gui_create_window (void)
|
|
|
|
{
|
|
|
|
GtkWidget *window;
|
|
|
|
GtkWidget *table1;
|
|
|
|
GtkWidget *frame400;
|
|
|
|
GtkWidget *table401;
|
|
|
|
GtkWidget *label401;
|
|
|
|
GtkWidget *label402;
|
|
|
|
GtkWidget *label403;
|
|
|
|
GtkWidget *label407;
|
|
|
|
GtkWidget *label408;
|
|
|
|
// GtkWidget *vscale401;
|
|
|
|
// GtkWidget *togglebutton401;
|
|
|
|
// GtkWidget *entry401;
|
|
|
|
// GtkWidget *entry402;
|
|
|
|
// GtkWidget *entry403;
|
|
|
|
// GtkWidget *entry405;
|
|
|
|
// GtkWidget *entry406;
|
|
|
|
GtkWidget *vseparator402;
|
|
|
|
GtkWidget *vseparator401;
|
|
|
|
GtkWidget *label400;
|
|
|
|
GtkWidget *frame200;
|
|
|
|
GtkWidget *table201;
|
|
|
|
GtkWidget *button202;
|
|
|
|
GtkWidget *button204;
|
|
|
|
GtkWidget *button203;
|
|
|
|
GtkWidget *button201;
|
|
|
|
GtkWidget *label201;
|
|
|
|
// GtkWidget *filechooserbutton201;
|
|
|
|
GtkWidget *label202;
|
|
|
|
// GtkWidget *filechooserbutton202;
|
|
|
|
GtkWidget *button207;
|
|
|
|
GtkWidget *button208;
|
|
|
|
GtkWidget *button205;
|
|
|
|
GtkWidget *button206;
|
|
|
|
GtkWidget *vseparator201;
|
|
|
|
// GtkWidget *progressbar201;
|
|
|
|
GtkWidget *label200;
|
|
|
|
GtkWidget *frame300;
|
|
|
|
GtkWidget *table301;
|
|
|
|
GtkWidget *label301;
|
|
|
|
GtkWidget *label302;
|
|
|
|
GtkWidget *label303;
|
|
|
|
GtkWidget *label304;
|
|
|
|
GtkWidget *label305;
|
|
|
|
GtkWidget *label306;
|
|
|
|
GtkWidget *label307;
|
|
|
|
GtkWidget *label308;
|
|
|
|
GtkWidget *label309;
|
|
|
|
GtkWidget *label310;
|
|
|
|
GtkWidget *hseparator301;
|
|
|
|
GtkObject *spinbutton302_adj;
|
|
|
|
// GtkWidget *spinbutton302;
|
|
|
|
GtkObject *spinbutton307_adj;
|
|
|
|
// GtkWidget *spinbutton307;
|
|
|
|
GtkObject *spinbutton303_adj;
|
|
|
|
// GtkWidget *spinbutton303;
|
|
|
|
GtkObject *spinbutton308_adj;
|
|
|
|
// GtkWidget *spinbutton308;
|
|
|
|
GtkObject *spinbutton304_adj;
|
|
|
|
// GtkWidget *spinbutton304;
|
|
|
|
GtkObject *spinbutton309_adj;
|
|
|
|
// GtkWidget *spinbutton309;
|
|
|
|
GtkObject *spinbutton305_adj;
|
|
|
|
// GtkWidget *spinbutton305;
|
|
|
|
GtkObject *spinbutton310_adj;
|
|
|
|
// GtkWidget *spinbutton310;
|
|
|
|
GtkWidget *hbuttonbox301;
|
|
|
|
GtkWidget *button301;
|
|
|
|
GtkWidget *button302;
|
|
|
|
GtkObject *spinbutton301_adj;
|
|
|
|
// GtkWidget *spinbutton301;
|
|
|
|
GtkObject *spinbutton306_adj;
|
|
|
|
// GtkWidget *spinbutton306;
|
|
|
|
GtkWidget *vseparator301;
|
|
|
|
GtkWidget *label300;
|
|
|
|
GtkWidget *frame100;
|
|
|
|
GtkWidget *table101;
|
|
|
|
GtkWidget *label101;
|
|
|
|
// GtkWidget *combobox101;
|
|
|
|
GtkWidget *label102;
|
|
|
|
GtkObject *spinbutton101_adj;
|
|
|
|
// GtkWidget *spinbutton101;
|
|
|
|
GtkWidget *scrolledwindow101;
|
|
|
|
// GtkWidget *textview101;
|
|
|
|
GtkWidget *hbuttonbox101;
|
|
|
|
GtkWidget *button101;
|
|
|
|
GtkWidget *button102;
|
|
|
|
GtkWidget *button103;
|
|
|
|
GtkWidget *hseparator101;
|
|
|
|
GtkWidget *hseparator102;
|
|
|
|
GtkWidget *label100;
|
|
|
|
|
|
|
|
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
|
|
|
gtk_window_set_title (GTK_WINDOW (window), "blmc-config v0.20");
|
|
|
|
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
|
|
|
|
|
|
|
table1 = gtk_table_new (2, 2, FALSE);
|
|
|
|
gtk_widget_show (table1);
|
|
|
|
gtk_container_add (GTK_CONTAINER (window), table1);
|
|
|
|
gtk_table_set_row_spacings (GTK_TABLE (table1), 5);
|
|
|
|
gtk_table_set_col_spacings (GTK_TABLE (table1), 5);
|
|
|
|
|
|
|
|
frame400 = gtk_frame_new (NULL);
|
|
|
|
gtk_widget_show (frame400);
|
|
|
|
gtk_table_attach (GTK_TABLE (table1), frame400, 1, 2, 1, 2,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (GTK_FILL), 0, 0);
|
|
|
|
gtk_frame_set_shadow_type (GTK_FRAME (frame400), GTK_SHADOW_IN);
|
|
|
|
|
|
|
|
table401 = gtk_table_new (5, 6, FALSE);
|
|
|
|
gtk_widget_show (table401);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame400), table401);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (table401), 5);
|
|
|
|
gtk_table_set_row_spacings (GTK_TABLE (table401), 2);
|
|
|
|
gtk_table_set_col_spacings (GTK_TABLE (table401), 2);
|
|
|
|
|
|
|
|
label401 = gtk_label_new ("PWM:");
|
|
|
|
gtk_widget_show (label401);
|
|
|
|
gtk_table_attach (GTK_TABLE (table401), label401, 0, 1, 0, 1,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label401), 0, 0.5);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label401), 5, 0);
|
|
|
|
|
|
|
|
label402 = gtk_label_new ("PWM (real):");
|
|
|
|
gtk_widget_show (label402);
|
|
|
|
gtk_table_attach (GTK_TABLE (table401), label402, 0, 1, 1, 2,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label402), 0, 0.5);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label402), 5, 0);
|
|
|
|
|
|
|
|
label403 = gtk_label_new ("RPM:");
|
|
|
|
gtk_widget_show (label403);
|
|
|
|
gtk_table_attach (GTK_TABLE (table401), label403, 0, 1, 2, 3,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label403), 0, 0.5);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label403), 5, 0);
|
|
|
|
|
|
|
|
label407 = gtk_label_new ("Current:");
|
|
|
|
gtk_widget_show (label407);
|
|
|
|
gtk_table_attach (GTK_TABLE (table401), label407, 0, 1, 3, 4,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label407), 0, 0.5);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label407), 5, 0);
|
|
|
|
|
|
|
|
label408 = gtk_label_new ("Voltage:");
|
|
|
|
gtk_widget_show (label408);
|
|
|
|
gtk_table_attach (GTK_TABLE (table401), label408, 0, 1, 4, 5,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label408), 0, 0.5);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label408), 5, 0);
|
|
|
|
|
|
|
|
vscale401 = gtk_vscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 255, 0, 0, 0)));
|
|
|
|
gtk_widget_show (vscale401);
|
|
|
|
gtk_table_attach (GTK_TABLE (table401), vscale401, 3, 4, 0, 5,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (GTK_FILL), 0, 0);
|
|
|
|
gtk_scale_set_value_pos (GTK_SCALE (vscale401), GTK_POS_BOTTOM);
|
|
|
|
gtk_scale_set_digits (GTK_SCALE (vscale401), 0);
|
|
|
|
gtk_range_set_inverted (GTK_RANGE (vscale401), TRUE);
|
|
|
|
|
|
|
|
togglebutton401 = gtk_toggle_button_new_with_mnemonic ("Motor");
|
|
|
|
gtk_widget_show (togglebutton401);
|
|
|
|
gtk_table_attach (GTK_TABLE (table401), togglebutton401, 5, 6, 0, 5,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
|
|
|
|
entry401 = gtk_entry_new ();
|
|
|
|
gtk_widget_show (entry401);
|
|
|
|
gtk_table_attach (GTK_TABLE (table401), entry401, 1, 2, 0, 1,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_editable_set_editable (GTK_EDITABLE (entry401), FALSE);
|
|
|
|
gtk_entry_set_text (GTK_ENTRY (entry401), "0");
|
|
|
|
gtk_entry_set_invisible_char (GTK_ENTRY (entry401), 9679);
|
|
|
|
gtk_entry_set_width_chars (GTK_ENTRY (entry401), 8);
|
|
|
|
|
|
|
|
entry402 = gtk_entry_new ();
|
|
|
|
gtk_widget_show (entry402);
|
|
|
|
gtk_table_attach (GTK_TABLE (table401), entry402, 1, 2, 1, 2,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_editable_set_editable (GTK_EDITABLE (entry402), FALSE);
|
|
|
|
gtk_entry_set_text (GTK_ENTRY (entry402), "0");
|
|
|
|
gtk_entry_set_invisible_char (GTK_ENTRY (entry402), 9679);
|
|
|
|
gtk_entry_set_width_chars (GTK_ENTRY (entry402), 8);
|
|
|
|
|
|
|
|
entry403 = gtk_entry_new ();
|
|
|
|
gtk_widget_show (entry403);
|
|
|
|
gtk_table_attach (GTK_TABLE (table401), entry403, 1, 2, 2, 3,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_editable_set_editable (GTK_EDITABLE (entry403), FALSE);
|
|
|
|
gtk_entry_set_text (GTK_ENTRY (entry403), "0");
|
|
|
|
gtk_entry_set_invisible_char (GTK_ENTRY (entry403), 9679);
|
|
|
|
gtk_entry_set_width_chars (GTK_ENTRY (entry403), 8);
|
|
|
|
|
|
|
|
entry404 = gtk_entry_new ();
|
|
|
|
gtk_widget_show (entry404);
|
|
|
|
gtk_table_attach (GTK_TABLE (table401), entry404, 1, 2, 3, 4,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_editable_set_editable (GTK_EDITABLE (entry404), FALSE);
|
|
|
|
gtk_entry_set_text (GTK_ENTRY (entry404), "0");
|
|
|
|
gtk_entry_set_invisible_char (GTK_ENTRY (entry404), 9679);
|
|
|
|
gtk_entry_set_width_chars (GTK_ENTRY (entry404), 8);
|
|
|
|
|
|
|
|
entry405 = gtk_entry_new ();
|
|
|
|
gtk_widget_show (entry405);
|
|
|
|
gtk_table_attach (GTK_TABLE (table401), entry405, 1, 2, 4, 5,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_editable_set_editable (GTK_EDITABLE (entry405), FALSE);
|
|
|
|
gtk_entry_set_text (GTK_ENTRY (entry405), "0");
|
|
|
|
gtk_entry_set_invisible_char (GTK_ENTRY (entry405), 9679);
|
|
|
|
gtk_entry_set_width_chars (GTK_ENTRY (entry405), 8);
|
|
|
|
|
|
|
|
vseparator402 = gtk_vseparator_new ();
|
|
|
|
gtk_widget_show (vseparator402);
|
|
|
|
gtk_table_attach (GTK_TABLE (table401), vseparator402, 4, 5, 0, 5,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (GTK_FILL), 0, 0);
|
|
|
|
|
|
|
|
vseparator401 = gtk_vseparator_new ();
|
|
|
|
gtk_widget_show (vseparator401);
|
|
|
|
gtk_table_attach (GTK_TABLE (table401), vseparator401, 2, 3, 0, 5,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (GTK_FILL), 0, 0);
|
|
|
|
|
|
|
|
label400 = gtk_label_new ("Motorttest:");
|
|
|
|
gtk_widget_show (label400);
|
|
|
|
gtk_frame_set_label_widget (GTK_FRAME (frame400), label400);
|
|
|
|
gtk_label_set_use_markup (GTK_LABEL (label400), TRUE);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label400), 5, 0);
|
|
|
|
|
|
|
|
frame200 = gtk_frame_new (NULL);
|
|
|
|
gtk_widget_show (frame200);
|
|
|
|
gtk_table_attach (GTK_TABLE (table1), frame200, 0, 1, 1, 2,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (GTK_FILL), 0, 0);
|
|
|
|
gtk_frame_set_shadow_type (GTK_FRAME (frame200), GTK_SHADOW_IN);
|
|
|
|
|
|
|
|
table201 = gtk_table_new (5, 5, FALSE);
|
|
|
|
gtk_widget_show (table201);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame200), table201);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (table201), 5);
|
|
|
|
gtk_table_set_row_spacings (GTK_TABLE (table201), 2);
|
|
|
|
gtk_table_set_col_spacings (GTK_TABLE (table201), 2);
|
|
|
|
|
|
|
|
button202 = gtk_button_new_with_mnemonic ("WRITE");
|
|
|
|
gtk_widget_show (button202);
|
|
|
|
gtk_table_attach (GTK_TABLE (table201), button202, 0, 1, 3, 4,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (button202), 5);
|
|
|
|
GTK_WIDGET_SET_FLAGS (button202, GTK_CAN_DEFAULT);
|
|
|
|
|
|
|
|
button204 = gtk_button_new_with_mnemonic ("CLEAR");
|
|
|
|
gtk_widget_show (button204);
|
|
|
|
gtk_table_attach (GTK_TABLE (table201), button204, 1, 2, 3, 4,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (button204), 5);
|
|
|
|
|
|
|
|
button203 = gtk_button_new_with_mnemonic ("VERIFY");
|
|
|
|
gtk_widget_show (button203);
|
|
|
|
gtk_table_attach (GTK_TABLE (table201), button203, 1, 2, 2, 3,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (button203), 5);
|
|
|
|
|
|
|
|
button201 = gtk_button_new_with_mnemonic ("READ");
|
|
|
|
gtk_widget_show (button201);
|
|
|
|
gtk_table_attach (GTK_TABLE (table201), button201, 0, 1, 2, 3,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (button201), 5);
|
|
|
|
GTK_WIDGET_SET_FLAGS (button201, GTK_CAN_DEFAULT);
|
|
|
|
|
|
|
|
label201 = gtk_label_new ("FLASH:");
|
|
|
|
gtk_widget_show (label201);
|
|
|
|
gtk_table_attach (GTK_TABLE (table201), label201, 0, 2, 0, 1,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
|
|
|
|
filechooserbutton201 = gtk_file_chooser_button_new ("Select A File", GTK_FILE_CHOOSER_ACTION_OPEN);
|
|
|
|
gtk_widget_show (filechooserbutton201);
|
|
|
|
gtk_table_attach (GTK_TABLE (table201), filechooserbutton201, 0, 2, 1, 2,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 5, 0);
|
2009-06-13 15:29:38 +02:00
|
|
|
g_object_set (filechooserbutton201, "width-chars", 15, NULL);
|
2008-06-22 17:53:20 +02:00
|
|
|
|
|
|
|
label202 = gtk_label_new ("EEPROM:");
|
|
|
|
gtk_widget_show (label202);
|
|
|
|
gtk_table_attach (GTK_TABLE (table201), label202, 3, 5, 0, 1,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
|
|
|
|
filechooserbutton202 = gtk_file_chooser_button_new ("Select A File", GTK_FILE_CHOOSER_ACTION_OPEN);
|
|
|
|
gtk_widget_show (filechooserbutton202);
|
|
|
|
gtk_table_attach (GTK_TABLE (table201), filechooserbutton202, 3, 5, 1, 2,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 5, 0);
|
2009-06-13 15:29:38 +02:00
|
|
|
g_object_set (filechooserbutton202, "width-chars", 16, NULL);
|
2008-06-22 17:53:20 +02:00
|
|
|
|
|
|
|
button207 = gtk_button_new_with_mnemonic ("VERIFY");
|
|
|
|
gtk_widget_show (button207);
|
|
|
|
gtk_table_attach (GTK_TABLE (table201), button207, 4, 5, 2, 3,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (button207), 5);
|
|
|
|
|
|
|
|
button208 = gtk_button_new_with_mnemonic ("CLEAR");
|
|
|
|
gtk_widget_show (button208);
|
|
|
|
gtk_table_attach (GTK_TABLE (table201), button208, 4, 5, 3, 4,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (button208), 5);
|
|
|
|
|
|
|
|
button205 = gtk_button_new_with_mnemonic ("READ");
|
|
|
|
gtk_widget_show (button205);
|
|
|
|
gtk_table_attach (GTK_TABLE (table201), button205, 3, 4, 2, 3,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (button205), 5);
|
|
|
|
GTK_WIDGET_SET_FLAGS (button205, GTK_CAN_DEFAULT);
|
|
|
|
|
|
|
|
button206 = gtk_button_new_with_mnemonic ("WRITE");
|
|
|
|
gtk_widget_show (button206);
|
|
|
|
gtk_table_attach (GTK_TABLE (table201), button206, 3, 4, 3, 4,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (button206), 5);
|
|
|
|
GTK_WIDGET_SET_FLAGS (button206, GTK_CAN_DEFAULT);
|
|
|
|
|
|
|
|
vseparator201 = gtk_vseparator_new ();
|
|
|
|
gtk_widget_show (vseparator201);
|
|
|
|
gtk_table_attach (GTK_TABLE (table201), vseparator201, 2, 3, 0, 4,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (GTK_FILL), 5, 0);
|
|
|
|
|
|
|
|
progressbar201 = gtk_progress_bar_new ();
|
|
|
|
gtk_widget_show (progressbar201);
|
|
|
|
gtk_table_attach (GTK_TABLE (table201), progressbar201, 0, 5, 4, 5,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_progress_bar_set_text (GTK_PROGRESS_BAR (progressbar201), "0%");
|
|
|
|
|
|
|
|
label200 = gtk_label_new ("Bootloader:");
|
|
|
|
gtk_widget_show (label200);
|
|
|
|
gtk_frame_set_label_widget (GTK_FRAME (frame200), label200);
|
|
|
|
gtk_label_set_use_markup (GTK_LABEL (label200), TRUE);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label200), 5, 0);
|
|
|
|
|
|
|
|
frame300 = gtk_frame_new (NULL);
|
|
|
|
gtk_widget_show (frame300);
|
|
|
|
gtk_table_attach (GTK_TABLE (table1), frame300, 1, 2, 0, 1,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (GTK_FILL), 0, 0);
|
|
|
|
gtk_frame_set_shadow_type (GTK_FRAME (frame300), GTK_SHADOW_IN);
|
|
|
|
|
|
|
|
table301 = gtk_table_new (7, 5, FALSE);
|
|
|
|
gtk_widget_show (table301);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame300), table301);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (table301), 5);
|
|
|
|
gtk_table_set_row_spacings (GTK_TABLE (table301), 2);
|
|
|
|
gtk_table_set_col_spacings (GTK_TABLE (table301), 2);
|
|
|
|
|
|
|
|
label301 = gtk_label_new ("SPINUP Ticks:");
|
|
|
|
gtk_widget_show (label301);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), label301, 0, 1, 0, 1,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label301), 0, 0.5);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label301), 5, 0);
|
|
|
|
|
|
|
|
label302 = gtk_label_new ("SPINUP Tick:");
|
|
|
|
gtk_widget_show (label302);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), label302, 0, 1, 1, 2,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label302), 0, 0.5);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label302), 5, 0);
|
|
|
|
|
|
|
|
label303 = gtk_label_new ("SPINUP Step:");
|
|
|
|
gtk_widget_show (label303);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), label303, 0, 1, 2, 3,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label303), 0, 0.5);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label303), 5, 0);
|
|
|
|
|
|
|
|
label304 = gtk_label_new ("SPINUP Wait:");
|
|
|
|
gtk_widget_show (label304);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), label304, 0, 1, 3, 4,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label304), 0, 0.5);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label304), 5, 0);
|
|
|
|
|
|
|
|
label305 = gtk_label_new ("SPINUP PWM:");
|
|
|
|
gtk_widget_show (label305);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), label305, 0, 1, 4, 5,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label305), 0, 0.5);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label305), 5, 0);
|
|
|
|
|
|
|
|
label306 = gtk_label_new ("min. PWM:");
|
|
|
|
gtk_widget_show (label306);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), label306, 3, 4, 0, 1,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label306), 0, 0.5);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label306), 5, 0);
|
|
|
|
|
|
|
|
label307 = gtk_label_new ("max. PWM:");
|
|
|
|
gtk_widget_show (label307);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), label307, 3, 4, 1, 2,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label307), 0, 0.5);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label307), 5, 0);
|
|
|
|
|
|
|
|
label308 = gtk_label_new ("Current Limit:");
|
|
|
|
gtk_widget_show (label308);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), label308, 3, 4, 2, 3,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label308), 0, 0.5);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label308), 5, 0);
|
|
|
|
|
|
|
|
label309 = gtk_label_new ("Current max.:");
|
|
|
|
gtk_widget_show (label309);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), label309, 3, 4, 3, 4,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label309), 0, 0.5);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label309), 5, 0);
|
|
|
|
|
|
|
|
label310 = gtk_label_new ("Voltage min.:");
|
|
|
|
gtk_widget_show (label310);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), label310, 3, 4, 4, 5,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label310), 0, 0.5);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label310), 5, 0);
|
|
|
|
|
|
|
|
hseparator301 = gtk_hseparator_new ();
|
|
|
|
gtk_widget_show (hseparator301);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), hseparator301, 0, 5, 5, 6,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
|
|
|
|
|
|
|
|
spinbutton302_adj = gtk_adjustment_new (0, 0, 63, 1, 10, 10);
|
|
|
|
spinbutton302 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton302_adj), 1, 0);
|
|
|
|
gtk_widget_show (spinbutton302);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), spinbutton302, 1, 2, 1, 2,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
|
|
|
|
spinbutton307_adj = gtk_adjustment_new (0, 0, 255, 1, 10, 10);
|
|
|
|
spinbutton307 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton307_adj), 1, 0);
|
|
|
|
gtk_widget_show (spinbutton307);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), spinbutton307, 4, 5, 1, 2,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
|
|
|
|
spinbutton303_adj = gtk_adjustment_new (0, 0, 255, 1, 10, 10);
|
|
|
|
spinbutton303 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton303_adj), 1, 0);
|
|
|
|
gtk_widget_show (spinbutton303);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), spinbutton303, 1, 2, 2, 3,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
|
|
|
|
spinbutton308_adj = gtk_adjustment_new (0, 0, 1023, 1, 10, 10);
|
|
|
|
spinbutton308 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton308_adj), 1, 0);
|
|
|
|
gtk_widget_show (spinbutton308);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), spinbutton308, 4, 5, 2, 3,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
|
|
|
|
spinbutton304_adj = gtk_adjustment_new (0, 0, 255, 1, 10, 10);
|
|
|
|
spinbutton304 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton304_adj), 1, 0);
|
|
|
|
gtk_widget_show (spinbutton304);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), spinbutton304, 1, 2, 3, 4,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
|
|
|
|
spinbutton309_adj = gtk_adjustment_new (0, 0, 1023, 1, 10, 10);
|
|
|
|
spinbutton309 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton309_adj), 1, 0);
|
|
|
|
gtk_widget_show (spinbutton309);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), spinbutton309, 4, 5, 3, 4,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
|
|
|
|
spinbutton305_adj = gtk_adjustment_new (0, 0, 255, 1, 10, 10);
|
|
|
|
spinbutton305 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton305_adj), 1, 0);
|
|
|
|
gtk_widget_show (spinbutton305);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), spinbutton305, 1, 2, 4, 5,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
|
|
|
|
spinbutton310_adj = gtk_adjustment_new (0, 0, 1023, 1, 10, 10);
|
|
|
|
spinbutton310 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton310_adj), 1, 0);
|
|
|
|
gtk_widget_show (spinbutton310);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), spinbutton310, 4, 5, 4, 5,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
|
|
|
|
hbuttonbox301 = gtk_hbutton_box_new ();
|
|
|
|
gtk_widget_show (hbuttonbox301);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), hbuttonbox301, 0, 5, 6, 7,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 5);
|
|
|
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox301), GTK_BUTTONBOX_SPREAD);
|
|
|
|
|
|
|
|
button301 = gtk_button_new_with_mnemonic ("Revert to Defaults");
|
|
|
|
gtk_widget_show (button301);
|
|
|
|
gtk_container_add (GTK_CONTAINER (hbuttonbox301), button301);
|
|
|
|
GTK_WIDGET_SET_FLAGS (button301, GTK_CAN_DEFAULT);
|
|
|
|
|
|
|
|
button302 = gtk_button_new_with_mnemonic ("Save to EEPROM");
|
|
|
|
gtk_widget_show (button302);
|
|
|
|
gtk_container_add (GTK_CONTAINER (hbuttonbox301), button302);
|
|
|
|
GTK_WIDGET_SET_FLAGS (button302, GTK_CAN_DEFAULT);
|
|
|
|
|
|
|
|
spinbutton301_adj = gtk_adjustment_new (0, 0, 65535, 1, 10, 10);
|
|
|
|
spinbutton301 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton301_adj), 1, 0);
|
|
|
|
gtk_widget_show (spinbutton301);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), spinbutton301, 1, 2, 0, 1,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
|
|
|
|
spinbutton306_adj = gtk_adjustment_new (0, 0, 255, 1, 10, 10);
|
|
|
|
spinbutton306 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton306_adj), 1, 0);
|
|
|
|
gtk_widget_show (spinbutton306);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), spinbutton306, 4, 5, 0, 1,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
|
|
|
|
vseparator301 = gtk_vseparator_new ();
|
|
|
|
gtk_widget_show (vseparator301);
|
|
|
|
gtk_table_attach (GTK_TABLE (table301), vseparator301, 2, 3, 0, 5,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (GTK_FILL), 5, 0);
|
|
|
|
|
|
|
|
label300 = gtk_label_new ("Parameters:");
|
|
|
|
gtk_widget_show (label300);
|
|
|
|
gtk_frame_set_label_widget (GTK_FRAME (frame300), label300);
|
|
|
|
gtk_label_set_use_markup (GTK_LABEL (label300), TRUE);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label300), 5, 0);
|
|
|
|
|
|
|
|
frame100 = gtk_frame_new (NULL);
|
|
|
|
gtk_widget_show (frame100);
|
|
|
|
gtk_table_attach (GTK_TABLE (table1), frame100, 0, 1, 0, 1,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (GTK_FILL), 0, 0);
|
|
|
|
gtk_frame_set_shadow_type (GTK_FRAME (frame100), GTK_SHADOW_IN);
|
|
|
|
|
|
|
|
table101 = gtk_table_new (6, 2, FALSE);
|
|
|
|
gtk_widget_show (table101);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame100), table101);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (table101), 5);
|
|
|
|
gtk_table_set_row_spacings (GTK_TABLE (table101), 2);
|
|
|
|
gtk_table_set_col_spacings (GTK_TABLE (table101), 2);
|
|
|
|
|
|
|
|
label101 = gtk_label_new ("I2C Interface:");
|
|
|
|
gtk_widget_show (label101);
|
|
|
|
gtk_table_attach (GTK_TABLE (table101), label101, 0, 1, 0, 1,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label101), 0, 0.5);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label101), 5, 0);
|
|
|
|
|
|
|
|
combobox101 = gtk_combo_box_new_text ();
|
|
|
|
gtk_widget_show (combobox101);
|
|
|
|
gtk_table_attach (GTK_TABLE (table101), combobox101, 1, 2, 0, 1,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (GTK_FILL), 0, 0);
|
|
|
|
|
|
|
|
label102 = gtk_label_new ("I2C Address:");
|
|
|
|
gtk_widget_show (label102);
|
|
|
|
gtk_table_attach (GTK_TABLE (table101), label102, 0, 1, 1, 2,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC (label102), 0, 0.5);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label102), 5, 0);
|
|
|
|
|
|
|
|
spinbutton101_adj = gtk_adjustment_new (33, 1, 127, 1, 10, 10);
|
|
|
|
spinbutton101 = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton101_adj), 1, 0);
|
|
|
|
gtk_widget_show (spinbutton101);
|
|
|
|
gtk_table_attach (GTK_TABLE (table101), spinbutton101, 1, 2, 1, 2,
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
|
|
|
|
scrolledwindow101 = gtk_scrolled_window_new (NULL, NULL);
|
|
|
|
gtk_widget_show (scrolledwindow101);
|
|
|
|
gtk_table_attach (GTK_TABLE (table101), scrolledwindow101, 0, 2, 5, 6,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
|
|
|
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow101), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
|
|
|
|
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow101), GTK_SHADOW_IN);
|
|
|
|
|
|
|
|
textview101 = gtk_text_view_new ();
|
|
|
|
gtk_widget_show (textview101);
|
|
|
|
gtk_container_add (GTK_CONTAINER (scrolledwindow101), textview101);
|
|
|
|
gtk_text_view_set_editable (GTK_TEXT_VIEW (textview101), FALSE);
|
|
|
|
gtk_text_view_set_accepts_tab (GTK_TEXT_VIEW (textview101), FALSE);
|
|
|
|
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (textview101), FALSE);
|
|
|
|
|
|
|
|
hbuttonbox101 = gtk_hbutton_box_new ();
|
|
|
|
gtk_widget_show (hbuttonbox101);
|
|
|
|
gtk_table_attach (GTK_TABLE (table101), hbuttonbox101, 0, 2, 3, 4,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
|
|
|
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox101), GTK_BUTTONBOX_SPREAD);
|
|
|
|
|
|
|
|
button101 = gtk_button_new_with_mnemonic ("Connect");
|
|
|
|
gtk_widget_show (button101);
|
|
|
|
gtk_container_add (GTK_CONTAINER (hbuttonbox101), button101);
|
|
|
|
|
|
|
|
button102 = gtk_button_new_with_mnemonic ("Bootloader");
|
|
|
|
gtk_widget_show (button102);
|
|
|
|
gtk_container_add (GTK_CONTAINER (hbuttonbox101), button102);
|
|
|
|
|
|
|
|
button103 = gtk_button_new_with_mnemonic ("Application");
|
|
|
|
gtk_widget_show (button103);
|
|
|
|
gtk_container_add (GTK_CONTAINER (hbuttonbox101), button103);
|
|
|
|
|
|
|
|
hseparator101 = gtk_hseparator_new ();
|
|
|
|
gtk_widget_show (hseparator101);
|
|
|
|
gtk_table_attach (GTK_TABLE (table101), hseparator101, 0, 2, 2, 3,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 5);
|
|
|
|
|
|
|
|
hseparator102 = gtk_hseparator_new ();
|
|
|
|
gtk_widget_show (hseparator102);
|
|
|
|
gtk_table_attach (GTK_TABLE (table101), hseparator102, 0, 2, 4, 5,
|
|
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 5);
|
|
|
|
|
|
|
|
label100 = gtk_label_new ("Connection:");
|
|
|
|
gtk_widget_show (label100);
|
|
|
|
gtk_frame_set_label_widget (GTK_FRAME (frame100), label100);
|
|
|
|
gtk_label_set_use_markup (GTK_LABEL (label100), TRUE);
|
|
|
|
gtk_misc_set_padding (GTK_MISC (label100), 5, 0);
|
|
|
|
|
|
|
|
g_signal_connect ((gpointer) window, "destroy",
|
|
|
|
G_CALLBACK (gtk_main_quit),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) window, "delete_event",
|
|
|
|
G_CALLBACK (gtk_main_quit),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) togglebutton401, "toggled",
|
|
|
|
G_CALLBACK (on_togglebutton401_toggled),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) button202, "clicked",
|
|
|
|
G_CALLBACK (on_button202_clicked),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) button204, "clicked",
|
|
|
|
G_CALLBACK (on_button204_clicked),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) button203, "clicked",
|
|
|
|
G_CALLBACK (on_button203_clicked),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) button201, "clicked",
|
|
|
|
G_CALLBACK (on_button201_clicked),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) button207, "clicked",
|
|
|
|
G_CALLBACK (on_button207_clicked),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) button208, "clicked",
|
|
|
|
G_CALLBACK (on_button208_clicked),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) button205, "clicked",
|
|
|
|
G_CALLBACK (on_button205_clicked),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) button206, "clicked",
|
|
|
|
G_CALLBACK (on_button206_clicked),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) spinbutton302, "value_changed",
|
|
|
|
G_CALLBACK (on_parameter_value_changed),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) spinbutton307, "value_changed",
|
|
|
|
G_CALLBACK (on_parameter_value_changed),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) spinbutton303, "value_changed",
|
|
|
|
G_CALLBACK (on_parameter_value_changed),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) spinbutton308, "value_changed",
|
|
|
|
G_CALLBACK (on_parameter_value_changed),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) spinbutton304, "value_changed",
|
|
|
|
G_CALLBACK (on_parameter_value_changed),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) spinbutton309, "value_changed",
|
|
|
|
G_CALLBACK (on_parameter_value_changed),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) spinbutton305, "value_changed",
|
|
|
|
G_CALLBACK (on_parameter_value_changed),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) spinbutton310, "value_changed",
|
|
|
|
G_CALLBACK (on_parameter_value_changed),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) button301, "clicked",
|
|
|
|
G_CALLBACK (on_button301_clicked),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) button302, "clicked",
|
|
|
|
G_CALLBACK (on_button302_clicked),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) spinbutton301, "value_changed",
|
|
|
|
G_CALLBACK (on_parameter_value_changed),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) spinbutton306, "value_changed",
|
|
|
|
G_CALLBACK (on_parameter_value_changed),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) spinbutton101, "value_changed",
|
|
|
|
G_CALLBACK (on_spinbutton101_value_changed),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) button101, "clicked",
|
|
|
|
G_CALLBACK (on_button101_clicked),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) button102, "clicked",
|
|
|
|
G_CALLBACK (on_button102_clicked),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect ((gpointer) button103, "clicked",
|
|
|
|
G_CALLBACK (on_button103_clicked),
|
|
|
|
NULL);
|
|
|
|
return window;
|
|
|
|
}
|