The second post is much more advanced! I'm commuting now, so review was cursory (in a PR it would be easier) - now noting just one thing that jumped at me as I scrolled to the end of new source: the `upsdrv_shutdown()` method is done wrong :)
It is usually called during an outage FSD (via `drivername -k`) and should handle the UPS poweroff, ideally in a way that load is turned back on when wall power returns or the UPS does power-cycle if wall power returned while your systems were already shutting down (may need different firmware commands based on momentary OL/OB status). It should also *not* be called during a simple `upsdrv_cleanup()` preparing to exit the driver program :) Jim On Mon, Nov 25, 2024, 16:11 Lucas Bocchi <[email protected]> wrote: > Jim > > Because of my leak of time I send the driver to you, people, to help me to > make these little adjustments before first commit. I'll put on github with > my name without problem, but the continuation of the project is another > history... > > 1) The serial is a part that I won't understand to put on code. Vendor is > 0925 and device 1241 (0925:1241). If anyone help me with these part of > code, i'll corret it. > > Bus 004 Device 002: ID 0925:1241 Lakeview Research NHS USB > > 2) I'll correct all mistakes with portuguese / spanish on the code > > 3) I'll correct the memset with a function to start it. > > More contributions are welcome and thanks for your patience. > Em 25/11/2024 11:35, Jim Klimov escreveu: > > Em 25/11/2024 11:35, Jim Klimov escreveu: > > Thanks for the contribution, looks quite nice. > > On the first glance, comments and messages in Brazilian/Spanish would have > to get internationalized to the lowest common denominator, English. And > added to Makefile.am as a serial driver, to NEWS.adoc, etc. > But that can be done in subsequent commits as this gets into git. Which > brings me to the question: would you post the initial pull request on > GitHub, so it is attributed in NUT's Git history in your name? > > I also wonder if the legacy-compatibility builders would agree with > structure initialization by named fields, I remember at some point > something complained about the approach - and we try to keep NUT buildable > wherever possible (including very old systems that are still running). In > the worst case, would have to initialize with dumber syntax, field by field > (or `memset 0` and init the few fields that have values). > > Jim Klimov > > > On Mon, Nov 25, 2024 at 2:14 PM Lucas Bocchi via Nut-upsdev < > [email protected]> wrote: > >> Sorry >> >> First send doesn't include GNU header. Please ignore first mail. >> >> >> Em 25/11/2024 09:57, Lucas Bocchi escreveu: >> > Hello everyone. >> > >> > >> > My name is Lucas Willian Bocchi. After a few weeks of suffering, a lot >> > of reverse engineering, creating serial port simulators in Python, C, >> > etc., I managed to create a functional driver for the NHS UPS, >> > sinusoidal line. It is a famous UPS in Brazil, but the company was >> > never interested in developing something solid to integrate with Nut >> > or ApCupsd. Since I had to choose between one or the other to start >> > with, I chose Nut. >> > >> > The driver is functional, but unfortunately, I can no longer continue >> > the development alone. I need help, because I will not be able to >> > handle this project, but I also do not want to let it die. If anyone >> > wants to take on the project, I can help with whatever I can in the >> > development part when time allows. But I can no longer do it alone. >> > >> > I would be very grateful to anyone who can help. Below is the source >> > code with the first "functional" >> version._______________________________________________ >> Nut-upsdev mailing list >> [email protected] >> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev >> >
_______________________________________________ Nut-upsdev mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev
