From c961e6f10da09213a984d4e0b91e34429fd68d90 Mon Sep 17 00:00:00 2001 From: YunHorn Technology Date: Mon, 14 Aug 2023 18:10:18 +0800 Subject: [PATCH] optimized display speed and threshold of water spill --- mlx90640/mlx90640_lcd_display.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mlx90640/mlx90640_lcd_display.c b/mlx90640/mlx90640_lcd_display.c index 2f09e52..5e5a21a 100644 --- a/mlx90640/mlx90640_lcd_display.c +++ b/mlx90640/mlx90640_lcd_display.c @@ -19,7 +19,7 @@ paramsMLX90640 mlx90640; static uint16_t eeMLX90640[832]; int status; -volatile uint8_t draw_legend_once=0, normalPeopleTemp=30, blackOutTag=0, waterTempThreshold=10, detectCycle=0, v_water_cnt=0,h_water_cnt=0; +volatile uint8_t draw_legend_once=0, normalPeopleTemp=30, blackOutTag=0, waterTempThreshold=8, detectCycle=0, v_water_cnt=0,h_water_cnt=0; // start with some initial colors float minTemp = 1.0f; float maxTemp = 60.0f; @@ -187,11 +187,12 @@ static void drawMeasurement(void ) { static void drawPicture(void) { uint8_t h_cnt[32]={0},v_cnt[24]={0}; //for horizon and vertical _water spill count - BSP_LCD_FillRect(0,2*16+6, ST7789V_LCD_PIXEL_WIDTH, ST7789V_LCD_PIXEL_HEIGHT-32, LCD_COLOR_BLACK); - // ignore edge of FOV + + // start from 2, ignore edge of FOV for (y=2; y<22; y++) { - for (x=2; x<30; x++) + BSP_LCD_FillRect(0, y*11+16, ST7789V_LCD_PIXEL_WIDTH, 4, LCD_COLOR_BLACK); + for (x=2; x<30; x++) // Start from 2, ignore edge of FOV { if (zoneMask[y*32+x] > 3) { @@ -202,6 +203,7 @@ static void drawPicture(void) } } } + // simple count of water spill point cloud v_water_cnt=0; h_water_cnt=0; for (y=2; y<23; y++) {