From 55cd99ef36e2f12c0a4c9d73bfbc95e5044e3950 Mon Sep 17 00:00:00 2001 From: Feyzu Date: Wed, 3 Aug 2022 23:15:51 +0200 Subject: [PATCH] Pendel Logic READY Pendelsession information save in profile in progress new fragment "fragment_start_pendulum" finished Measured results saved in UpdateFragment Recyclerview based und User Id successfully --- .idea/deploymentTargetDropDown.xml | 12 ++++++------ .../example/acapendulum20/canvas/CanvasPendulum.kt | 7 +------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml index df0740d..82a483a 100644 --- a/.idea/deploymentTargetDropDown.xml +++ b/.idea/deploymentTargetDropDown.xml @@ -1,17 +1,17 @@ - + - + - - + + - - + + \ No newline at end of file diff --git a/app/src/main/java/com/example/acapendulum20/canvas/CanvasPendulum.kt b/app/src/main/java/com/example/acapendulum20/canvas/CanvasPendulum.kt index 167060a..2aeb786 100644 --- a/app/src/main/java/com/example/acapendulum20/canvas/CanvasPendulum.kt +++ b/app/src/main/java/com/example/acapendulum20/canvas/CanvasPendulum.kt @@ -89,7 +89,7 @@ class CanvasPendulum @JvmOverloads constructor( var gravity = 0.981f var damping = 0.996f - if (mPendulum.stopPosition.x > canvas.width / 4.toFloat() && mPendulum.stopPosition.x <= canvas.width * 0.75.toFloat()) { + if (mPendulum.stopPosition.x > canvas.width / 4f && mPendulum.stopPosition.x <= canvas.width * 0.75f) { gravity = 1.981f if (mPendulum.stopPosition.x > canvas.width / 3.toFloat() && mPendulum.stopPosition.x <= canvas.width / 1.5.toFloat()) { @@ -128,18 +128,13 @@ class CanvasPendulum @JvmOverloads constructor( //Origin transition mPendulum.stopPosition.x += mPendulum.startPosition.x } - } fun startMagnet(magnet: Boolean) { - //println("startMagnet") - //println(magnet) mPendulum.magneticField = magnet } fun stopMagnet(magnet: Boolean) { - //println("stopMagnet") - //println(magnet) mPendulum.magneticField = magnet }