#434 #454 PPM improvements and undefined function overhaul

This commit is contained in:
Mikayla Fischler
2024-03-23 00:26:58 -04:00
parent 1c0f61b3e0
commit 19869416af
12 changed files with 186 additions and 265 deletions

View File

@@ -144,9 +144,9 @@ function plc.rps_init(reactor, is_formed)
local function _check_and_handle_ppm_call(result)
if result == ppm.ACCESS_FAULT then
_set_fault()
elseif result == ppm.UNDEFINED_FIELD then
_set_fault()
self.formed = false
-- if undefined, then the reactor isn't formed
if reactor.__p_last_fault() == ppm.UNDEFINED_FIELD then self.formed = false end
else return true end
return false