Merge pull request 'T6_O1L' (#58) from T6_O1L into T6

Reviewed-on: https://gitea.yunhorn.com/sundp/WLE5CC_NODE_STS/pulls/58
This commit is contained in:
Yunhorn 2024-11-12 16:15:41 +08:00
commit 4fb857726b
7 changed files with 20 additions and 15 deletions

View File

@ -5,7 +5,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1048471218779752885" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="962004915065611908" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
@ -16,7 +16,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1048471218779752885" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="962004915065611908" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>

View File

@ -14,9 +14,6 @@ RM := rm -rf
-include Middlewares/LoRaWAN/subdir.mk
-include Drivers/STM32WLxx_HAL_Driver/subdir.mk
-include Drivers/CMSIS/subdir.mk
-include Drivers/BSP/STM32WLxx_Nucleo/subdir.mk
-include Drivers/BSP/Components/subdir.mk
-include Drivers/BSP/53L8A1/subdir.mk
-include Application/User/Startup/subdir.mk
-include Application/User/STS/TOF/vl53l1x_uld/subdir.mk
-include Application/User/STS/TOF/Target/subdir.mk

View File

@ -30,9 +30,6 @@ Application/User/STS/TOF/App \
Application/User/STS/TOF/Target \
Application/User/STS/TOF/vl53l1x_uld \
Application/User/Startup \
Drivers/BSP/53L8A1 \
Drivers/BSP/Components \
Drivers/BSP/STM32WLxx_Nucleo \
Drivers/CMSIS \
Drivers/STM32WLxx_HAL_Driver \
Middlewares/LoRaWAN \

View File

@ -163,7 +163,7 @@ typedef struct sts_cfg_nvm {
uint8_t length; // length of following parameters except AC CODE(20bytes)
uint8_t p[STS_CFG_PCFG_SIZE];
uint8_t reserve02;
uint8_t color_occupy_vacant; // occupy color and vacant color define, C_OCCUPY<<4|C_VACANT
uint8_t reserve03;
uint8_t sensor_install_height_in_10cm;
uint8_t alarm_parameter05;

View File

@ -105,7 +105,7 @@ volatile sts_cfg_nvm_t sts_cfg_nvm = {
0x00, //reserve --P[19]
#endif
}, // above 20 bytes
0x00, //reserve2
0x21, // color occupy (red:2) | color vacant (green:1) or other 0x10 occupy(red:1) | color vacant (dark:0)
0x00, //reserve3
0x20, //sensor install height in dm =10 cm, default 32*10=320cm, 3.2meter
@ -656,8 +656,19 @@ void USER_APP_Parse_CMD_P(uint8_t *parse_buffer, uint8_t parse_buffer_size)
break;
}
break;
// P 1 1 N C, P 1 1 0 C CHANGE network color code
case 5:
break;
// P 1 1 M C1 C2 Change default OCCUPANCY AND VACANT COLOR CODE
case 6:
if (sts_work_mode == 1)
{
sts_cfg_nvm.color_occupy_vacant = ((uint8_t)(parse_buffer[CFG_CMD5]-0x30)<<4)|((uint8_t)(parse_buffer[CFG_CMD6]-0x30));
}
break;
case 12:
break;
case 13:
@ -1557,7 +1568,7 @@ void OnStoreSTSCFGContextRequest(void)
to_store__value[i++] = (sts_cfg_nvm.p[j]);
}
to_store__value[i++] = sts_cfg_nvm.reserve02;
to_store__value[i++] = sts_cfg_nvm.color_occupy_vacant;
to_store__value[i++] = sts_cfg_nvm.reserve03;
to_store__value[i++] = sts_cfg_nvm.sensor_install_height_in_10cm;
to_store__value[i++] = sts_cfg_nvm.alarm_parameter05;
@ -1654,8 +1665,8 @@ void STS_REBOOT_CONFIG_Init(void)
sts_cfg_nvm.p[j] = (uint8_t)nvm_store_value[NVM_CFG_START+j];
}
sts_cfg_nvm.reserve02 =(uint8_t)nvm_store_value[NVM_RESERVE02];
sts_cfg_nvm.reserve03 =(uint8_t)nvm_store_value[NVM_RESERVE03];
sts_cfg_nvm.color_occupy_vacant =(uint8_t)nvm_store_value[NVM_RESERVE02];
sts_cfg_nvm.reserve03 =(uint8_t)nvm_store_value[NVM_RESERVE03];
sts_cfg_nvm.sensor_install_height_in_10cm =(uint8_t)nvm_store_value[NVM_SENSOR_INSTALL_HEIGHT];
sts_cfg_nvm.alarm_parameter05 =(uint8_t)nvm_store_value[NVM_ALARM_PARAMETER05];
sts_cfg_nvm.alarm_mute_reset_timer_in_10sec = (uint8_t)nvm_store_value[NVM_ALARM_MUTE_RESET_TIMER];

View File

@ -659,9 +659,9 @@ void STS_TOF_VL53LX_PresenceDetection_Process_Start(void)
status = sts_tof_vl53lx_presence_detection_start();
if (sts_tof_presence_state ==1)
{
sts_lamp_bar_color = STS_RED;
sts_lamp_bar_color = (sts_cfg_nvm.color_occupy_vacant>>4)&0x0f; //STS_RED;
} else if (sts_tof_presence_state ==0) {
sts_lamp_bar_color = STS_GREEN;
sts_lamp_bar_color = (sts_cfg_nvm.color_occupy_vacant)&0x0f; //STS_GREEN;
}
sts_people_count_sensor_data.Count_Valid = (status ==0)? 1:0;
//APP_LOG(TS_OFF, VLEVEL_M,"############### SUB-PROCESS running .... \r\n");