Skip to content

Conversation

@Pietfried
Copy link
Contributor

@Pietfried Pietfried commented Dec 1, 2025

Describe your changes

Added the Huawei_V100R023C10 PowerSupply driver from BaseCamp

Issue ticket number and link

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

@Pietfried Pietfried force-pushed the feature/add-huawei-v100 branch from 5a586fb to 75766fa Compare December 1, 2025 10:05
@Pietfried Pietfried marked this pull request as draft December 1, 2025 13:32
@Pietfried Pietfried marked this pull request as ready for review December 2, 2025 13:28
@Pietfried Pietfried force-pushed the feature/add-huawei-v100 branch 3 times, most recently from bd87836 to eac4719 Compare December 4, 2025 09:37
Copy link
Contributor

@markxoe markxoe left a comment

Choose a reason for hiding this comment

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

Also, ev_add_module(Huawei_V100R023C10) is missing in modules/HardwareDrivers/PowerSupplies/CMakeLists.txt

Copy link
Member

@hikinggrass hikinggrass left a comment

Choose a reason for hiding this comment

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

I think most/all of the review comments from #1336 still apply here (things like too high CMake versions / C++20 usage etc)

Copy link
Contributor

@markxoe markxoe left a comment

Choose a reason for hiding this comment

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

This should fix all C++ downgrade compile errors. Has been tested against the user acceptance tests

@corneliusclaussen corneliusclaussen self-requested a review December 11, 2025 07:53
Comment on lines 118 to 137
uint8_t sys_buffer[buffer_size];
uint8_t net_buffer[buffer_size];

// read the current value and convert it to network byte order
data_provider.on_read(sys_buffer, buffer_size);
converter.sys_to_net(sys_buffer, net_buffer, buffer_size);

// write the new data to the buffer
memcpy(net_buffer + byte_offset, data.data(),
std::min(data.size(), sizeof(net_buffer) - byte_offset));

// convert the buffer back to system byte order and write it to the provider
converter.net_to_sys(net_buffer, sys_buffer, buffer_size);
data_provider.on_write(sys_buffer, buffer_size);
}

std::vector<uint8_t> on_read() override {
std::vector<uint8_t> net_buffer(buffer_size);

uint8_t sys_buffer[buffer_size];
Copy link
Member

Choose a reason for hiding this comment

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

std::array

@Pietfried Pietfried force-pushed the feature/add-huawei-v100 branch 2 times, most recently from 4259042 to 4abeafc Compare December 12, 2025 07:45
@Pietfried Pietfried requested a review from djchhp as a code owner December 12, 2025 07:45
@Pietfried
Copy link
Contributor Author

Addressed most of the comments, except for the ones regarding the usage of std::array. I'd prefer to handle those in a subsequent PR, as the current changeset relative to the original driver has already become very large and I am likely not able to verify all of these changes.

hikinggrass
hikinggrass previously approved these changes Dec 12, 2025
@Pietfried Pietfried added this pull request to the merge queue Dec 12, 2025
@Pietfried Pietfried removed this pull request from the merge queue due to a manual request Dec 12, 2025
Signed-off-by: Mark Oude Elberink <[email protected]>
Signed-off-by: corneliusclaussen <[email protected]>
Co-authored-by: Fabian Gajek <[email protected]>
Co-authored-by: Kai Hermann <[email protected]>
Co-authored-by: Tim <[email protected]>

----------

Additional changes when this driver was moved from BaseCamp to EVerest:
* Replaced usage of designated initializers
* Removed gitlab ci files
* Replace README with doc.rst
* Remove Auffaeligkeiten and renamed readme.md to README.md
* Use std:: prefixed integer types
* Remove clang format files
* Removed unused files
* Removed code that was commented out
* Use modern instead of c-style casts
* Refactor CMakeLists: Refactor test setup and register libraries with ev_register_library_target to include those in EVerest coverage generation
* Renamed and refactored library README to address the updated CMake structure. The module internally libraries can currently not be built standalone

Signed-off-by: Piet Gömpel <[email protected]>
@Pietfried Pietfried force-pushed the feature/add-huawei-v100 branch from c9bf39b to 81ed812 Compare December 12, 2025 10:32
@Pietfried Pietfried enabled auto-merge December 12, 2025 10:33
@Pietfried Pietfried added this pull request to the merge queue Dec 12, 2025
Merged via the queue into main with commit 651d4b3 Dec 12, 2025
10 of 12 checks passed
@Pietfried Pietfried deleted the feature/add-huawei-v100 branch December 12, 2025 11:30
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.

6 participants