magnue / indi_usbrelay2_roof Goto Github PK
View Code? Open in Web Editor NEWINDI driver for USBRelay2 devices. Controll roof motors and power on / off devices
License: GNU Lesser General Public License v2.1
INDI driver for USBRelay2 devices. Controll roof motors and power on / off devices
License: GNU Lesser General Public License v2.1
At the moment the function 'USBInterface::GetDevices()' that calls the 'USBRL_API::usb_relay_device_enumerate()' never returns the info for more than two devices. This makes the device list in Device setup tab incomplete. It is at the moment necessary to connect atmost two devices simultaneously to note the device string for all devices.
TODO: find out if the issue lies with USBInterface or USBRL_API, and if it can be solved.
If Open or Close is aborted using the 'Abort' button, the switch status will not reset. This means that if aborting 'Open/Close' the 'Open/Close' button must be klicked twice to resume 'Open/Close'. This does not happend when Parking or Unparking, nor if 'Open/Close' is aborted with a second klick on 'Open/Close'. Aborting Open and resuming to Close works as expexted, and vice versa
TODO: Review code when aborting "non parking / unpark" motion, and add necessary update of state.
It seems that this driver needs to be updated.
It's a shame because it would be very useful for me!!
I can't compile it and someone told me "it just look like it is missing a few edits that were made for INDI release 2.0.8."
I would be very grateful if you would take a look at it!
Wxcuse me, but I know nothing about code writting...
root@xavier-HP:/home/xavier/Projects/indi_usbrelay2_roof/build# cmake -DCMAKE_INSTALL_PREFIX=/usr . ..
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.
-- The CXX compiler identification is GNU 11.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found INDI-DRIVERS: /usr/lib/x86_64-linux-gnu/libindidriver.so
-- Found LIBNOVA: /usr/lib/x86_64-linux-gnu/libnova.so
-- Found USB_RELAY_DEVICE: /usr/local/lib/libusb_relay_device.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xavier/Projects/indi_usbrelay2_roof/build
root@xavier-HP:/home/xavier/Projects/indi_usbrelay2_roof/build# make install
[ 33%] Building CXX object CMakeFiles/indi_usbrelay2_roof.dir/usbrelay2_roof/usbrelay2_roof.cpp.o
/home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.cpp: In member function ‘virtual bool USBRelay2::saveConfigItems(FILE*)’:
/home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.cpp:120:27: error: ‘INDI::PropertyView* INDI::PropertyBasic::operator&;() [with T = _IText]’ is protected within this context
120 | IUSaveConfigText(fp, &ActiveDeviceTP);
| ^~~~~~~~~~~~~~
In file included from /usr/include/libindi/indipropertytext.h:21,
from /usr/include/libindi/basedevice.h:29,
from /usr/include/libindi/parentdevice.h:3,
from /usr/include/libindi/defaultdevice.h:21,
from /usr/include/libindi/indidome.h:25,
from /home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.h:25,
from /home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.cpp:22:
/usr/include/libindi/indipropertybasic.h:115:27: note: declared protected here
115 | PropertyView * operator &;();
| ^~~~~~~~
/home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.cpp: In member function ‘virtual void USBRelay2::TimerHit()’:
/home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.cpp:613:9: error: ‘DomeMotionS’ was not declared in this scope; did you mean ‘DomeMotionSP’?
613 | if (DomeMotionS[DOME_CW].s == ISS_ON)
| ^~~~~~~~~~~
| DomeMotionSP
/home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.cpp: In member function ‘virtual IPState USBRelay2::Move(INDI::Dome::DomeDirection, INDI::Dome::DomeMotionCommand)’:
/home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.cpp:669:20: error: ‘DomeMotionS’ was not declared in this scope; did you mean ‘DomeMotionSP’?
669 | else if ( (DomeMotionS[DOME_CW].s == ISS_ON && dir == DOME_CCW)
| ^~~~~~~~~~~
| DomeMotionSP
/home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.cpp:694:9: error: ‘DomeMotionS’ was not declared in this scope; did you mean ‘DomeMotionSP’?
694 | DomeMotionS[dir].s = ISS_ON;
| ^~~~~~~~~~~
| DomeMotionSP
/home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.cpp:695:22: error: ‘class INDI::PropertySwitch’ has no member named ‘s’
695 | DomeMotionSP.s = IPS_BUSY;
| ^
/home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.cpp: In member function ‘virtual bool USBRelay2::Abort()’:
/home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.cpp:783:9: error: ‘DomeMotionS’ was not declared in this scope; did you mean ‘DomeMotionSP’?
783 | if (DomeMotionS[DOME_CW].s == ISS_ON && DomeMotionS[DOME_CCW].s == ISS_OFF)
| ^~~~~~~~~~~
| DomeMotionSP
/home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.cpp: In member function ‘void USBRelay2::setAbsolutePosition()’:
/home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.cpp:897:14: error: ‘DomeMotionS’ was not declared in this scope; did you mean ‘DomeMotionSP’?
897 | else if (DomeMotionS[DOME_CCW].s == ISS_ON)
| ^~~~~~~~~~~
| DomeMotionSP
/home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.cpp: In member function ‘bool USBRelay2::StopParkingAction(int)’:
/home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.cpp:926:5: error: ‘DomeMotionS’ was not declared in this scope; did you mean ‘DomeMotionSP’?
926 | DomeMotionS[dir].s = ISS_OFF;
| ^~~~~~~~~~~
| DomeMotionSP
/home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.cpp:945:22: error: ‘class INDI::PropertySwitch’ has no member named ‘s’
945 | DomeMotionSP.s = IPS_OK;
| ^
/home/xavier/Projects/indi_usbrelay2_roof/usbrelay2_roof/usbrelay2_roof.cpp:954:22: error: ‘class INDI::PropertySwitch’ has no member named ‘s’
954 | DomeMotionSP.s = IPS_ALERT;
| ^
make[2]: *** [CMakeFiles/indi_usbrelay2_roof.dir/build.make:76: CMakeFiles/indi_usbrelay2_roof.dir/usbrelay2_roof/usbrelay2_roof.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/indi_usbrelay2_roof.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Hi Magnus,
I'm running the Indi_usbrelay2_roof driver on an Astroberry Raspberry Pi4 with KStars 3.5.3 Stable and libindi version 1.9.1. Since the last libindi update the driver crashes right after trying to connect. Before the update to libindi 1.9.1 all went fine.
Simon
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.