kopia lustrzana https://github.com/SP8EBC/ParaTNC
bugfix in windsensor handling related to misusing power supply state
rodzic
4e634a4ad8
commit
590d5795a2
|
@ -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="GPIOA"/> </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"/> <peripheral name="TIM3"/> </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"/>
|
||||
|
|
11
include/io.h
11
include/io.h
|
@ -104,4 +104,15 @@ inline void io___cntrl_vbat_r_disable(void) {
|
|||
|
||||
}
|
||||
|
||||
inline uint8_t io_get_cntrl_vbat_c(void) {
|
||||
uint8_t out = 0;
|
||||
|
||||
if ((GPIOA->ODR & GPIO_ODR_ODR_1) != 0) {
|
||||
out = 1;
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
#endif /* IO_H_ */
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "config_data.h"
|
||||
|
||||
#define SW_VER "EA05"
|
||||
#define SW_DATE "26032022"
|
||||
#define SW_DATE "05042022"
|
||||
|
||||
#define SYSTICK_TICKS_PER_SECONDS 100
|
||||
#define SYSTICK_TICKS_PERIOD 10
|
||||
|
|
|
@ -178,7 +178,11 @@ void wx_pool_anemometer(const config_data_wx_sources_t * const config_sources, c
|
|||
int32_t modbus_retval;
|
||||
uint16_t scaled_windspeed = 0;
|
||||
|
||||
#ifdef STM32L471xx
|
||||
if (io_get_cntrl_vbat_c() == 0) {
|
||||
#else
|
||||
if (io_get_5v_isol_sw___cntrl_vbat_s() == 0) {
|
||||
#endif
|
||||
// inhibit any measurement when power is not applied to sensors
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -566,11 +566,15 @@ int16_t analog_anemometer_direction_handler(void) {
|
|||
|
||||
uint16_t downscaled_angle = 0;
|
||||
|
||||
#ifdef STM32F10X_MD_VL
|
||||
if (io_get_5v_isol_sw___cntrl_vbat_s() == 0) {
|
||||
|
||||
#else
|
||||
if (io_get_cntrl_vbat_c() == 0) {
|
||||
#endif
|
||||
return rte_wx_winddirection_last;
|
||||
}
|
||||
|
||||
|
||||
#ifdef STM32F10X_MD_VL
|
||||
TIM_Cmd(TIM3, DISABLE);
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue