[READ-ONLY] Mirror of https://github.com/thoda-dev/sb-energy-management. A full module to manage energy in your ship
0

Configure Feed

Select the types of activity you want to include in your feed.

full rework

Thomas (Aug 19, 2021, 8:26 PM +0200) b1bd3967 42d45283

+29 -133
-20
button1.yolol
··· 1 - if :GenModeP==1 then :GenModeNb++ :GenModeP=0 end goto1 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - // SHIP ENERGY MANAGEMENT By Jericho (Discord: jericho#1060) 20 - // https://github.com/Jericho1060/sb-energy-management
-20
button2.yolol
··· 1 - if :GenModeM==1 then :GenModeNb-- :GenModeM=0 end goto1 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - // SHIP ENERGY MANAGEMENT By Jericho (Discord: jericho#1060) 20 - // https://github.com/Jericho1060/sb-energy-management
-20
buttons_group.yolol
··· 1 - if :GenModeP==1 then :GenModeNb++ :GenModeP=0 end 2 - if :GenModeM==1 then :GenModeNb-- :GenModeM=0 end 3 - if :GenModeNb<3 then :GenModeNb=6 end 4 - if :GenModeNb>6 then:GenModeNb=3 end goto1 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - // SHIP ENERGY MANAGEMENT By Jericho (Discord: jericho#1060) 20 - // https://github.com/Jericho1060/sb-energy-management
-20
higher_limit.yolol
··· 1 - if :GenModeNb>6 then:GenModeNb=3 end goto1 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - // SHIP ENERGY MANAGEMENT By Jericho (Discord: jericho#1060) 20 - // https://github.com/Jericho1060/sb-energy-management
-20
lower_limit.yolol
··· 1 - if :GenModeNb<3 then :GenModeNb=6 end goto1 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - // SHIP ENERGY MANAGEMENT By Jericho (Discord: jericho#1060) 20 - // https://github.com/Jericho1060/sb-energy-management
+1 -1
main.yolol
··· 1 - goto (:GenModeNb-1) 1 + goto :GM 2 2 :FuelChamberUnitRateLimit=0 goto1 3 3 :FuelChamberUnitRateLimit=100-(:StoredBatteryPower/100) goto1 4 4 :FuelChamberUnitRateLimit=50 goto1
pictures/ButtonBottom.jpg

This is a binary file and will not be displayed.

pictures/ButtonTop.jpg

This is a binary file and will not be displayed.

pictures/MemoryChip.jpg

This is a binary file and will not be displayed.

+8 -12
readme.md
··· 19 19 20 20 ## Elements required 21 21 22 - - 6 `Basic YOLOL chips` (you can only use 3 but the performance will be slower) 22 + - 2 `Basic YOLOL chips` 23 23 - 1 `Text panel 24x24` 24 24 - 2 `Simple buttons 12x12` 25 - - 1 `YOLOL memery chip` 26 - - 7 `YOLOL chip sockets` or 3 `YOLOL Racks 48x48` with 1 `YOLOL Rack chip slot(2 slots)` and 2 `YOLOL Rack chip slot (3 Slots)` 25 + - 1 `YOLOL memory chip` 26 + - 3 `YOLOL chip sockets` 27 27 28 28 ## Example for Mounting the display and buttons 29 29 ··· 65 65 66 66 ![Text Panel fields](https://github.com/Jericho1060/sb-energy-management/blob/main/pictures/TextPanel.jpg?raw=true) 67 67 68 - 69 68 ## Memory chip 70 69 71 70 On the memory chip, just replace the 1st field with the name `GenModeNb` and set it to `4` (this is the value for auto power) ··· 74 73 75 74 ## Scripts 76 75 77 - If you are using 6 you can copy each of the folowing files on a single basic chip and plug them: 76 + Copy and paste these both scripts (line by line) on the two basic chips 78 77 79 78 - `main.yolol` will manage the fuel chmaber rate depending on th emode you selected 80 - - `screen.yolol` will manage the display on the text panel 81 - - `button1.yolol` will manage the press on the bottom button 82 - - `button2.yolol` will manage the press on the top button 83 - - `higher_limit.yolol` will reset the value of `GenModeNB` to shutdown if it goes higher than the overide 84 - - `higher_limit.yolol` will reset the value of `GenModeNB` to override if it goes lower than the shutdown 79 + - `selector.yolol` will manage the display on the text panel 80 + 81 + ## Credits 85 82 86 - if you are only using 3 chips, you only need these 3 scripts : `main.yolol`, `screen.yolol`, `buttons_group.yolol`. 87 - The third one will regroupe the 4 that are managing the button states and the limits. 83 + Special Thanx to Daveman42 for the help on the selector. 88 84 89 85 ## Support or donation 90 86
-20
screen.yolol
··· 1 - l1="Shutdown" l2="Auto" l3="Half" l4="Override" 2 - a="> " b=" " n="\n" goto :GenModeNb 3 - :GenMode=n+a+l1+n+b+l2+n+b+l3+n+b+l4 goto2 4 - :GenMode=n+b+l1+n+a+l2+n+b+l3+n+b+l4 goto2 5 - :GenMode=n+b+l1+n+b+l2+n+a+l3+n+b+l4 goto2 6 - :GenMode=n+b+l1+n+b+l2+n+b+l3+n+a+l4 goto2 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - // SHIP ENERGY MANAGEMENT By Jericho (Discord: jericho#1060) 20 - // https://github.com/Jericho1060/sb-energy-management
+20
selector.yolol
··· 1 + n="\n" l=n+" 2> Shutdown"+n+" 3> Auto"+n+" 4> Half"+n+" 5> Override" 2 + v=:GMP-:GMM if v then :GM+=v :GM+=(:GM<2)*4-(:GM>5)*4 else goto3 end 3 + ax=" "+:GM :GMP=0 :GMM=0 :GenMode=l-ax-"2>"-"3>"-"4>"-"5>" goto2 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + // SHIP ENERGY MANAGEMENT By Jericho (Discord: jericho#1060) 19 + // https://github.com/Jericho1060/sb-energy-management 20 + // special thanx to Daveman42 for the help on the rework