This commit is contained in:
parent
1f6020a3a9
commit
6fed6a034d
|
@ -730,7 +730,8 @@ static void peripheralStateNotificationCB(gapRole_States_t newState, gapRoleEven
|
||||||
*/
|
*/
|
||||||
static void performPeriodicTask(void)
|
static void performPeriodicTask(void)
|
||||||
{
|
{
|
||||||
if (boost_en_flag == 0 && GPIOA_ReadITFlagBit(BOOST_APIN) == 0)
|
// if (boost_en_flag == 0 && GPIOA_ReadITFlagBit(BOOST_APIN) == 0)
|
||||||
|
if (boost_en_flag == 0)
|
||||||
{
|
{
|
||||||
gValveData.bat = BSP_ReadVbat();
|
gValveData.bat = BSP_ReadVbat();
|
||||||
// TODO:温湿度传感器读错的话就不发了?
|
// TODO:温湿度传感器读错的话就不发了?
|
||||||
|
@ -763,7 +764,8 @@ static void performPeriodicTask(void)
|
||||||
|
|
||||||
tmos_set_event(led_task_id, LED_SHOW_START_EVT);
|
tmos_set_event(led_task_id, LED_SHOW_START_EVT);
|
||||||
}
|
}
|
||||||
else if(GPIOA_ReadITFlagBit(BOOST_APIN) == 1)
|
// else if(GPIOA_ReadITFlagBit(BOOST_APIN) == 1)
|
||||||
|
else
|
||||||
{
|
{
|
||||||
tmos_start_task(Peripheral_TaskID, SBP_PERIODIC_EVT, MS1_TO_SYSTEM_TIME(1000));
|
tmos_start_task(Peripheral_TaskID, SBP_PERIODIC_EVT, MS1_TO_SYSTEM_TIME(1000));
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @Author : stark1898y 1658608470@qq.com
|
* @Author : stark1898y 1658608470@qq.com
|
||||||
* @Date : 2024-12-15 15:01:15
|
* @Date : 2024-12-15 15:01:15
|
||||||
* @LastEditors : stark1898y 1658608470@qq.com
|
* @LastEditors : stark1898y 1658608470@qq.com
|
||||||
* @LastEditTime : 2025-05-30 16:30:38
|
* @LastEditTime : 2025-05-30 16:53:07
|
||||||
* @FilePath : \BLE_TYQ_CH584M\BSP\src\bsp_valve.c
|
* @FilePath : \BLE_TYQ_CH584M\BSP\src\bsp_valve.c
|
||||||
* @Description :
|
* @Description :
|
||||||
*
|
*
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
#undef LOG_TAG
|
#undef LOG_TAG
|
||||||
#define LOG_TAG "BSP_VALVE"
|
#define LOG_TAG "BSP_VALVE"
|
||||||
|
|
||||||
volatile uint8_t boost_en_flag;
|
volatile uint8_t boost_en_flag = 0;
|
||||||
|
|
||||||
TsValveData gValveData = {0};
|
TsValveData gValveData = {0};
|
||||||
uint16_t bat_mv;
|
uint16_t bat_mv;
|
||||||
|
@ -537,7 +537,8 @@ static uint16_t VAVLE_Task_ProcessEvent(uint8_t task_id, uint16_t events)
|
||||||
if (events & VAVLE_LOOP_DECT_EVT)
|
if (events & VAVLE_LOOP_DECT_EVT)
|
||||||
{
|
{
|
||||||
logDebug("VAVLE_LOOP_DECT_EVT");
|
logDebug("VAVLE_LOOP_DECT_EVT");
|
||||||
if (GPIOA_ReadITFlagBit(BOOST_APIN) == 0)
|
// if (GPIOA_ReadITFlagBit(BOOST_APIN) == 0)
|
||||||
|
if (boost_en_flag == 0)
|
||||||
{
|
{
|
||||||
// TODO:亮灯或者蜂鸣器的时候读电压就低了
|
// TODO:亮灯或者蜂鸣器的时候读电压就低了
|
||||||
gValveData.bat = BSP_ReadVbat();
|
gValveData.bat = BSP_ReadVbat();
|
||||||
|
|
Loading…
Reference in New Issue