50 virtual bool ISNewText(
const char *dev,
const char *name,
char *texts[],
char *names[],
int n)
override;
51 virtual bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n)
override;
52 virtual bool ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
override;
70 bool getWeatherData();
71 bool getWeatherOffsets();
75 bool setTemperatureOffset(
double value);
76 bool setHumidityOffset(
double value);
77 bool setDewHeater(uint8_t value);
78 bool setAutoDew(
bool enable);
79 bool setDewAggressiveness(uint8_t level);
81 bool setThreshold(uint8_t value);
82 bool setCapAngle(uint16_t angle);
83 bool setAutoClose(
bool enable);
84 bool wifiFactoryReset();
85 std::vector<std::string> split(
const std::string &input,
const std::string &sep);
88 bool sendCommandBuffer(
const char *
cmd,
char *response,
int response_len,
int timeout_sec);
91 bool sendCommand(
const char *
cmd,
char (&response)[N],
int timeout_sec = 3)
93 return sendCommandBuffer(
cmd, response, N, timeout_sec);
96 bool sendEchoCommand(
const char *
cmd);
97 static uint8_t aggressivenessLevel(
double value);
99 bool ignoredWhileLoadingConfig(
const char *dev,
const char *name)
const;
100 void updateFirmwareVersion();
104 IText FirmwareT[1] {};
107 INDI::PropertyNumber DewHeaterNP {1};
108 INDI::PropertySwitch AutoDewSP {2};
109 INDI::PropertyNumber DewAggressivenessNP {1};
110 INDI::PropertyNumber ThresholdNP {1};
111 INDI::PropertySwitch SaveDewSP {1};
114 INDI::PropertySwitch AutoCloseSP {2};
117 INDI::PropertyNumber CapAngleNP {1};
120 INDI::PropertyNumber WeatherOffsetNP {2};
123 INDI::PropertyNumber DeviceStatusNP {9};
126 INDI::PropertyNumber UptimeNP {1};
129 INDI::PropertySwitch RebootSP {1};
132 INDI::PropertySwitch WifiFactoryResetSP {1};
134 Connection::Serial *serialConnection{
nullptr };
135 Connection::TCP *tcpConnection{
nullptr };
138 PegasusAstro::WiFi wifi {
this};
139 bool m_IsTCP{
false };
142 int m_CapTarget{ 0 };
143 std::chrono::steady_clock::time_point m_CapMoveStarted;
144 static constexpr std::chrono::seconds CAP_START_TIMEOUT{ 5 };
146 std::vector<std::string> lastWeatherData;
147 std::vector<std::string> lastStatusData;
149 static constexpr const char *ENVIRONMENT_TAB {
"Environment"};
150 static constexpr const char *LIGHTBOX_TAB {
"Light Box"};
151 static constexpr const char *DUSTCAP_TAB {
"Dust Cap"};
152 static constexpr const char *DEW_TAB {
"Dew Control"};
153 static constexpr const char *STATUS_TAB {
"Overview"};
154 static constexpr const char *NETWORK_TAB {
"Network"};
155 static constexpr const uint8_t NEO_LEN {64};
176 CAP_STATUS_UNKNOWN = 0,
177 CAP_STATUS_PARKED = 1,
178 CAP_STATUS_MOVING = 2,
179 CAP_STATUS_UNPARKED = 3,
185 STATUS_LIGHT_INTENSITY = 0,
187 STATUS_CAP_ACTUAL_ANGLE,
188 STATUS_CAP_TARGET_ANGLE,
192 STATUS_DEW_AGGRESSIVE,
218 OFFSET_TEMPERATURE = 0,
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
Provides interface to implement weather reporting and safety monitoring functionality.
virtual 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.
virtual void TimerHit() override
Callback function to be called once SetTimer duration elapses.
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override
Process the client newSwitch command.
virtual bool initProperties() override
Initialize properties initial state and value. The child class must implement this function.
virtual IPState UnParkCap() override
unPark dust cap (open cover). Must be implemented by child.
virtual IPState ParkCap() override
Park dust cap (close cover). Must be implemented by child.
virtual bool ISSnoopDevice(XMLEle *root) override
Process a snoop event from INDI server. This function is called when a snooped property is updated in...
virtual IPState AbortCap() override
Abort motion. Must be implemented by child.
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
const char * getDefaultName() override
virtual bool EnableLightBox(bool enable) override
EnableLightBox Turn on/off on a light box. Must be implemented in the child class.
virtual ~PegasusFlatMasterNeo() override=default
virtual IPState updateWeather() override
updateWeather Update weather conditions from device or service. The function should not change the st...
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
void ISGetProperties(const char *dev) override
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
struct _ITextVectorProperty ITextVectorProperty
*brief user defined string literal for JSON values *sa std::size_t n