i can not run the Jack application . i have compiling and running the application as follows from this >> http://macpod.net/electronics/lasershark/lasershark_usage_linux.php
but it don't work can you please help me .
Hi Wan-anong,
What problem are you encountering specifically?
How do you plan to use the jack application too? I ask as there may be easier ways to accomplish your goal
i plan to use galvanometer mirror and use lasershark to control it . i read your article using openlase and when i compile lasershark jack host application to receives data from OpenLase-based and transmits data to the Lasershark over USB . i do the following that you give but it's not work for me and i have no idea what wrong. can you please help me with this.
We could not run our laser even though we try to follow your instruction carefully
Compiling and Using the Lasershark Jack Host Application (for use with OpenLase):
this happen after we tryed to make it.....
iids@iids-X450CA:~/Desktop/lasershark_hostapp$ make
gcc -Wall -o lasershark_twostep lasershark_twostep.c lasersharklib/lasershark_uart_bridge_lib.c \
twosteplib/ls_ub_twostep_lib.c twosteplib/twostep_host_lib.c \
twosteplib/twostep_common_lib.c `pkg-config --libs --cflags libusb-1.0`
lasershark_twostep.c: In function ‘main’:
lasershark_twostep.c:301:5: warning: ‘memset’ used with constant zero length parameter; this could be due to transposed parameters [-Wmemset-transposed-args]
memset(lasershark_serialnum, lasershark_serialnum_len, 0);
^
In file included from twosteplib/ls_ub_twostep_lib.h:27:0,
from lasershark_twostep.c:31:
lasershark_twostep.c: At top level:
twosteplib/twostep_common_lib.h:162:13: warning: inline function ‘twostep_verify_start_token’ declared but never defined
inline bool twostep_verify_start_token(uint8_t *buf);
^
twosteplib/twostep_common_lib.h:161:13: warning: inline function ‘twostep_insert_start_token’ declared but never defined
inline void twostep_insert_start_token(uint8_t *buf);
^
In file included from twosteplib/ls_ub_twostep_lib.h:27:0,
from twosteplib/ls_ub_twostep_lib.c:22:
twosteplib/twostep_common_lib.h:162:13: warning: inline function ‘twostep_verify_start_token’ declared but never defined
inline bool twostep_verify_start_token(uint8_t *buf);
^
twosteplib/twostep_common_lib.h:161:13: warning: inline function ‘twostep_insert_start_token’ declared but never defined
inline void twostep_insert_start_token(uint8_t *buf);
^
In file included from twosteplib/twostep_host_lib.h:27:0,
from twosteplib/twostep_host_lib.c:22:
twosteplib/twostep_common_lib.h:162:13: warning: inline function ‘twostep_verify_start_token’ declared but never defined
inline bool twostep_verify_start_token(uint8_t *buf);
^
twosteplib/twostep_common_lib.h:161:13: warning: inline function ‘twostep_insert_start_token’ declared but never defined
inline void twostep_insert_start_token(uint8_t *buf);
^
/tmp/ccmO9wSs.o: In function `twostep_cmd_set_steps':
twostep_host_lib.c:(.text+0x4d): undefined reference to `twostep_insert_start_token'
/tmp/ccmO9wSs.o: In function `twostep_cmd_set_safe_steps':
twostep_host_lib.c:(.text+0xd3): undefined reference to `twostep_insert_start_token'
/tmp/ccmO9wSs.o: In function `twostep_cmd_set_step_until_switch':
twostep_host_lib.c:(.text+0x156): undefined reference to `twostep_insert_start_token'
/tmp/ccmO9wSs.o: In function `twostep_cmd_start':
twostep_host_lib.c:(.text+0x1be): undefined reference to `twostep_insert_start_token'
/tmp/ccmO9wSs.o: In function `twostep_cmd_stop':
twostep_host_lib.c:(.text+0x226): undefined reference to `twostep_insert_start_token'
/tmp/ccmO9wSs.o:twostep_host_lib.c:(.text+0x28e): more undefined references to `twostep_insert_start_token' follow
/tmp/ccLUrsBM.o: In function `twostep_resp_valid':
twostep_common_lib.c:(.text+0x303): undefined reference to `twostep_verify_start_token'
collect2: error: ld returned 1 exit status
Makefile:41: recipe for target 'lasershark_tw
It looks like you are missing twostep_common_lib.h and twostep_common_lib.c . Did you remember to initialize and checkout the github submodules?
cd ~/Desktop
git clone https://github.com/macpod/lasershark_hostapp.git cd lasershark_hostapp
git submodule init
git submodule update
i did it but it still has the same result :'(
It looks like something changed with gcc and I'll need to update the code to have it compile.
In the meantime in the Makefile you can remove "lasershark_twostep" from the following line and run make again. This should build everything fine:
all: lasershark_jack lasershark_stdin lasershark_stdin_circlemaker lasershark_stdin_displayimage lasershark_twostep
I'll try and fix this gcc issue this weekend but since you probably don't have a twostep board the result likely won't matter much for you
edit: I have removed the inlines and corrected some code that was throwing warning too as a bonus :)