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

WB-MAI6: Add supply voltage channel #846

Merged
merged 10 commits into from
Dec 20, 2024

Conversation

Ilia1S
Copy link
Contributor

@Ilia1S Ilia1S commented Dec 19, 2024

Добавил контрол Supply Voltage (регистр 121)

Summary by CodeRabbit

  • New Features

    • Introduced an Internal 5V Bus Voltage channel for the WB-MAI6 device in version 2.152.1.
    • Added a new parameter for "Internal 5V Bus Voltage" in the WB-MAI6 device configuration.
    • Included English and Russian translations for "Internal 5V Bus Voltage".
  • Bug Fixes

    • Updated the WBE2-I-EBUS template with a new min_request_interval parameter.
  • Documentation

    • Updated the changelog to reflect recent changes and improvements across multiple versions.

@Ilia1S Ilia1S requested a review from pgasheev December 19, 2024 14:27
@Ilia1S Ilia1S requested review from a team, KraPete and sikmir as code owners December 19, 2024 14:27
Copy link

coderabbitai bot commented Dec 19, 2024

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • test/TDeviceTemplatesTest.Validate.dat is excluded by !**/*.dat

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This pull request updates the wb-mqtt-serial package to version 2.152.1, introducing an Internal 5V Bus Voltage channel for the WB-MAI6 device. The changelog reflects this addition and previous modifications, including a "protocol:" prefix in the Load RPC response for custom devices. The JSON configuration for the WB-MAI6 template has been updated to include the new parameter, along with English and Russian translations, while maintaining the existing structure and logic.

Changes

File Change Summary
debian/changelog Added new version 2.152.1 with Internal 5V Bus Voltage channel for WB-MAI6, detailing previous updates.
templates/config-wb-mai6.json.jinja Added new "Internal 5V Bus Voltage" parameter in hw_info section with configuration details and translations in English and Russian. Modified "MCU Voltage" parameter type and units.

Possibly related PRs

Suggested reviewers

  • sikmir
  • KraPete

Poem

🐰 A voltage channel springs to life,
In WB-MAI6's template rife,
With Russian and English words so bright,
A configuration taking flight!
Rabbit's code hops with pure delight! 🔌


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

"name": "Supply Voltage",
"reg_type": "input",
"address": 121,
"type": "voltage",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"type": "voltage",
"type": "value",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Во всех местах нужно поменять voltage на value?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Существующие не надо менять, а при добавлении новых уже использовать value.
Подробнее тут https://github.com/wirenboard/conventions?tab=readme-ov-file#specific-value-type-control:

WARNING: These control types are deprecated. It is recommended to use units property instead.

Copy link
Contributor

@KraPete KraPete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Сломалась генерация шаблона для ONI. Он делается из этого шаблона

unknown file: Failure
C++ exception with description "Failed to parse JSON test/../build/templates/config-oni-plc-w-ema-06u00.json:* Line 5391, Column 17
  Missing ',' or '}' in object declaration
" thrown in the test body.
test/utils/testlog.cpp:58: Failure

@@ -1058,6 +1069,7 @@
"IN_P_title": "Channel P",
"IN_N_title": "Channel N",
"external_voltage_divider_description": "External voltage divider is used to measure voltage higher than 30V and to get higher input resistance. Output voltage of the divider should be in the range from 0 to 4V (better to 2V). Supported since firmware version 2.1.0."
"Supply Voltage": "5V Supply",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Supply Voltage": "5V Supply",
"Supply Voltage": "5V Supply"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@@ -1058,6 +1069,7 @@
"IN_P_title": "Channel P",
"IN_N_title": "Channel N",
"external_voltage_divider_description": "External voltage divider is used to measure voltage higher than 30V and to get higher input resistance. Output voltage of the divider should be in the range from 0 to 4V (better to 2V). Supported since firmware version 2.1.0."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"external_voltage_divider_description": "External voltage divider is used to measure voltage higher than 30V and to get higher input resistance. Output voltage of the divider should be in the range from 0 to 4V (better to 2V). Supported since firmware version 2.1.0."
"external_voltage_divider_description": "External voltage divider is used to measure voltage higher than 30V and to get higher input resistance. Output voltage of the divider should be in the range from 0 to 4V (better to 2V). Supported since firmware version 2.1.0.",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@Ilia1S Ilia1S requested review from KraPete and sikmir December 20, 2024 07:06
@@ -1057,7 +1068,8 @@
"baud_rate_description": "Make sure that communication with device is established before changing this parameter. Select required baud rate, save configuration and then change port baud rate to the same value.",
"IN_P_title": "Channel P",
"IN_N_title": "Channel N",
"external_voltage_divider_description": "External voltage divider is used to measure voltage higher than 30V and to get higher input resistance. Output voltage of the divider should be in the range from 0 to 4V (better to 2V). Supported since firmware version 2.1.0."
"external_voltage_divider_description": "External voltage divider is used to measure voltage higher than 30V and to get higher input resistance. Output voltage of the divider should be in the range from 0 to 4V (better to 2V). Supported since firmware version 2.1.0.",
"Supply Voltage": "5V Supply"
Copy link
Contributor

@pgasheev pgasheev Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я за то, чтобы топик сразу назвать правильно. К Supply Voltage (напряжение питания) он не имеет никакого отношения.
Internal 5V Bus Voltage - как-то так. И перевод не потребуется.
Потому что тут непонятки, а на МАПе скорее всего неправильное название заткнули переводом.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

templates/config-wb-mai6.json.jinja Outdated Show resolved Hide resolved
@Ilia1S Ilia1S requested a review from pgasheev December 20, 2024 13:27
@Ilia1S Ilia1S merged commit 2e2920c into master Dec 20, 2024
14 checks passed
@Ilia1S Ilia1S deleted the feature/fw771-mai6-add-supply-voltage branch December 20, 2024 13:55
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.

4 participants