Add java, cpp, and python examples
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
EXE=multiCameraServerExample
|
||||
DESTDIR?=/home/pi/
|
||||
|
||||
.PHONY: clean build install
|
||||
|
||||
build: ${EXE}
|
||||
|
||||
install: build
|
||||
cp ${EXE} runCamera ${DESTDIR}
|
||||
|
||||
clean:
|
||||
rm ${EXE} *.o
|
||||
|
||||
${EXE}: main.o
|
||||
${CXX} -o $@ $< -L/usr/local/frc/lib -lcameraserver -lcscore -lntcore -lwpiutil
|
||||
|
||||
.cpp.o:
|
||||
${CXX} -O -c -o $@ -I/usr/local/frc/include $<
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
=======================
|
||||
Building locally on rPi
|
||||
=======================
|
||||
|
||||
1) Run "make"
|
||||
2) Run "make install" (replaces /home/pi/runCamera)
|
||||
3) Run "./runInteractive" in /home/pi or "sudo svc -t /service/camera" to
|
||||
restart service.
|
||||
|
||||
|
||||
===================
|
||||
Building on desktop
|
||||
===================
|
||||
|
||||
One time setup
|
||||
--------------
|
||||
|
||||
Install the Raspbian compiler [1] as well as GNU make.
|
||||
|
||||
[1]: https://github.com/wpilibsuite/raspbian-toolchain/releases
|
||||
|
||||
The lib and include directories from the Pi /usr/local/frc/ directory must
|
||||
be copied to the desktop machine. Edit the Makefile to change
|
||||
/usr/local/frc/lib and /usr/local/frc/include to the local desktop locations.
|
||||
|
||||
Building
|
||||
--------
|
||||
|
||||
1) Run "make CXX=arm-raspbian9-linux-gnueabihf-g++"
|
||||
2) Copy multiCameraServerExample and runCamera to /home/pi on the Pi
|
||||
3) On the Pi, run "./runInteractive" in /home/pi or
|
||||
"sudo svc -t /service/camera" to restart service.
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
echo "Waiting 5 seconds..."
|
||||
sleep 5
|
||||
exec ./multiCameraServerExample
|
||||
Reference in New Issue
Block a user