diff --git a/examples/pozyx_ready_to_localize/pozyx_ready_to_localize.pde b/examples/pozyx_ready_to_localize/pozyx_ready_to_localize.pde index 1cd2a5b..b5abac8 100644 --- a/examples/pozyx_ready_to_localize/pozyx_ready_to_localize.pde +++ b/examples/pozyx_ready_to_localize/pozyx_ready_to_localize.pde @@ -138,7 +138,7 @@ void calculateAspectRatio(){ for (PozyxDevice pozyxDevice : pozyxDevices){ int[] pos = pozyxDevice.getCurrentPosition(); max_width_mm = max(max_width_mm, pos[0]); - max_height_mm = max(max_height_mm, pos[0]); + max_height_mm = max(max_height_mm, pos[1]); } max_width_mm += 2*border; max_height_mm += 2*border; @@ -223,4 +223,4 @@ void keyPressed() { // resets the scale to the current area taken by the devices. Useful if you moved too much outside of the anchor area. pixel_per_mm = 0.5; println("Resetting area size"); -} \ No newline at end of file +}