kopia lustrzana https://github.com/SP8EBC/ParaTNC
daily
rodzic
0dd67e45fb
commit
fc9f1bd4f5
|
@ -22,7 +22,6 @@ C_SRCS += \
|
|||
../src/main.c \
|
||||
../src/packet_tx_handler.c \
|
||||
../src/pwr_save.c \
|
||||
../src/pwr_switch.c \
|
||||
../src/rte_main.c \
|
||||
../src/rte_pv.c \
|
||||
../src/rte_pwr.c \
|
||||
|
@ -31,7 +30,8 @@ C_SRCS += \
|
|||
../src/wx_handler.c \
|
||||
../src/wx_handler_humidity.c \
|
||||
../src/wx_handler_pressure.c \
|
||||
../src/wx_handler_temperature.c
|
||||
../src/wx_handler_temperature.c \
|
||||
../src/wx_pwr_switch.c
|
||||
|
||||
OBJS += \
|
||||
./src/KissCommunication.o \
|
||||
|
@ -52,7 +52,6 @@ OBJS += \
|
|||
./src/main.o \
|
||||
./src/packet_tx_handler.o \
|
||||
./src/pwr_save.o \
|
||||
./src/pwr_switch.o \
|
||||
./src/rte_main.o \
|
||||
./src/rte_pv.o \
|
||||
./src/rte_pwr.o \
|
||||
|
@ -61,7 +60,8 @@ OBJS += \
|
|||
./src/wx_handler.o \
|
||||
./src/wx_handler_humidity.o \
|
||||
./src/wx_handler_pressure.o \
|
||||
./src/wx_handler_temperature.o
|
||||
./src/wx_handler_temperature.o \
|
||||
./src/wx_pwr_switch.o
|
||||
|
||||
C_DEPS += \
|
||||
./src/KissCommunication.d \
|
||||
|
@ -82,7 +82,6 @@ C_DEPS += \
|
|||
./src/main.d \
|
||||
./src/packet_tx_handler.d \
|
||||
./src/pwr_save.d \
|
||||
./src/pwr_switch.d \
|
||||
./src/rte_main.d \
|
||||
./src/rte_pv.d \
|
||||
./src/rte_pwr.d \
|
||||
|
@ -91,7 +90,8 @@ C_DEPS += \
|
|||
./src/wx_handler.d \
|
||||
./src/wx_handler_humidity.d \
|
||||
./src/wx_handler_pressure.d \
|
||||
./src/wx_handler_temperature.d
|
||||
./src/wx_handler_temperature.d \
|
||||
./src/wx_pwr_switch.d
|
||||
|
||||
|
||||
# Each subdirectory must supply rules for building sources it contributes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="ilg.gnumcueclipse.debug.gdbjtag.openocd.launchConfigurationType">
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.PERIPHERALS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <peripherals> <peripheral name="GPIOB"/> <peripheral name="GPIOC"/> <peripheral name="ADC2"/> </peripherals> "/>
|
||||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.PERIPHERALS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <peripherals> <peripheral name="GPIOB"/> <peripheral name="GPIOC"/> <peripheral name="GPIOA"/> </peripherals> "/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doContinue" value="true"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doDebugInRam" value="false"/>
|
||||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doFirstReset" value="true"/>
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
|
||||
//#define PARATNC_HWREV_A
|
||||
//#define PARATNC_HWREV_B
|
||||
#define PARATNC_HWREV_C
|
||||
//#define PARAMETEO
|
||||
//#define PARATNC_HWREV_C
|
||||
#define PARAMETEO
|
||||
|
||||
#ifdef PARAMETEO
|
||||
// those defines and an undef are only required for shitty Eclipse indexer to see anything from STM32L471xx target
|
||||
|
|
|
@ -306,6 +306,20 @@ void packet_tx_handler(const config_data_basic_t * const config_basic, const con
|
|||
}
|
||||
else {
|
||||
|
||||
#ifdef STM32L471xx
|
||||
// if _DALLAS_AS_TELEM will be enabled the fifth channel will be set to temperature measured by DS12B20
|
||||
//telemetry_send_values(rx10m, tx10m, digi10m, kiss10m, rte_wx_temperature_dallas_valid, dallas_qf, rte_wx_ms5611_qf, rte_wx_dht_valid.qf, rte_wx_umb_qf);
|
||||
if (config_mode->wx == 1) {
|
||||
|
||||
// if _METEO will be enabled, but without _DALLAS_AS_TELEM the fifth channel will be used to transmit temperature from MS5611
|
||||
// which may be treated then as 'rack/cabinet internal temperature'. Dallas DS12B10 will be used for ragular WX frames
|
||||
telemetry_send_values(rx10m, tx10m, digi10m, rte_main_battery_voltage, digidrop10m, rte_wx_temperature_internal_valid, dallas_qf, pressure_qf, humidity_qf, wind_qf, config_mode);
|
||||
}
|
||||
else {
|
||||
// if user will disable both _METEO and _DALLAS_AS_TELEM value will be zeroed internally anyway
|
||||
telemetry_send_values(rx10m, tx10m, digi10m, rte_main_battery_voltage, digidrop10m, 0.0f, dallas_qf, pressure_qf, humidity_qf, wind_qf, config_mode);
|
||||
}
|
||||
#else
|
||||
// if _DALLAS_AS_TELEM will be enabled the fifth channel will be set to temperature measured by DS12B20
|
||||
//telemetry_send_values(rx10m, tx10m, digi10m, kiss10m, rte_wx_temperature_dallas_valid, dallas_qf, rte_wx_ms5611_qf, rte_wx_dht_valid.qf, rte_wx_umb_qf);
|
||||
if (config_mode->wx == 1) {
|
||||
|
@ -318,7 +332,7 @@ void packet_tx_handler(const config_data_basic_t * const config_basic, const con
|
|||
// if user will disable both _METEO and _DALLAS_AS_TELEM value will be zeroed internally anyway
|
||||
telemetry_send_values(rx10m, tx10m, digi10m, kiss10m, digidrop10m, 0.0f, dallas_qf, pressure_qf, humidity_qf, wind_qf, config_mode);
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
packet_tx_telemetry_counter = 0;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "system_stm32l4xx.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#include "pwr_switch.h"
|
||||
#include "wx_pwr_switch.h"
|
||||
#include "io.h"
|
||||
#include "LedConfig.h"
|
||||
#include "packet_tx_handler.h"
|
||||
|
|
|
@ -63,6 +63,19 @@ void telemetry_send_values_pv ( uint8_t rx_pkts,
|
|||
void telemetry_send_chns_description_pv(const config_data_basic_t * const config_basic);
|
||||
void telemetry_send_status_pv(ve_direct_average_struct* avg, ve_direct_error_reason* last_error, ve_direct_system_state state, uint32_t master_time, uint16_t messages_count, uint16_t corrupted_messages_count);
|
||||
|
||||
#ifdef STM32L471xx
|
||||
void telemetry_send_values( uint8_t rx_pkts,
|
||||
uint8_t tx_pkts,
|
||||
uint8_t digi_pkts,
|
||||
uint16_t vbatt_voltage,
|
||||
uint8_t viscous_drop_pkts,
|
||||
float temperature,
|
||||
dallas_qf_t dallas_qf,
|
||||
pressure_qf_t press_qf,
|
||||
humidity_qf_t humid_qf,
|
||||
wind_qf_t anemometer_qf,
|
||||
const config_data_mode_t * const config_mode);
|
||||
#else
|
||||
void telemetry_send_values( uint8_t rx_pkts,
|
||||
uint8_t tx_pkts,
|
||||
uint8_t digi_pkts,
|
||||
|
@ -74,6 +87,7 @@ void telemetry_send_values( uint8_t rx_pkts,
|
|||
humidity_qf_t humid_qf,
|
||||
wind_qf_t anemometer_qf,
|
||||
const config_data_mode_t * const config_mode);
|
||||
#endif
|
||||
void telemetry_send_chns_description(const config_data_basic_t * const config_basic, const config_data_mode_t * const config_mode);
|
||||
void telemetry_send_status(void);
|
||||
|
||||
|
|
|
@ -288,10 +288,11 @@ void telemetry_send_chns_description(const config_data_basic_t * const config_ba
|
|||
/**
|
||||
* This function sends telemetry values in 'typical configuration' when VICTRON VE.direct protocol parser is not enabled.
|
||||
*/
|
||||
#ifdef STM32L471xx
|
||||
void telemetry_send_values( uint8_t rx_pkts,
|
||||
uint8_t tx_pkts,
|
||||
uint8_t digi_pkts,
|
||||
uint8_t kiss_pkts,
|
||||
uint16_t vbatt_voltage,
|
||||
uint8_t viscous_drop_pkts,
|
||||
float temperature,
|
||||
dallas_qf_t dallas_qf,
|
||||
|
@ -299,7 +300,19 @@ void telemetry_send_values( uint8_t rx_pkts,
|
|||
humidity_qf_t humid_qf,
|
||||
wind_qf_t anemometer_qf,
|
||||
const config_data_mode_t * const config_mode) {
|
||||
|
||||
#else
|
||||
void telemetry_send_values( uint8_t rx_pkts,
|
||||
uint8_t tx_pkts,
|
||||
uint8_t digi_pkts,
|
||||
uint8_t kiss_pkts,
|
||||
uint8_t viscous_drop_pkts,
|
||||
float temperature,
|
||||
dallas_qf_t dallas_qf,
|
||||
pressure_qf_t press_qf,
|
||||
humidity_qf_t humid_qf,
|
||||
wind_qf_t anemometer_qf,
|
||||
const config_data_mode_t * const config_mode) {
|
||||
#endif
|
||||
|
||||
// local variables with characters to be inserted to APRS telemetry frame
|
||||
char qf = '0', degr = '0', nav = '0';
|
||||
|
@ -381,6 +394,23 @@ void telemetry_send_values( uint8_t rx_pkts,
|
|||
// reset the buffer where the frame will be contructed and stored for transmission
|
||||
memset(main_own_aprs_msg, 0x00, sizeof(main_own_aprs_msg));
|
||||
|
||||
#ifdef STM32L471xx
|
||||
if (config_mode->digi_viscous == 0) {
|
||||
// generate the telemetry frame from values
|
||||
#ifdef _DALLAS_AS_TELEM
|
||||
main_own_aprs_msg_len = sprintf(main_own_aprs_msg, "T#%03d,%03d,%03d,%03d,%03d,%03d,%c%c%c%c%c%c%c0", telemetry_counter++, rx_pkts, tx_pkts, digi_pkts, vbatt_voltage, scaled_temperature, qf, degr, nav, pressure_qf_navaliable, humidity_qf_navaliable, anemometer_degradated, anemometer_navble);
|
||||
#else
|
||||
main_own_aprs_msg_len = sprintf(main_own_aprs_msg, "T#%03d,%03d,%03d,%03d,%03d,%03d,%c%c%c%c%c%c%c0", telemetry_counter++, rx_pkts, tx_pkts, digi_pkts, vbatt_voltage, scaled_temperature, qf, degr, nav, pressure_qf_navaliable, humidity_qf_navaliable, anemometer_degradated, anemometer_navble);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
#ifdef _DALLAS_AS_TELEM
|
||||
main_own_aprs_msg_len = sprintf(main_own_aprs_msg, "T#%03d,%03d,%03d,%03d,%03d,%03d,%c%c%c%c%c%c%c0", telemetry_counter++, rx_pkts, tx_pkts, digi_pkts, viscous_drop_pkts, scaled_temperature, qf, degr, nav, pressure_qf_navaliable, humidity_qf_navaliable, anemometer_degradated, anemometer_navble);
|
||||
#else
|
||||
main_own_aprs_msg_len = sprintf(main_own_aprs_msg, "T#%03d,%03d,%03d,%03d,%03d,%03d,%c%c%c%c%c%c%c0", telemetry_counter++, rx_pkts, tx_pkts, digi_pkts, viscous_drop_pkts, scaled_temperature, qf, degr, nav, pressure_qf_navaliable, humidity_qf_navaliable, anemometer_degradated, anemometer_navble);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
if (config_mode->digi_viscous == 0) {
|
||||
// generate the telemetry frame from values
|
||||
#ifdef _DALLAS_AS_TELEM
|
||||
|
@ -396,6 +426,7 @@ void telemetry_send_values( uint8_t rx_pkts,
|
|||
main_own_aprs_msg_len = sprintf(main_own_aprs_msg, "T#%03d,%03d,%03d,%03d,%03d,%03d,%c%c%c%c%c%c%c0", telemetry_counter++, rx_pkts, tx_pkts, digi_pkts, viscous_drop_pkts, scaled_temperature, qf, degr, nav, pressure_qf_navaliable, humidity_qf_navaliable, anemometer_degradated, anemometer_navble);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
// reset the frame counter if it overflowed
|
||||
if (telemetry_counter > 999)
|
||||
|
|
Ładowanie…
Reference in New Issue