ESC telemetry lua script: update_rpm is reset to zero after update_telem_data is called

1.lua (458 Bytes)

Hi All,
I’ve been working on JFB110 and CubeOrange to get ESC telem data from my companion board. My problem is that update_telem_data and update_rpm don’t perform as I expect. Both the FCs behave exactly the same so it is independent of FC platform.

  • One-time calling update_rpm shows lower rpm. It seems averaged with the value before.
  • Two-time calling update_rpm shows correct rpms.
  • Once update_telem_data is called, rpm value, which is put by a previous update_rpm, is reset to zero one second after the update_rpm run.

Probably attached script replicates the issue to review. I ran the script several times by changing the time parameters and order of lines. The problem shows consistently.
I suppose that other people have the same problem as ESC telemetry is important. I am grad if someone can look. Thank you. Kozmi.