Porównaj commity

...

3 Commity

Autor SHA1 Wiadomość Data
Mike Hojnowski 005dc0b3e5
Modified formula for voltage calculation on dfm17 (#81) 2024-01-03 12:13:43 +02:00
penfold42 ce961ae5fb
clean up minor compiler warnings (#79)
set c99 on tests/CMakeLists.txt
2024-01-03 12:12:58 +02:00
Randy Pratt 9b4c19c101
APRS address and routing fix. (#77)
* Update config.h

Added note to APRS_RELAYS line.

* Update ax25.h

source_ssid and destination_ssid did not match. Uint8_t was used in function definition within ax25.c file. Now all should match.

* Update ax25.c

source_ssid and destination_ssid are both defined the same in config.h and in ax25.h.  Both are inserted to memory by adjusting a pointer. Therefore both should require moving the pointer back 7 bytes to place in correctly addressed position. I am puzzled that the header definition and the cast in this code line are both needed.
2024-01-03 12:11:26 +02:00
7 zmienionych plików z 15 dodań i 4 usunięć

Wyświetl plik

@ -89,7 +89,7 @@ uint16_t ax25_encode_packet_aprs(char *source, uint8_t source_ssid, char *destin
call_length = strlen(destination);
memset(header->destination, ' ', sizeof(header->destination));
memcpy(header->destination, destination, call_length < 6 ? call_length : 6);
header->destination_ssid = destination_ssid;
header->destination_ssid = (uint8_t) destination_ssid >= 'A' ? destination_ssid - 7 : destination_ssid);;
char *digipeater_addresses_start = ((char *) header) + 1 + 14;
uint16_t digipeater_addresses_length = ax25_encode_digipeater_path(digipeater_addresses, digipeater_addresses_start);

Wyświetl plik

@ -13,7 +13,7 @@ typedef struct _ax25_packet_header {
char destination[6];
uint8_t destination_ssid;
char source[6];
char source_ssid;
uint8_t source_ssid;
} ax25_packet_header;
typedef struct _ax25_packet_header_end {

Wyświetl plik

@ -30,7 +30,7 @@ void * JTEncode::init_rs_int(int symsize, int gfpoly, int fcr, int prim,
rs = ((struct rs *)0);
/* Check parameter ranges */
if(symsize < 0 || symsize > 8*sizeof(data_t)){
if(symsize < 0 || (unsigned) symsize > 8*sizeof(data_t)){
goto done;
}

Wyświetl plik

@ -275,7 +275,7 @@
#define APRS_SYMBOL_TABLE '/' // '/' denotes primary and '\\' denotes alternate APRS symbol table
#define APRS_SYMBOL 'O'
#define APRS_COMMENT "RS41ng radiosonde firmware test"
#define APRS_RELAYS "WIDE1-1,WIDE2-1"
#define APRS_RELAYS "WIDE1-1,WIDE2-1" //Do not include any spaces in the APRS_RELAYS
#define APRS_DESTINATION "APZ41N"
#define APRS_DESTINATION_SSID '0'
// Generate an APRS weather report instead of a position report. This will override the APRS symbol with the weather station symbol.

Wyświetl plik

@ -684,7 +684,9 @@ int si4063_init()
void TIM1_BRK_TIM15_IRQHandler(void)
{
#ifdef DFM17
static bool pin_state = false;
#endif
if (TIM_GetITStatus(TIM15, TIM_IT_Update) != RESET) {
TIM_ClearITPendingBit(TIM15, TIM_IT_Update);

Wyświetl plik

@ -211,7 +211,14 @@ static void dma_adc_init()
uint16_t system_get_battery_voltage_millivolts()
{
#ifdef RS41
return (uint16_t) (((float) dma_buffer_adc[0]) * 10.0f * 600.0f / 4096.0f);
#else //DFM17
// Kludge: DFM17 voltage is more than 5 volts, so cut the value in half.
// Changed 600 to 690 to try and get it more accurate to actual voltage
// 690 yields fairly linear, accurate results between 5v6 and 6v6
return (uint16_t) ( ((float) dma_buffer_adc[0]) * 10.0f * 690.0f / 8192.0f );
#endif
}
uint16_t system_get_button_adc_value()

Wyświetl plik

@ -7,6 +7,8 @@ project(RS41ng_test C CXX)
set(BINARY ${CMAKE_PROJECT_NAME})
SET(CMAKE_C_FLAGS "${COMMON_FLAGS} -std=gnu99")
file(GLOB_RECURSE USER_SOURCES "../src/config.c" "../src/codecs/*.c" "../src/template.c" "../src/utils.c" "../src/strlcpy.c")
file(GLOB_RECURSE USER_SOURCES_CXX "../src/codecs/*.cpp")
file(GLOB_RECURSE USER_HEADERS "../src/codecs/*.h" "../src/template.h" "../src/utils.h" "../src/config.h" "../src/strlcpy.h")