From 2f46877f1ff5f359727aa979b8dbc4ab2d092fbb Mon Sep 17 00:00:00 2001 From: Bruce Conrad Date: Sat, 16 Mar 2024 09:44:29 -0600 Subject: [PATCH] finish insert code --- krl/io.picolabs.plan.wovyn-sensors.krl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/krl/io.picolabs.plan.wovyn-sensors.krl b/krl/io.picolabs.plan.wovyn-sensors.krl index 13ff2e0..e35a050 100644 --- a/krl/io.picolabs.plan.wovyn-sensors.krl +++ b/krl/io.picolabs.plan.wovyn-sensors.krl @@ -254,24 +254,22 @@ daysInRecord() clear ent:mapping{name} } } - rule addSensorMapping { + rule insertSensorMapping { select when io_picolabs_plan_wovyn_sensors sensor_needed name re#(Wovyn_[A-F0-9]{6})# location re#(.+)# setting(name,location) pre { new_location = {}.put(name,location) -.klog("new_location") new_mapping = ent:mapping .keys() .reduce(function(a,k){ a.put(k,ent:mapping.get(k)) },new_location) -.klog("new_mapping") } send_directive("_redirect",{"url":settings_link()}) fired { - ent:mapping{name} := location + ent:mapping := new_mapping } } rule acceptHeartbeat {