Commit 9128b312 authored by Pavel Vaynerman's avatar Pavel Vaynerman

minor fixes in io-utilities

parent 3acd88eb
noinst_PROGRAMS = test
noinst_PROGRAMS = test
test_LDADD = $(top_builddir)/lib/libUniSet.la
test_CXXFLAGS = -I$(top_builddir)/include
test_SOURCES = TestGen_SK.cc TestGen.cc TestGen-main.cc
GENERATED=TestGen_SK.h TestGen_SK.cc TestGen-main.cc
......
......@@ -3,7 +3,7 @@
Name: libuniset
Version: 0.97
Release: eter2
Release: eter3
Summary: UniSet - library for building distributed industrial control systems
License: GPL
Group: Development/C++
......@@ -91,7 +91,7 @@ Libraries needed to develop for uniset extensions
%configure --disable-docs --disable-static
%endif
%make_build
%make
%install
%makeinstall_std
......
......@@ -158,7 +158,7 @@ int main(int argc, char* argv[])
exit(EXIT_FAILURE);
}
insn_config(card,subdev,chan,100,range,aref);
// insn_config(card,subdev,chan,100,range,aref);
int fd=open("/dev/stdin",O_NONBLOCK | O_RDONLY );
helpPrint();
......@@ -171,7 +171,7 @@ int main(int argc, char* argv[])
while(1)
{
if(comedi_data_read(card, subdev, chan, range, AREF_GROUND, &data) < 0)
if(comedi_data_read(card, subdev, chan, range, aref, &data) < 0)
{
fprintf(stderr, "can't read from channel %d\n",chan);
exit(EXIT_FAILURE);
......@@ -286,7 +286,7 @@ void insn_config( comedi_t* card, int subdev, int channel, lsampl_t iotype, int
insn.chanspec = CR_PACK(channel,range,aref);
if( comedi_do_insn(card,&insn) < 0 )
{
fprintf(stderr, "can`t configure (AIO) subdev=%d channel=%d type=%d",subdev,channel,iotype);
fprintf(stderr, "can`t configure (AIO) subdev=%d channel=%d type=%d\n",subdev,channel,iotype);
exit(EXIT_FAILURE);
}
}
......
......@@ -255,7 +255,7 @@ int main(int argc, char* argv[])
if( autoconf )
insn_config(card, subdev,chan[k],100,range,aref);
int ret = comedi_data_read(card, subdev, chan[k], range, AREF_GROUND, &data);
int ret = comedi_data_read(card, subdev, chan[k], range, aref, &data);
if( ret < 0)
{
fprintf(stderr, "can't read from channel %d: (%d) %s\n",chan[k],ret,strerror(ret));
......@@ -274,7 +274,7 @@ int main(int argc, char* argv[])
if( autoconf )
insn_config(card,subdev,chan[k],101,range,aref);
int ret = comedi_data_write(card, subdev, chan[k], range, AREF_GROUND, val);
int ret = comedi_data_write(card, subdev, chan[k], range, aref, val);
if( ret < 0)
{
fprintf(stderr, "can't write to channel %d: (%d) %s\n",chan[k],ret,strerror(ret));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment