xrf dashboard

pull/1/head
Tom Early 6 years ago
parent fccec9c81a
commit 1e80dd58cd

@ -1,5 +1,12 @@
#copyright(C) 2020 by Thomas A. Early, N7TAE #copyright(C) 2020 by Thomas A. Early, N7TAE
#################################################################
# Here is the only things you might need to change
ip = 127.0.0.1
# set to true for debugging support
debug = false
#################################################################
# If you are going to change this path, you will # If you are going to change this path, you will
# need to update the systemd service script # need to update the systemd service script
BINDIR = /usr/local/bin BINDIR = /usr/local/bin
@ -10,10 +17,13 @@ GCC=g++
#DEBUG=true #DEBUG=true
CFLAGS = -W -MMD -MD -std=c++11 CFLAGS = -W -MMD -MD -std=c++11
ifdef DEBUG
ifeq ($(debug), true)
CFLAGS+=-ggdb3 CFLAGS+=-ggdb3
endif endif
CFLAGS += -DIP_ADDR=\"$(ip)\"
LDFLAGS = -pthread LDFLAGS = -pthread
SRCS = cagc.cpp cbuffer.cpp cfirfilter.cpp cip.cpp csignalprocessor.cpp cusb3003hrinterface.cpp cvocodecchannel.cpp cvoicepacket.cpp cambepacket.cpp ccallsign.cpp cfixedgain.cpp cpacket.cpp cstream.cpp cusb3000interface.cpp cusb3003interface.cpp cvocodecinterface.cpp main.cpp cambeserver.cpp ccontroller.cpp cftdidevicedescr.cpp cpacketqueue.cpp ctimepoint.cpp cusb3003df2etinterface.cpp cusb3xxxinterface.cpp cvocodecs.cpp cudpsocket.cpp SRCS = cagc.cpp cbuffer.cpp cfirfilter.cpp cip.cpp csignalprocessor.cpp cusb3003hrinterface.cpp cvocodecchannel.cpp cvoicepacket.cpp cambepacket.cpp ccallsign.cpp cfixedgain.cpp cpacket.cpp cstream.cpp cusb3000interface.cpp cusb3003interface.cpp cvocodecinterface.cpp main.cpp cambeserver.cpp ccontroller.cpp cftdidevicedescr.cpp cpacketqueue.cpp ctimepoint.cpp cusb3003df2etinterface.cpp cusb3xxxinterface.cpp cvocodecs.cpp cudpsocket.cpp

@ -32,20 +32,14 @@
//////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////
// function declaration // function declaration
#ifndef IP_ADDR
#define IP_ADDR "127.0.0.1"
#endif
int main(int argc, const char * argv[]) int main()
{ {
// check arguments
if ( argc != 2 )
{
std::cout << "Usage: ambed ip" << std::endl;
std::cout << "example: ambed 192.168.178.212" << std::endl;
return 1;
}
// initialize ambeserver // initialize ambeserver
g_AmbeServer.SetListenIp(argv[1]); g_AmbeServer.SetListenIp(IP_ADDR);
// and let it run // and let it run
std::cout << "Starting AMBEd " << VERSION_MAJOR << "." << VERSION_MINOR << "." << VERSION_REVISION << std::endl << std::endl; std::cout << "Starting AMBEd " << VERSION_MAJOR << "." << VERSION_MINOR << "." << VERSION_REVISION << std::endl << std::endl;

@ -84,9 +84,9 @@ for ($i=0;$i<$Reflector->PeerCount();$i++) {
if ($count > 1) { if ($count > 1) {
if (1 == substr_count($ipstr, "::")) { $ipstr = str_replace("::", str_repeat(":", 9 - $count), $ipstr); } if (1 == substr_count($ipstr, "::")) { $ipstr = str_replace("::", str_repeat(":", 9 - $count), $ipstr); }
if (7 == substr_count($ipstr, ":")) { if (7 == substr_count($ipstr, ":")) {
echo $MC.':'.$MC.':'.$MC.':'.$MC; echo $MC.':'.$MC.':'.$MC.':'.$MC.':'.$MC.':'.$MC;
$Bytes = explode(":", $ipstr); $Bytes = explode(":", $ipstr);
for( $k=4; $k<8; $k++) { echo (0==strlen($Bytes[$k])) ? ':0' : ':'.$Bytes[$k]; } for( $k=6; $k<8; $k++) { echo (0==strlen($Bytes[$k])) ? ':0' : ':'.$Bytes[$k]; }
} }
} }
} }

@ -134,7 +134,7 @@ clean :
-include $(DEPS) -include $(DEPS)
install : $(EXE).blacklist $(EXE).whitelist $(EXE).interlink $(EXE).terminal $(EXE).service $(EXE) install :
ln -s $(shell pwd)/$(EXE).blacklist $(CFGDIR)/$(EXE).blacklist ln -s $(shell pwd)/$(EXE).blacklist $(CFGDIR)/$(EXE).blacklist
ln -s $(shell pwd)/$(EXE).whitelist $(CFGDIR)/$(EXE).whitelist ln -s $(shell pwd)/$(EXE).whitelist $(CFGDIR)/$(EXE).whitelist
ln -s $(shell pwd)/$(EXE).interlink $(CFGDIR)/$(EXE).interlink ln -s $(shell pwd)/$(EXE).interlink $(CFGDIR)/$(EXE).interlink
@ -153,7 +153,7 @@ uninstall :
rm -f $(CFGDIR)/$(EXE).whitelist rm -f $(CFGDIR)/$(EXE).whitelist
rm -f $(CFGDIR)/$(EXE).interlink rm -f $(CFGDIR)/$(EXE).interlink
rm -f $(CFGDIR)/$(EXE).terminal rm -f $(CFGDIR)/$(EXE).terminal
rm -r xlxd xrfd rm -rf xlxd xrfd
systemctl stop $(EXE).service systemctl stop $(EXE).service
rm -f $(CFGDIR)/dmrid.dat rm -f $(CFGDIR)/dmrid.dat
systemctl disable $(EXE).service systemctl disable $(EXE).service

Loading…
Cancel
Save

Powered by TurnKey Linux.