fix: preserve WeatherRuntime timeline rejection
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled
This commit is contained in:
@@ -364,14 +364,19 @@ class ParticleCoreLayerValidationActivity : AppCompatActivity() {
|
||||
2 -> when (value) { 0.5f -> runtime?.setPlaybackSpeed(WeatherRuntime.PlaybackSpeed.HALF); 1.0f -> runtime?.setPlaybackSpeed(WeatherRuntime.PlaybackSpeed.NORMAL); 2.0f -> runtime?.setPlaybackSpeed(WeatherRuntime.PlaybackSpeed.DOUBLE); else -> null }
|
||||
else -> null // Existing fixture-only diagnostic commands remain outside the REAL WEATHER Host facade.
|
||||
}
|
||||
if (accepted != WeatherRuntime.CommandResult.ACCEPTED && !realWeatherMode && (runtime == null || !maplibreMap.controlRasterArraySourceTimeline(PARTICLE_SOURCE_ID, command, value))) {
|
||||
Log.i(TAG, "ParticleTimeline: event=REJECTED command=$command")
|
||||
} else {
|
||||
timelineState = when (command) { 0 -> "PLAY"; 1 -> "PAUSE"; 6 -> "WAIT"; 7 -> "INVALID"; 8 -> "PAUSE"; else -> timelineState }
|
||||
if (command == 2) timelineSpeed = "${value}x"
|
||||
status.text = statusText()
|
||||
Log.i(TAG, "ParticleTimeline: event=COMMAND command=$command value=$value")
|
||||
val commandAccepted = when {
|
||||
accepted == WeatherRuntime.CommandResult.ACCEPTED -> true
|
||||
realWeatherMode -> false
|
||||
else -> maplibreMap.controlRasterArraySourceTimeline(PARTICLE_SOURCE_ID, command, value)
|
||||
}
|
||||
if (!commandAccepted) {
|
||||
Log.i(TAG, "ParticleTimeline: event=REJECTED command=$command")
|
||||
return
|
||||
}
|
||||
timelineState = when (command) { 0 -> "PLAY"; 1 -> "PAUSE"; 6 -> "WAIT"; 7 -> "INVALID"; 8 -> "PAUSE"; else -> timelineState }
|
||||
if (command == 2) timelineSpeed = "${value}x"
|
||||
status.text = statusText()
|
||||
Log.i(TAG, "ParticleTimeline: event=COMMAND command=$command value=$value")
|
||||
}
|
||||
|
||||
private fun actionLabel(id: Int): String = when (id) {
|
||||
|
||||
Reference in New Issue
Block a user