Having nothing better to do after retiring, I’ve been trying to teach myself some new computer languages. (I don’t think employers care one whit I code in assembly on multiple processors.) The connection to INDI is that a dome developer has several buyers who want to run on Linux/Ekos instead of ASCOM.
First off, I’ve looked at the code and I am stunned at the elegance and structure of INDI. Simply awesome. My question is down in the weeds (I just laughed at myself. I wonder how "down in the weeds translates into other languages.) My question has to do with something very specific.
The dome drivers and/or .h files often have have items such as CalibrateSP or DomeAbsPosNP. I’m certain that the SP and NP refer to some kind of pointer and was hoping someone could steer me in the right direction.
Thanks Jasem. I’m sure we’ll be coming to you for help.
The dome team is currently writing ASCOM compliant software. Once this is complete and the bugs wrung out, I hope we can obtain the relevant source code that interfaces with the dome hardware. In the interim, I’m having “fun” putting together a .h file the .cpp so that when we do come for help at least you won’t be starting from a blank slate.
You’ll have to forgive me. I’m having a hard time focusing after reading the title of a recent post:
UDP Awareness or How Did I End with my Scope Upside Down
Now to the duller stuff. Let’s suppose in a dome driver I’m running a set of diagnostics. While these Diags are running I don’t want any intrusions from other switches like shutter open / close. Assume a row of switches labeled Row_1, Row_2 and Row_3 with the corresponding SPs (e.g., Row_1SP.fill(getDeviceName(), “Row1”, “R1”, SITE_TAB, IP_RW,
ISR_ATMOST1, 60, IPS_OK);
As the Diags are running a user hits switch 3 in row 2. I want to immediately inform the user that Diags are running (hit Abort to terminate); that’s the easy part. Now I want to turn-off the switch that’s been activated. Once I know the row I can find the index of the struck switch. What I need to is the row name.
I can do a comparison
if (DiagnosticsSP.isNameMatch(name))
to see if the name matches a Switch Pointer. What I want to do in the end is:
If I "build"a driver switch that has 4 positions and specify them using the ThisSwitchSP constructs, INDI will create a row of 4 switches. If I increase the number to 5, then INDI will create a drop-down for the various switch values even though I have plenty of window width to accommodate more switches.
Is there a way I can force INDI to put more switches in the row instead of resorting to a drop=down menu? I’m hoping there is a MAX_SWITCH_NUMBER somewhere that can be overridden.