Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 49e6bf4

Browse files
committed
log state and action in makePolicy method.
1 parent 0cfc11e commit 49e6bf4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎controller-application/Police/app/src/main/java/io/github/xei/police/joystick/JoystickPresenter.kt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.github.xei.police.joystick
22

3+
import android.util.Log
34
import io.github.xei.police.app.Action
45
import io.github.xei.police.app.State
56
import io.github.xei.police.exception.BluetoothNotSupportException
@@ -9,6 +10,8 @@ import io.github.xei.police.exception.BluetoothNotSupportException
910
*/
1011
class JoystickPresenter(private val model: JoystickContract.Model, private val view: JoystickContract.View) : JoystickContract.Presenter {
1112

13+
private val TAG_DEBUG = JoystickPresenter::class.java.simpleName
14+
1215
init {
1316
model.presenter = this
1417
view.presenter = this
@@ -30,9 +33,11 @@ class JoystickPresenter(private val model: JoystickContract.Model, private val v
3033
}
3134

3235
override fun makePolicy(state: State) {
36+
Log.i(TAG_DEBUG, "State: " + state.toString())
3337
// TODO: make policy based on the sensors state
3438
val action = Action()
3539
sendActionToAgent(action)
40+
Log.i(TAG_DEBUG, "Action: " + action.toString())
3641
}
3742

3843
override fun sendActionToAgent(action: Action) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /