Release 0.8.9

This commit is contained in:
Matthias Toussaint 2014-04-12 09:56:46 +01:00 committed by Joel Holdsworth
parent 9b295049d0
commit bc0aa0f745
14 changed files with 361 additions and 64 deletions

View File

@ -1,3 +1,7 @@
19/08/2007 0.8.9
- Added Voltcraft M-3610D
- Added Iso-Tech IDM 73
19/11/2006 0.8.8
- Make it compile with gcc 4.1
- Added Digitech QM1538

11
WISHLIST Normal file
View File

@ -0,0 +1,11 @@
- fix Digitek DT 4000ZC (nearly compatible with VC820)
jacob@wiersma-online.de
- check printing
- fix import/export
- QM 1538 vik.olliver@uiactive.com
- Presets for Voltcraft M-4650CR
1200,7,n,2
Display 4 1/2
Protokoll: 14 bytes ascii, continuous
- autoscrolling

View File

@ -1,6 +1,6 @@
#############################################################################
# Makefile for building: ../bin/qtdmm
# Generated by qmake (1.07a) (Qt 3.3.4) on: Fri Apr 29 19:55:26 2005
# Generated by qmake (1.07a) (Qt 3.3.5) on: Sun Aug 19 20:18:40 2007
# Project: src.pro
# Template: app
# Command: $(QMAKE) -o Makefile src.pro
@ -12,14 +12,14 @@ CC = gcc
CXX = g++
LEX = flex
YACC = yacc
CFLAGS = -pipe -O2 -fmessage-length=0 -Wall -g -DUSE_LIB64_PATHES -Wall -W -O2 -fmessage-length=0 -Wall -g -DUSE_LIB64_PATHES -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
CXXFLAGS = -pipe -O2 -fmessage-length=0 -Wall -g -DUSE_LIB64_PATHES -Wall -W -O2 -fmessage-length=0 -Wall -g -DUSE_LIB64_PATHES -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
CFLAGS = -pipe -O2 -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -fno-strict-aliasing -Wall -W -O2 -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -fno-strict-aliasing -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
CXXFLAGS = -pipe -O2 -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -fno-strict-aliasing -Wall -W -O2 -march=i586 -mtune=i686 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -fno-strict-aliasing -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
LEXFLAGS =
YACCFLAGS= -d
INCPATH = -I/usr/lib/qt3/mkspecs/default -I. -I. -Imoc -Ixpm -I/usr/include -I$(QTDIR)/include -Imoc/
LINK = g++
LFLAGS =
LIBS = $(SUBLIBS) -L/usr/lib64/ -L$(QTDIR)/lib64/ -L/usr/X11R6/lib64/ -lqt-mt -lXext -lX11 -lm -lpthread
LIBS = $(SUBLIBS) -L/usr/lib/ -L$(QTDIR)/lib/ -L/usr/X11R6/lib/ -lqt-mt -lXext -lX11 -lm -lpthread
AR = ar cqs
RANLIB =
MOC = $(QTDIR)/bin/moc
@ -310,7 +310,6 @@ tmp/configdlg.o: configdlg.cpp configdlg.h \
dmmgraph.h \
readevent.h \
uidmmprefs.h \
prefwidget.h \
uiexecuteprefs.h \
uigraphprefs.h \
uiguiprefs.h \
@ -339,8 +338,7 @@ tmp/dmmgraph.o: dmmgraph.cpp dmmgraph.h
tmp/dmmprefs.o: dmmprefs.cpp dmmprefs.h \
simplecfg.h \
uidmmprefs.h \
readevent.h \
prefwidget.h
readevent.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/dmmprefs.o dmmprefs.cpp
tmp/engnumbervalidator.o: engnumbervalidator.cpp engnumbervalidator.h
@ -349,30 +347,26 @@ tmp/engnumbervalidator.o: engnumbervalidator.cpp engnumbervalidator.h
tmp/executeprefs.o: executeprefs.cpp engnumbervalidator.h \
executeprefs.h \
simplecfg.h \
uiexecuteprefs.h \
prefwidget.h
uiexecuteprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/executeprefs.o executeprefs.cpp
tmp/graphprefs.o: graphprefs.cpp colorbutton.h \
graphprefs.h \
simplecfg.h \
uigraphprefs.h \
prefwidget.h
uigraphprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/graphprefs.o graphprefs.cpp
tmp/guiprefs.o: guiprefs.cpp colorbutton.h \
guiprefs.h \
simplecfg.h \
uiguiprefs.h \
prefwidget.h
uiguiprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/guiprefs.o guiprefs.cpp
tmp/integrationprefs.o: integrationprefs.cpp colorbutton.h \
engnumbervalidator.h \
integrationprefs.h \
simplecfg.h \
uiintegrationprefs.h \
prefwidget.h
uiintegrationprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/integrationprefs.o integrationprefs.cpp
tmp/main.o: main.cpp mainwin.h
@ -417,15 +411,13 @@ tmp/recorderprefs.o: recorderprefs.cpp engnumbervalidator.h \
recorderprefs.h \
simplecfg.h \
uirecorderprefs.h \
dmmgraph.h \
prefwidget.h
dmmgraph.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/recorderprefs.o recorderprefs.cpp
tmp/scaleprefs.o: scaleprefs.cpp engnumbervalidator.h \
scaleprefs.h \
simplecfg.h \
uiscaleprefs.h \
prefwidget.h
uiscaleprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/scaleprefs.o scaleprefs.cpp
tmp/simplecfg.o: simplecfg.cpp simplecfg.h
@ -461,12 +453,12 @@ uigraphprefs.cpp: uigraphprefs.h uigraphprefs.ui colorbutton.h \
prefwidget.h
$(UIC) uigraphprefs.ui -i uigraphprefs.h -o uigraphprefs.cpp
uiguiprefs.h: uiguiprefs.ui colorbutton.h \
prefwidget.h
uiguiprefs.h: uiguiprefs.ui prefwidget.h \
colorbutton.h
$(UIC) uiguiprefs.ui -o uiguiprefs.h
uiguiprefs.cpp: uiguiprefs.h uiguiprefs.ui colorbutton.h \
prefwidget.h
uiguiprefs.cpp: uiguiprefs.h uiguiprefs.ui prefwidget.h \
colorbutton.h
$(UIC) uiguiprefs.ui -i uiguiprefs.h -o uiguiprefs.cpp
uiintegrationprefs.h: uiintegrationprefs.ui colorbutton.h \
@ -562,24 +554,19 @@ tmp/moc_dmmgraph.o: moc/moc_dmmgraph.cpp dmmgraph.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_dmmgraph.o moc/moc_dmmgraph.cpp
tmp/moc_dmmprefs.o: moc/moc_dmmprefs.cpp dmmprefs.h uidmmprefs.h \
readevent.h \
prefwidget.h
readevent.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_dmmprefs.o moc/moc_dmmprefs.cpp
tmp/moc_executeprefs.o: moc/moc_executeprefs.cpp executeprefs.h uiexecuteprefs.h \
prefwidget.h
tmp/moc_executeprefs.o: moc/moc_executeprefs.cpp executeprefs.h uiexecuteprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_executeprefs.o moc/moc_executeprefs.cpp
tmp/moc_graphprefs.o: moc/moc_graphprefs.cpp graphprefs.h uigraphprefs.h \
prefwidget.h
tmp/moc_graphprefs.o: moc/moc_graphprefs.cpp graphprefs.h uigraphprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_graphprefs.o moc/moc_graphprefs.cpp
tmp/moc_guiprefs.o: moc/moc_guiprefs.cpp guiprefs.h uiguiprefs.h \
prefwidget.h
tmp/moc_guiprefs.o: moc/moc_guiprefs.cpp guiprefs.h uiguiprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_guiprefs.o moc/moc_guiprefs.cpp
tmp/moc_integrationprefs.o: moc/moc_integrationprefs.cpp integrationprefs.h uiintegrationprefs.h \
prefwidget.h
tmp/moc_integrationprefs.o: moc/moc_integrationprefs.cpp integrationprefs.h uiintegrationprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_integrationprefs.o moc/moc_integrationprefs.cpp
tmp/moc_mainwid.o: moc/moc_mainwid.cpp mainwid.h uimainwid.h
@ -598,12 +585,10 @@ tmp/moc_readerthread.o: moc/moc_readerthread.cpp readerthread.h readevent.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_readerthread.o moc/moc_readerthread.cpp
tmp/moc_recorderprefs.o: moc/moc_recorderprefs.cpp recorderprefs.h uirecorderprefs.h \
dmmgraph.h \
prefwidget.h
dmmgraph.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_recorderprefs.o moc/moc_recorderprefs.cpp
tmp/moc_scaleprefs.o: moc/moc_scaleprefs.cpp scaleprefs.h uiscaleprefs.h \
prefwidget.h
tmp/moc_scaleprefs.o: moc/moc_scaleprefs.cpp scaleprefs.h uiscaleprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_scaleprefs.o moc/moc_scaleprefs.cpp
tmp/moc_tipdlg.o: moc/moc_tipdlg.cpp tipdlg.h uitipdlg.h
@ -612,19 +597,19 @@ tmp/moc_tipdlg.o: moc/moc_tipdlg.cpp tipdlg.h uitipdlg.h
tmp/moc_uiconfigdlg.o: moc/moc_uiconfigdlg.cpp uiconfigdlg.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_uiconfigdlg.o moc/moc_uiconfigdlg.cpp
tmp/moc_uidmmprefs.o: moc/moc_uidmmprefs.cpp uidmmprefs.h prefwidget.h
tmp/moc_uidmmprefs.o: moc/moc_uidmmprefs.cpp uidmmprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_uidmmprefs.o moc/moc_uidmmprefs.cpp
tmp/moc_uiexecuteprefs.o: moc/moc_uiexecuteprefs.cpp uiexecuteprefs.h prefwidget.h
tmp/moc_uiexecuteprefs.o: moc/moc_uiexecuteprefs.cpp uiexecuteprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_uiexecuteprefs.o moc/moc_uiexecuteprefs.cpp
tmp/moc_uigraphprefs.o: moc/moc_uigraphprefs.cpp uigraphprefs.h prefwidget.h
tmp/moc_uigraphprefs.o: moc/moc_uigraphprefs.cpp uigraphprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_uigraphprefs.o moc/moc_uigraphprefs.cpp
tmp/moc_uiguiprefs.o: moc/moc_uiguiprefs.cpp uiguiprefs.h prefwidget.h
tmp/moc_uiguiprefs.o: moc/moc_uiguiprefs.cpp uiguiprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_uiguiprefs.o moc/moc_uiguiprefs.cpp
tmp/moc_uiintegrationprefs.o: moc/moc_uiintegrationprefs.cpp uiintegrationprefs.h prefwidget.h
tmp/moc_uiintegrationprefs.o: moc/moc_uiintegrationprefs.cpp uiintegrationprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_uiintegrationprefs.o moc/moc_uiintegrationprefs.cpp
tmp/moc_uimainwid.o: moc/moc_uimainwid.cpp uimainwid.h
@ -633,10 +618,10 @@ tmp/moc_uimainwid.o: moc/moc_uimainwid.cpp uimainwid.h
tmp/moc_uiprintdlg.o: moc/moc_uiprintdlg.cpp uiprintdlg.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_uiprintdlg.o moc/moc_uiprintdlg.cpp
tmp/moc_uirecorderprefs.o: moc/moc_uirecorderprefs.cpp uirecorderprefs.h prefwidget.h
tmp/moc_uirecorderprefs.o: moc/moc_uirecorderprefs.cpp uirecorderprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_uirecorderprefs.o moc/moc_uirecorderprefs.cpp
tmp/moc_uiscaleprefs.o: moc/moc_uiscaleprefs.cpp uiscaleprefs.h prefwidget.h
tmp/moc_uiscaleprefs.o: moc/moc_uiscaleprefs.cpp uiscaleprefs.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tmp/moc_uiscaleprefs.o moc/moc_uiscaleprefs.cpp
tmp/moc_uitipdlg.o: moc/moc_uitipdlg.cpp uitipdlg.h

