mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
RCON Interface Update (#1545)
* SMES interface charging fix * Updates RCON console to use kW units
This commit is contained in:
@@ -17,10 +17,10 @@
|
|||||||
smeslist.Add(list(list(
|
smeslist.Add(list(list(
|
||||||
"charge" = round(SMES.Percentage()),
|
"charge" = round(SMES.Percentage()),
|
||||||
"input_set" = SMES.input_attempt,
|
"input_set" = SMES.input_attempt,
|
||||||
"input_val" = round(SMES.input_level),
|
"input_val" = round(SMES.input_level/1000, 0.1),
|
||||||
"output_set" = SMES.output_attempt,
|
"output_set" = SMES.output_attempt,
|
||||||
"output_val" = round(SMES.output_level),
|
"output_val" = round(SMES.output_level/1000, 0.1),
|
||||||
"output_load" = round(SMES.output_used),
|
"output_load" = round(SMES.output_used/1000, 0.1),
|
||||||
"RCON_tag" = SMES.RCon_tag
|
"RCON_tag" = SMES.RCon_tag
|
||||||
)))
|
)))
|
||||||
|
|
||||||
@@ -63,12 +63,12 @@
|
|||||||
if(href_list["smes_in_set"])
|
if(href_list["smes_in_set"])
|
||||||
var/obj/machinery/power/smes/buildable/SMES = GetSMESByTag(href_list["smes_in_set"])
|
var/obj/machinery/power/smes/buildable/SMES = GetSMESByTag(href_list["smes_in_set"])
|
||||||
if(SMES)
|
if(SMES)
|
||||||
var/inputset = input(usr, "Enter new input level (0-[SMES.input_level_max])", "SMES Input Power Control") as num
|
var/inputset = (input(usr, "Enter new input level (0-[SMES.input_level_max/1000] kW)", "SMES Input Power Control", SMES.input_level/1000) as num) * 1000
|
||||||
SMES.set_input(inputset)
|
SMES.set_input(inputset)
|
||||||
if(href_list["smes_out_set"])
|
if(href_list["smes_out_set"])
|
||||||
var/obj/machinery/power/smes/buildable/SMES = GetSMESByTag(href_list["smes_out_set"])
|
var/obj/machinery/power/smes/buildable/SMES = GetSMESByTag(href_list["smes_out_set"])
|
||||||
if(SMES)
|
if(SMES)
|
||||||
var/outputset = input(usr, "Enter new output level (0-[SMES.output_level_max])", "SMES Input Power Control") as num
|
var/outputset = (input(usr, "Enter new output level (0-[SMES.output_level_max/1000] kW)", "SMES Input Power Control", SMES.output_level/1000) as num) * 1000
|
||||||
SMES.set_output(outputset)
|
SMES.set_output(outputset)
|
||||||
|
|
||||||
if(href_list["toggle_breaker"])
|
if(href_list["toggle_breaker"])
|
||||||
|
|||||||
@@ -303,7 +303,7 @@
|
|||||||
data["storedCapacity"] = round(100.0*charge/capacity, 0.1)
|
data["storedCapacity"] = round(100.0*charge/capacity, 0.1)
|
||||||
data["storedCapacityAbs"] = round(charge/(1000*60), 0.1)
|
data["storedCapacityAbs"] = round(charge/(1000*60), 0.1)
|
||||||
data["storedCapacityMax"] = round(capacity/(1000*60))
|
data["storedCapacityMax"] = round(capacity/(1000*60))
|
||||||
data["charging"] = round(inputting/1000, 0.1)
|
data["charging"] = inputting
|
||||||
data["chargeMode"] = input_attempt
|
data["chargeMode"] = input_attempt
|
||||||
data["chargeLevel"] = round(input_level/1000, 0.1)
|
data["chargeLevel"] = round(input_level/1000, 0.1)
|
||||||
data["chargeMax"] = round(input_level_max/1000)
|
data["chargeMax"] = round(input_level_max/1000)
|
||||||
|
|||||||
@@ -27,12 +27,12 @@
|
|||||||
</div>
|
</div>
|
||||||
{{if !data.hide_smes_details}}
|
{{if !data.hide_smes_details}}
|
||||||
<tr><td>
|
<tr><td>
|
||||||
Input: {{:value.input_val}}W - {{:value.input_set ? "AUTO" : "OFF"}}
|
Input: {{:value.input_val}} kW - {{:value.input_set ? "AUTO" : "OFF"}}
|
||||||
<td>
|
<td>
|
||||||
{{:helper.link('', 'power', { 'smes_in_toggle' : value.RCON_tag})}}
|
{{:helper.link('', 'power', { 'smes_in_toggle' : value.RCON_tag})}}
|
||||||
{{:helper.link('', 'pencil', { 'smes_in_set' : value.RCON_tag})}}
|
{{:helper.link('', 'pencil', { 'smes_in_set' : value.RCON_tag})}}
|
||||||
<tr><td>
|
<tr><td>
|
||||||
Output: {{:value.output_val}}W - {{:value.output_set ? "ONLINE" : "OFFLINE"}}
|
Output: {{:value.output_val}} kW - {{:value.output_set ? "ONLINE" : "OFFLINE"}}
|
||||||
<td>
|
<td>
|
||||||
{{:helper.link('', 'power', { 'smes_out_toggle' : value.RCON_tag})}}
|
{{:helper.link('', 'power', { 'smes_out_toggle' : value.RCON_tag})}}
|
||||||
{{:helper.link('', 'pencil', { 'smes_out_set' : value.RCON_tag})}}
|
{{:helper.link('', 'pencil', { 'smes_out_set' : value.RCON_tag})}}
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
<tr><td>
|
<tr><td>
|
||||||
Output Load:
|
Output Load:
|
||||||
<td>
|
<td>
|
||||||
{{:value.output_load}}W
|
{{:value.output_load}} kW
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user