diff --git a/Examples/ADC/Test-QT-src/ADC1.pro b/Examples/ADC/Test-QT-src/ADC1.pro new file mode 100644 index 0000000..1522161 --- /dev/null +++ b/Examples/ADC/Test-QT-src/ADC1.pro @@ -0,0 +1,23 @@ +# ##################################################################### +# Automatically generated by qmake (2.01a) Sat Apr 3 14:28:42 2010 +# ##################################################################### +TEMPLATE = app +TARGET = TestADC +DEPENDPATH += . +INCLUDEPATH += . + +# Input +HEADERS += mainwindow.h \ + jz47xx_mmap.h \ + signaldisplay.h \ + ADCw.h \ + jz_adc_peripheral.h \ + jz47xx_gpio.h +FORMS += mainwindow.ui +SOURCES += main.cpp \ + mainwindow.cpp \ + signaldisplay.cpp \ + ADCw.cpp \ + jz_adc_peripheral.cpp \ + jz47xx_gpio.cpp \ + jz47xx_mmap.cpp diff --git a/Examples/ADC/Test-QT-src/ADC1.pro.user b/Examples/ADC/Test-QT-src/ADC1.pro.user new file mode 100644 index 0000000..f957427 --- /dev/null +++ b/Examples/ADC/Test-QT-src/ADC1.pro.user @@ -0,0 +1,214 @@ + + + + RunConfiguration0-Arguments + + + + RunConfiguration0-BaseEnvironmentBase + 2 + + + RunConfiguration0-Executable + /home/juan64bits/Desktop/nn-usb-fpga/Examples/ADC/Scope-QT-src/ADC + + + RunConfiguration0-RunConfiguration.name + Run /home/juan64bits/Desktop/nn-usb-fpga/Examples/ADC/Scope-QT-src/ADC + + + RunConfiguration0-UseTerminal + false + + + RunConfiguration0-UserEnvironmentChanges + + + + RunConfiguration0-UserName + + + + RunConfiguration0-UserSetName + false + + + RunConfiguration0-WorkingDirectory + $BUILDDIR + + + RunConfiguration0-type + ProjectExplorer.CustomExecutableRunConfiguration + + + activeRunConfiguration + 0 + + + activebuildconfiguration + Debug + + + buildConfiguration-Debug + + Debug + 2 + 0 + + 2 + + + + buildconfiguration-Debug-buildstep0 + + Debug + + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-R9oeYpdn1v,guid=bf98b5220eae3f73ac0e2cd74ccd76a4 + DEFAULTS_PATH=/usr/share/gconf/gnome.default.path + DESKTOP_SESSION=gnome + DISPLAY=:0.0 + GDMSESSION=gnome + GDM_KEYBOARD_LAYOUT=es + GDM_LANG=en_US.utf8 + GNOME_DESKTOP_SESSION_ID=this-is-deprecated + GNOME_KEYRING_CONTROL=/tmp/keyring-78MfHT + GNOME_KEYRING_PID=1538 + GTK_MODULES=canberra-gtk-module + HOME=/home/juan64bits + LANG=en_US.utf8 + LD_LIBRARY_PATH=/usr/lib/qtcreator + LOGNAME=juan64bits + MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path + ORBIT_SOCKETDIR=/tmp/orbit-juan64bits + PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PWD=/home/juan64bits + QTDIR=/usr/share/qt4 + SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1556,unix/Maximus:/tmp/.ICE-unix/1556 + SHELL=/bin/bash + SPEECHD_PORT=7560 + SSH_AGENT_PID=1592 + SSH_AUTH_SOCK=/tmp/keyring-78MfHT/ssh + USER=juan64bits + USERNAME=juan64bits + XAUTHORITY=/var/run/gdm/auth-for-juan64bits-mGObKq/database + XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg + XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/ + XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1288533667.711046-1067046560 + + + /home/juan64bits/ebd/ECB/nn-usb-fpga2/Examples/ADC/Test-QT-src/ADC1.pro + -spec + linux-g++ + -r + CONFIG+=debug + + /usr/bin/qmake-qt4 + true + /home/juan64bits/ebd/ECB/nn-usb-fpga2/Examples/ADC/Test-QT-src + + + + + buildconfiguration-Debug-buildstep1 + + Debug + + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-R9oeYpdn1v,guid=bf98b5220eae3f73ac0e2cd74ccd76a4 + DEFAULTS_PATH=/usr/share/gconf/gnome.default.path + DESKTOP_SESSION=gnome + DISPLAY=:0.0 + GDMSESSION=gnome + GDM_KEYBOARD_LAYOUT=es + GDM_LANG=en_US.utf8 + GNOME_DESKTOP_SESSION_ID=this-is-deprecated + GNOME_KEYRING_CONTROL=/tmp/keyring-78MfHT + GNOME_KEYRING_PID=1538 + GTK_MODULES=canberra-gtk-module + HOME=/home/juan64bits + LANG=en_US.utf8 + LD_LIBRARY_PATH=/usr/lib/qtcreator + LOGNAME=juan64bits + MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path + ORBIT_SOCKETDIR=/tmp/orbit-juan64bits + PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PWD=/home/juan64bits + QTDIR=/usr/share/qt4 + SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1556,unix/Maximus:/tmp/.ICE-unix/1556 + SHELL=/bin/bash + SPEECHD_PORT=7560 + SSH_AGENT_PID=1592 + SSH_AUTH_SOCK=/tmp/keyring-78MfHT/ssh + USER=juan64bits + USERNAME=juan64bits + XAUTHORITY=/var/run/gdm/auth-for-juan64bits-mGObKq/database + XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg + XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/ + XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1288533667.711046-1067046560 + + false + + -w + + /usr/bin/make + true + /home/juan64bits/ebd/ECB/nn-usb-fpga2/Examples/ADC/Test-QT-src + + + + buildconfiguration-Debug-cleanstep0 + + Debug + true + + clean + + + + + buildconfigurations + + Debug + + + + buildstep0 + + + + + + + buildstep1 + + + + + + buildsteps + + trolltech.qt4projectmanager.qmake + trolltech.qt4projectmanager.make + + + + cleanstep0 + + + true + + + + cleansteps + + trolltech.qt4projectmanager.make + + + + defaultFileEncoding + System + + + project + + + diff --git a/Examples/ADC/Test-QT-src/ADCw.cpp b/Examples/ADC/Test-QT-src/ADCw.cpp new file mode 100644 index 0000000..cd0e31d --- /dev/null +++ b/Examples/ADC/Test-QT-src/ADCw.cpp @@ -0,0 +1,103 @@ +#include "ADCw.h" + +ADCw::ADCw() +{ + BUFFER_OFFSET = 8; //Ignore first 16 samples + ADC_SPI_CLKDIV=ADC_SPI_CLKDIV_MAX; //Set clock to minimum speed + BUFFER_LEN=16; + MUX_CHANNELS =0; + + ADCBuffer = jz_adc_init(); + + //Clean FPGA RAM memory + for (int i = 0; i < 512; i++) //RAMB16_s9_s9 has 2048 bytes 8-bit + { + ADCBuffer[i] = 0x00000000; //Clean 4 register by cicle + } + + adcConfig(ADC_CMD_SET_SPI_CLKDIV); + adcConfig(ADC_CMD_SET_FAST_CONV); + printf("\nADC in Fast Convertion Mode (10us) and Fs=9.8KHz (Min)\n"); +} + +void ADCw::testADC() +{ + int aggregate=0; float errorT=0; + /******************************* TEST 1 ***********************************/ + printf("\nINIT TEST1: Autoselft {(Vref+) - (Vref-)}/2 -> Return 0x0200 \n"); + adcConfig(ADC_CMD_SET_AUTOSELFT_1); + adcConfig(ADC_CMD_READ_AUTOSELFT_1); + for(int i=BUFFER_OFFSET; i< BUFFER_LEN/2+BUFFER_OFFSET; i++) + { + aggregate += (ADCBuffer[i]&0xFFFF + ((ADCBuffer[i]>>16)&0x0FFF)); + printf("[%08X]", ADCBuffer[i]); + } + errorT=(aggregate/16)*100/0x200; + if((errorT<95)||(errorT>105)) + printf("\n**WARNING** Test FAILED.\n\n"); + else + printf("\nTest OK\n\n"); + + aggregate=0; + fflush (stdout); + + /******************************* TEST 2 ***********************************/ + printf("\n\nINIT TEST2: Autoselft (Vref-) -> Return 0x0000 \n"); + adcConfig(ADC_CMD_SET_AUTOSELFT_2); + adcConfig(ADC_CMD_READ_AUTOSELFT_2); + for(int i=BUFFER_OFFSET; i< BUFFER_LEN/2+BUFFER_OFFSET; i++) + { + aggregate += (ADCBuffer[i]&0xFFFF + ((ADCBuffer[i]>>16)&0x0FFF)); + printf("[%08X]", ADCBuffer[i]); + } + if(aggregate!=0) + printf("\n**WARNING** Test FAILED. Expected value=0x0000.\n\n"); + else + printf("\nTest OK\n\n"); + + aggregate=0; + fflush (stdout); + + /******************************* TEST 3 ***********************************/ + printf("\n\nINIT TEST3: Autoselft (Vref+) -> Return 0x03FF \n"); + adcConfig(ADC_CMD_SET_AUTOSELFT_3); + adcConfig(ADC_CMD_READ_AUTOSELFT_3); + for(int i=BUFFER_OFFSET; i< BUFFER_LEN/2+BUFFER_OFFSET; i++) + { + aggregate += (ADCBuffer[i]&0xFFFF + ((ADCBuffer[i]>>16)&0x0FFF)); + printf("[%08X]", ADCBuffer[i]); + } + errorT=(aggregate/16)*100/0x3FF; + if((errorT<95)||(errorT>105)) + printf("\n**WARNING** Test FAILED.\n\n"); + else + printf("\nTest OK\n\n"); + + fflush (stdout); +} + +void ADCw::powerDownADC() +{ + adcConfig(ADC_CMD_SET_POWER_DOWN); + printf("\nADC in Power Down Mode \n"); +} + +JZ_REG* ADCw::takeSamplesADC(int CHANNEL) +{ + adcConfig(ADC_CMD_SET_CHANNEL0+CHANNEL); + adcConfig(ADC_CMD_READ_CHANNEL0+CHANNEL); + return (JZ_REG*)(ADCBuffer+BUFFER_OFFSET); +} + +void ADCw::adcConfig(uchar CMD) +{ + ADCBuffer[0] = (((MUX_CHANNELS<<6) + CMD)<<24) + \ + ((BUFFER_LEN+BUFFER_OFFSET*2) << 8) + \ + (ADC_SPI_CLKDIV); + while(adcCheckBufferFull()) usleep (10); +} + +int ADCw::adcCheckBufferFull() +{ + return ADCBuffer[0]&0x20000000; +} diff --git a/Examples/ADC/Test-QT-src/ADCw.h b/Examples/ADC/Test-QT-src/ADCw.h new file mode 100644 index 0000000..4495aba --- /dev/null +++ b/Examples/ADC/Test-QT-src/ADCw.h @@ -0,0 +1,31 @@ +#ifndef ADCW_H +#define ADCW_H + +#include "jz_adc_peripheral.h" +#include +#include + +class ADCw +{ +public: + ADCw(); + ~ADCw(){} + + void testADC(); + void powerDownADC(); + JZ_REG * takeSamplesADC(int CHANNEL); + void setClockDiv(uchar value){ ADC_SPI_CLKDIV = value;} + void setBufferLen(int value){ BUFFER_LEN = value;} + void setMuxChannels(uchar value){ MUX_CHANNELS = value;} +private: + void adcConfig(uchar CMD); + int adcCheckBufferFull(); + + JZ_REG * ADCBuffer; + uchar ADC_SPI_CLKDIV; + int BUFFER_LEN; + int BUFFER_OFFSET; + uchar MUX_CHANNELS; +}; + +#endif // ADCW_H diff --git a/Examples/ADC/Test-QT-src/ADCw.o b/Examples/ADC/Test-QT-src/ADCw.o new file mode 100644 index 0000000..df75050 Binary files /dev/null and b/Examples/ADC/Test-QT-src/ADCw.o differ diff --git a/Examples/ADC/Test-QT-src/Makefile b/Examples/ADC/Test-QT-src/Makefile new file mode 100644 index 0000000..b40b305 --- /dev/null +++ b/Examples/ADC/Test-QT-src/Makefile @@ -0,0 +1,259 @@ +############################################################################# +# Makefile for building: TestADC +# Generated by qmake (2.01a) (Qt 4.6.2) on: Sun Oct 31 11:42:42 2010 +# Project: ADC1.pro +# Template: app +# Command: /usr/bin/qmake -unix -o Makefile ADC1.pro +############################################################################# + +####### Compiler, tools and options + +CC = gcc +CXX = g++ +DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED +CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES) +CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES) +INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I. +LINK = g++ +LFLAGS = -Wl,-O1 +LIBS = $(SUBLIBS) -L/usr/lib -lQtGui -lQtCore -lpthread +AR = ar cqs +RANLIB = +QMAKE = /usr/bin/qmake +TAR = tar -cf +COMPRESS = gzip -9f +COPY = cp -f +SED = sed +COPY_FILE = $(COPY) +COPY_DIR = $(COPY) -r +STRIP = strip +INSTALL_FILE = install -m 644 -p +INSTALL_DIR = $(COPY_DIR) +INSTALL_PROGRAM = install -m 755 -p +DEL_FILE = rm -f +SYMLINK = ln -f -s +DEL_DIR = rmdir +MOVE = mv -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p + +####### Output directory + +OBJECTS_DIR = ./ + +####### Files + +SOURCES = main.cpp \ + mainwindow.cpp \ + signaldisplay.cpp \ + ADCw.cpp \ + jz_adc_peripheral.cpp \ + jz47xx_gpio.cpp \ + jz47xx_mmap.cpp moc_mainwindow.cpp +OBJECTS = main.o \ + mainwindow.o \ + signaldisplay.o \ + ADCw.o \ + jz_adc_peripheral.o \ + jz47xx_gpio.o \ + jz47xx_mmap.o \ + moc_mainwindow.o +DIST = /usr/share/qt4/mkspecs/common/g++.conf \ + /usr/share/qt4/mkspecs/common/unix.conf \ + /usr/share/qt4/mkspecs/common/linux.conf \ + /usr/share/qt4/mkspecs/qconfig.pri \ + /usr/share/qt4/mkspecs/features/qt_functions.prf \ + /usr/share/qt4/mkspecs/features/qt_config.prf \ + /usr/share/qt4/mkspecs/features/exclusive_builds.prf \ + /usr/share/qt4/mkspecs/features/default_pre.prf \ + /usr/share/qt4/mkspecs/features/release.prf \ + /usr/share/qt4/mkspecs/features/default_post.prf \ + /usr/share/qt4/mkspecs/features/warn_on.prf \ + /usr/share/qt4/mkspecs/features/qt.prf \ + /usr/share/qt4/mkspecs/features/unix/thread.prf \ + /usr/share/qt4/mkspecs/features/moc.prf \ + /usr/share/qt4/mkspecs/features/resources.prf \ + /usr/share/qt4/mkspecs/features/uic.prf \ + /usr/share/qt4/mkspecs/features/yacc.prf \ + /usr/share/qt4/mkspecs/features/lex.prf \ + /usr/share/qt4/mkspecs/features/include_source_dir.prf \ + ADC1.pro +QMAKE_TARGET = TestADC +DESTDIR = +TARGET = TestADC + +first: all +####### Implicit rules + +.SUFFIXES: .o .c .cpp .cc .cxx .C + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cc.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cxx.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.C.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.c.o: + $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" + +####### Build rules + +all: Makefile $(TARGET) + +$(TARGET): ui_mainwindow.h $(OBJECTS) + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) + +Makefile: ADC1.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \ + /usr/share/qt4/mkspecs/common/unix.conf \ + /usr/share/qt4/mkspecs/common/linux.conf \ + /usr/share/qt4/mkspecs/qconfig.pri \ + /usr/share/qt4/mkspecs/features/qt_functions.prf \ + /usr/share/qt4/mkspecs/features/qt_config.prf \ + /usr/share/qt4/mkspecs/features/exclusive_builds.prf \ + /usr/share/qt4/mkspecs/features/default_pre.prf \ + /usr/share/qt4/mkspecs/features/release.prf \ + /usr/share/qt4/mkspecs/features/default_post.prf \ + /usr/share/qt4/mkspecs/features/warn_on.prf \ + /usr/share/qt4/mkspecs/features/qt.prf \ + /usr/share/qt4/mkspecs/features/unix/thread.prf \ + /usr/share/qt4/mkspecs/features/moc.prf \ + /usr/share/qt4/mkspecs/features/resources.prf \ + /usr/share/qt4/mkspecs/features/uic.prf \ + /usr/share/qt4/mkspecs/features/yacc.prf \ + /usr/share/qt4/mkspecs/features/lex.prf \ + /usr/share/qt4/mkspecs/features/include_source_dir.prf \ + /usr/lib/libQtGui.prl \ + /usr/lib/libQtCore.prl + $(QMAKE) -unix -o Makefile ADC1.pro +/usr/share/qt4/mkspecs/common/g++.conf: +/usr/share/qt4/mkspecs/common/unix.conf: +/usr/share/qt4/mkspecs/common/linux.conf: +/usr/share/qt4/mkspecs/qconfig.pri: +/usr/share/qt4/mkspecs/features/qt_functions.prf: +/usr/share/qt4/mkspecs/features/qt_config.prf: +/usr/share/qt4/mkspecs/features/exclusive_builds.prf: +/usr/share/qt4/mkspecs/features/default_pre.prf: +/usr/share/qt4/mkspecs/features/release.prf: +/usr/share/qt4/mkspecs/features/default_post.prf: +/usr/share/qt4/mkspecs/features/warn_on.prf: +/usr/share/qt4/mkspecs/features/qt.prf: +/usr/share/qt4/mkspecs/features/unix/thread.prf: +/usr/share/qt4/mkspecs/features/moc.prf: +/usr/share/qt4/mkspecs/features/resources.prf: +/usr/share/qt4/mkspecs/features/uic.prf: +/usr/share/qt4/mkspecs/features/yacc.prf: +/usr/share/qt4/mkspecs/features/lex.prf: +/usr/share/qt4/mkspecs/features/include_source_dir.prf: +/usr/lib/libQtGui.prl: +/usr/lib/libQtCore.prl: +qmake: FORCE + @$(QMAKE) -unix -o Makefile ADC1.pro + +dist: + @$(CHK_DIR_EXISTS) .tmp/TestADC1.0.0 || $(MKDIR) .tmp/TestADC1.0.0 + $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/TestADC1.0.0/ && $(COPY_FILE) --parents mainwindow.h jz47xx_mmap.h signaldisplay.h ADCw.h jz_adc_peripheral.h jz47xx_gpio.h .tmp/TestADC1.0.0/ && $(COPY_FILE) --parents main.cpp mainwindow.cpp signaldisplay.cpp ADCw.cpp jz_adc_peripheral.cpp jz47xx_gpio.cpp jz47xx_mmap.cpp .tmp/TestADC1.0.0/ && $(COPY_FILE) --parents mainwindow.ui .tmp/TestADC1.0.0/ && (cd `dirname .tmp/TestADC1.0.0` && $(TAR) TestADC1.0.0.tar TestADC1.0.0 && $(COMPRESS) TestADC1.0.0.tar) && $(MOVE) `dirname .tmp/TestADC1.0.0`/TestADC1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/TestADC1.0.0 + + +clean:compiler_clean + -$(DEL_FILE) $(OBJECTS) + -$(DEL_FILE) *~ core *.core + + +####### Sub-libraries + +distclean: clean + -$(DEL_FILE) $(TARGET) + -$(DEL_FILE) Makefile + + +mocclean: compiler_moc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_source_make_all + +compiler_moc_header_make_all: moc_mainwindow.cpp +compiler_moc_header_clean: + -$(DEL_FILE) moc_mainwindow.cpp +moc_mainwindow.cpp: ADCw.h \ + jz_adc_peripheral.h \ + jz47xx_mmap.h \ + jz47xx_gpio.h \ + mainwindow.h + /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) mainwindow.h -o moc_mainwindow.cpp + +compiler_rcc_make_all: +compiler_rcc_clean: +compiler_image_collection_make_all: qmake_image_collection.cpp +compiler_image_collection_clean: + -$(DEL_FILE) qmake_image_collection.cpp +compiler_moc_source_make_all: +compiler_moc_source_clean: +compiler_uic_make_all: ui_mainwindow.h +compiler_uic_clean: + -$(DEL_FILE) ui_mainwindow.h +ui_mainwindow.h: mainwindow.ui \ + signaldisplay.h + /usr/bin/uic-qt4 mainwindow.ui -o ui_mainwindow.h + +compiler_yacc_decl_make_all: +compiler_yacc_decl_clean: +compiler_yacc_impl_make_all: +compiler_yacc_impl_clean: +compiler_lex_make_all: +compiler_lex_clean: +compiler_clean: compiler_moc_header_clean compiler_uic_clean + +####### Compile + +main.o: main.cpp mainwindow.h \ + ADCw.h \ + jz_adc_peripheral.h \ + jz47xx_mmap.h \ + jz47xx_gpio.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp + +mainwindow.o: mainwindow.cpp mainwindow.h \ + ADCw.h \ + jz_adc_peripheral.h \ + jz47xx_mmap.h \ + jz47xx_gpio.h \ + ui_mainwindow.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp + +signaldisplay.o: signaldisplay.cpp signaldisplay.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o signaldisplay.o signaldisplay.cpp + +ADCw.o: ADCw.cpp ADCw.h \ + jz_adc_peripheral.h \ + jz47xx_mmap.h \ + jz47xx_gpio.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ADCw.o ADCw.cpp + +jz_adc_peripheral.o: jz_adc_peripheral.cpp jz_adc_peripheral.h \ + jz47xx_mmap.h \ + jz47xx_gpio.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o jz_adc_peripheral.o jz_adc_peripheral.cpp + +jz47xx_gpio.o: jz47xx_gpio.cpp jz47xx_gpio.h \ + jz47xx_mmap.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o jz47xx_gpio.o jz47xx_gpio.cpp + +jz47xx_mmap.o: jz47xx_mmap.cpp jz47xx_mmap.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o jz47xx_mmap.o jz47xx_mmap.cpp + +moc_mainwindow.o: moc_mainwindow.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp + +####### Install + +install: FORCE + +uninstall: FORCE + +FORCE: + diff --git a/Examples/ADC/Test-QT-src/TestADC b/Examples/ADC/Test-QT-src/TestADC new file mode 100755 index 0000000..85783ce Binary files /dev/null and b/Examples/ADC/Test-QT-src/TestADC differ diff --git a/Examples/ADC/Test-QT-src/compile-mips b/Examples/ADC/Test-QT-src/compile-mips new file mode 100755 index 0000000..f130ed7 --- /dev/null +++ b/Examples/ADC/Test-QT-src/compile-mips @@ -0,0 +1,5 @@ +#!/bin/sh +QT_BASE_DIR="/home/cain/Embedded/ingenic/sakc/build/openwrt-xburst/build_dir/target-mipsel_uClibc-0.9.30.1/qt-everywhere-opensource-src-4.6.2/" +${QT_BASE_DIR}/bin/qmake -spec ${QT_BASE_DIR}mkspecs/qws/linux-openwrt-g++ -unix -o Makefile +make + diff --git a/Examples/ADC/Test-QT-src/jz47xx_gpio.cpp b/Examples/ADC/Test-QT-src/jz47xx_gpio.cpp new file mode 100644 index 0000000..affa85e --- /dev/null +++ b/Examples/ADC/Test-QT-src/jz47xx_gpio.cpp @@ -0,0 +1,108 @@ +/* + JZ47xx GPIO at userspace + + Copyright (C) 2010 Andres Calderon andres.calderon@emqbit.com + +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; either version 2 of the License, or +(at your option) any later version. + +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 */ + +#include +#include +#include + +#include +#include + + +#define JZ_GPIO_BASE 0x10010000 + +void +jz_gpio_as_output (JZ_PIO * pio, unsigned int o) +{ + pio->PXFUNC = (1 << (o)); + pio->PXSELC = (1 << (o)); + pio->PXDIRS = (1 << (o)); +} + +void +jz_gpio_as_input (JZ_PIO * pio, unsigned int o) +{ + pio->PXFUNC = (1 << (o)); + pio->PXSELC = (1 << (o)); + pio->PXDIRC = (1 << (o)); +} + +void +jz_gpio_set_pin (JZ_PIO * pio, unsigned int o) +{ + pio->PXDATS = (1 << (o)); +} + +void +jz_gpio_clear_pin (JZ_PIO * pio, unsigned int o) +{ + pio->PXDATC = (1 << (o)); +} + +void +jz_gpio_out (JZ_PIO * pio, unsigned int o, unsigned int val) +{ + if (val == 0) + pio->PXDATC = (1 << (o)); + else + pio->PXDATS = (1 << (o)); +} + +unsigned int +jz_gpio_get_pin (JZ_PIO * pio, unsigned int o) +{ + return (pio->PXPIN & (1 << o)) ? 1 : 0; +} + +int +jz_gpio_as_func (JZ_PIO * pio, unsigned int o, int func) +{ + switch (func) + { + case 0: + pio->PXFUNS = (1 << o); + pio->PXTRGC = (1 << o); + pio->PXSELC = (1 << o); + return 1; + + case 1: + pio->PXFUNS = (1 << o); + pio->PXTRGC = (1 << o); + pio->PXSELS = (1 << o); + return 1; + + case 2: + pio->PXFUNS = (1 << o); + pio->PXTRGS = (1 << o); + pio->PXSELC = (1 << o); + return 1; + } + return 0; +} + +JZ_PIO * +jz_gpio_map (int port) +{ + JZ_PIO *pio; + + pio = (JZ_PIO *) jz_mmap (JZ_GPIO_BASE); + pio = (JZ_PIO *) ((unsigned int) pio + port * 0x100); + + return pio; +} diff --git a/Examples/ADC/Test-QT-src/jz47xx_gpio.h b/Examples/ADC/Test-QT-src/jz47xx_gpio.h new file mode 100644 index 0000000..d8b0113 --- /dev/null +++ b/Examples/ADC/Test-QT-src/jz47xx_gpio.h @@ -0,0 +1,84 @@ +/* + JZ47xx GPIO at userspace + + Copyright (C) 2010 Andres Calderon andres.calderon@emqbit.com + +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; either version 2 of the License, or +(at your option) any later version. + +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 */ + +#ifndef __jz47xx_gpio_h__ +#define __jz47xx_gpio_h__ + +#define JZ_GPIO_PORT_A 0 +#define JZ_GPIO_PORT_B 1 +#define JZ_GPIO_PORT_C 2 +#define JZ_GPIO_PORT_D 3 + +typedef volatile unsigned int JZ_REG; /* Hardware register definition */ + +typedef struct _JZ_PIO +{ + JZ_REG PXPIN; /* PIN Level Register */ + JZ_REG Reserved0; + JZ_REG Reserved1; + JZ_REG Reserved2; + JZ_REG PXDAT; /* Port Data Register */ + JZ_REG PXDATS; /* Port Data Set Register */ + JZ_REG PXDATC; /* Port Data Clear Register */ + JZ_REG Reserved3; + JZ_REG PXIM; /* Interrupt Mask Register */ + JZ_REG PXIMS; /* Interrupt Mask Set Reg */ + JZ_REG PXIMC; /* Interrupt Mask Clear Reg */ + JZ_REG Reserved4; + JZ_REG PXPE; /* Pull Enable Register */ + JZ_REG PXPES; /* Pull Enable Set Reg. */ + JZ_REG PXPEC; /* Pull Enable Clear Reg. */ + JZ_REG Reserved5; + JZ_REG PXFUN; /* Function Register */ + JZ_REG PXFUNS; /* Function Set Register */ + JZ_REG PXFUNC; /* Function Clear Register */ + JZ_REG Reserved6; + JZ_REG PXSEL; /* Select Register */ + JZ_REG PXSELS; /* Select Set Register */ + JZ_REG PXSELC; /* Select Clear Register */ + JZ_REG Reserved7; + JZ_REG PXDIR; /* Direction Register */ + JZ_REG PXDIRS; /* Direction Set Register */ + JZ_REG PXDIRC; /* Direction Clear Register */ + JZ_REG Reserved8; + JZ_REG PXTRG; /* Trigger Register */ + JZ_REG PXTRGS; /* Trigger Set Register */ + JZ_REG PXTRGC; /* Trigger Set Register */ + JZ_REG Reserved9; + JZ_REG PXFLG; /* Port Flag Register */ + JZ_REG PXFLGC; /* Port Flag clear Register */ +} JZ_PIO, *PJZ_PIO; + +void jz_gpio_as_output (JZ_PIO * pio, unsigned int o); + +void jz_gpio_as_input (JZ_PIO * pio, unsigned int o); + +void jz_gpio_set_pin (JZ_PIO * pio, unsigned int o); + +void jz_gpio_clear_pin (JZ_PIO * pio, unsigned int o); + +void jz_gpio_out (JZ_PIO * pio, unsigned int o, unsigned int val); + +unsigned int jz_gpio_get_pin (JZ_PIO * pio, unsigned int o); + +int jz_gpio_as_func (JZ_PIO * pio, unsigned int o, int func); + +JZ_PIO *jz_gpio_map (int port); + +#endif diff --git a/Examples/ADC/Test-QT-src/jz47xx_gpio.o b/Examples/ADC/Test-QT-src/jz47xx_gpio.o new file mode 100644 index 0000000..1703d06 Binary files /dev/null and b/Examples/ADC/Test-QT-src/jz47xx_gpio.o differ diff --git a/Examples/ADC/Test-QT-src/jz47xx_mmap.cpp b/Examples/ADC/Test-QT-src/jz47xx_mmap.cpp new file mode 100644 index 0000000..52266bb --- /dev/null +++ b/Examples/ADC/Test-QT-src/jz47xx_mmap.cpp @@ -0,0 +1,39 @@ +/* + * JZ47xx GPIO lines + * + * Written 2010 by Andres Calderon andres.calderon@emqbit.com + */ + +#include +#include +#include +#include +#include +#include + +#include + + +unsigned int * +jz_mmap (off_t address) +{ + int fd; + + unsigned int *pio; + + if ((fd = open ("/dev/mem", O_RDWR | O_SYNC)) == -1) + { + fprintf (stderr, "Cannot open /dev/mem.\n"); + return 0; + } + + pio = (unsigned int *) mmap (0, getpagesize (), PROT_READ | PROT_WRITE, MAP_SHARED, fd, address); + + if (pio == (unsigned int *) -1) + { + fprintf (stderr, "Cannot mmap.\n"); + return 0; + } + + return pio; +} diff --git a/Examples/ADC/Test-QT-src/jz47xx_mmap.h b/Examples/ADC/Test-QT-src/jz47xx_mmap.h new file mode 100644 index 0000000..7380eb6 --- /dev/null +++ b/Examples/ADC/Test-QT-src/jz47xx_mmap.h @@ -0,0 +1,14 @@ +/* + * JZ47xx GPIO lines + * + * Written 2010 by Andres Calderon andres.calderon@emqbit.com + */ + +#ifndef __jz47xx_mmap_h__ +#define __jz47xx_mmap_h__ + +#include + +unsigned int * jz_mmap (off_t address); + +#endif diff --git a/Examples/ADC/Test-QT-src/jz47xx_mmap.o b/Examples/ADC/Test-QT-src/jz47xx_mmap.o new file mode 100644 index 0000000..e186f50 Binary files /dev/null and b/Examples/ADC/Test-QT-src/jz47xx_mmap.o differ diff --git a/Examples/ADC/Test-QT-src/jz_adc_peripheral.cpp b/Examples/ADC/Test-QT-src/jz_adc_peripheral.cpp new file mode 100644 index 0000000..091f350 --- /dev/null +++ b/Examples/ADC/Test-QT-src/jz_adc_peripheral.cpp @@ -0,0 +1,47 @@ +/* ADC Peripheral.c + +Copyright (C) 2010 Carlos Camargo cicamargoba@unal.edu.co + Andres Calderon andres.calderon@emqbit.com + +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; either version 2 of the License, or +(at your option) any later version. + +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 */ + +#include +#include + +#include "jz_adc_peripheral.h" + +JZ_REG * +jz_adc_init() +{ + JZ_PIO *pio; + JZ_REG *virt_addr; + + pio = jz_gpio_map (CS2_PORT); + jz_gpio_as_func (pio, CS2_PIN, 0); + + virt_addr = (JZ_REG *) (jz_mmap(0x13010000) + 0x18); + + if (*virt_addr != 0x0FFF7700) + { + *virt_addr = 0x0FFF7700; + printf ("ADC: Configuring CS2 8 bits and 0 WS: %08X\n", *virt_addr); + } + else + printf ("ADC: CS2, already configured: %08X\n", *virt_addr); + + virt_addr = (JZ_REG *) jz_mmap (0x14000000); + + return virt_addr; +} diff --git a/Examples/ADC/Test-QT-src/jz_adc_peripheral.h b/Examples/ADC/Test-QT-src/jz_adc_peripheral.h new file mode 100644 index 0000000..a60d143 --- /dev/null +++ b/Examples/ADC/Test-QT-src/jz_adc_peripheral.h @@ -0,0 +1,81 @@ +/* ADC Peripheral.h + +Copyright (C) 2010 Carlos Camargo cicamargoba@unal.edu.co + Andres Calderon andres.calderon@emqbit.com + +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; either version 2 of the License, or +(at your option) any later version. + +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 */ + +#ifndef __adc_peripheral_h__ +#define __adc_peripheral_h__ + +#include "jz47xx_mmap.h" +#include "jz47xx_gpio.h" + +#define ADC_CMD_NONE 0x00 /* Nothing to do */ +#define ADC_CMD_SET_SPI_CLKDIV 0x00 /* Set clock divider for ADC sclk */ +#define ADC_CMD_SET_BUFFER_SIZE 0x00 /* Set clock divider for ADC sclk */ + +#define ADC_CMD_SET_CHANNEL0 0x30 /* Set channel 0 */ +#define ADC_CMD_READ_CHANNEL0 0x20 /* Read channel 0 */ + +#define ADC_CMD_SET_CHANNEL1 0x31 /* Set channel 1 */ +#define ADC_CMD_READ_CHANNEL1 0x21 /* Read channel 1 */ + +#define ADC_CMD_SET_CHANNEL2 0x32 /* Set channel 2 */ +#define ADC_CMD_READ_CHANNEL2 0x22 /* Read channel 2 */ + +#define ADC_CMD_SET_CHANNEL3 0x33 /* Set channel 3 */ +#define ADC_CMD_READ_CHANNEL3 0x23 /* Read channel 3 */ + +#define ADC_CMD_SET_CHANNEL4 0x34 /* Set channel 4 */ +#define ADC_CMD_READ_CHANNEL4 0x24 /* Read channel 4 */ + +#define ADC_CMD_SET_CHANNEL5 0x35 /* Set channel 5 */ +#define ADC_CMD_READ_CHANNEL5 0x25 /* Read channel 5 */ + +#define ADC_CMD_SET_CHANNEL6 0x36 /* Set channel 6 */ +#define ADC_CMD_READ_CHANNEL6 0x26 /* Read channel 6 */ + +#define ADC_CMD_SET_CHANNEL7 0x37 /* Set channel 7 */ +#define ADC_CMD_READ_CHANNEL7 0x27 /* Read channel 8 */ + +#define ADC_CMD_SET_POWER_DOWN 0X38 /* Set ADC power down mode (1uA) */ + +#define ADC_CMD_SET_FAST_CONV 0X39 /* Initialize ADC Fast Convertion(<10us)*/ + +#define ADC_CMD_SET_LOW_CONV 0X3A /* Initialize ADC Slow Convertion(<40us)*/ + +#define ADC_CMD_SET_AUTOSELFT_1 0x3B /* Set Autoselft ADC {(Vref+)-(Vref-)}/2*/ +#define ADC_CMD_READ_AUTOSELFT_1 0x2B /* Read Autoselft ADC 1 (0x0200) */ + +#define ADC_CMD_SET_AUTOSELFT_2 0x3C /* Set Autoselft ADC (Vref-) */ +#define ADC_CMD_READ_AUTOSELFT_2 0x2C /* Read Autoselft ADC 2 (0x0000) */ + +#define ADC_CMD_SET_AUTOSELFT_3 0x3D /* Set Autoselft ADC (Vref+) */ +#define ADC_CMD_READ_AUTOSELFT_3 0x2D /* Read Autoselft ADC 3 (0x03FF) */ + +#define ADC_SPI_CLKDIV_MIN 0x08 /* 50/(2*9) -> 2.78MHz (MAX=2.8MHz) */ +#define ADC_SPI_CLKDIV_MAX 0xFF /* 50/(2*256) -> 97.65KHz */ + +#define ADC_MAX_BUFFER 0x3FE/* 1022 reads/commands */ + +#define CS2_PORT JZ_GPIO_PORT_B +#define CS2_PIN 26 + +typedef unsigned char uchar; + +JZ_REG *jz_adc_init(); + +#endif diff --git a/Examples/ADC/Test-QT-src/jz_adc_peripheral.o b/Examples/ADC/Test-QT-src/jz_adc_peripheral.o new file mode 100644 index 0000000..e97f9d1 Binary files /dev/null and b/Examples/ADC/Test-QT-src/jz_adc_peripheral.o differ diff --git a/Examples/ADC/Test-QT-src/main.cpp b/Examples/ADC/Test-QT-src/main.cpp new file mode 100755 index 0000000..ee0cfef --- /dev/null +++ b/Examples/ADC/Test-QT-src/main.cpp @@ -0,0 +1,10 @@ +#include +#include "mainwindow.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + return a.exec(); +} diff --git a/Examples/ADC/Test-QT-src/main.o b/Examples/ADC/Test-QT-src/main.o new file mode 100644 index 0000000..62ab79b Binary files /dev/null and b/Examples/ADC/Test-QT-src/main.o differ diff --git a/Examples/ADC/Test-QT-src/mainwindow.cpp b/Examples/ADC/Test-QT-src/mainwindow.cpp new file mode 100755 index 0000000..c59f537 --- /dev/null +++ b/Examples/ADC/Test-QT-src/mainwindow.cpp @@ -0,0 +1,57 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" +#include + +#include +#include + +MainWindow::MainWindow(QWidget *parent) + : QMainWindow(parent), ui(new Ui::MainWindow) +{ + ui->setupUi(this); + connect(this,SIGNAL(refresh()),ui->Graph, SLOT(repaint())); + ui->Graph->setPointsPerPlot(100); + ui->Graph->setVoltsPerDiv(819); + ui->Graph->setNumSig(8); + + timer1 = new QTimer(this); + timer1->start(100); + connect(timer1, SIGNAL(timeout()), this, SLOT(updateGraph())); + + /*ADC1 = new ADCw; + ADC1->testADC(); + ADC1->setBufferLen(800); + + ADC1->setClockDiv(ADC_SPI_CLKDIV_MIN); //Max. speed 99KHz + ADC1->setMuxChannels(7);*/ + printf("\nTaking 100 samples by channel at Fs=12.37KHz (trigger~100ms)\n"); +} + +MainWindow::~MainWindow() +{ + delete ui; +} + +void MainWindow::updateGraph() +{ + //JZ_REG * dataADC; + + int tempD, tempIdx=0; + + //dataADC=ADC1->takeSamplesADC(0); + for(int i=0; i< 800/2; i++) + { + //tempD = dataADC[i]&0x0FFF; + tempD = sin(10*PI*i/200)*0x200+0x200; + ui->Graph->addPoints(tempIdx,tempD+0x3ff*tempIdx); + + //tempD = (dataADC[i]>>16)&0x0FFF; + tempD = cos(10*PI*i/200)*0x200+0x200; + ui->Graph->addPoints(tempIdx+1,tempD+0x3ff*(tempIdx+1)); + + tempIdx=(tempIdx+2)%8; + } + + + emit refresh(); +} diff --git a/Examples/ADC/Test-QT-src/mainwindow.h b/Examples/ADC/Test-QT-src/mainwindow.h new file mode 100755 index 0000000..6e2faea --- /dev/null +++ b/Examples/ADC/Test-QT-src/mainwindow.h @@ -0,0 +1,39 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include "ADCw.h" + +#define PI 3.14159265 +#define VrmsC 0.017 +#define VmC 0.4999 + +namespace Ui +{ + class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + MainWindow(QWidget *parent = 0); + ~MainWindow(); + + bool getSign(int val){if(val<0) return 0; else return 1;} + +public slots: + void updateGraph(); + +signals: + void refresh(); + +private: + Ui::MainWindow *ui; + QTimer *timer1; + ADCw *ADC1; + bool CHANNEL; +}; + +#endif // MAINWINDOW_H diff --git a/Examples/ADC/Test-QT-src/mainwindow.o b/Examples/ADC/Test-QT-src/mainwindow.o new file mode 100644 index 0000000..6654805 Binary files /dev/null and b/Examples/ADC/Test-QT-src/mainwindow.o differ diff --git a/Examples/ADC/Test-QT-src/mainwindow.ui b/Examples/ADC/Test-QT-src/mainwindow.ui new file mode 100755 index 0000000..c0e287b --- /dev/null +++ b/Examples/ADC/Test-QT-src/mainwindow.ui @@ -0,0 +1,66 @@ + + + MainWindow + + + + 0 + 0 + 320 + 240 + + + + ADC Test + + + + + + 0 + 0 + 320 + 240 + + + + + 100 + 20 + + + + + + + &Salir + + + + + A&cerca de... + + + + + Acerca de &QT + + + + + Acerca de &Qt... + + + + + + + SignalDisplay + QWidget +
signaldisplay.h
+ 1 +
+
+ + +
diff --git a/Examples/ADC/Test-QT-src/moc_mainwindow.cpp b/Examples/ADC/Test-QT-src/moc_mainwindow.cpp new file mode 100644 index 0000000..bed9901 --- /dev/null +++ b/Examples/ADC/Test-QT-src/moc_mainwindow.cpp @@ -0,0 +1,89 @@ +/**************************************************************************** +** Meta object code from reading C++ file 'mainwindow.h' +** +** Created: Sun Oct 31 11:42:47 2010 +** by: The Qt Meta Object Compiler version 62 (Qt 4.6.2) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#include "mainwindow.h" +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'mainwindow.h' doesn't include ." +#elif Q_MOC_OUTPUT_REVISION != 62 +#error "This file was generated using the moc from 4.6.2. It" +#error "cannot be used with the include files from this version of Qt." +#error "(The moc has changed too much.)" +#endif + +QT_BEGIN_MOC_NAMESPACE +static const uint qt_meta_data_MainWindow[] = { + + // content: + 4, // revision + 0, // classname + 0, 0, // classinfo + 2, 14, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 1, // signalCount + + // signals: signature, parameters, type, tag, flags + 12, 11, 11, 11, 0x05, + + // slots: signature, parameters, type, tag, flags + 22, 11, 11, 11, 0x0a, + + 0 // eod +}; + +static const char qt_meta_stringdata_MainWindow[] = { + "MainWindow\0\0refresh()\0updateGraph()\0" +}; + +const QMetaObject MainWindow::staticMetaObject = { + { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow, + qt_meta_data_MainWindow, 0 } +}; + +#ifdef Q_NO_DATA_RELOCATION +const QMetaObject &MainWindow::getStaticMetaObject() { return staticMetaObject; } +#endif //Q_NO_DATA_RELOCATION + +const QMetaObject *MainWindow::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; +} + +void *MainWindow::qt_metacast(const char *_clname) +{ + if (!_clname) return 0; + if (!strcmp(_clname, qt_meta_stringdata_MainWindow)) + return static_cast(const_cast< MainWindow*>(this)); + return QMainWindow::qt_metacast(_clname); +} + +int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QMainWindow::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + switch (_id) { + case 0: refresh(); break; + case 1: updateGraph(); break; + default: ; + } + _id -= 2; + } + return _id; +} + +// SIGNAL 0 +void MainWindow::refresh() +{ + QMetaObject::activate(this, &staticMetaObject, 0, 0); +} +QT_END_MOC_NAMESPACE diff --git a/Examples/ADC/Test-QT-src/moc_mainwindow.o b/Examples/ADC/Test-QT-src/moc_mainwindow.o new file mode 100644 index 0000000..e0ad953 Binary files /dev/null and b/Examples/ADC/Test-QT-src/moc_mainwindow.o differ diff --git a/Examples/ADC/Test-QT-src/qmake.conf b/Examples/ADC/Test-QT-src/qmake.conf new file mode 100644 index 0000000..f93210e --- /dev/null +++ b/Examples/ADC/Test-QT-src/qmake.conf @@ -0,0 +1,27 @@ +include(../../common/g++.conf) +include(../../common/linux.conf) +include(../../common/qws.conf) +OPENWRT_DIR = "/home/cain/Embedded/ingenic/sakc/build/openwrt-xburst" +ROOTFS_DIR = "$${OPENWRT_DIR}/staging_dir/target-mipsel_uClibc-0.9.30.1" +TOOLCHAIN_DIR = "$${OPENWRT_DIR}/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1" +QT_BASE_DIR = "$${OPENWRT_DIR}/build_dir/target-mipsel_uClibc-0.9.30.1/qt-everywhere-opensource-src-4.6.2" +INCDIR = -I$${ROOTFS_DIR}/usr/include/freetype2 -I$${ROOTFS_DIR}/usr/include -I$${ROOTFS_DIR}/include -I$${TOOLCHAIN_DIR}/usr/include -I$${TOOLCHAIN_DIR}/include +QMAKE_CC = mipsel-openwrt-linux-uclibc-gcc +QMAKE_CXX = mipsel-openwrt-linux-uclibc-g++ +QMAKE_AR = mipsel-openwrt-linux-uclibc-ar cqs +QMAKE_OBJCOPY = mipsel-openwrt-linux-uclibc-objcopy +QMAKE_RANLIB = mipsel-openwrt-linux-uclibc-ranlib +QMAKE_CFLAGS = -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float $${INCDIR} +QMAKE_CXXFLAGS = -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float $${INCDIR} +QMAKE_LINK = mipsel-openwrt-linux-uclibc-g++ +QMAKE_LINK_SHLIB = mipsel-openwrt-linux-uclibc-g++ +QMAKE_LINK_C = mipsel-openwrt-linux-uclibc-gcc +QMAKE_LINK_C_SHLIB = mipsel-openwrt-linux-uclibc-gcc +QMAKE_LFLAGS = -L$${QT_BASE_DIR}/lib -L$${ROOTFS_DIR}/usr/lib -L$${ROOTFS_DIR}/lib -L/$${TOOLCHAIN_DIR}/usr/lib -L/$${TOOLCHAIN_DIR}/lib -Wl,-rpath-link=$${ROOTFS_DIR}/usr/lib +QMAKE_STRIP = : +QMAKE_STRIPFLAGS_LIB = +QMAKE_INCDIR_QT = $${QT_BASE_DIR}/include +QMAKE_LIBDIR_QT = $${QT_BASE_DIR}/lib +QMAKE_MOC = $${QT_BASE_DIR}/bin/moc +QMAKE_UIC = $${QT_BASE_DIR}/bin/uic +load(qt_config) diff --git a/Examples/ADC/Test-QT-src/signaldisplay.cpp b/Examples/ADC/Test-QT-src/signaldisplay.cpp new file mode 100755 index 0000000..6974d54 --- /dev/null +++ b/Examples/ADC/Test-QT-src/signaldisplay.cpp @@ -0,0 +1,68 @@ +#include "signaldisplay.h" +#include +#include + +SignalDisplay::SignalDisplay(QWidget *&parent):QWidget(parent) +{ + secsPerDiv = 1.0/600.0; + voltsPerDiv = 20; + numSig=2; + setPointsPerPlot(10); +} + +void SignalDisplay::setNumSig(int value) +{ + numSig = value; + setPointsPerPlot(pointsPerPlot); +} + +void SignalDisplay::setPointsPerPlot(int value) +{ + pointsPerPlot = value; + waves = new QPoint *[numSig]; + secsIdx=new int[numSig]; + colorTraces = new QColor[numSig]; + int numT=(255/(numSig+1)); + for(int i=0;i +#include +#include + +class SignalDisplay : public QWidget +{ +public: + SignalDisplay(QWidget *&parent); + void addPoints(int idx, int value); + void setSecsPerDiv( float value ){ secsPerDiv = fabs(value);} + void setVoltsPerDiv( float value ){ voltsPerDiv = fabs(value);} + float getSecsPerDiv(){ return secsPerDiv; } + void setPointsPerPlot(int value); + void setColorTraces(QColor color, int idx){colorTraces[idx]=color;} + void setNumSig(int value); + +private: + void paintEvent(QPaintEvent *event); + void drawGrid(QPainter &p, QColor colorGrid, int x, int y, int w, int h, int nx, int ny); + QPoint **waves; + float voltsPerDiv; + float secsPerDiv; + QColor *colorTraces; + int *secsIdx; + int w, h, ox, oy; + int pointsPerPlot; + int numSig; +}; + +#endif // SIGNALDISPLAY_H diff --git a/Examples/ADC/Test-QT-src/signaldisplay.o b/Examples/ADC/Test-QT-src/signaldisplay.o new file mode 100644 index 0000000..dac2ddc Binary files /dev/null and b/Examples/ADC/Test-QT-src/signaldisplay.o differ diff --git a/Examples/ADC/Test-QT-src/ui_mainwindow.h b/Examples/ADC/Test-QT-src/ui_mainwindow.h new file mode 100644 index 0000000..3d25b9a --- /dev/null +++ b/Examples/ADC/Test-QT-src/ui_mainwindow.h @@ -0,0 +1,77 @@ +/******************************************************************************** +** Form generated from reading UI file 'mainwindow.ui' +** +** Created: Sun Oct 31 11:42:44 2010 +** by: Qt User Interface Compiler version 4.6.2 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_MAINWINDOW_H +#define UI_MAINWINDOW_H + +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_MainWindow +{ +public: + QAction *action_Salir; + QAction *actionA_cerca_de; + QAction *actionAcerca_de_QT; + QAction *actionAcerca_de_Qt; + QWidget *centralWidget; + SignalDisplay *Graph; + + void setupUi(QMainWindow *MainWindow) + { + if (MainWindow->objectName().isEmpty()) + MainWindow->setObjectName(QString::fromUtf8("MainWindow")); + MainWindow->resize(320, 240); + action_Salir = new QAction(MainWindow); + action_Salir->setObjectName(QString::fromUtf8("action_Salir")); + actionA_cerca_de = new QAction(MainWindow); + actionA_cerca_de->setObjectName(QString::fromUtf8("actionA_cerca_de")); + actionAcerca_de_QT = new QAction(MainWindow); + actionAcerca_de_QT->setObjectName(QString::fromUtf8("actionAcerca_de_QT")); + actionAcerca_de_Qt = new QAction(MainWindow); + actionAcerca_de_Qt->setObjectName(QString::fromUtf8("actionAcerca_de_Qt")); + centralWidget = new QWidget(MainWindow); + centralWidget->setObjectName(QString::fromUtf8("centralWidget")); + Graph = new SignalDisplay(centralWidget); + Graph->setObjectName(QString::fromUtf8("Graph")); + Graph->setGeometry(QRect(0, 0, 320, 240)); + Graph->setMinimumSize(QSize(100, 20)); + MainWindow->setCentralWidget(centralWidget); + + retranslateUi(MainWindow); + + QMetaObject::connectSlotsByName(MainWindow); + } // setupUi + + void retranslateUi(QMainWindow *MainWindow) + { + MainWindow->setWindowTitle(QApplication::translate("MainWindow", "ADC Test", 0, QApplication::UnicodeUTF8)); + action_Salir->setText(QApplication::translate("MainWindow", "&Salir", 0, QApplication::UnicodeUTF8)); + actionA_cerca_de->setText(QApplication::translate("MainWindow", "A&cerca de...", 0, QApplication::UnicodeUTF8)); + actionAcerca_de_QT->setText(QApplication::translate("MainWindow", "Acerca de &QT", 0, QApplication::UnicodeUTF8)); + actionAcerca_de_Qt->setText(QApplication::translate("MainWindow", "Acerca de &Qt...", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class MainWindow: public Ui_MainWindow {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_MAINWINDOW_H diff --git a/KICAD_design_files/SAKC_PCB_v2/N_MODELS/J17.mod b/KICAD_design_files/SAKC_PCB_v2/N_MODELS/J17.mod index 27a6a51..b06e830 100644 --- a/KICAD_design_files/SAKC_PCB_v2/N_MODELS/J17.mod +++ b/KICAD_design_files/SAKC_PCB_v2/N_MODELS/J17.mod @@ -1,15 +1,15 @@ PCBNEW-LibModule-V1 23/2/2010-03:08:11 $INDEX -J17 +POWER_CONN $EndINDEX -$MODULE J17 +$MODULE POWER_CONN Po 0 0 0 15 43C58C74 4B834694 ~~ -Li J17 +Li POWER_CONN Sc 4B834694 AR Op 0 0 0 -T0 0 -79 157 157 -1800 20 N V 21 "J17" -T1 0 118 118 118 -1800 20 N I 21 "HEADER 2" +T0 0 -79 157 157 -1800 20 N I 21 "POWER_CONN" +T1 0 118 118 118 -1800 20 N V 21 "VALUE" DS -1650 2650 -1650 -3350 10 24 DS -1650 -3350 2350 -3350 10 24 DS 2350 -3350 2350 2650 10 24 @@ -39,5 +39,5 @@ At STD N 00C08001 Ne 0 "" Po 1500 -1500 $EndPAD -$EndMODULE J17 +$EndMODULE POWER_CONN $EndLIBRARY diff --git a/KICAD_design_files/SAKC_PCB_v2/SAKC.pro b/KICAD_design_files/SAKC_PCB_v2/SAKC.pro index df499d8..5745f9e 100644 --- a/KICAD_design_files/SAKC_PCB_v2/SAKC.pro +++ b/KICAD_design_files/SAKC_PCB_v2/SAKC.pro @@ -1,4 +1,4 @@ -update=Mon 11 Oct 2010 12:34:05 PM COT +update=Mon 08 Nov 2010 07:59:46 PM COT last_client=pcbnew [general] version=1 @@ -95,7 +95,7 @@ DrawLar=79 EdgeLar=79 TxtLar=120 MSegLar=79 -LastNetListRead= +LastNetListRead=SAKC.net [pcbnew/libraries] LibDir=./N_MODELS/ LibName1=./N_MODELS/D8 diff --git a/Software/sie_cg/block_editor/adc_single.die b/Software/sie_cg/block_editor/adc_single.die new file mode 100644 index 0000000..917c43e --- /dev/null +++ b/Software/sie_cg/block_editor/adc_single.die @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/block_editor/constant.die b/Software/sie_cg/block_editor/constant.die new file mode 100644 index 0000000..2d365e1 --- /dev/null +++ b/Software/sie_cg/block_editor/constant.die @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/Software/sie_cg/block_editor/diagramscene.cpp b/Software/sie_cg/block_editor/diagramscene.cpp index 94e2a6d..6b7615c 100644 --- a/Software/sie_cg/block_editor/diagramscene.cpp +++ b/Software/sie_cg/block_editor/diagramscene.cpp @@ -118,8 +118,8 @@ void DiagramScene::doSnapToGrid(QGraphicsSceneMouseEvent *mouseEvent) { if(snapToGrid){ mouseEvent->setScenePos(QPointF( - int(mouseEvent->scenePos().x()/myGrid)*myGrid, - int(mouseEvent->scenePos().y()/myGrid)*myGrid + round(mouseEvent->scenePos().x()/myGrid)*myGrid, + round(mouseEvent->scenePos().y()/myGrid)*myGrid )); } } diff --git a/Software/sie_cg/block_editor/left_shift.die b/Software/sie_cg/block_editor/left_shift.die new file mode 100644 index 0000000..8bf5800 --- /dev/null +++ b/Software/sie_cg/block_editor/left_shift.die @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/block_editor/mainwindow.cpp b/Software/sie_cg/block_editor/mainwindow.cpp index 86be657..0a3b24b 100644 --- a/Software/sie_cg/block_editor/mainwindow.cpp +++ b/Software/sie_cg/block_editor/mainwindow.cpp @@ -168,6 +168,20 @@ void MainWindow::createToolBox() QIcon(":/images/background1.png")),++i,0); layout->addWidget(createToolButton(129+i,tr("Float"), QIcon(":/images/background1.png")),++i,0); + layout->addWidget(createToolButton(129+i,tr("Short"), + QIcon(":/images/background1.png")),++i,0); + layout->addWidget(createToolButton(129+i,tr("Long"), + QIcon(":/images/background1.png")),++i,0); + layout->addWidget(createToolButton(129+i,tr("UChar"), + QIcon(":/images/background1.png")),++i,0); + layout->addWidget(createToolButton(129+i,tr("UInt"), + QIcon(":/images/background1.png")),++i,0); + layout->addWidget(createToolButton(129+i,tr("UShort"), + QIcon(":/images/background1.png")),++i,0); + layout->addWidget(createToolButton(129+i,tr("ULong"), + QIcon(":/images/background1.png")),++i,0); + + //OUTPUTS i=0; @@ -181,6 +195,18 @@ void MainWindow::createToolBox() QIcon(":/images/background3.png")),++i,1); layout->addWidget(createToolButton(i,tr("Float"), QIcon(":/images/background3.png")),++i,1); + layout->addWidget(createToolButton(i,tr("Short"), + QIcon(":/images/background3.png")),++i,1); + layout->addWidget(createToolButton(i,tr("Long"), + QIcon(":/images/background3.png")),++i,1); + layout->addWidget(createToolButton(i,tr("UChar"), + QIcon(":/images/background3.png")),++i,1); + layout->addWidget(createToolButton(i,tr("UInt"), + QIcon(":/images/background3.png")),++i,1); + layout->addWidget(createToolButton(i,tr("UShort"), + QIcon(":/images/background3.png")),++i,1); + layout->addWidget(createToolButton(i,tr("ULong"), + QIcon(":/images/background3.png")),++i,1); layout->setRowStretch(3, 10); layout->setColumnStretch(2, 10); diff --git a/Software/sie_cg/block_editor/pwm_single.die b/Software/sie_cg/block_editor/pwm_single.die new file mode 100644 index 0000000..73cbda8 --- /dev/null +++ b/Software/sie_cg/block_editor/pwm_single.die @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/block_editor/right_shift.die b/Software/sie_cg/block_editor/right_shift.die new file mode 100644 index 0000000..0f2fd90 --- /dev/null +++ b/Software/sie_cg/block_editor/right_shift.die @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/block_editor/test_block2.die b/Software/sie_cg/block_editor/test_block2.die index b9c3df7..8738baa 100644 --- a/Software/sie_cg/block_editor/test_block2.die +++ b/Software/sie_cg/block_editor/test_block2.die @@ -1,15 +1,15 @@ - - - + + + - - + + - + diff --git a/Software/sie_cg/block_editor/timer.die b/Software/sie_cg/block_editor/timer.die new file mode 100644 index 0000000..03f021f --- /dev/null +++ b/Software/sie_cg/block_editor/timer.die @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/block_editor/while.die b/Software/sie_cg/block_editor/while.die new file mode 100644 index 0000000..81ef45d --- /dev/null +++ b/Software/sie_cg/block_editor/while.die @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/diagramscene.cpp b/Software/sie_cg/diagramscene.cpp index 82582fe..92805e5 100644 --- a/Software/sie_cg/diagramscene.cpp +++ b/Software/sie_cg/diagramscene.cpp @@ -176,8 +176,8 @@ void DiagramScene::doSnapToGrid(QGraphicsSceneMouseEvent *mouseEvent) { if(snapToGrid){ mouseEvent->setScenePos(QPointF( - int(mouseEvent->scenePos().x()/myGrid)*myGrid, - int(mouseEvent->scenePos().y()/myGrid)*myGrid + round(mouseEvent->scenePos().x()/myGrid)*myGrid, + round(mouseEvent->scenePos().y()/myGrid)*myGrid )); } } @@ -190,7 +190,7 @@ void DiagramScene::mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent) line->setLine(newLine); } else if (myMode == MoveItem) { QGraphicsScene::mouseMoveEvent(mouseEvent); - } + } } void DiagramScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *mouseEvent) @@ -277,6 +277,10 @@ QDomDocument DiagramScene::toXmlFormat() QDomElement diagram = document.createElement("Diagram"); document.appendChild(diagram); + QDomElement test = document.createElement("Test"); + test.text().fromAscii("TEXT HERE"); + document.appendChild(test); + //Lists of items QList Items; QList Arrows; diff --git a/Software/sie_cg/diagramscene.pro.user b/Software/sie_cg/diagramscene.pro.user index d1afe0c..ff43fba 100644 --- a/Software/sie_cg/diagramscene.pro.user +++ b/Software/sie_cg/diagramscene.pro.user @@ -76,7 +76,7 @@ Debug - DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-MI4KrAyPP5,guid=5c5c5e6146195c74b6ad266d4cc07afd + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-bm3IFDvHlY,guid=a9cadece3d5adbab4e7ecc664cc367c4 DEFAULTS_PATH=/usr/share/gconf/gnome.default.path DESKTOP_SESSION=gnome DISPLAY=:0.0 @@ -84,12 +84,11 @@ GDM_KEYBOARD_LAYOUT=es GDM_LANG=en_US.utf8 GNOME_DESKTOP_SESSION_ID=this-is-deprecated - GNOME_KEYRING_CONTROL=/tmp/keyring-CFAuJK - GNOME_KEYRING_PID=1516 + GNOME_KEYRING_CONTROL=/tmp/keyring-EOe3re + GNOME_KEYRING_PID=1591 GTK_MODULES=canberra-gtk-module HOME=/home/juan64bits LANG=en_US.utf8 - LANGUAGE= LD_LIBRARY_PATH=/usr/lib/qtcreator LOGNAME=juan64bits MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path @@ -97,20 +96,20 @@ PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games PWD=/home/juan64bits QTDIR=/usr/share/qt4 - SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1534,unix/Maximus:/tmp/.ICE-unix/1534 + SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1609,unix/Maximus:/tmp/.ICE-unix/1609 SHELL=/bin/bash SPEECHD_PORT=7560 - SSH_AGENT_PID=1570 - SSH_AUTH_SOCK=/tmp/keyring-CFAuJK/ssh + SSH_AGENT_PID=1645 + SSH_AUTH_SOCK=/tmp/keyring-EOe3re/ssh USER=juan64bits USERNAME=juan64bits - XAUTHORITY=/var/run/gdm/auth-for-juan64bits-V4ry7M/database + XAUTHORITY=/var/run/gdm/auth-for-juan64bits-XFOps8/database XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/ - XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1287682812.550485-1725059380 + XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1287874500.2500-279079160 - /home/juan64bits/QT/diagramscene/diagramscene.pro + /home/juan64bits/QT/sie_cg/diagramscene.pro -spec linux-g++ -r @@ -118,7 +117,7 @@ /usr/bin/qmake-qt4 false - /home/juan64bits/QT/diagramscene + /home/juan64bits/QT/sie_cg @@ -126,7 +125,7 @@ Debug - DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-MI4KrAyPP5,guid=5c5c5e6146195c74b6ad266d4cc07afd + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-bm3IFDvHlY,guid=a9cadece3d5adbab4e7ecc664cc367c4 DEFAULTS_PATH=/usr/share/gconf/gnome.default.path DESKTOP_SESSION=gnome DISPLAY=:0.0 @@ -134,12 +133,11 @@ GDM_KEYBOARD_LAYOUT=es GDM_LANG=en_US.utf8 GNOME_DESKTOP_SESSION_ID=this-is-deprecated - GNOME_KEYRING_CONTROL=/tmp/keyring-CFAuJK - GNOME_KEYRING_PID=1516 + GNOME_KEYRING_CONTROL=/tmp/keyring-EOe3re + GNOME_KEYRING_PID=1591 GTK_MODULES=canberra-gtk-module HOME=/home/juan64bits LANG=en_US.utf8 - LANGUAGE= LD_LIBRARY_PATH=/usr/lib/qtcreator LOGNAME=juan64bits MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path @@ -147,17 +145,17 @@ PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games PWD=/home/juan64bits QTDIR=/usr/share/qt4 - SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1534,unix/Maximus:/tmp/.ICE-unix/1534 + SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1609,unix/Maximus:/tmp/.ICE-unix/1609 SHELL=/bin/bash SPEECHD_PORT=7560 - SSH_AGENT_PID=1570 - SSH_AUTH_SOCK=/tmp/keyring-CFAuJK/ssh + SSH_AGENT_PID=1645 + SSH_AUTH_SOCK=/tmp/keyring-EOe3re/ssh USER=juan64bits USERNAME=juan64bits - XAUTHORITY=/var/run/gdm/auth-for-juan64bits-V4ry7M/database + XAUTHORITY=/var/run/gdm/auth-for-juan64bits-XFOps8/database XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/ - XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1287682812.550485-1725059380 + XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1287874500.2500-279079160 false @@ -165,7 +163,7 @@ /usr/bin/make true - /home/juan64bits/QT/diagramscene + /home/juan64bits/QT/sie_cg diff --git a/Software/sie_cg/mainwindow.cpp b/Software/sie_cg/mainwindow.cpp index ccd9f0c..ce15e25 100644 --- a/Software/sie_cg/mainwindow.cpp +++ b/Software/sie_cg/mainwindow.cpp @@ -374,7 +374,7 @@ void MainWindow::createToolBox() toolBox = new QToolBox; toolBox->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Ignored)); toolBox->setMinimumWidth(itemWidget->sizeHint().width()); - toolBox->addItem(itemWidget, tr("Basic Flowchart Shapes")); + toolBox->addItem(itemWidget, tr("Basic blocks")); //toolBox->addItem(backgroundWidget, tr("Backgrounds")); //Add tool box to window @@ -896,7 +896,7 @@ void MainWindow::editLibPath() QList selected = libUi->listLib->selectedItems(); if(selected.count()>0) { - callexternapp("block_editor/blockeditor",selected.at(0)->text()); + callexternapp("block_editor/blockeditor",selected.at(0)->text()); } } diff --git a/Software/sie_cg/mainwindow.h b/Software/sie_cg/mainwindow.h index 1503f97..e685896 100644 --- a/Software/sie_cg/mainwindow.h +++ b/Software/sie_cg/mainwindow.h @@ -212,8 +212,8 @@ public: { QProcess lnexternapp; lnexternapp.start(QString("%1 %2").arg(execFile).arg(execParm)); - lnexternapp.waitForFinished(-1); - retnValu = QString(lnexternapp.readAll()); + //lnexternapp.waitForFinished(-1); + //retnValu = QString(lnexternapp.readAll()); } }; diff --git a/Software/sie_cg/test.sie b/Software/sie_cg/test.sie index ae0c6b0..c12b3a0 100644 --- a/Software/sie_cg/test.sie +++ b/Software/sie_cg/test.sie @@ -7,35 +7,53 @@ Arrows depend of items, and items depend of libraries!!!! --> + + + + + + + - - - - + - + - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + diff --git a/Software/sie_cg/test1.png b/Software/sie_cg/test1.png new file mode 100644 index 0000000..3c92dc9 Binary files /dev/null and b/Software/sie_cg/test1.png differ