conflict resolution

pull/32/head
Piotr Wilkon 2023-08-30 16:38:49 +02:00
commit 46334fd16d
10 zmienionych plików z 123 dodań i 38 usunięć

Wyświetl plik

@ -17,16 +17,16 @@
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.785246917" name="Debug" parent="fr.ac6.managedbuild.config.gnu.cross.exe.debug" postannouncebuildStep="Generating hex and Printing size information:" postbuildStep="arm-none-eabi-objcopy -O ihex &quot;${BuildArtifactFileBaseName}.elf&quot; &quot;${BuildArtifactFileBaseName}.hex&quot; &amp;&amp; arm-none-eabi-size &quot;${BuildArtifactFileName}&quot;">
<folderInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.785246917." name="/" resourcePath="">
<toolChain id="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug.2013979193" name="Ac6 STM32 MCU GCC" superClass="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug">
<option id="fr.ac6.managedbuild.option.gnu.cross.prefix.382830450" name="Prefix" superClass="fr.ac6.managedbuild.option.gnu.cross.prefix" useByScannerDiscovery="false" value="arm-none-eabi-" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.mcu.66405555" name="Mcu" superClass="fr.ac6.managedbuild.option.gnu.cross.mcu" useByScannerDiscovery="false" value="STM32F103C8Tx" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.board.1729153140" name="Board" superClass="fr.ac6.managedbuild.option.gnu.cross.board" useByScannerDiscovery="false" value="F103C8T6_DIGI_USB" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.core.1083960614" name="Core" superClass="fr.ac6.managedbuild.option.gnu.cross.core" useByScannerDiscovery="false" valueType="stringList">
<option id="fr.ac6.managedbuild.option.gnu.cross.prefix.382830450" name="Prefix" superClass="fr.ac6.managedbuild.option.gnu.cross.prefix" value="arm-none-eabi-" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.mcu.66405555" name="Mcu" superClass="fr.ac6.managedbuild.option.gnu.cross.mcu" value="STM32F103C8Tx" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.board.1729153140" name="Board" superClass="fr.ac6.managedbuild.option.gnu.cross.board" value="F103C8T6_DIGI_USB" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.core.1083960614" name="Core" superClass="fr.ac6.managedbuild.option.gnu.cross.core" valueType="stringList">
<listOptionValue builtIn="false" value="ARM Cortex-M3"/>
<listOptionValue builtIn="false" value="CM3"/>
</option>
<option id="fr.ac6.managedbuild.option.gnu.cross.instructionSet.1656935294" name="Instruction Set" superClass="fr.ac6.managedbuild.option.gnu.cross.instructionSet" useByScannerDiscovery="false" value="fr.ac6.managedbuild.option.gnu.cross.instructionSet.thumbII" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.fpu.1493691602" name="Floating point hardware" superClass="fr.ac6.managedbuild.option.gnu.cross.fpu" useByScannerDiscovery="false" value="fr.ac6.managedbuild.option.gnu.cross.fpu.no" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.floatabi.2025609880" name="Floating-point ABI" superClass="fr.ac6.managedbuild.option.gnu.cross.floatabi" useByScannerDiscovery="false" value="fr.ac6.managedbuild.option.gnu.cross.floatabi.soft" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.instructionSet.1656935294" name="Instruction Set" superClass="fr.ac6.managedbuild.option.gnu.cross.instructionSet" value="fr.ac6.managedbuild.option.gnu.cross.instructionSet.thumbII" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.fpu.1493691602" name="Floating point hardware" superClass="fr.ac6.managedbuild.option.gnu.cross.fpu" value="fr.ac6.managedbuild.option.gnu.cross.fpu.no" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.floatabi.2025609880" name="Floating-point ABI" superClass="fr.ac6.managedbuild.option.gnu.cross.floatabi" value="fr.ac6.managedbuild.option.gnu.cross.floatabi.soft" valueType="enumerated"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross.2146232636" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
<builder buildPath="${workspace_loc:/F103C8T6_DIGI_USB}/Debug" id="fr.ac6.managedbuild.builder.gnu.cross.458407908" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="fr.ac6.managedbuild.builder.gnu.cross">
<outputEntries>
@ -77,10 +77,10 @@
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s.314001530" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s"/>
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.949266977" name="MCU GCC Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker">
<option id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.script.100896041" name="Linker Script (-T)" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker.script" useByScannerDiscovery="false" value="../STM32F103C8Tx_FLASH.ld" valueType="string"/>
<option id="gnu.c.link.option.libs.1305202629" name="Libraries (-l)" superClass="gnu.c.link.option.libs" useByScannerDiscovery="false"/>
<option id="gnu.c.link.option.paths.1292687187" name="Library search path (-L)" superClass="gnu.c.link.option.paths" useByScannerDiscovery="false"/>
<option id="gnu.c.link.option.ldflags.2131178816" name="Linker flags" superClass="gnu.c.link.option.ldflags" useByScannerDiscovery="false" value="-specs=nosys.specs -specs=nano.specs" valueType="string"/>
<option id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.script.100896041" name="Linker Script (-T)" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker.script" value="../STM32F103C8Tx_FLASH.ld" valueType="string"/>
<option id="gnu.c.link.option.libs.1305202629" name="Libraries (-l)" superClass="gnu.c.link.option.libs"/>
<option id="gnu.c.link.option.paths.1292687187" name="Library search path (-L)" superClass="gnu.c.link.option.paths"/>
<option id="gnu.c.link.option.ldflags.2131178816" name="Linker flags" superClass="gnu.c.link.option.ldflags" value="-specs=nosys.specs -specs=nano.specs" valueType="string"/>
<option id="gnu.c.link.option.other.623842724" name="Other options (-Xlinker [option])" superClass="gnu.c.link.option.other" useByScannerDiscovery="false"/>
<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.751662654" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
@ -100,7 +100,7 @@
</tool>
<tool id="fr.ac6.managedbuild.tool.gnu.archiver.1989184041" name="MCU GCC Archiver" superClass="fr.ac6.managedbuild.tool.gnu.archiver"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.assembler.1762903833" name="MCU GCC Assembler" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler">
<option id="gnu.both.asm.option.include.paths.1278058431" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" useByScannerDiscovery="false"/>
<option id="gnu.both.asm.option.include.paths.1278058431" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths"/>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.632714311" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.1298773058" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
</tool>
@ -237,6 +237,12 @@
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="F103C8T6_DIGI_USB.fr.ac6.managedbuild.target.gnu.cross.exe.1488070975" name="Executable" projectType="fr.ac6.managedbuild.target.gnu.cross.exe"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="fr.ac6.managedbuild.config.gnu.cross.exe.debug.785246917;fr.ac6.managedbuild.config.gnu.cross.exe.debug.785246917.;fr.ac6.managedbuild.tool.gnu.cross.c.compiler.736856211;fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.1385058365">
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Debug">