View File

@ -84,6 +84,7 @@
#include <thirty_bar.xpm>
#include <fourty_bar.xpm>
#include <fifty_bar.xpm>
#include <sixty_bar.xpm>
#include <iostream>
@ -153,6 +154,7 @@ DisplayWid::DisplayWid( QWidget *parent, const char *name ) :
m_bar[3] = createBitmap((const char **)thirty_bar_xpm);
m_bar[4] = createBitmap((const char **)fourty_bar_xpm);
m_bar[5] = createBitmap((const char **)fifty_bar_xpm);
m_bar[6] = createBitmap((const char **)sixty_bar_xpm);
setBackgroundMode( QWidget::NoBackground );
@ -228,6 +230,10 @@ DisplayWid::setDisplayMode( int dm, bool minMax, bool bar, int numValues )
case 7:
m_range = 1000000;
break;
case 8:
m_range = 6000;
break;
}
update();
@ -369,6 +375,11 @@ DisplayWid::paintEvent( QPaintEvent * )
step /= 40;
off = (width()-40*step)/2-2;
}
else if (8 == m_displayMode)
{
step /= 60;
off = (width()-60*step)/2-2;
}
else
{
step /= 50;
@ -424,7 +435,7 @@ void
DisplayWid::drawSmallNumber( QPainter *p, const QString & num )
{
int x = 0;
int offset = (m_displayMode > 1 ? 0 : 1);
int offset = ((m_displayMode > 1) && (m_displayMode != 8) ? 0 : 1);
if (num[offset] == '-')
{
@ -691,10 +702,9 @@ void
DisplayWid::drawBigNumber( QPainter *p, const QString & num )
{
int x = 0;
int offset = (m_displayMode > 1 ? 0 : 1);
int offset = ((m_displayMode > 1) && (m_displayMode != 8) ? 0 : 1);
bool comma = false;
if (num[offset] == '-')
{
p->drawPixmap( x, 0, *m_bigMinus );
@ -801,6 +811,7 @@ DisplayWid::calcNumDigits( int dm )
default:
case 0:
case 1:
case 8:
numDigits = 4;
break;
case 2:

View File

@ -93,7 +93,7 @@ protected:
QBitmap *m_diode;
QBitmap *m_ac;
QBitmap *m_dc;
QBitmap *m_bar[6];
QBitmap *m_bar[7];
QString m_value[4];
QString m_minValue;
QString m_maxValue;

View File

@ -27,6 +27,7 @@
#include <iostream>
#include <qdatetime.h>
#include <math.h>
#define LOG_OUTPUT
@ -207,11 +208,16 @@ DMM::open()
cfsetospeed( &attr, B4800 );
cfsetispeed( &attr, B4800 );
}
else
else if (9600 == m_speed)
{
cfsetospeed( &attr, B9600 );
cfsetispeed( &attr, B9600 );
}
else if (19200 == m_speed)
{
cfsetospeed( &attr, B19200 );
cfsetispeed( &attr, B19200 );
}
m_error = tr( "Error configuring serial port." );
m_error += " ";
@ -332,6 +338,9 @@ DMM::customEvent( QCustomEvent *ev )
case ReadEvent::VC820Continuous:
readVC820Continuous( re );
break;
case ReadEvent::IsoTech:
readIsoTechContinuous( re );
break;
}
}
else
@ -371,6 +380,12 @@ DMM::insertComma( const QString & val, int pos )
return val.left(2+pos) + "." + val.right(4-pos);
}
QString
DMM::insertCommaIT( const QString & val, int pos )
{
return val.left(pos) + "." + val.right(4-pos);
}
void
DMM::setName( const QString & name )
{
@ -696,6 +711,215 @@ void DMM::readM9803RContinuous( ReadEvent *re )
m_error = tr( "Connected" ) + " (" + m_name + " @ " + m_device + ")";
}
void DMM::readIsoTechContinuous(ReadEvent *re)
{
QString tmp = re->string();
QString val = tmp.mid(11,4);
QString unit, special;
const char* tmpstring = re->string();
double d_val = val.toDouble();
// Type of measurement
int typecode = tmpstring[15] & 0xf;
int rangecode = re->string()[10] & 0xf;
int acdccode = re->string()[18] & 0xc;
// printf("ISO: value %s, type: %d, range: %d, ac/dc: %c\n",
// re->string(), typecode, rangecode, acdccode == 0x8 ? 'D': 'A' );
double multiplier = 1.0;
switch(typecode) {
case 0xb:
// voltage
if (rangecode < 4)
rangecode += 5;
rangecode -= 4;
multiplier = pow(10, rangecode - 4);
if (acdccode == 0x8) {
special = "DC";
} else {
special = "AC";
}
switch (rangecode) {
case 0:
val = insertCommaIT(val, 3);
unit = "mV";
break;
case 1:
val = insertCommaIT(val, 1);
unit = "V";
break;
case 2:
val = insertCommaIT(val, 2);
unit = "V";
break;
case 3:
val = insertCommaIT(val, 3);
unit = "V";
break;
case 4:
unit = "V";
break;
default:
// error
;
}
break;
case 0x3:
// resistance
multiplier = pow(10,rangecode - 1);
special = "OH";
switch (rangecode) {
case 0:
val = insertCommaIT(val, 3);
unit = "Ohm";
break;
case 1:
val = insertCommaIT(val, 1);
unit = "kOhm";
break;
case 2:
val = insertCommaIT(val, 2);
unit = "kOhm";
break;
case 3:
val = insertCommaIT(val, 3);
unit = "kOhm";
break;
case 4:
val = insertCommaIT(val, 1);
unit = "MOhm";
break;
case 5:
val = insertCommaIT(val, 2);
unit = "MOhm";
break;
default:
// error
;
}
break;
case 0x1:
// diode
multiplier = 0.001;
val = insertCommaIT(val,1);
unit = "V";
break;
case 0xd:
// current micro
multiplier = pow(10,rangecode - 7);
special = "DC";
if (rangecode == 0) {
val = insertCommaIT(val,3);
unit = "uA";
} else {
val = insertCommaIT(val,1);
unit = "mA";
}
break;
case 0x0:
// current
multiplier = pow(10,rangecode - 3);
unit = "A";
val = insertCommaIT(val,rangecode + 1);
if (acdccode == 0x8) {
special = "DC";
} else {
special = "AC";
}
break;
case 0x2:
// frequency
special = "HZ";
multiplier = pow(10,rangecode);
switch (rangecode) {
case 0x0:
val = insertCommaIT(val, 1);
unit = "kHz";
break;
case 0x1:
val = insertCommaIT(val, 2);
unit = "kHz";
break;
case 0x2:
val = insertCommaIT(val, 3);
unit = "kHz";
break;
case 0x3:
val = insertCommaIT(val, 1);
unit = "MHz";
break;
case 0x4:
val = insertCommaIT(val, 2);
unit = "MHz";
break;
default:
// error
;
}
break;
case 0x6:
// capacity
special = "CA";
multiplier = pow(10, rangecode - 12);
switch (rangecode) {
case 0x0:
val = insertCommaIT(val, 1);
unit = "nF";
break;
case 0x1:
val = insertCommaIT(val, 2);
unit = "nF";
break;
case 0x2:
val = insertCommaIT(val, 3);
unit = "nF";
break;
case 0x3:
val = insertCommaIT(val, 1);
unit = "uF";
break;
case 0x4:
val = insertCommaIT(val, 2);
unit = "uF";
break;
case 0x5:
val = insertCommaIT(val, 3);
unit = "uF";
break;
case 0x6:
val = insertCommaIT(val, 1);
unit = "mF";
break;
default:
// error
;
}
break;
default:
// error - unknown type of measurement
;
}
d_val *= multiplier;
if (re->string()[16] & 0x01) {
val = " 0L";
}
if (re->string()[16] & 0x4) {
d_val = - d_val;
val = " -" + val;
} else {
val = " " + val;
}
// printf ("DVAL: %f\n", d_val);
emit value( d_val, val, unit, special, true, re->id() );
m_error = tr( "Connected" ) + " (" + m_name + " @ " + m_device + ")";
}
void DMM::readVC820Continuous( ReadEvent *re )
{
QString val;

View File

@ -73,10 +73,12 @@ protected:
void timerEvent( QTimerEvent * );
void customEvent( QCustomEvent * );
QString insertComma( const QString &, int );
QString insertCommaIT( const QString &, int );
void readASCII( ReadEvent * );
void readVC820Continuous( ReadEvent * );
void readM9803RContinuous( ReadEvent * );
void readIsoTechContinuous( ReadEvent * );
char *vc820Digit( int );
};

View File

@ -49,6 +49,7 @@ struct DMMInfo dmm_info[] = {
{"Digitech QM1350", 0, 0, 7, 2, 1, 0, 1},
{"Digitech QM1538", 3, 5, 8, 1, 1, 0, 1},
{"ELV M9803R", 5, 4, 7, 1, 1, 1, 1},
{"Iso-Tech IDM 73", 6, 6, 7, 1, 1, 2, 8},
{"MASTECH MAS-345", 0, 0, 7, 2, 1, 0, 1},
{"MASTECH M9803R", 5, 4, 7, 1, 1, 1, 1},
{"McVoice M-345pro", 0, 0, 7, 2, 1, 0, 1},
@ -67,6 +68,7 @@ struct DMMInfo dmm_info[] = {
{"PeakTech 451", 0, 1, 7, 2, 1, 0, 1},
{"Radioshack 22-805 DMM", 0, 0, 7, 2, 1, 0, 1},
{"Radioshack RS22-168A", 1, 0, 7, 2, 1, 0, 1},
{"Voltcraft M-3610D", 1, 0, 7, 2, 1, 0, 1},
{"Voltcraft M-3650D", 1, 0, 7, 2, 1, 0, 1},
{"Voltcraft M-4650CR", 1, 2, 7, 2, 1, 0, 2 },
{"Voltcraft M-4660", 1, 0, 7, 2, 4, 0, 3},
@ -310,6 +312,8 @@ DmmPrefs::speed() const
return 4800;
case 5:
return 9600;
case 6:
return 19200;
}
return 600;

View File

@ -44,7 +44,7 @@
#include <help.xpm>
#include <icon.xpm>
#define VERSION_STRING "0.8.8"
#define VERSION_STRING "0.8.9"
#include <iostream>
@ -337,7 +337,7 @@ MainWin::versionSLOT()
msg += qVersion();
msg += " from Trolltech AS Norway <font color=blue><u>www.trolltech.com</u></font>"
" and is licensed under <b>GPL</b>.</div><br>"
"&copy; 2001-2006 Matthias Toussaint &nbsp;-&nbsp;&nbsp;<font color=blue><u>qtdmm@mtoussaint.de</u></font>"
"&copy; 2001-2007 Matthias Toussaint &nbsp;-&nbsp;&nbsp;<font color=blue><u>qtdmm@mtoussaint.de</u></font>"
"<p><br>The icons (except the DMM icon) have been taken from the KDE project.<p>";
QMessageBox version( tr("QtDMM: Welcome!" ),

View File

@ -179,6 +179,8 @@ ReaderThread::formatLength() const
return 12;
case ReadEvent::VC820Continuous:
return 14;
case ReadEvent::IsoTech:
return 22;
}
return 0;
@ -210,6 +212,10 @@ ReaderThread::readDMM()
{
readPeakTech10();
}
else if (m_format == ReadEvent::IsoTech)
{
readIsoTech();
}
}
bool
@ -244,6 +250,23 @@ ReaderThread::checkFormat()
if ((m_fifo[m_length] & 0xf0) == 0xe0) return true;
//if (m_fifo[(m_length-1+FIFO_LENGTH)%FIFO_LENGTH] & 0xf0 == 0xe0) return true;
}
else if (m_format == ReadEvent::IsoTech && m_length >= 22)
{
for (int i=0; i<11; ++i)
{
if (m_fifo[m_length-22+i] != m_fifo[m_length-22+11+i])
{
return false;
}
}
if (m_fifo[m_length-22+9] != 0x0d ||
m_fifo[m_length-22+10] != 0x0a)
{
return false;
}
return true;
}
return false;
}
@ -277,6 +300,10 @@ ReaderThread::readM9803RContinuous()
{
}
void ReaderThread::readIsoTech()
{
}
void
ReaderThread::readPeakTech10()
{

View File

@ -73,6 +73,7 @@ protected:
void readVoltcraft15Continuous();
void readM9803RContinuous();
void readPeakTech10();
void readIsoTech();
int formatLength() const;
bool checkFormat();

View File

@ -33,7 +33,8 @@ public:
Voltcraft14Continuous,
Voltcraft15Continuous,
M9803RContinuous,
VC820Continuous
VC820Continuous,
IsoTech
};
ReadEvent( char *str, int len, int id, DataFormat df );
@ -45,7 +46,7 @@ public:
int length() const { return m_length; }
private:
char m_str[20];
char m_str[23];
int m_length;
DataFormat m_format;
int m_id;

