File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -710,7 +710,7 @@ uart:
710710 int zone4_begin_y_value = id(zone4_begin_y).state;
711711 int zone4_end_y_value = id(zone4_end_y).state;
712712
713- if (p1_distance < max_distance) {
713+ if (p1_distance > 0 && p1_distance <= max_distance) {
714714 if(installation_angle != 0){
715715 p1_x = p1_distance * cos((p1_angle - installation_angle)/RADIANS_TO_DEGREES);
716716 p1_y = p1_distance * sin((p1_angle - installation_angle)/RADIANS_TO_DEGREES);
@@ -779,7 +779,7 @@ uart:
779779 }
780780 }
781781
782- if (p2_distance < max_distance) {
782+ if (p2_distance > 0 && p2_distance <= max_distance) {
783783 if(installation_angle != 0){
784784 p2_x = p2_distance * cos((p2_angle - installation_angle)/RADIANS_TO_DEGREES);
785785 p2_y = p2_distance * sin((p2_angle - installation_angle)/RADIANS_TO_DEGREES);
@@ -848,7 +848,7 @@ uart:
848848 }
849849 }
850850
851- if (p3_distance < max_distance) {
851+ if (p3_distance > 0 && p3_distance <= max_distance) {
852852 if(installation_angle != 0){
853853 p3_x = p3_distance * cos((p3_angle - installation_angle)/RADIANS_TO_DEGREES);
854854 p3_y = p3_distance * sin((p3_angle - installation_angle)/RADIANS_TO_DEGREES);
You can’t perform that action at this time.
0 commit comments