revised for output format

This commit is contained in:
Yunhorn 2024-01-09 12:29:36 +08:00
parent b3caa5db85
commit 3494145796
1 changed files with 2 additions and 5 deletions

View File

@ -203,7 +203,6 @@ static void sortFocusAreas(void)
}
// ignore edge of FOV
waterSpillCount =0;
for (y=1; y<ROW; y++)
{
for (x=1; x<COL; x++)
@ -214,7 +213,7 @@ static void sortFocusAreas(void)
{
if (blackOutTag == 0) {
zoneMask[y*COL+x] ++;
//upMask[(uint8_t)(x/3)*(uint8_t)(y/3)] ++; //translate to 11*8 matrix for upload
upMask[(uint8_t)(y/3)][(uint8_t)(x/3)] ++; //translate to 11*8 matrix for upload
waterSpillCount ++;
}
@ -237,18 +236,16 @@ void STS_M1A_SENSOR_Read(STS_M1A_SensorDataTypeDef *m1a_data)
m1a_data->maxTemp = maxTemp;
m1a_data->v_water_cnt = v_water_cnt;
m1a_data->h_water_cnt = h_water_cnt;
spot_cnt = max(v_water_cnt, h_water_cnt);
m1a_data->spot_cnt = blackOutTag ==0? spot_cnt:0; //max(v_water_cnt, h_water_cnt);
uint8_t i=0;
if ((spot_cnt != 0) && (blackOutTag == 0)) {
//bubbleSort((uint8_t*)upMask, (ROW/3)*(COL/3), (uint8_t*)order);
bubbleSort((void *)upMask, 80, (void *)order);
for (i= spot_cnt; i< 80;i++) {
order[i] = 0;
}
} else {
for (i= 0; i< 80;i++) {
order[i] = 0;
}