View File

@ -8,8 +8,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>505</width>
<height>607</height>
<width>534</width>
<height>635</height>
</rect>
</property>
<property name="caption">
@ -250,6 +250,11 @@
<string>9600 baud</string>
</property>
</item>
<item>
<property name="text">
<string>19200 baud</string>
</property>
</item>
<property name="name">
<cstring>baudRate</cstring>
</property>
@ -338,7 +343,7 @@
<cstring>ui_displayLabel</cstring>
</property>
<property name="text">
<string>&amp;Display</string>
<string>&amp;Digits</string>
</property>
<property name="alignment">
<set>AlignVCenter|AlignRight</set>
@ -352,42 +357,47 @@
<widget class="QComboBox" row="2" column="4">
<item>
<property name="text">
<string>3 1/2</string>
<string>2000</string>
</property>
</item>
<item>
<property name="text">
<string>3 3/4</string>
<string>4000</string>
</property>
</item>
<item>
<property name="text">
<string>4 1/2</string>
<string>20000</string>
</property>
</item>
<item>
<property name="text">
<string>4 3/4</string>
<string>50000</string>
</property>
</item>
<item>
<property name="text">
<string>5</string>
<string>100000</string>
</property>
</item>
<item>
<property name="text">
<string>5 1/2</string>
<string>200000</string>
</property>
</item>
<item>
<property name="text">
<string>5 3/4</string>
<string>400000</string>
</property>
</item>
<item>
<property name="text">
<string>6</string>
<string>1000000</string>
</property>
</item>
<item>
<property name="text">
<string>6000</string>
</property>
</item>
<property name="name">
@ -490,6 +500,11 @@
<string>14 bytes binary, continuous (VC820)</string>
</property>
</item>
<item>
<property name="text">
<string>22 bytes ascii, continuous (IsoTech)</string>
</property>
</item>
<property name="name">
<cstring>protocolCombo</cstring>
</property>

12
src/xpm/sixty_bar.xpm Normal file
View File

@ -0,0 +1,12 @@
/* XPM */
static char * sixty_bar_xpm[] = {
"9 7 2 1",
" c None",
". c #000000",
" .. .. ",
". . . .",
". . .",
"... . .",
". . . .",
". . . .",
" .. .. "};