kopia lustrzana https://github.com/SP8EBC/ParaTNC
bugfixes: wind direction > 180 degrees and spikes on windspeed
rodzic
499cd18c2a
commit
5639618ddb
|
@ -47,10 +47,10 @@
|
|||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
|
||||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Debug/ParaTNC.elf"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="STM32F100_ParaTNC/ParaTNC.elf"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="ParaTNC"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.827603628"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/ParaTNC"/>
|
||||
</listAttribute>
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#include "drivers/serial.h"
|
||||
#include "config_data.h"
|
||||
|
||||
#define SW_VER "EA00"
|
||||
#define SW_DATE "24092021"
|
||||
#define SW_VER "EA01"
|
||||
#define SW_DATE "28092021"
|
||||
|
||||
#define SYSTICK_TICKS_PER_SECONDS 100
|
||||
#define SYSTICK_TICKS_PERIOD 10
|
||||
|
|
|
@ -52,7 +52,7 @@ extern uint8_t rte_wx_winddirection_it;
|
|||
extern uint16_t rte_wx_winddirection_last;
|
||||
extern uint16_t rte_wx_average_windspeed;
|
||||
extern uint16_t rte_wx_max_windspeed;
|
||||
extern uint16_t rte_wx_average_winddirection;
|
||||
extern int16_t rte_wx_average_winddirection;
|
||||
|
||||
extern int8_t rte_wx_humidity, rte_wx_humidity_valid;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
//#define PARATNC_HWREV_A
|
||||
//#define PARATNC_HWREV_B
|
||||
//#define PARATNC_HWREV_C
|
||||
#define PARAMETEO
|
||||
//#define PARAMETEO
|
||||
|
||||
#ifdef PARAMETEO
|
||||
// those defines and an undef are only required for shitty Eclipse indexer to see anything from STM32L471xx target
|
||||
|
|
|
@ -122,6 +122,8 @@ void pwr_save_init(config_data_powersave_mode_t mode) {
|
|||
*/
|
||||
void pwr_save_enter_stop2(void) {
|
||||
|
||||
analog_anemometer_deinit();
|
||||
|
||||
// clear previous low power mode selection
|
||||
PWR->CR1 &= (0xFFFFFFFF ^ PWR_CR1_LPMS_Msk);
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "wx_handler.h"
|
||||
#include "io.h"
|
||||
#include "pwr_save.h"
|
||||
#include "delay.h"
|
||||
|
||||
|
||||
#ifdef STM32F10X_MD_VL
|
||||
|
|
|
@ -28,7 +28,7 @@ uint8_t rte_wx_winddirection_it = 0;
|
|||
uint16_t rte_wx_winddirection_last = 0;
|
||||
uint16_t rte_wx_average_windspeed = 0;
|
||||
uint16_t rte_wx_max_windspeed = 0;
|
||||
uint16_t rte_wx_average_winddirection = 0;
|
||||
int16_t rte_wx_average_winddirection = 0;
|
||||
|
||||
int8_t rte_wx_humidity = 0, rte_wx_humidity_valid = 0;
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ void analog_anemometer_init( uint16_t pulses_per_meter_second,
|
|||
uint8_t anemometer_lower_boundary,
|
||||
uint8_t anemometer_upper_boundary,
|
||||
uint8_t direction_polarity);
|
||||
|
||||
void analog_anemometer_deinit(void);
|
||||
void analog_anemometer_timer_irq(void);
|
||||
void analog_anemometer_dma_irq(void);
|
||||
uint32_t analog_anemometer_get_ms_from_pulse(uint16_t inter_pulse_time);
|
||||
|
|
|
@ -329,6 +329,18 @@ void analog_anemometer_init(uint16_t pulses_per_meter_second, uint8_t anemometer
|
|||
return;
|
||||
}
|
||||
|
||||
void analog_anemometer_deinit(void) {
|
||||
#ifdef STM32L471xx
|
||||
LL_DMA_DisableIT_TC(DMA1, LL_DMA_CHANNEL_5);
|
||||
|
||||
LL_DMA_DisableChannel(DMA1, LL_DMA_CHANNEL_5);
|
||||
|
||||
LL_TIM_DisableCounter(TIM4);
|
||||
|
||||
LL_TIM_DisableCounter(TIM3);
|
||||
#endif
|
||||
}
|
||||
|
||||
void analog_anemometer_timer_irq(void) {
|
||||
analog_anemometer_timer_has_been_fired = 1;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue