Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

integration to libindi #2149

wants to merge 1 commit into from

Conversation

aknotwot
Copy link

IPX800 driver (v0.7) for libindi integration.
Documentation to come.

Comment on lines +126 to +129
ISState fullOpenLimitSwitch { ISS_ON };
ISState fullClosedLimitSwitch { ISS_OFF };
double MotionRequest { 0 };
struct timeval MotionStart { 0, 0 };
Copy link
Contributor

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. To be removed.

Comment on lines +131 to +142
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] ;
Copy link
Contributor

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.

Copy link
Author

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.

Copy link
Contributor

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.

Comment on lines +150 to +165
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";
Copy link
Contributor

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cf. previous comment.

Comment on lines +214 to +217
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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required

Copy link
Author

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];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required.

Copy link
Author

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use INDI::PropertySwitch

Copy link
Author

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed

Copy link
Author

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)

Comment on lines +91 to +92
ISwitchVectorProperty getMyRelayVector(int i);
ISwitchVectorProperty getMyDigitsVector(int i);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use INDI::PropertySwitch

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Work in progress

@knro
Copy link
Contributor

knro commented Dec 2, 2024

@aknotwot Can you please check my comments?

@aknotwot
Copy link
Author

aknotwot commented Dec 2, 2024

Hi, i'll do it 👍

@knro
Copy link
Contributor

knro commented Dec 18, 2024

@aknotwot Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants