Skip to content

Fix missing tx_power and freq parameters for node configuration - #83

Merged
GUVWAF merged 1 commit into
meshtastic:masterfrom
jonearle:master
Jul 28, 2026
Merged

Fix missing tx_power and freq parameters for node configuration#83
GUVWAF merged 1 commit into
meshtastic:masterfrom
jonearle:master

Conversation

@jonearle

@jonearle jonearle commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Using both loraMesh.py and batchSim.py with the default invocation on the latest version could throw a similar TypeError for both files, as the required tx_power and freq arguments were not provided when creating a NodeConfig.

On loraMesh.py:
python3 loraMesh.py
TypeError: NodeConfig.from_gen_scenario_output() missing 2 required positional arguments: 'tx_power' and 'freq'

On batchSim.py:
python3 batchSim.py
TypeError: NodeConfig.init() missing 2 required positional arguments: 'tx_power' and 'freq'

This change adds the missing arguments to both files so NodeConfig objects can be created properly.

All tests pass after changes are made:
python -m unittest discover -s tests

Ran 31 tests in 2.988s

OK

Summary by CodeRabbit

  • Bug Fixes
    • Network simulations now consistently apply each scenario’s configured transmit power and frequency to node settings.
    • Improved accuracy of batch and scenario-based simulation results by ensuring complete radio configuration is used for every node.

@CLAassistant

CLAassistant commented Jul 27, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f2c2c1e6-15c3-4bdd-a929-ee710146d277

📥 Commits

Reviewing files that changed from the base of the PR and between b835776 and df0d837.

📒 Files selected for processing (2)
  • batchSim.py
  • loraMesh.py

📝 Walkthrough

Walkthrough

Node configuration creation now explicitly passes transmit power and frequency in both batch simulation setup and scenario file loading.

Changes

Radio configuration propagation

Layer / File(s) Summary
NodeConfig radio inputs
batchSim.py, loraMesh.py
Batch setup uses explicit keyword arguments and passes PTX and FREQ; scenario loading forwards the same parameters to NodeConfig.from_gen_scenario_output.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: zandi

Poem

I’m a bunny with radios bright,
Passing power and frequency right.
Nodes hop with care,
Configs fill the air,
And signals now travel just right!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main fix: adding missing tx_power and freq parameters to NodeConfig creation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@GUVWAF

GUVWAF commented Jul 28, 2026

Copy link
Copy Markdown
Member

Thanks for the fix, looks good to me!

@GUVWAF
GUVWAF merged commit 17ceb82 into meshtastic:master Jul 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants