I have a fully working RG11 rain sensor driver at github.com/Trigger-broom-289/indi-RG11-Rain-Sensor
I would like to simplify it, ie: not linked to Weather and add better snooping for my observatory roof box.
to the section "Client is asking us to update a switch" in github.com/indilib/indi/blob/master/libi...ive/raindetector.cpp
ie: there will no longer be the switch on/off like in the tutorial.
I cannot get my head around. Anyone kind enough to point me in the right direction please?
I'm going to try to adapt the code from the odroid roof for it.
/**
* Get the state of the full open limit switch. This function will also switch off the motors as a safety override.
**/
bool OdroidRoof::getFullOpenedLimitSwitch(){
if(wiringPiSetup() == -1)
printf("ERROR");
DEBUG(INDI::Logger::DBG_SESSION, "Checking fully open switch");
if (digitalRead(4) != 0){
fullOpenLimitSwitch = ISS_ON;
SetParked(false);
return true;
}
else {
DEBUG(INDI::Logger::DBG_SESSION, "Fully open switch OFF");
return false;
}}