Skip to content

Commit 760f093

Browse files
alexandre-rouxAlexandre Roux
and
Alexandre Roux
authored
peppergamepad-1.0.3 (#4)
* Upgrade to versionCode 4 & versionName 1.0.3 * Reduce speed to avoid wobbles * Reduce joystick sensibility Co-authored-by: Alexandre Roux <aroux@softbankrobotics.com>
1 parent a640c06 commit 760f093

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pepper-gamepad-root/pepper-gamepad/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ apply plugin: 'kotlin-android'
44

55
android {
66
archivesBaseName = "pepper-gamepad"
7-
version = "1.0.0"
7+
version = "1.0.3"
88
compileSdkVersion 28
99
defaultConfig {
1010
minSdkVersion 23
1111
targetSdkVersion 28
12-
versionCode 1
13-
versionName "1.0.0"
12+
versionCode 4
13+
versionName "1.0.3"
1414
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1515
}
1616
buildTypes {

pepper-gamepad-root/pepper-gamepad/src/main/java/com/softbankrobotics/peppergamepad/RemoteRobotController.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ class RemoteRobotController(context: QiContext) {
6464
var roundedNewLeftJoystickY = 0
6565
if (!(newLeftJoystickX == 0f && newLeftJoystickY == 0f)) {
6666
val leftJoystickTheta = atan2(newLeftJoystickY, newLeftJoystickX)
67-
roundedNewLeftJoystickX = (cos(leftJoystickTheta) * 10).roundToInt()
68-
roundedNewLeftJoystickY = (sin(leftJoystickTheta) * 10).roundToInt()
67+
roundedNewLeftJoystickX = (cos(leftJoystickTheta) * 2).roundToInt() * 5
68+
roundedNewLeftJoystickY = (sin(leftJoystickTheta) * 2).roundToInt() * 5
6969
}
7070
var roundedNewRightJoystickX = 0
7171
var roundedNewRightJoystickY = 0
@@ -102,7 +102,7 @@ class RemoteRobotController(context: QiContext) {
102102
val targetX = -currentLeftJoystickY.toDouble()
103103
val targetY = -currentLeftJoystickX.toDouble()
104104

105-
val animationString = "[\"Holonomic\", [\"Line\", [$targetX, $targetY]], 0.0, 30.0]"
105+
val animationString = "[\"Holonomic\", [\"Line\", [$targetX, $targetY]], 0.0, 40.0]"
106106
val animation = AnimationBuilder.with(qiContext).withTexts(animationString).build()
107107
val animate = AnimateBuilder.with(qiContext).withAnimation(animation).build()
108108
animate.addOnStartedListener {

0 commit comments

Comments
 (0)