Update flipflop.js

This commit is contained in:
felixs-alt 2023-09-26 12:42:08 +02:00 committed by GitHub
parent 04e1bcd2db
commit 46110d56cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -16,11 +16,11 @@ elements.flipflop = {
console.log(typeof Output)
if (typeof Output !== "undefined" && typeof Input !== "undefined"){
Output.charge = 0
if (Powerstate == "true" && Input.charge > 0.9) {
if (Powerstate == "true" && Input.charge > 0.2) {
Powerstate == "false"
pixel.color = "#CF300D"
Output.charge = 0
} else if (Powerstate == false && Input.charge < 0.9) {
} else if (Powerstate == false && Input.charge > 0.2) {
Powerstate == true
pixel.color = "#94CF0D"
Output.charge = 5