Update flipflop.js
This commit is contained in:
parent
0e9b52edc5
commit
89b75ae78e
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue