[Nut-upsdev] [Nut-upsuser] Sweex 1000VA UPS (was: powermust usb)
Alexander I. Gordeev
lasaine at lvk.cs.msu.su
Thu May 31 11:27:50 UTC 2007
On Thu, 24 May 2007 19:54:05 +0400, Peter van Valderen <p.v.valderen at probu.nl> wrote:
> Thanks for the instructions, attached you will find lakeview.patch.
> Alternatively you can get it at:
> http://www.probu.nl/~p.v.valderen/lakeview.patch
>
> In the file you will find patches for lakeview_usb.c, lakeview_usb.h,
> nut_usb.c and Makefile.am.
>
> sweex_usb is not the best name for the driver as discussed, for that
> reason I renamed it to lakeview_usb.
>
Sorry for the delay, I was busy with my university exams.
Your patch should be fixed: driver fails to build.
Please test patches before sending them.
This line
+lakeview_usb_LDADD = $(LDADD_DRIVER) $(LIBUSB_LDFLAGS)
should be replaced with
+lakeview_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LDFLAGS)
The complete fixed Makefile.am diff:
Index: Makefile.am
===================================================================
--- Makefile.am (revision 939)
+++ Makefile.am (working copy)
@@ -21,7 +21,7 @@
mge-shut mge-utalk newmge-shut nitram oneac optiups powercom rhino \
safenet skel solis tripplite tripplitesu upscode2 victronups powerpanel
SNMP_DRIVERLIST = snmp-ups
-USB_LIBUSB_DRIVERLIST = usbhid-ups bcmxcp_usb tripplite_usb megatec_usb
+USB_LIBUSB_DRIVERLIST = usbhid-ups bcmxcp_usb lakeview_usb tripplite_usb megatec_usb
USB_HIDDEV_DRIVERLIST = energizerups
USB_DRIVERLIST = $(USB_LIBUSB_DRIVERLIST) $(USB_HIDDEV_DRIVERLIST)
HAL_DRIVERLIST = hald-addon-usbhid-ups hald-addon-bcmxcp_usb hald-addon-tripplite_usb hald-addon-megatec_usb
@@ -121,6 +121,9 @@
energizerups_SOURCES = energizerups.c
energizerups_LDADD = $(LDADD_DRIVERS)
+lakeview_usb_SOURCES = lakeview_usb.c nut_usb.c
+lakeview_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LDFLAGS)
+
tripplite_usb_SOURCES = tripplite_usb.c libhid.c libusb.c hidparser.c
tripplite_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LDFLAGS) -lm
@@ -173,8 +176,8 @@
masterguard.h megatec.h metasys.h mge-hid.h mgemib.h mge-shut.h \
mge-utalk.h netvisionmib.h usbhid-ups.h nitram.h nut_usb.h \
oneac.h optiups.h powercom.h pwmib.h safenet.h serial.h \
- snmp-ups.h solis.h tripplite.h tripplite-hid.h tripplitesu.h \
- upscode2.h victronups.h powerpanel.h
+ snmp-ups.h solis.h lakeview_usb.h tripplite.h tripplite-hid.h \
+ tripplitesu.h upscode2.h victronups.h powerpanel.h
# Define a dummy library so that Automake builds rules for the
# corresponding object files. This library is not actually built,
Have you switched from nut_usb.c interface to libusb.c/libhid.c
as Peter proposed?
--
Alexander
More information about the Nut-upsdev
mailing list