--- revised zero pulse and one pulse
This commit is contained in:
parent
03f5e2e12e
commit
8ee3ed8596
|
@ -28,11 +28,11 @@
|
||||||
|
|
||||||
#include "yunhorn_sts_sensors.h"
|
#include "yunhorn_sts_sensors.h"
|
||||||
|
|
||||||
#define ONE_PULSE (36)
|
#define ONE_PULSE (40) //36
|
||||||
#define ZERO_PULSE (20)
|
#define ZERO_PULSE (20)
|
||||||
|
|
||||||
#define LED_DATA_LEN 24
|
#define LED_DATA_LEN 24
|
||||||
#define WS2812B_DATA_LEN (24 * STS_LAMP_BAR_LED_NUM+1)
|
#define WS2812B_DATA_LEN (24 * (STS_LAMP_BAR_LED_NUM+1))
|
||||||
#define RESET_PULSE (24) //(80) TO FIX DARK_COLOR AND SM2
|
#define RESET_PULSE (24) //(80) TO FIX DARK_COLOR AND SM2
|
||||||
|
|
||||||
|
|
||||||
|
@ -101,8 +101,10 @@ void STS_Lamp_Bar_Set_Dark(void)
|
||||||
|
|
||||||
void STS_WS2812B_Refresh(void)
|
void STS_WS2812B_Refresh(void)
|
||||||
{
|
{
|
||||||
|
STS_WS2812B_Set_RGB(0,0,0,STS_LAMP_BAR_LED_NUM );
|
||||||
|
|
||||||
__disable_irq();
|
__disable_irq();
|
||||||
HAL_TIM_PWM_Start_DMA(&STS_LAMP_BAR_HTIM, STS_LAMP_BAR_TIM_CHANNEL, (uint32_t *)&rgb_buf, (uint16_t)(sizeof(rgb_buf)));
|
HAL_TIM_PWM_Start_DMA(&STS_LAMP_BAR_HTIM, STS_LAMP_BAR_TIM_CHANNEL, (uint32_t *)rgb_buf.GRB, (uint16_t)(sizeof(rgb_buf.GRB)));
|
||||||
__enable_irq();
|
__enable_irq();
|
||||||
//HAL_TIM_PWM_Start_IT(&STS_LAMP_BAR_HTIM, STS_LAMP_BAR_TIM_CHANNEL);
|
//HAL_TIM_PWM_Start_IT(&STS_LAMP_BAR_HTIM, STS_LAMP_BAR_TIM_CHANNEL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ extern volatile uint32_t event_start_time, event_stop_time;
|
||||||
extern volatile uint16_t sts_unconscious_threshold;
|
extern volatile uint16_t sts_unconscious_threshold;
|
||||||
volatile uint8_t sts_occupancy_overtime_state = 0;
|
volatile uint8_t sts_occupancy_overtime_state = 0;
|
||||||
volatile uint8_t sts_presence_fall_detection=TRUE;
|
volatile uint8_t sts_presence_fall_detection=TRUE;
|
||||||
volatile uint32_t SamplingPeriodicity = 2000; //unit ms
|
volatile uint32_t SamplingPeriodicity = 1000; //unit ms
|
||||||
volatile uint32_t HeartBeatPeriodicity = 120000; //unit ms
|
volatile uint32_t HeartBeatPeriodicity = 120000; //unit ms
|
||||||
volatile uint8_t STS_LoRa_WAN_Joined = 0;
|
volatile uint8_t STS_LoRa_WAN_Joined = 0;
|
||||||
volatile uint8_t mems_int1_detected = 0;
|
volatile uint8_t mems_int1_detected = 0;
|
||||||
|
|
Loading…
Reference in New Issue