-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
integration to libindi #2149
base: master
Are you sure you want to change the base?
integration to libindi #2149
Conversation
ISState fullOpenLimitSwitch { ISS_ON }; | ||
ISState fullClosedLimitSwitch { ISS_OFF }; | ||
double MotionRequest { 0 }; | ||
struct timeval MotionStart { 0, 0 }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not belong in the driver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. To be removed.
ISwitch RelaisInfoS[11] {}; | ||
ISwitch Relais1InfoS[11], Relais2InfoS[11],Relais3InfoS[11],Relais4InfoS[11],Relais5InfoS[11],Relais6InfoS[11],Relais7InfoS[11],Relais8InfoS[11] {}; | ||
ISwitchVectorProperty RelaisInfoSP[8] {}; | ||
|
||
ISwitch DigitalInputS[10] {}; | ||
ISwitch Digital1InputS[10], Digital2InputS[10], Digital3InputS[10], Digital4InputS[10], Digital5InputS[10], Digital6InputS[10], Digital7InputS[10], Digital8InputS[10]; | ||
ISwitchVectorProperty DigitalInputSP[8] {}; | ||
|
||
ISwitch Relay1StateS[2],Relay2StateS[2],Relay3StateS[2],Relay4StateS[2],Relay5StateS[2],Relay6StateS[2],Relay7StateS[2],Relay8StateS[2] ; | ||
ISwitchVectorProperty RelaysStatesSP[8] ; | ||
ISwitch Digit1StateS[2],Digit2StateS[2],Digit3StateS[2],Digit4StateS[2],Digit5StateS[2],Digit6StateS[2],Digit7StateS[2],Digit8StateS[2] ; | ||
ISwitchVectorProperty DigitsStatesSP[8] ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for? We already have the input/output properties defined by the interface, no need to define other properties unless there is a good reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand your comment. But the ipx800 driver provide additionnal functions that Dome drivers can't provide. Those Inputs/Outputs allows the user to connect functions to Inputs/Outputs...
Those additionnal functions allows for exemple to lock roof moves to physical mount park position.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand, but they don't belong in this driver. We can have another ROR or Dome driver that uses these functionalities. The purpose of IPX800 driver is to provide a generic Input/Ouput driver. There is nothing inherit in the IPX800 that is tied to domes or roll-offs.
enum { | ||
ROOF_IS_OPENED , | ||
ROOF_IS_CLOSED , | ||
UNKNOWN_STATUS | ||
} | ||
Roof_Status; | ||
|
||
enum { | ||
RA_PARKED , | ||
DEC_PARKED , | ||
BOTH_PARKED , | ||
NONE_PARKED | ||
} | ||
Mount_Status; | ||
|
||
const char *ROLLOFF_TAB = "Roll Off"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There shouldn't be anything related to roof or dome in the driver, it's a generic input/output driver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cf. previous comment.
int mount_Status = RA_PARKED | DEC_PARKED | BOTH_PARKED | NONE_PARKED; | ||
int roof_Status = ROOF_IS_OPENED | ROOF_IS_CLOSED | UNKNOWN_STATUS; | ||
bool enginePowered = false ; // True = on / false = Off | ||
bool first_Start = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first_Start removed.
bool first_Start = false; | ||
|
||
ISwitch IPXVersionS[5]; | ||
ISwitch roofEnginePowerS[2]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first_Start removed.
|
||
ISwitch IPXVersionS[5]; | ||
ISwitch roofEnginePowerS[2]; | ||
ISwitchVectorProperty IPXVersionSP, roofEnginePowerSP; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use INDI::PropertySwitch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Work in progress
virtual bool saveConfigItems(FILE *fp) override; | ||
|
||
private: | ||
bool roofPowerManagement = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useful for additionnal function (engine power management)
ISwitchVectorProperty getMyRelayVector(int i); | ||
ISwitchVectorProperty getMyDigitsVector(int i); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use INDI::PropertySwitch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Work in progress
@aknotwot Can you please check my comments? |
Hi, i'll do it 👍 |
@aknotwot Any updates? |
IPX800 driver (v0.7) for libindi integration.
Documentation to come.