Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

circuit_id value bug #85

Closed
olegogogo opened this issue Nov 21, 2024 · 1 comment · Fixed by #91
Closed

circuit_id value bug #85

olegogogo opened this issue Nov 21, 2024 · 1 comment · Fixed by #91
Labels
bug Something isn't working

Comments

@olegogogo
Copy link
Contributor

circuit_id value miscalculated if node_id > 25
here is an example:

Expected behaviour

node_id == 24

### Message from 24 to All  ts_mono=4705.564778  ts_real=1732175071.509685
circuit_id: 241
voltage: 5.3594
current: nan
error_flags: 0

### Message from 24 to All  ts_mono=4706.063576  ts_real=1732175072.008484
circuit_id: 240
voltage: 4.9336
current: nan
error_flags: 0

and this messages are followed by rule:
.circuit_id = static_cast<uint8_t>(node_id * 10), and .circuit_id = static_cast<uint8_t>(node_id * 10 + 1),

Unexpected behaviour

but if node_id == 26

### Message from 26 to All  ts_mono=4967.872189  ts_real=1732175333.817097
circuit_id: 4
voltage: 4.9102
current: nan
error_flags: 0

### Message from 26 to All  ts_mono=4967.872927  ts_real=1732175333.817834
circuit_id: 5
voltage: 5.2969
current: nan
error_flags: 0

if node_id == 42

### Message from 42 to All  ts_mono=5052.216468  ts_real=1732175418.161376
circuit_id: 164
voltage: 4.9219
current: nan
error_flags: 0

### Message from 42 to All  ts_mono=5052.217260  ts_real=1732175418.162167
circuit_id: 165
voltage: 5.3750
current: nan
error_flags: 0
@PonomarevDA PonomarevDA added the bug Something isn't working label Nov 21, 2024
@PonomarevDA PonomarevDA linked a pull request Dec 4, 2024 that will close this issue
@PonomarevDA
Copy link
Contributor

Fixed #91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants