kopia lustrzana https://github.com/SP8EBC/ParaTNC
fixed bug in bme280_get_humidity
rodzic
6fb028da2b
commit
0116e6111e
|
@ -71,7 +71,7 @@ C_DEPS += \
|
|||
src/%.o: ../src/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: Cross ARM C Compiler'
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ C_DEPS += \
|
|||
system/src/aprs/%.o: ../system/src/aprs/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: Cross ARM C Compiler'
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ C_DEPS += \
|
|||
system/src/cmsis/%.o: ../system/src/cmsis/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: Cross ARM C Compiler'
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ C_DEPS += \
|
|||
system/src/cortexm/%.o: ../system/src/cortexm/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: Cross ARM C Compiler'
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ C_DEPS += \
|
|||
system/src/davis_vantage/%.o: ../system/src/davis_vantage/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: Cross ARM C Compiler'
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ C_DEPS += \
|
|||
system/src/diag/%.o: ../system/src/diag/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: Cross ARM C Compiler'
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ C_DEPS += \
|
|||
system/src/drivers/%.o: ../system/src/drivers/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: Cross ARM C Compiler'
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ C_DEPS += \
|
|||
system/src/modbus_rtu/%.o: ../system/src/modbus_rtu/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: Cross ARM C Compiler'
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ system/src/newlib/%.o: ../system/src/newlib/%.cpp
|
|||
system/src/newlib/%.o: ../system/src/newlib/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: Cross ARM C Compiler'
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ C_DEPS += \
|
|||
system/src/stm32f1-stdperiph/%.o: ../system/src/stm32f1-stdperiph/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: Cross ARM C Compiler'
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ C_DEPS += \
|
|||
system/src/umb_master/%.o: ../system/src/umb_master/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: Cross ARM C Compiler'
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ C_DEPS += \
|
|||
system/src/ve_direct_protocol/%.o: ../system/src/ve_direct_protocol/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: Cross ARM C Compiler'
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -g3 -DDEBUG -DTRACE -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -DHSE_VALUE=8000000 -I"../include" -I"../system/include/aprs" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f1-stdperiph" -std=gnu11 -Wunused-function -Wall -Wa,-adhlns="$@.lst" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -54,17 +54,16 @@ static const config_data_wx_sources_t internal = {
|
|||
void wx_get_all_measurements(const config_data_wx_sources_t * const config_sources, const config_data_mode_t * const config_mode, const config_data_umb_t * const config_umb) {
|
||||
|
||||
int32_t return_value = 0;
|
||||
int32_t i = 0, j = 0;
|
||||
int32_t function_result = -1; // used for return values from various functions
|
||||
int32_t parameter_result = 0; // stores which parameters have been retrieved successfully. this is used for failsafe handling
|
||||
int32_t backup_parameter_result = 0; // uses during retrieving backup
|
||||
int8_t modbus_qf = 0; // quality factor for Modbus-RTU communication
|
||||
umb_qf_t umb_quality_factor = UMB_QF_UNITIALIZED; // wuality factor for UMB communication
|
||||
|
||||
int32_t temperature_result = 0;
|
||||
int32_t pressure_result = 0;
|
||||
int32_t humidity_result = 0;
|
||||
|
||||
parameter_result = wx_get_temperature_measurement(config_sources, config_mode, config_umb);
|
||||
parameter_result = wx_get_pressure_measurement(config_sources, config_mode, config_umb);
|
||||
parameter_result = wx_get_humidity_measurement(config_sources, config_mode, config_umb);
|
||||
parameter_result |= wx_get_temperature_measurement(config_sources, config_mode, config_umb);
|
||||
parameter_result |= wx_get_pressure_measurement(config_sources, config_mode, config_umb);
|
||||
parameter_result |= wx_get_humidity_measurement(config_sources, config_mode, config_umb);
|
||||
|
||||
// check if all parameters (except wind) were collected successfully
|
||||
if (parameter_result == (WX_HANDLER_PARAMETER_RESULT_TEMPERATURE | WX_HANDLER_PARAMETER_RESULT_PRESSURE | WX_HANDLER_PARAMETER_RESULT_HUMIDITY | WX_HANDLER_PARAMETER_RESULT_TEMP_INTERNAL)) {
|
||||
|
@ -72,7 +71,7 @@ void wx_get_all_measurements(const config_data_wx_sources_t * const config_sourc
|
|||
}
|
||||
else {
|
||||
// if not check what was faulty and backup with an internal sensor
|
||||
if (parameter_result & WX_HANDLER_PARAMETER_RESULT_TEMPERATURE == 0) {
|
||||
if ((parameter_result & WX_HANDLER_PARAMETER_RESULT_TEMPERATURE) == 0) {
|
||||
// if we don't have temperature
|
||||
// check what is the primary source of temperature
|
||||
if (config_sources->temperature != WX_SOURCE_INTERNAL) {
|
||||
|
@ -84,14 +83,14 @@ void wx_get_all_measurements(const config_data_wx_sources_t * const config_sourc
|
|||
}
|
||||
}
|
||||
|
||||
if (parameter_result & WX_HANDLER_PARAMETER_RESULT_PRESSURE == 0) {
|
||||
if ((parameter_result & WX_HANDLER_PARAMETER_RESULT_PRESSURE) == 0) {
|
||||
|
||||
if (config_sources->pressure != WX_SOURCE_INTERNAL) {
|
||||
backup_parameter_result |= wx_get_pressure_measurement(&internal, config_mode, config_umb);
|
||||
}
|
||||
}
|
||||
|
||||
if (parameter_result & WX_HANDLER_PARAMETER_RESULT_HUMIDITY == 0) {
|
||||
if ((parameter_result & WX_HANDLER_PARAMETER_RESULT_HUMIDITY) == 0) {
|
||||
|
||||
if (config_sources->pressure != WX_SOURCE_INTERNAL) {
|
||||
backup_parameter_result |= wx_get_humidity_measurement(&internal, config_mode, config_umb);
|
||||
|
@ -100,51 +99,6 @@ void wx_get_all_measurements(const config_data_wx_sources_t * const config_sourc
|
|||
}
|
||||
|
||||
|
||||
//#if defined(_MODBUS_RTU)
|
||||
//
|
||||
// // unify quality factor across Modbus-RTU sensor and embedded
|
||||
// // ones.
|
||||
//
|
||||
// // BME280 (or MS5611) has a prioryty over the Modbus-RTU
|
||||
// if (rte_wx_bme280_qf == BME280_QF_NOT_AVAILABLE ||
|
||||
// rte_wx_bme280_qf == BME280_QF_UKNOWN)
|
||||
// {
|
||||
// // if an internal sensor is not responding or it is not used at all
|
||||
// // check the result of modbus RTU. this is an a little bit of complicated
|
||||
// // case as BME280 is a pressure and humidity sensor at once, so changing
|
||||
// // this QF will also influence the pressure one, but at this point we might
|
||||
// // agree that we won't use BME280 and external, RTU pressure sensor as it
|
||||
// // would make no sense to do so
|
||||
// if ((modbus_qf & MODBUS_QF_HUMIDITY_FULL) > 0) {
|
||||
// rte_wx_bme280_qf = BME280_QF_FULL;
|
||||
// }
|
||||
// else {
|
||||
// rte_wx_bme280_qf = BME280_QF_UKNOWN;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // Dallas temperature qualiy factor
|
||||
// if (rte_wx_error_dallas_qf == DALLAS_QF_NOT_AVALIABLE) {
|
||||
//
|
||||
// // if an internal sensor is not responding check the result of modbus RTU
|
||||
// if ((modbus_qf & MODBUS_QF_TEMPERATURE_FULL) > 0) {
|
||||
// rte_wx_error_dallas_qf = DALLAS_QF_UNKNOWN;
|
||||
// rte_wx_current_dallas_qf = DALLAS_QF_FULL;
|
||||
//
|
||||
// }
|
||||
// else if ((modbus_qf & MODBUS_QF_TEMPERATURE_DEGR) > 0) {
|
||||
// rte_wx_error_dallas_qf = DALLAS_QF_DEGRADATED;
|
||||
// rte_wx_current_dallas_qf = DALLAS_QF_DEGRADATED;
|
||||
// }
|
||||
// else if ((modbus_qf & MODBUS_QF_TEMPERATURE_NAVB) > 0) {
|
||||
// rte_wx_error_dallas_qf = DALLAS_QF_DEGRADATED;
|
||||
// rte_wx_current_dallas_qf = DALLAS_QF_NOT_AVALIABLE;
|
||||
// }
|
||||
// }
|
||||
//#endif
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ int32_t wx_get_temperature_measurement(const config_data_wx_sources_t * const co
|
|||
int32_t measurement_result = -1; // used for return values from various functions
|
||||
int32_t parameter_result = 0; // stores which parameters have been retrieved successfully. this is used for failsafe handling
|
||||
umb_qf_t umb_quality_factor = UMB_QF_UNITIALIZED; // wuality factor for UMB communication
|
||||
int32_t i = 0, j = 0;
|
||||
|
||||
// choose a temperature source from the configuration
|
||||
switch(config_sources->temperature) {
|
||||
|
|
|
@ -404,7 +404,7 @@ int16_t analog_anemometer_direction_handler(void) {
|
|||
|
||||
TIM_Cmd(TIM3, DISABLE);
|
||||
|
||||
uint16_t downscaled_angle;
|
||||
uint16_t downscaled_angle = 0;
|
||||
|
||||
// getting current counter value
|
||||
uint16_t current_value = TIM_GetCounter(TIM3);
|
||||
|
|
|
@ -332,7 +332,7 @@ int32_t bme280_get_humidity(int8_t* out, uint16_t raw_data, bme280_qf_t* qf) {
|
|||
|
||||
if (*out > 99 || *out < 0) {
|
||||
*qf = BME280_QF_HUMIDITY_DEGRADED;
|
||||
out = BME280_WRONG_HUMIDITY_READOUT;
|
||||
ret = BME280_WRONG_HUMIDITY_READOUT;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
Ładowanie…
Reference in New Issue