From d2ae736764ff6b0852d5d64e0e5d185e9055e7ca Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Mon, 29 Jan 2018 23:03:40 +0200 Subject: [PATCH 1/3] fix: ArduiPi_OLED wants -li2c /usr/local/lib/libArduiPi_OLED.so: undefined reference to `i2c_smbus_write_i2c_block_data' /usr/local/lib/libArduiPi_OLED.so: undefined reference to `i2c_smbus_write_word_data' /usr/local/lib/libArduiPi_OLED.so: undefined reference to `i2c_smbus_write_byte_data' collect2: error: ld returned 1 exit status --- Makefile.Pi.OLED | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.Pi.OLED b/Makefile.Pi.OLED index 1845bc2..4cf1b2e 100644 --- a/Makefile.Pi.OLED +++ b/Makefile.Pi.OLED @@ -3,7 +3,7 @@ CC = gcc CXX = g++ CFLAGS = -g -O3 -Wall -std=c++0x -pthread -DOLED -I/usr/local/include -LIBS = -lArduiPi_OLED -lpthread +LIBS = -lArduiPi_OLED -li2c -lpthread LDFLAGS = -g -L/usr/local/lib OBJECTS = \ From b694f85461e789f98cff5a65fd32176da3e3e1ab Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Mon, 29 Jan 2018 23:08:48 +0000 Subject: [PATCH 2/3] Remove quotes from config values if found. --- Conf.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Conf.cpp b/Conf.cpp index dd12307..5afec64 100644 --- a/Conf.cpp +++ b/Conf.cpp @@ -273,7 +273,14 @@ bool CConf::read() char* value = ::strtok(NULL, "\r\n"); if (value == NULL) continue; - + + // Remove quotes from the value + size_t len = ::strlen(value); + if (len > 1U && *value == '"' && value[len - 1U] == '"') { + value[len - 1U] = '\0'; + value++; + } + if (section == SECTION_GENERAL) { if (::strcmp(key, "Callsign") == 0) { // Convert the callsign to upper case From 63a2ea330d2bf08783f5d2b81f42b832952c7d97 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 31 Jan 2018 18:16:31 +0000 Subject: [PATCH 3/3] Disable the jitter buffer. --- DMRNetwork.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DMRNetwork.cpp b/DMRNetwork.cpp index d296b57..51843db 100644 --- a/DMRNetwork.cpp +++ b/DMRNetwork.cpp @@ -498,6 +498,9 @@ void CDMRNetwork::receiveData(const unsigned char* data, unsigned int length) if (slotNo == 2U && !m_slot2) return; + m_jitterBuffers[slotNo]->appendData(data, length); + + /* unsigned char dataType = data[15U] & 0x3FU; if (dataType == (0x20U | DT_CSBK) || dataType == (0x20U | DT_DATA_HEADER) || @@ -511,6 +514,7 @@ void CDMRNetwork::receiveData(const unsigned char* data, unsigned int length) unsigned char seqNo = data[4U]; m_jitterBuffers[slotNo]->addData(data, length, seqNo); } + */ } bool CDMRNetwork::writeLogin()