automatic reactor scram functionality for future use

This commit is contained in:
Mikayla Fischler
2022-11-11 16:15:44 -05:00
parent c221ffa129
commit af57c3b1fc
8 changed files with 48 additions and 13 deletions

View File

@@ -789,10 +789,15 @@ function plc.comms(id, version, modem, local_port, server_port, reactor, rps, co
self.scrammed = false
_send_ack(packet.type, rps.activate())
elseif packet.type == RPLC_TYPES.RPS_SCRAM then
-- disable the reactor
-- disable the reactor per manual request
self.scrammed = true
rps.trip_manual()
_send_ack(packet.type, true)
elseif packet.type == RPLC_TYPES.RPS_ASCRAM then
-- disable the reactor per automatic request
self.scrammed = true
rps.trip_auto()
_send_ack(packet.type, true)
elseif packet.type == RPLC_TYPES.RPS_RESET then
-- reset the RPS status
rps.reset()