iotile / iotile/coretools

Optimize inputs -> counter -> trigger always

Open
#379 0 comments 0 reactions 0 assignees View on GitHub
iotile-sensorgraph type:enhancement
Dominant language
Python
Stars
14
Forks
7
PR merge metrics
No merged PRs in 30d

Description

There is an autogenerated node pattern that can be easily optimized. When a counter is attached to an input to produce timers but the timers are always triggered, there is no need for the intermediate counter:

See:

```
(system input 3 always) => counter 1025 using copy_latest_a
(counter 1025 always && constant 1034 when value == 1) => counter 1031 using copy_latest_a
```

This should be just:

```
(system input 3 always && constant 1034 when value == 1) => counter 1031 using copy_latest_a
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.