revised for output format
This commit is contained in:
parent
b3caa5db85
commit
3494145796
|
@ -203,7 +203,6 @@ static void sortFocusAreas(void)
|
||||||
}
|
}
|
||||||
// ignore edge of FOV
|
// ignore edge of FOV
|
||||||
waterSpillCount =0;
|
waterSpillCount =0;
|
||||||
|
|
||||||
for (y=1; y<ROW; y++)
|
for (y=1; y<ROW; y++)
|
||||||
{
|
{
|
||||||
for (x=1; x<COL; x++)
|
for (x=1; x<COL; x++)
|
||||||
|
@ -214,7 +213,7 @@ static void sortFocusAreas(void)
|
||||||
{
|
{
|
||||||
if (blackOutTag == 0) {
|
if (blackOutTag == 0) {
|
||||||
zoneMask[y*COL+x] ++;
|
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
|
upMask[(uint8_t)(y/3)][(uint8_t)(x/3)] ++; //translate to 11*8 matrix for upload
|
||||||
waterSpillCount ++;
|
waterSpillCount ++;
|
||||||
}
|
}
|
||||||
|
@ -237,18 +236,16 @@ void STS_M1A_SENSOR_Read(STS_M1A_SensorDataTypeDef *m1a_data)
|
||||||
m1a_data->maxTemp = maxTemp;
|
m1a_data->maxTemp = maxTemp;
|
||||||
m1a_data->v_water_cnt = v_water_cnt;
|
m1a_data->v_water_cnt = v_water_cnt;
|
||||||
m1a_data->h_water_cnt = h_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);
|
m1a_data->spot_cnt = blackOutTag ==0? spot_cnt:0; //max(v_water_cnt, h_water_cnt);
|
||||||
|
|
||||||
uint8_t i=0;
|
uint8_t i=0;
|
||||||
if ((spot_cnt != 0) && (blackOutTag == 0)) {
|
if ((spot_cnt != 0) && (blackOutTag == 0)) {
|
||||||
//bubbleSort((uint8_t*)upMask, (ROW/3)*(COL/3), (uint8_t*)order);
|
|
||||||
bubbleSort((void *)upMask, 80, (void *)order);
|
bubbleSort((void *)upMask, 80, (void *)order);
|
||||||
|
|
||||||
for (i= spot_cnt; i< 80;i++) {
|
for (i= spot_cnt; i< 80;i++) {
|
||||||
order[i] = 0;
|
order[i] = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
for (i= 0; i< 80;i++) {
|
for (i= 0; i< 80;i++) {
|
||||||
order[i] = 0;
|
order[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue