Update flipflop.js

This commit is contained in:
felixs-alt 2023-09-27 08:06:19 +02:00 committed by GitHub
parent 3c3b20d33d
commit 82c897e70e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -17,7 +17,6 @@ elements.flipflop = {
if (typeof Output !== "undefined" && typeof Input !== "undefined"){
if (pixel.cooldown > 0){
pixel.cooldown--
console.log(pixel.cooldown)
}
Output.charge = 0
if (pixel.powerstate == "true" && Input.charge > 0.2 && pixel.cooldown < 1) {
@ -27,7 +26,7 @@ elements.flipflop = {
pixel.color = "#CF300D"
Output.charge = 0
} else if (pixel.powerstate == "false" && Input.charge > 0.2 && pixel.cooldown < 1) {
Input.chare = 0
Input.charge = 0
pixel.cooldown = 5
pixel.powerstate = "true"
pixel.color = "#94CF0D"