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 f1e3aaf

Browse files
committed
add makePolicy method in presenter.
1 parent 0098841 commit f1e3aaf

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

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

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

33
import io.github.xei.police.app.Action
4+
import io.github.xei.police.app.State
45
import io.github.xei.police.exception.BluetoothNotSupportException
56
import io.github.xei.police.util.mvp.BaseModel
67
import io.github.xei.police.util.mvp.BasePresenter
@@ -28,6 +29,7 @@ interface JoystickContract {
2829
}
2930

3031
interface Presenter : BasePresenter {
32+
fun makePolicy(state: State)
3133
fun performVoiceCommand(recognizedCommand: String)
3234
}
3335
}

‎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 io.github.xei.police.app.State
34
import io.github.xei.police.exception.BluetoothNotSupportException
45

56
/**
@@ -27,6 +28,10 @@ class JoystickPresenter(private val model: JoystickContract.Model, private val v
2728
}
2829
}
2930

31+
override fun makePolicy(state: State) {
32+
// TODO: make policy based on the sensors state
33+
}
34+
3035
override fun performVoiceCommand(recognizedCommand: String) {
3136
if (view.isActive) {
3237
view.showToast(recognizedCommand)

0 commit comments

Comments
(0)

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