Wyświetl plik

@ -79,6 +79,7 @@ void Ax25ClearReceivedFrameBitmap(void);
* @brief Get next received frame (if available)
* @param **dst Pointer to internal buffer
* @param *size Actual frame size
<<<<<<< HEAD
* @param *peak Signak positive peak value in %
* @param *valley Signal negative peak value in %
* @param *level Signal level in %

Wyświetl plik

@ -31,6 +31,11 @@ enum ModemType
MODEM_1200_V23,
MODEM_300,
MODEM_9600,
#ifdef ENABLE_PSK
MODEM_BPSK_1200,
MODEM_QPSK_1200,
#endif
};
enum ModemTxTestMode
@ -53,12 +58,14 @@ extern struct ModemDemodConfig ModemConfig;
enum ModemPrefilter
{
PREFILTER_NONE = 0,
PREFILTER_PREEMPHASIS,
PREFILTER_DEEMPHASIS,
PREFILTER_FLAT,
PREFILTER_NONE,
};
void pushSample(float s);
/**
* @brief Get measured signal level
* @param modem Modem number

Wyświetl plik

@ -32,18 +32,18 @@ const struct Fx25Mode* Fx25GetModeForTag(uint64_t tag);
const struct Fx25Mode* Fx25GetModeForSize(uint16_t size);
/**
* @brief Encode AX.25 packet using FX.25
* @param *buffer Input full AX.25 packets with flags and output FX.25 packet
* @param *mode FEC mode to use
* @brief Encode AX.25 message in FX.25
* @param *buffer AX.25 message (bit-stuffed, with CRC and padding)
* @param *mode FX.25 mode
*/
void Fx25Encode(uint8_t *buffer, const struct Fx25Mode *mode);
/**
* @brief Decode FX.25 packet to AX.25
* @param *buffer Input FX.25 packet and output AX.25 packet
* @param *mode FEC mode to use
* @param *fixed Number of bytes corrected
* @return True on success, false on failure
* @brief Decode/fix FX.25 packet
* @param *buffer Input buffer
* @param *mode FX.25 mode
* @param *fixed Number of bytes fixed
* @return True if message is valid, false if uncorrectable
*/
bool Fx25Decode(uint8_t *buffer, const struct Fx25Mode *mode, uint8_t *fixed);

