aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/lua2c-interface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/lua2c-interface.cpp')
-rw-r--r--plugins/lua2c-interface.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/lua2c-interface.cpp b/plugins/lua2c-interface.cpp
index 76f61cc..b584823 100644
--- a/plugins/lua2c-interface.cpp
+++ b/plugins/lua2c-interface.cpp
@@ -57,7 +57,7 @@ CTLP_LUA2C (setSignalValueWrap, label, argsJ)
const char* name = nullptr;
double resultNum;
uint64_t timestamp;
- if(! wrap_json_unpack(argsJ, "{ss, sF, sF? !}",
+ if(! wrap_json_unpack(argsJ, "{ss, sF, sI? !}",
"name", &name,
"value", &resultNum,
"timestamp", &timestamp))
@@ -65,9 +65,8 @@ CTLP_LUA2C (setSignalValueWrap, label, argsJ)
AFB_ERROR("Fail to set value for label: %s, argsJ: %s", label, json_object_to_json_string(argsJ));
return -1;
}
-
struct signalValue result = {0,0,1, resultNum, 0, ""};
- pluginCtx->pluginHandle->setSignalValue(name, timestamp, result);
+ pluginCtx->pluginHandle->setSignalValue(name, timestamp*MICRO, result);
return 0;
}