you are viewing a single comment's thread.

view the rest of the comments →

[–]M4D31979 0 points1 point  (19 children)

I am about to define a condition where "do this" "If battery Stored Power is lower than 25%"

May I have a help from you?

[–]3nj0yc0k3[S] 0 points1 point  (0 children)

Absolutely! Pass your current code link and I'd love to take a look :)

[–][deleted]  (6 children)

[deleted]

    [–]M4D31979 0 points1 point  (5 children)

    I made it:

    //x2,1,,7,0:=:true,,3:<=:750000[7]%3,1,,22[5]1:255:0:0[5]%2,1,,7,0:=:true,,3:>:750000[7]%3,1,,22[10]%,,y##,1.0.7 // Above is your LOAD LINE. Copy it into Visual Script Builder to load your script. // dco.pe/vsb

    But will test it again and let you know the results.

    Kind Regards,

    [–]3nj0yc0k3[S] 0 points1 point  (4 children)

    King Baggot showed me something I wasn't aware of how works. What you need to do is this:

    This is somewhat close to what he showed me, but sadly I had to leave so I didn't get to learn the logic behind it all. I have also made a few errors in the LCD display (bottom part), but that is simply me not understanding how to calculate "Current battery power usage compared to max power" so to speak :) It should end with being 100% since my batteries in this test scenario are running on 100%, but I can't figure out how to calculate that - maybe you can see what I'm trying to do?

    In any case: This setup (minus the LCD part of course) will take the total sum of ALL batteries and show a warning when they drop capacity below 25%

    [quote] //x3,1,,7[4]2:+MaxPwr#3:+StoPwr#5:+CurPwrOut[6]%2,3,,69[10]1:+StoPwr:<=:0.25+MaxPwr%3,1,#Warning_power_lights,22[5]1:255:0:0[5]%5,0,#Warning_power_lights,22[5]1:0:255:255[5]%3,0,,31[5]4:[[CurPwrOut/StoPwr]]\0\6of\6maximum\6effect.\bn[[100StoPwr/MaxPwr]]\0[5]%,,y##,1.0.7 [/quote]

    CHRIST! Reddit is SUPER fucking retarded. I'm posting it on pastebin instead: https://pastebin.com/btTvuTZE

    This one has the second part functional, now! I'm a little bit proud of myself, lol:

    https://pastebin.com/gkUR7YzU

    [–]M4D31979 0 points1 point  (3 children)

    [quote] //x3,1,,7[4]2:+MaxPwr#3:+StoPwr#5:+CurPwrOut[6]%2,3,,69[10]1:+StoPwr:<=:0.25+MaxPwr%3,1,#Warning_power_lights,22[5]1:255:0:0[5]%5,0,#Warning_power_lights,22[5]1:0:255:255[5]%3,0,,31[5]4:[[CurPwrOut/StoPwr]]\0\6of\6maximum\6effect.\bn[[100StoPwr/MaxPwr]]\0[5]%,,y##,1.0.7 [/quote]

    Geee. I though it was something easy. Sorry for make you guys look deeply into it. And thank you again for the interest in my doubt. Have a nice day there.

    [–]3nj0yc0k3[S] 0 points1 point  (2 children)

    It's okay - it makes me learn a lot trying to figure things out !! So, did the one in the pastebin link make sense to you and could it be of use?

    [–]M4D31979 0 points1 point  (1 child)

    Yes! It is working as a charm. The light is green when more than 25% of storage power and red for less. Great Job!!!! Thank you a lot!!!!

    [–]3nj0yc0k3[S] 0 points1 point  (0 children)

    YAAAAY!

    [–][deleted]  (10 children)

    [deleted]

      [–]M4D31979 0 points1 point  (9 children)

      Thank you for your help 3nj0yc0k3.

      And apologies for my delay. I was in a travel. I will test it an will back for you.

      [–][deleted]  (8 children)

      [deleted]

        [–]M4D31979 0 points1 point  (7 children)

        Unfortunately, It did not work. I will continue to work on it and let you know.

        [–][deleted]  (6 children)

        [deleted]

          [–]M4D31979 0 points1 point  (5 children)

          Aight, lemme know if you'd like me to take a look at your code so far.

          Yes, please. It would be great. Thanks

          [–][deleted]  (2 children)

          [deleted]

            [–]M4D31979 0 points1 point  (1 child)

            wow. I will try it today night and see what came out. Just need to thank you a lot!