Lua rFSM bugfix

Markus,

Some weeks ago you fixed a bug in rFSM (thanks for that!), but seem to
have forgotten to commit the changes.
Please find the error message and patch below.

Kind regards,
Eli

[ ERROR ][/opt/ros/electric/stacks/orocos_toolchain/ocl/bin/rttlua-gnulinux::main()]
LuaComponent 'sup': error calling function configureHook:
/home/intermodalics/ros/rFSM/rfsm_rtt.lua:119: attempt to call local
'type' (a string value)

diff --git a/rfsm_rtt.lua b/rfsm_rtt.luaindex 1bb05b7..c6c113c
100644--- a/rfsm_rtt.lua+++ b/rfsm_rtt.lua@@ -115,14 +115,14 @@ end --
(optional)  function gen_write_fqn(port, filter)-   local type =
port:info().type --todo check for filter?-   if type ~= 'string' and
type(filter) ~= 'function' then-      error("use of non string type "
.. type .. " requires a filter function")-   end+   local type_name =
port:info().type --todo check for filter?+   --if type_name ~=
'string' and type(filter) ~= 'function' then+   --   error("use of non
string type " .. type_name .. " requires a filter function")+   --end
  local act_fqn = ""    local _f = filter or function (var, fqn)
var:assign(fqn); return var end-   local out_dsb =
rtt.Variable.new(type)+   local out_dsb = rtt.Variable.new(type_name)
  port:write(_f(out_dsb, "<none>")) -- initial val @@ -266,4 +266,4
@@ function component_launch_rfsm(argtab)    if argtab.postfile then
exec_file(argtab.postfile) end     return comp-end\ No newline at end
of file+end

Lua rFSM bugfix

On Tuesday 06 December 2011 10:43:24 Eli Reekmans wrote:
> Markus,
>
> Some weeks ago you fixed a bug in rFSM (thanks for that!), but seem to
> have forgotten to commit the changes.
> Please find the error message and patch below.
>
> Kind regards,
> Eli
>
> [ ERROR
> ][/opt/ros/electric/stacks/orocos_toolchain/ocl/bin/rttlua-gnulinux::main(
> )] LuaComponent 'sup': error calling function configureHook:
> /home/intermodalics/ros/rFSM/rfsm_rtt.lua:119: attempt to call local
> 'type' (a string value)
>
>
> diff --git a/rfsm_rtt.lua b/rfsm_rtt.luaindex 1bb05b7..c6c113c
> 100644--- a/rfsm_rtt.lua+++ b/rfsm_rtt.lua@@ -115,14 +115,14 @@ end --
> (optional) function gen_write_fqn(port, filter)- local type =
> port:info().type --todo check for filter?- if type ~= 'string' and
> type(filter) ~= 'function' then- error("use of non string type "
> .. type .. " requires a filter function")- end+ local type_name =
> port:info().type --todo check for filter?+ --if type_name ~=
> 'string' and type(filter) ~= 'function' then+ -- error("use of non
> string type " .. type_name .. " requires a filter function")+ --end
> local act_fqn = "" local _f = filter or function (var, fqn)
> var:assign(fqn); return var end- local out_dsb =
> rtt.Variable.new(type)+ local out_dsb = rtt.Variable.new(type_name)
> port:write(_f(out_dsb, "<none>")) -- initial val @@ -266,4 +266,4
> @@ function component_launch_rfsm(argtab) if argtab.postfile then
> exec_file(argtab.postfile) end return comp-end\ No newline at end
> of file+end

Invalid patch :-) You'd probably want to attach this as a file, unless you get
a good email program :-)

Peter

Lua rFSM bugfix

I attached it as a diff-file. That should look better...

On Tue, Dec 6, 2011 at 11:21 AM, Peter Soetens <peter [..] ...> wrote:
> On Tuesday 06 December 2011 10:43:24 Eli Reekmans wrote:
>> Markus,
>>
>> Some weeks ago you fixed a bug in rFSM (thanks for that!), but seem to
>> have forgotten to commit the changes.
>> Please find the error message and patch below.
>>
>> Kind regards,
>> Eli
>>
>> [ ERROR
>> ][/opt/ros/electric/stacks/orocos_toolchain/ocl/bin/rttlua-gnulinux::main(
>> )] LuaComponent 'sup': error calling function configureHook:
>> /home/intermodalics/ros/rFSM/rfsm_rtt.lua:119: attempt to call local
>> 'type' (a string value)
>>
>>
>> diff --git a/rfsm_rtt.lua b/rfsm_rtt.luaindex 1bb05b7..c6c113c
>> 100644--- a/rfsm_rtt.lua+++ b/rfsm_rtt.lua@@ -115,14 +115,14 @@ end --
>> (optional)  function gen_write_fqn(port, filter)-   local type =
>> port:info().type --todo check for filter?-   if type ~= 'string' and
>> type(filter) ~= 'function' then-      error("use of non string type "
>> .. type .. " requires a filter function")-   end+   local type_name =
>> port:info().type --todo check for filter?+   --if type_name ~=
>> 'string' and type(filter) ~= 'function' then+   --   error("use of non
>> string type " .. type_name .. " requires a filter function")+   --end
>>    local act_fqn = ""    local _f = filter or function (var, fqn)
>> var:assign(fqn); return var end-   local out_dsb =
>> rtt.Variable.new(type)+   local out_dsb = rtt.Variable.new(type_name)
>>    port:write(_f(out_dsb, "<none>")) -- initial val @@ -266,4 +266,4
>> @@ function component_launch_rfsm(argtab)    if argtab.postfile then
>> exec_file(argtab.postfile) end     return comp-end\ No newline at end
>> of file+end
>
> Invalid patch :-) You'd probably want to attach this as a file, unless you get
> a good email program :-)
>
> Peter

Lua rFSM bugfix

On Tue, Dec 06, 2011 at 02:47:28PM +0100, Eli Reekmans wrote:
> I attached it as a diff-file. That should look better...
>
> diff --git a/rfsm_rtt.lua b/rfsm_rtt.lua
> index 1bb05b7..c6c113c 100644