Browse Source

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
master
Feyzu 3 years ago
parent
commit
55cd99ef36
2 changed files with 7 additions and 12 deletions
  1. +6
    -6
      .idea/deploymentTargetDropDown.xml
  2. +1
    -6
      app/src/main/java/com/example/acapendulum20/canvas/CanvasPendulum.kt

+ 6
- 6
.idea/deploymentTargetDropDown.xml View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<targetSelectedWithDropDown>
<runningDeviceTargetSelectedWithDropDown>
<Target>
<type value="QUICK_BOOT_TARGET" />
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="C:\Users\Feyzu\.android\avd\Pixel_4_API_30.avd" />
<type value="SERIAL_NUMBER" />
<value value="2870b471243f7ece" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2022-06-09T14:25:36.652444900Z" />
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2022-08-01T12:00:37.380333200Z" />
</component>
</project>

+ 1
- 6
app/src/main/java/com/example/acapendulum20/canvas/CanvasPendulum.kt View File

@ -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
}


Loading…
Cancel
Save