git://git.jankratochvil.net
/
lptgpib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f5680bf
)
Port inicializovat jenom, kdyz to je opravdu potreba.
author
Jan Kratochvil
<jan.kratochvil@redhat.com>
Wed, 26 Jun 2013 15:40:04 +0000
(17:40 +0200)
committer
Jan Kratochvil
<jan.kratochvil@redhat.com>
Wed, 26 Jun 2013 15:40:04 +0000
(17:40 +0200)
terminal.c
patch
|
blob
|
history
diff --git
a/terminal.c
b/terminal.c
index
94f671a
..
af3fa7a
100644
(file)
--- a/
terminal.c
+++ b/
terminal.c
@@
-25,14
+25,14
@@
int main(int argc,char **argv) {
for (;;) {
// GPIB -> obrazovka
for (;;) {
// GPIB -> obrazovka
- if (init)
+ if (init)
{
fprintf(stderr,"Inicializuji port... ");
fprintf(stderr,"Inicializuji port... ");
- lptgpib_command(UNL);
- lptgpib_command(MLA+0);
- lptgpib_command(MTA+zdroj_adresa);
- if (init)
+ lptgpib_command(UNL);
+ lptgpib_command(MLA+0);
+ lptgpib_command(MTA+zdroj_adresa);
fprintf(stderr,"hotovo.\n");
fprintf(stderr,"hotovo.\n");
- init=0;
+ init=0;
+ }
put_control(TRI | NDAC); /* clear NRFD */
usleep(1000000/10);
if (get_control()&DAV) { /* wait for DAV */
put_control(TRI | NDAC); /* clear NRFD */
usleep(1000000/10);
if (get_control()&DAV) { /* wait for DAV */
@@
-63,6
+63,7
@@
int main(int argc,char **argv) {
fprintf(stderr,"zapisuji radek: %s\n",str);
lptgpib_write(zdroj_adresa,str);
fprintf(stderr,"zapsan radek.\n");
fprintf(stderr,"zapisuji radek: %s\n",str);
lptgpib_write(zdroj_adresa,str);
fprintf(stderr,"zapsan radek.\n");
+ init=1;
}
}
}
}