Skip to content

2 new problems #58

@msillano

Description

@msillano

Hi Martin

a) Working a new timer project I had a problem: after a change (I don't know which one :( ) all the timers and interrupts, which previously worked perfectly, all stopped working at the same time. My code is very long (3950) and I make strong efforts to keep it in the required size. But the problem is not the total size. (I can send you the full code not working if that can help).

b) So I start to make some tests: maybe the cause is the size of code after "on timer.."? Cutting it looks working (not sure). Making tests to cut it, I fond a second problem, easily replicable, see the next code (the idea is to use "publish local .." as a function call)

on init
do
subscribe local /#
settimer 2 3000

on topic local /tb
do
%next line as no effect
println "in local timer 2"
%This line works, timer 2 restarts
settimer 2 3000

on timer 2
do
println "on timer 2 "
publish local /tb b

The message "in local timer 2" do not appear on the terminal (Putty, telnet) but the next line works, because the timer restarts: "on timer 2 " appears every 3 seconds.

Tested using:

  • Version V2.0.6 (build: Wed Jul 18 20:03:01 2018) and
  • Version V2.0.10 (build: Sun Jan 27 17:30:33 2019): both same.

Any idea?
Best regards
m.s.
p.s. ADDED
Using serial debug I get (correct):

local timer 2
on timer 2
local timer 2

Using telnet debug I get (bad)

on timer 2
on timer 2
on timer 2

best regards

p.p.s. about (a) problem:
After many tests days, I found that the following line creates problems at runtime:

publish local $cmd on
% must be replaced with
publish local $cmd go
publish local $cmd "on"

best rergards
m.s.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions