Update flipflop.js

This commit is contained in:
felixs-alt 2023-09-26 13:45:07 +02:00 committed by GitHub
parent 0e9b52edc5
commit 89b75ae78e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -17,11 +17,13 @@ elements.flipflop = {
if (typeof Output !== "undefined" && typeof Input !== "undefined"){
Output.charge = 0
if (pixel.powerstate == "true" && Input.charge > 0.2) {
Input.charge = 0
pixel.powerstate = "false"
pixel.color = "#CF300D"
console.log(pixel.powerstate+"y")
Output.charge = 0
} else if (pixel.powerstate == "false" && Input.charge > 0.2) {
Input.chare = 0
pixel.powerstate = "true"
console.log(pixel.powerstate+"n")
pixel.color = "#94CF0D"