Skip to content

Commit

Permalink
Use sensor type const
Browse files Browse the repository at this point in the history
  • Loading branch information
anod committed Dec 7, 2018
1 parent 0e2ab4e commit 3cf2969
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import android.view.KeyEvent
import info.anodsplace.headunit.aap.protocol.Channel
import info.anodsplace.headunit.aap.protocol.messages.*
import info.anodsplace.headunit.aap.protocol.nano.Input
import info.anodsplace.headunit.aap.protocol.nano.Sensors
import info.anodsplace.headunit.connection.AccessoryConnection
import info.anodsplace.headunit.contract.ProjectionActivityRequest
import info.anodsplace.headunit.decoder.AudioDecoder
Expand Down Expand Up @@ -54,7 +55,7 @@ class AapTransport(

internal fun startSensor(type: Int) {
startedSensors.add(type)
if (type == 10) {
if (type == Sensors.SENSOR_TYPE_NIGHT) {
send(NightModeEvent(false))
}
}
Expand Down

0 comments on commit 3cf2969

Please sign in to comment.