it compiles!

main
Tom Early 4 years ago
parent a80c6fcc4a
commit 07deaa2a58

1
.gitignore vendored

@ -31,6 +31,7 @@
#files
configure.h
configure.mk
# Executables
tcd

@ -129,9 +129,10 @@ void CController::ReadReflector()
if (reader.Receive(&tcpack, 40)) {
//create a std::shared_ptr to a new packet
auto packet = std::make_shared<CTranscoderPacket>(tcpack);
unsigned int devnum;
switch (packet->GetCodecIn()) {
case ECodecType::dstar:
unsigned int devnum = current_dstar_vocoder / 3;
devnum = current_dstar_vocoder / 3;
//send it to the next available dstar vocoder
dstar_device[devnum]->SendData(current_dstar_vocoder%3, packet->GetDStarData());
//push the packet onto that vocoder's queue
@ -140,7 +141,7 @@ void CController::ReadReflector()
IncrementDStarVocoder();
break;
case ECodecType::dmr:
unsigned int devnum = current_dmr_vocoder / 3;
devnum = current_dmr_vocoder / 3;
//send it to the next avaiable dmr vocoder
dmr_device[devnum]->SendData(current_dmr_vocoder%3, packet->GetDMRData());
//push the packet onto that vocoder's queue

@ -0,0 +1,30 @@
// urfd -- The universal reflector
// Copyright © 2021 Thomas A. Early N7TAE
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <iostream>
#include "Controller.h"
int main()
{
CController controller;
if (controller.Start())
return EXIT_FAILURE;
controller.Stop();
return EXIT_SUCCESS;
}

@ -0,0 +1,49 @@
#Copyright (C) 2021 by Thomas A. Early, N7TAE
include configure.mk
# If you are going to change this path, you will
# need to update the systemd service script
BINDIR = /usr/local/bin
GCC = g++
ifeq ($(debug), true)
CFLAGS = -ggdb3 -W -Werror -Icodec2 -MMD -MD -std=c++11
else
CFLAGS = -W -Werror -Icodec2 -MMD -MD -std=c++11
endif
LDFLAGS = -pthread
SRCS = $(wildcard *.cpp) $(wildcard codec2/*.cpp)
OBJS = $(SRCS:.cpp=.o)
DEPS = $(SRCS:.cpp=.d)
EXE = tcd
$(EXE) : $(OBJS)
$(GCC) $(LDFLAGS) $(OBJS) -o $@
%.o : %.cpp
$(GCC) $(CFLAGS) -c $< -o $@
clean :
$(RM) $(EXE) $(OBJS) $(DEPS)
-include $(DEPS)
# The install and uninstall targets need to be run by root
install : $(EXE)
cp $(EXE) $(BINDIR)
cp ../systemd/$(EXE).service /etc/systemd/system/
systemctl enable $(EXE)
systemctl daemon-reload
systemctl start $(EXE)
uninstall :
systemctl stop $(EXE)
systemctl disable $(EXE)
systemctl daemon-reload
rm -f /etc/systemd/system/$(EXE).service
rm -f $(BINDIR)/$(EXE)
systemctl daemon-reload
Loading…
Cancel
Save

Powered by TurnKey Linux.