Wyświetl plik

@ -37,7 +37,7 @@ struct Ax25ProtoConfig Ax25Config;
//frames that are too long are sent as standard AX.25 frames
//Reed-Solomon library needs a bit of memory and the frame buffer must be smaller
//otherwise we run out of RAM
#define FRAME_MAX_SIZE (280) //single frame max length
#define FRAME_MAX_SIZE (265) //single frame max length
#include "fx25.h"
#endif
@ -56,9 +56,9 @@ struct FrameHandle
int8_t peak;
int8_t valley;
uint8_t level;
uint8_t corrected;
#ifdef ENABLE_FX25
struct Fx25Mode *fx25Mode;
uint8_t corrected;
#endif
};
@ -136,7 +136,6 @@ struct RxState
struct Fx25Mode *fx25Mode;
uint64_t tag; //received correlation tag
uint8_t tagBit;
uint8_t corrected;
#endif
};
@ -501,6 +500,7 @@ bool Ax25ReadNextRxFrame(uint8_t **dst, uint16_t *size, int8_t *peak, int8_t *va
#endif
rxFrameBufferFull = false;
rxFrameTail++;
rxFrameTail %= FRAME_MAX_COUNT;
return true;
@ -511,7 +511,6 @@ enum Ax25RxStage Ax25GetRxStage(uint8_t modem)
return rxState[modem].rx;
}
#include <stdio.h>
void Ax25BitParse(uint8_t bit, uint8_t modem)
{
@ -653,6 +652,12 @@ void Ax25BitParse(uint8_t bit, uint8_t modem)
if((rx->rx != RX_STAGE_FX25_FRAME) && (rx->rx != RX_STAGE_FX25_TAG))
{
#else
<<<<<<< HEAD
{
//this condition must not be checked when FX.25 is enabled
//because FX.25 parity bytes and tags contain >= 7 consecutive ones
if((rx->rawData & 0x7F) == 0x7F) //received 7 consecutive ones, this is an error (sometimes called "escape byte")
=======
{
//this condition must not be checked when FX.25 is enabled
//because FX.25 parity bytes and tags contain >= 7 consecutive ones
@ -957,7 +962,7 @@ void Ax25TransmitBuffer(void)
* @brief Start transmission immediately
* @warning Transmission should be initialized using Ax25_transmitBuffer
*/
static void transmitStart(void)
/*static */void transmitStart(void)
{
txCrc = 0xFFFF; //initial CRC value
txStage = TX_STAGE_PREAMBLE;

Wyświetl plik

@ -30,7 +30,11 @@ struct _GeneralConfig GeneralConfig =
.kissMonitor = 0,
};
const char versionString[] = "VP-Digi v. 1.3.0\r\nThe open-source standalone APRS digipeater controller and KISS TNC\r\n";
const char versionString[] = "VP-Digi v. 2.0.0\r\nThe open-source standalone APRS digipeater controller and KISS TNC\r\n"
#ifdef ENABLE_FX25
"with FX.25 support compiled-in\r\n"
#endif
;
static uint64_t pow10i(uint16_t exp)
{

Wyświetl plik

@ -94,7 +94,8 @@ along with VP-DigiConfig. If not, see <http://www.gnu.org/licenses/>.
#define CONFIG_KISSMONITOR 1206
#define CONFIG_DEST 1208
#define CONFIG_ALLOWNONAPRS 1214
#define CONFIG_XXX 1216 //next address (not used)
#define CONFIG_FX25 1216
#define CONFIG_XXX 1218 //next address (not used)
/**
@ -262,6 +263,7 @@ void ConfigWrite(void)
write(CONFIG_PWM_FLAT, ModemConfig.usePWM | (ModemConfig.flatAudioIn << 1));
write(CONFIG_KISSMONITOR, GeneralConfig.kissMonitor);
write(CONFIG_ALLOWNONAPRS, Ax25Config.allowNonAprs);
write(CONFIG_FX25, Ax25Config.fx25 | (Ax25Config.fx25Tx << 1));
write(CONFIG_FLAG, CONFIG_FLAG_WRITTEN);
@ -350,6 +352,9 @@ uint8_t ConfigRead(void)
ModemConfig.flatAudioIn = (t & 2) > 0;
GeneralConfig.kissMonitor = (read(CONFIG_KISSMONITOR) == 1);
Ax25Config.allowNonAprs = (read(CONFIG_ALLOWNONAPRS) == 1);
t = (uint8_t)read(CONFIG_FX25);
Ax25Config.fx25 = t & 1;
Ax25Config.fx25Tx = (t & 2) > 0;
return 1;
}

Wyświetl plik

@ -15,12 +15,14 @@ You should have received a copy of the GNU General Public License
along with VP-Digi. If not, see <http://www.gnu.org/licenses/>.
*/
#include "drivers/systick.h"
#include "drivers/modem.h"
#include "ax25.h"
#include <math.h>
#include <stdlib.h>
#include "common.h"
#include <string.h>
#include "stm32f1xx.h"
/*
@ -68,7 +70,6 @@ along with VP-Digi. If not, see <http://www.gnu.org/licenses/>.
#define PLL300_LOCKED_TUNE 0.74f
#define PLL300_NOT_LOCKED_TUNE 0.50f
#define AMP_TRACKING_ATTACK 0.16f //0.16
#define AMP_TRACKING_DECAY 0.00004f //0.00004
@ -304,7 +305,6 @@ static inline uint8_t scramble(uint8_t in)
/**
* @brief ISR for demodulator
* Called at 9600 Hz by DMA
*/
void DMA1_Channel2_IRQHandler(void) __attribute__ ((interrupt));
void DMA1_Channel2_IRQHandler(void)
@ -352,11 +352,15 @@ void DMA1_Channel2_IRQHandler(void)
if(ModemConfig.modem == MODEM_9600)
{
if(ModemConfig.usePWM)
sample = scrambledSymbol ? 90 : 0;
sample = scrambledSymbol ? 89 : 0;
else
sample = scrambledSymbol ? 15 : 1;
sample = scrambledSymbol ? 15 : 0;
sample = filter(&demodState[0].lpf, sample);
if(sample < 0)
sample = 0;
else if(sample > 15)
sample = 15;
}
else
{
@ -375,7 +379,19 @@ void DMA1_Channel2_IRQHandler(void)
GPIOB->ODR |= (sample << 12); //write sample to 4 oldest bits
}
}
}
void txBit()
{
if(Ax25GetTxBit() == 0) //get next bit and check if it's 0
{
currentSymbol ^= 1; //change symbol - NRZI encoding
}
//if 1, no symbol change
scrambledSymbol = scramble(currentSymbol);
}
/**
* @brief ISR for baudrate generator timer. NRZI encoding is done here.
@ -412,7 +428,7 @@ void DMA1_Channel2_IRQHandler(void)
TIM1->ARR = markStep;
}
}
}
/**
* @brief Demodulate received sample (4x oversampling)
@ -810,12 +826,16 @@ void ModemInit(void)
demodState[1].lpf.taps = sizeof(lpf1200) / sizeof(*lpf1200);
demodState[1].lpf.gainShift = 15;
demodState[0].lpf.coeffs = (int16_t*)lpf1200;
demodState[0].lpf.taps = sizeof(lpf1200) / sizeof(*lpf1200);
demodState[0].lpf.gainShift = 15;
demodState[0].prefilter = PREFILTER_NONE;
#ifdef ENABLE_PSK
if((ModemConfig.modem != MODEM_BPSK_1200) && (ModemConfig.modem != MODEM_QPSK_1200))
{
#endif
if(ModemConfig.flatAudioIn) //when used with flat audio input, use deemphasis and flat modems
{
#ifdef ENABLE_FX25
@ -847,6 +867,13 @@ void ModemInit(void)
markFreq = 1300.f;
spaceFreq = 2100.f;
}
#ifdef ENABLE_PSK
}
else
{
markFreq = 1700.f; //use as center frequency in PSK
}
#endif
TIM2->ARR = 207; //8MHz / 208 =~38400 Hz (4*9600 Hz for 4x oversampling)
}

Wyświetl plik

@ -136,8 +136,7 @@ static void handleFrame(void)
TermSendToAll(MODE_MONITOR, (uint8_t*)"F", 1);
break;
case PREFILTER_NONE:
TermSendToAll(MODE_MONITOR, (uint8_t*)"*", 1);
break;
TermSendToAll(MODE_MONITOR, (uint8_t*)"|", 1);
}
}
else
@ -230,6 +229,7 @@ int main(void)
Ax25Config.quietTime = 300;
Ax25Config.txDelayLength = 300;
Ax25Config.txTailLength = 30;
Ax25Config.fx25 = 0;
DigiConfig.dupeTime = 30;
ConfigRead();

Wyświetl plik

@ -150,7 +150,9 @@ static const char configHelp[] = "\r\nCommands available in config mode:\r\n"
"digi dupe <5-255> - sets anti-dupe buffer time (s)\r\n"
"digi list <0-19> [set <call>/remove] - sets/clears specified callsign slot in filter list\r\n"
"monkiss [on/off] - send own and digipeated frames to KISS ports\r\n"
"nonaprs [on/off] - enable reception of non-APRS frames\r\n";
"nonaprs [on/off] - enable reception of non-APRS frames\r\n"
"fx25 [on/off] - enable FX.25 protocol (AX.25 + FEC)\r\n"
"fx25tx [on/off] - enable TX in FX.25 mode\r\n";
@ -330,6 +332,16 @@ static void printConfig(Uart *src)
UartSendString(src, "On\r\n", 0);
else
UartSendString(src, "Off\r\n", 0);
UartSendString(src, "FX.25 protocol: ", 0);
if(Ax25Config.fx25 == 1)
UartSendString(src, "On\r\n", 0);
else
UartSendString(src, "Off\r\n", 0);
UartSendString(src, "FX.25 TX: ", 0);
if(Ax25Config.fx25Tx == 1)
UartSendString(src, "On\r\n", 0);
else
UartSendString(src, "Off\r\n", 0);
}
static void sendTime(Uart *src)
@ -1002,6 +1014,24 @@ void TermParse(Uart *src)
else
err = true;
}
else if(!strncmp(cmd, "fx25 ", 5))
{
if(!strncmp(&cmd[5], "on", 2))
Ax25Config.fx25 = 1;
else if(!strncmp(&cmd[5], "off", 2))
Ax25Config.fx25 = 0;
else
err = true;
}
else if(!strncmp(cmd, "fx25tx ", 7))
{
if(!strncmp(&cmd[7], "on", 2))
Ax25Config.fx25Tx = 1;
else if(!strncmp(&cmd[7], "off", 2))
Ax25Config.fx25Tx = 0;
else
err = true;
}
else
{
UartSendString(src, "Unknown command. For command list type \"help\"\r\n", 0);