Update flipflop.js

This commit is contained in:
felixs-alt 2023-09-27 09:05:35 +02:00 committed by GitHub
parent 132dfa2a2e
commit 7608a825fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -16,16 +16,16 @@ elements.flipflop = {
if (typeof Output !== "undefined" && typeof Input !== "undefined") {
if (Input.charge > 0.7) {
if (pixel.powerstate == "true") {
Input.charge = 0
pixel.powerstate = "false"
pixel.color = "#CF300D"
Output.charge = 0
} else {
Input.charge = 0
} else if (pixel.powerstate == "true") {
pixel.powerstate = "true"
pixel.color = "#94CF0D"
Output.charge = 5
Output.charge = 1
}
} else {
Output.charge = 0
}
}
}