-
Notifications
You must be signed in to change notification settings - Fork 25
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
add meanwell drs template #859
Conversation
Добавлен файл шаблона (пустой)
Добавлены каналы для группы Состояние устройства.
Добавлены каналы в Состояние устройства
Добавлены все необходимые каналы и параметры
Добавлены каналы в файл теста
Увеличен номер версии
WalkthroughA new version (2.154.0) of the Changes
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (1)
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (1)
templates/config-meanwell-drs.json (1)
573-576
: Improve organization of Russian translations.Consider moving group titles to a dedicated section in the Russian translations for better maintainability:
"ru": { "template_title": "MEANWELL DRS Series - многофункциональный источник питания", + "groups": { + "power_status": "Состояние питания", + "unit_status": "Состояние устройства", + "settings": "Настройка", + "hw_info": "Данные устройства" + }, - "Power Status": "Состояние питания", - "Unit Status": "Состояние устройства", - "Settings": "Настройка", - "HW Info": "Данные устройства",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
test/TDeviceTemplatesTest.Validate.dat
is excluded by!**/*.dat
📒 Files selected for processing (2)
debian/changelog
(1 hunks)templates/config-meanwell-drs.json
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- debian/changelog
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (2)
templates/config-meanwell-drs.json (2)
1-21
: LGTM! Well-structured device metadata and logical grouping.The device metadata and groups are well-organized, following a clear logical structure for power status, unit status, and settings.
1-634
: Overall template structure is well-designed.The template provides a comprehensive configuration for the MEANWELL DRS Series power supply, with well-organized parameters, channels, and multi-language support. The validation ranges, scaling factors, and grouping of functionality are logically structured.
templates/config-meanwell-drs.json
Outdated
"Undefined", | ||
"Сonstant Сurrent", | ||
"Сonstant Voltage", | ||
"Float Mode" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix character encoding in enum titles.
The enum titles use Cyrillic 'С' instead of Latin 'C':
- "Сonstant Сurrent",
- "Сonstant Voltage",
+ "Constant Current",
+ "Constant Voltage",
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"Undefined", | |
"Сonstant Сurrent", | |
"Сonstant Voltage", | |
"Float Mode" | |
"Undefined", | |
"Constant Current", | |
"Constant Voltage", | |
"Float Mode" |
templates/config-meanwell-drs.json
Outdated
"current_dc": "Сurrent DC", | ||
"battery_voltage": "Battery Voltage", | ||
"battery_current": "Battery Сurrent", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix inconsistent capitalization in translations.
The English translations use inconsistent capitalization and Cyrillic characters:
- "current_dc": "Сurrent DC",
- "battery_current": "Battery Сurrent",
+ "current_dc": "Current DC",
+ "battery_current": "Battery Current",
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"current_dc": "Сurrent DC", | |
"battery_voltage": "Battery Voltage", | |
"battery_current": "Battery Сurrent", | |
"current_dc": "Current DC", | |
"battery_voltage": "Battery Voltage", | |
"battery_current": "Battery Current", |
templates/config-meanwell-drs.json
Outdated
"title": "battary_low_voltage_setpoint", | ||
"id": "battary_low_voltage_setpoint", | ||
"address": 208, | ||
"reg_type": "holding", | ||
"default": 20.9, | ||
"min": 9.6, | ||
"max": 48, | ||
"scale": 0.01, | ||
"required": false, | ||
"order": 7, | ||
"group": "settings" | ||
}, | ||
{ | ||
"title": "battary_critical_voltage_setpoint", | ||
"id": "battary_critical_voltage_setpoint", | ||
"address": 209, | ||
"reg_type": "holding", | ||
"default": 16.8, | ||
"min": 8.4, | ||
"max": 48, | ||
"scale": 0.01, | ||
"required": false, | ||
"order": 8, | ||
"group": "settings" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix spelling errors in parameter names.
The word "battery" is misspelled as "battary" in two parameter names:
- "title": "battary_low_voltage_setpoint",
- "id": "battary_low_voltage_setpoint",
+ "title": "battery_low_voltage_setpoint",
+ "id": "battery_low_voltage_setpoint",
- "title": "battary_critical_voltage_setpoint",
- "id": "battary_critical_voltage_setpoint",
+ "title": "battery_critical_voltage_setpoint",
+ "id": "battery_critical_voltage_setpoint",
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"title": "battary_low_voltage_setpoint", | |
"id": "battary_low_voltage_setpoint", | |
"address": 208, | |
"reg_type": "holding", | |
"default": 20.9, | |
"min": 9.6, | |
"max": 48, | |
"scale": 0.01, | |
"required": false, | |
"order": 7, | |
"group": "settings" | |
}, | |
{ | |
"title": "battary_critical_voltage_setpoint", | |
"id": "battary_critical_voltage_setpoint", | |
"address": 209, | |
"reg_type": "holding", | |
"default": 16.8, | |
"min": 8.4, | |
"max": 48, | |
"scale": 0.01, | |
"required": false, | |
"order": 8, | |
"group": "settings" | |
}, | |
"title": "battery_low_voltage_setpoint", | |
"id": "battery_low_voltage_setpoint", | |
"address": 208, | |
"reg_type": "holding", | |
"default": 20.9, | |
"min": 9.6, | |
"max": 48, | |
"scale": 0.01, | |
"required": false, | |
"order": 7, | |
"group": "settings" | |
}, | |
{ | |
"title": "battery_critical_voltage_setpoint", | |
"id": "battery_critical_voltage_setpoint", | |
"address": 209, | |
"reg_type": "holding", | |
"default": 16.8, | |
"min": 8.4, | |
"max": 48, | |
"scale": 0.01, | |
"required": false, | |
"order": 8, | |
"group": "settings" | |
}, |
Update config-meanwell-drs.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
templates/config-meanwell-drs.json (1)
281-282
: Document disabled channels.Several channels are disabled by default. Consider adding documentation to explain:
- Why these channels are disabled
- Under what conditions they should be enabled
- Which device models support these features
Also applies to: 315-316, 397-398, 414-415, 431-432, 448-449, 465-466, 482-483, 499-500, 516-517
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
templates/config-meanwell-drs.json
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (4)
templates/config-meanwell-drs.json (4)
1-21
: LGTM! Well-structured device metadata.The device metadata is well-organized with clear grouping of functionality.
138-140
: Verify timeout units conversion.The timeout parameters have values in seconds (60-64800) but their translations show "Min" as the unit. This might cause confusion. Consider either:
- Adjusting the scale to 1/60 to match the displayed minutes, or
- Updating the translations to clarify the unit conversion.
Also applies to: 150-152, 162-164
608-609
: Fix character encoding in enum titles.The enum titles use Cyrillic 'С' instead of Latin 'C':
- "Сonstant Сurrent": "Постоянный ток", - "Сonstant Voltage": "Постоянное напряжение", + "Constant Current": "Постоянный ток", + "Constant Voltage": "Постоянное напряжение",
551-551
: Fix inconsistent capitalization in translations.The English translations use inconsistent capitalization and Cyrillic characters:
- "current_dc_status": "Сurrent DC Status", - "battery_current": "Battery Сurrent", + "current_dc_status": "Current DC Status", + "battery_current": "Battery Current",Also applies to: 561-561
resolve merge conflict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
templates/config-meanwell-drs.json (1)
3-3
: Standardize device naming convention.The device type and name use inconsistent hyphenation:
- "device_type": "MEAN-WELL-DRS-Series", - "name": "MEAN WELL DRS Series", + "device_type": "MEAN-WELL-DRS-Series", + "name": "MEAN-WELL-DRS-Series",Also applies to: 6-6
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
templates/config-meanwell-drs.json
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (3)
templates/config-meanwell-drs.json (3)
22-169
: Parameters section is well-structured!Good job on:
- Proper validation ranges and scaling factors
- Logical grouping and ordering
- Consistent naming and structure
287-291
: Verify battery charge mode enum values.The enum values skip from 2 to 4. Is this intentional according to the device's protocol, or should it be sequential (0,1,2,3)?
552-552
: Fix character encoding in translations.The following translations still use Cyrillic 'С' instead of Latin 'C':
- "battery_current": "Battery Сurrent", - "current_dc_status": "Сurrent DC Status", - "Сonstant Сurrent": "Постоянный ток", - "Сonstant Voltage": "Постоянное напряжение", + "battery_current": "Battery Current", + "current_dc_status": "Current DC Status", + "Constant Current": "Постоянный ток", + "Constant Voltage": "Постоянное напряжение",Also applies to: 561-561, 608-609
Добавлен шаблон для MEANWELL DRS Series
Summary by CodeRabbit