Discussion:
Source code question
Ulrich Oertel
2014-09-09 17:50:48 UTC
Permalink
Hallo all,

I think about an alternative to i1io on the basis of a DIY set
(http://www.makeblock.cc/xy-plotter-robot-kit-v2-0/).

Prerequisite is, of course, my ability to recompile and modify chartread
(Windows). Unfortunately, in the past I only worked with Pascal (Delphi)
and VB .net. In my first attempt to recompile chartread (VS 2013
Express) I got error messages for lines like

sv &= ~inst_stat_savdrd_chart

As I understand
a &= b
is the same as
a = a & b
but I dont understand this "~" operator.

The error message is:
error C2676: Binärer Operator '&=': 'inst_stat_savdrd' definiert diesen
Operator oder eine Konvertierung in einen für den vordefinierten
Operator geeigneten Typ nicht

Any help is highly appreciated!

Thanks in advance

Uli
Graeme Gill
2014-09-09 23:44:02 UTC
Permalink
Post by Ulrich Oertel
I think about an alternative to i1io on the basis of a DIY set
(http://www.makeblock.cc/xy-plotter-robot-kit-v2-0/).
Looks feasible.
Post by Ulrich Oertel
Prerequisite is, of course, my ability to recompile and modify chartread (Windows).
I guess you could do that, although structurally XY instruments are
intended to be implemented in the driver code, and chartread then deals
with them generically. For something like you are proposing (or the io), the
more natural way of adding that support would be as a psudo XY instrument
which is then a shim over the i1Pro driver.
Post by Ulrich Oertel
Unfortunately, in the past I only worked with Pascal (Delphi) and VB .net. In my first
attempt to recompile chartread (VS 2013 Express) I got error messages for lines like
sv &= ~inst_stat_savdrd_chart
Hmm. At least C is 5 x easier than C++ to learn, but porting to a new compile
environment is not fun, and might be an extreme test for a novice in the language.

I haven't tried to compile Argyll in anything beyond VC++10, and I'm guessing
that VS 2013 Express won't install on my XP development machine without
some cunning & effort. So I could suggest that you could probably more easily
compile using MingW, but I know that is not going to be very attractive
for someone used to using Visual Studio.
Post by Ulrich Oertel
but I dont understand this "~" operator.
Binary negate or complement.
Post by Ulrich Oertel
error C2676: Binärer Operator '&=': 'inst_stat_savdrd' definiert diesen Operator oder eine
Konvertierung in einen für den vordefinierten Operator geeigneten Typ nicht
The above message seems to hint at some problem with C++ changes leaking into your
compilation. Are you sure you are compiling the Argyll source as C and not C++ ?

Graeme Gill.
Ulrich Oertel
2014-09-10 18:38:44 UTC
Permalink
Hi Graeme,

thanks for your fast and knowledgeable answer.
Post by Graeme Gill
I guess you could do that, although structurally XY instruments are
intended to be implemented in the driver code, and chartread then deals
with them generically. For something like you are proposing (or the io), the
more natural way of adding that support would be as a psudo XY instrument
which is then a shim over the i1Pro driver.
I have had no idea about that but you convinced me. I know (from your
article "Modifying the i1i0 table for the i1pro2
<http://www.argyllcms.com/doc2/i0mod.html>") that you probably have
implemented the i1io instrument but I did not find that, did you? The
next question is: How to implement such a pseudo i1io, and who will do it?

The program running on the arduino microcontroller can be controlled via
com ports (though it is connected via usb port).

Possibly, cou can create a general (for use of people with different
solutions) pseudo i1io in the driver. This then can call another
program, or dll, which tells the hardware what to do. What do you think?
Post by Graeme Gill
Post by Ulrich Oertel
Unfortunately, in the past I only worked with Pascal (Delphi) and VB .net. In my first
attempt to recompile chartread (VS 2013 Express) I got error messages for lines like
sv &= ~inst_stat_savdrd_chart
Hmm. At least C is 5 x easier than C++ to learn, but porting to a new compile
environment is not fun, and might be an extreme test for a novice in the language.
I haven't tried to compile Argyll in anything beyond VC++10, and I'm guessing
that VS 2013 Express won't install on my XP development machine without
some cunning & effort. So I could suggest that you could probably more easily
compile using MingW, but I know that is not going to be very attractive
for someone used to using Visual Studio.
Today I tried to understand, what I have to do with JAM in order to use
MinGW. However, I must acknowledge that I did not understand that. So,
if there is a possibility to avoid recompilation I would be very happy...
Post by Graeme Gill
Post by Ulrich Oertel
error C2676: BinÀrer Operator '&=': 'inst_stat_savdrd' definiert diesen Operator oder eine
Konvertierung in einen fÃŒr den vordefinierten Operator geeigneten Typ nicht
The above message seems to hint at some problem with C++ changes leaking into your
compilation. Are you sure you are compiling the Argyll source as C and not C++ ?
It was C++ (I did not know that this makes a difference) but the errors
persist when setting it to C. I recognized that the compiler seems to
not accept enum as integer for these binary operations, it has nothing
to do with the "~" operator.

Best regards

Uli

Loading...