10#define GEMINI_DEVICE_ID 99
28 virtual bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n)
override;
29 virtual bool ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
override;
30 virtual bool ISNewText(
const char *dev,
const char *name,
char *texts[],
char *names[],
int n)
override;
56 void onMove(
int direction);
69 std::unique_ptr<GeminiFlatpanelAdapter> adapter;
74 int deviceRevision{-1};
75 char commandTerminator{
'\n'};
78 int prevCoverStatus{-1};
79 int prevLightStatus{-1};
80 int prevMotorStatus{-1};
81 int prevBrightness{-1};
93 bool updateCoverStatus(
char coverStatus);
94 bool updateLightStatus(
char lightStatus);
95 bool updateMotorStatus(
char motorStatus);
96 bool updateBrightness(
int brightness);
97 void updateConfigStatus();
100 bool sendCommand(
const char *command,
char *response,
int timeout =
SERIAL_TIMEOUT_SEC);
101 bool pingRevision1();
102 bool pingRevision2();
103 bool getFirmwareVersion(
int *version);
104 bool getConfigStatus();
105 bool getBrightness(
int *
const brightness);
106 bool setBrightness(
int value);
111 bool getStatus(
int *
const coverStatus,
int *
const lightStatus,
int *
const motorStatus);
112 bool move(uint16_t value,
int direction);
113 bool setClosePosition();
114 bool setOpenPosition();
115 bool setBeep(
bool enable);
116 bool setBrightnessMode(
int mode);
117 bool applyUnifiedBrightness(
int unifiedValue,
bool forceMode);
120 bool extractIntValue(
const char *response,
int startPos,
int *value);
121 bool formatCommand(
char commandLetter,
char *commandString,
int value =
NO_VALUE);
The Serial class manages connection with serial devices including Bluetooth. Serial communication is ...
Abstract adapter interface for Gemini Flatpanel firmware versions.
virtual IPState UnParkCap() override
unPark dust cap (open cover). Must be implemented by child.
bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
virtual bool ISSnoopDevice(XMLEle *root) override
Process a snoop event from INDI server. This function is called when a snooped property is updated in...
bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
virtual const char * getDefaultName() override
bool EnableLightBox(bool enable) override
EnableLightBox Turn on/off on a light box. Must be implemented in the child class.
bool validateCalibrationOperation(int direction)
virtual IPState AbortCap() override
Abort motion. Must be implemented by child.
bool SetLightBoxBrightness(uint16_t value) override
setBrightness Set light level. Must be implemented in the child class, if supported.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
void onSetPosition(int direction)
void ISGetProperties(const char *deviceName) override
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
void TimerHit() override
Callback function to be called once SetTimer duration elapses.
void onMove(int direction)
bool initProperties() override
Initialize properties initial state and value. The child class must implement this function.
void initLimitsProperties()
void initStatusProperties()
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override
Process the client newSwitch command.
void startConfiguration()
virtual ~GeminiFlatpanel()=default
virtual IPState ParkCap() override
Park dust cap (close cover). Must be implemented by child.
void cleanupSwitch(INDI::PropertySwitch ¤tSwitch, int switchIndex)
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
#define SERIAL_TIMEOUT_SEC
@ GEMINI_BRIGHTNESS_MODE_LOW
Combines all INDI Connection Plugins. Each INDI connection plugin is responsible of managing communic...