add board temperature
This commit is contained in:
parent
f4d77de492
commit
3b0bd10f82
|
@ -64,6 +64,7 @@ volatile uint8_t PIRValue =0, prev_sts_pir_state=0, sts_pir_state_changed=0;
|
|||
extern volatile uint8_t sts_tof_presence_state;
|
||||
uint32_t lowIn=0;
|
||||
volatile bool lockLow = true, takeLowTime;
|
||||
extern volatile int sts_tof_init_status;
|
||||
#endif
|
||||
|
||||
static uint32_t sts_warm_up_count = 0;
|
||||
|
@ -1282,11 +1283,12 @@ static void SendTxData(void)
|
|||
sensor_data_ready = 0;
|
||||
|
||||
#if defined(STS_T6)
|
||||
AppData.Buffer[i++] = 4;
|
||||
AppData.Buffer[i++] = 5;
|
||||
AppData.Buffer[i++] = (uint8_t)((sts_t6_sensor_data.tof_range_presence_state & 0xFF));
|
||||
AppData.Buffer[i++] = (uint8_t)((sts_t6_sensor_data.pir_motion_sensor_state & 0xFF));
|
||||
AppData.Buffer[i++] = (uint8_t)((sts_t6_sensor_data.lamp_bar_color & 0xFF));
|
||||
AppData.Buffer[i++] = (uint8_t)((sts_t6_sensor_data.tof_presence_distance_dm & 0xFF));
|
||||
AppData.Buffer[i++] = (uint8_t)((int16_t)(sensor_data.temperature) & 0xFF);
|
||||
|
||||
#endif //STS_T6
|
||||
|
||||
|
@ -1821,10 +1823,15 @@ static void OnYunhornSTSHeartBeatTimerEvent(void *context)
|
|||
appHeartBeatDataPort = YUNHORN_STS_M1_LORA_APP_HTBT_PORT;
|
||||
#endif
|
||||
|
||||
appHeartBeatBufferSize = 2;
|
||||
appHeartBeatBufferSize = 3;
|
||||
appHeartBeatDataBuffer[0]=(uint8_t)(0x80|AppLedStateOn);
|
||||
appHeartBeatDataBuffer[1]=(uint8_t)(SYS_GetBatteryLevel()/100); //TODO XXX change to battery level in mV
|
||||
//APP_LOG(TS_OFF, VLEVEL_M, "\n\n HEART-BEAT TIMER = %d\n\n", rfac_timer);
|
||||
|
||||
float TEMPERATURE_Value = (SYS_GetTemperatureLevel() >> 8);
|
||||
APP_LOG(TS_OFF, VLEVEL_M, "\r\n\n ### ### ### BOARD TEMPERATURE = %3d C\r\n", (int16_t)(TEMPERATURE_Value));
|
||||
appHeartBeatDataBuffer[2]=(uint8_t)((int16_t)TEMPERATURE_Value)&0xff;
|
||||
|
||||
|
||||
STS_SENSOR_Upload_Message(appHeartBeatDataPort, appHeartBeatBufferSize, (uint8_t*)appHeartBeatDataBuffer);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -126,6 +126,7 @@
|
|||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.1220095777" name="Core" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.2109882892" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="YUNHORN-WLE5CC" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.239742593" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.5 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || YUNHORN-WLE5CC || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../../Core/Inc | ../../LoRaWAN/Target | ../../../../../../../Utilities/misc | ../../../../../../../Middlewares/Third_Party/SubGHz_Phy | ../../../../../../../Utilities/lpm/tiny_lpm | ../../../../../../../Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver | ../../../../../../../Drivers/CMSIS/Device/ST/STM32WLxx/Include | ../../../../../../../Utilities/sequencer | ../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler/Packages | ../../LoRaWAN/App | ../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac/Region | ../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc | ../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc/Legacy | ../../../../../../../Utilities/trace/adv_trace | ../../../../../../../Drivers/BSP/STM32WLxx_Nucleo | ../../../../../../../Utilities/timer | ../../../../../../../Middlewares/Third_Party/LoRaWAN/Mac | ../../../../../../../Middlewares/Third_Party/LoRaWAN/Utilities | ../../../../../../../Middlewares/Third_Party/LoRaWAN/Crypto | ../../../../../../../Middlewares/Third_Party/LoRaWAN/LmHandler | ../../../../../../../Drivers/CMSIS/Include || || || USE_HAL_DRIVER | STM32WL55xx | CORE_CM4 || || || || || ${workspace_loc:/${ProjName}/STM32WLE5CCUX_FLASH.ld} || true || NonSecure || || secure_nsclib.o || || None || " valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.nanoprintffloat.1586782391" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.nanoprintffloat" value="true" valueType="boolean"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.504306143" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
||||
<builder buildPath="${workspace_loc:/LoRaWAN_End_Node}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.820311016" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1121803732" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
|
||||
|
|
|
@ -74,7 +74,7 @@ main-build: WLE5CC_NODE_STS.elf secondary-outputs
|
|||
|
||||
# Tool invocations
|
||||
WLE5CC_NODE_STS.elf WLE5CC_NODE_STS.map: $(OBJS) $(USER_OBJS) D:\ONEDRIVE\STM32WLV13\Projects\NUCLEO-WL55JC\Applications\LoRaWAN\WLE5CC_NODE_STS\STM32CubeIDE\STM32WLE5CCUX_FLASH.ld makefile objects.list $(OPTIONAL_TOOL_DEPS)
|
||||
arm-none-eabi-gcc -o "WLE5CC_NODE_STS.elf" @"objects.list" $(USER_OBJS) $(LIBS) -mcpu=cortex-m4 -T"D:\ONEDRIVE\STM32WLV13\Projects\NUCLEO-WL55JC\Applications\LoRaWAN\WLE5CC_NODE_STS\STM32CubeIDE\STM32WLE5CCUX_FLASH.ld" --specs=nosys.specs -Wl,-Map="WLE5CC_NODE_STS.map" -Wl,--gc-sections -static -L../../../../../../../Middlewares/ST/STM32_Cryptographic/lib -z noexecstack -Wunused-but-set-variable -Wunused-variable -fshort-enums --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
|
||||
arm-none-eabi-gcc -o "WLE5CC_NODE_STS.elf" @"objects.list" $(USER_OBJS) $(LIBS) -mcpu=cortex-m4 -T"D:\ONEDRIVE\STM32WLV13\Projects\NUCLEO-WL55JC\Applications\LoRaWAN\WLE5CC_NODE_STS\STM32CubeIDE\STM32WLE5CCUX_FLASH.ld" --specs=nosys.specs -Wl,-Map="WLE5CC_NODE_STS.map" -Wl,--gc-sections -static -L../../../../../../../Middlewares/ST/STM32_Cryptographic/lib -z noexecstack -Wunused-but-set-variable -Wunused-variable -fshort-enums --specs=nano.specs -mfloat-abi=soft -mthumb -u _printf_float -Wl,--start-group -lc -lm -Wl,--end-group
|
||||
@echo 'Finished building target: $@'
|
||||
@echo ' '
|
||||
|
||||
|
|
Loading…
Reference in New Issue