Skip to content

Commit

Permalink
Update CCD Crash Property
Browse files Browse the repository at this point in the history
  • Loading branch information
naheedsa committed Feb 8, 2024
1 parent cc74fcf commit b5d2d3a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 4 additions & 4 deletions drivers/ccd/ccd_simulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ bool CCDSim::initProperties()
SIMULATOR_TAB, IP_RW, 60, IPS_IDLE);

// Simulate Crash
IUFillSwitch(&CrashS[0], "CRASH", "Crash driver", ISS_OFF);
IUFillSwitchVector(&CrashSP, CrashS, 1, getDeviceName(), "CCD_SIMULATE_CRASH", "Crash", SIMULATOR_TAB, IP_WO,
CrashSP[CRASH].fill("CRASH", "Crash driver", ISS_OFF);
CrashSP.fill(getDeviceName(), "CCD_SIMULATE_CRASH", "Crash", SIMULATOR_TAB, IP_WO,
ISR_ATMOST1, 0, IPS_IDLE);

// Periodic Error
Expand Down Expand Up @@ -266,7 +266,7 @@ void CCDSim::ISGetProperties(const char * dev)
defineProperty(&EqPENP);
defineProperty(&FocusSimulationNP);
defineProperty(SimulateBayerSP);
defineProperty(&CrashSP);
defineProperty(CrashSP);
}

bool CCDSim::updateProperties()
Expand Down Expand Up @@ -1240,7 +1240,7 @@ bool CCDSim::ISNewSwitch(const char * dev, const char * name, ISState * states,
}
return true;
}
else if (strcmp(name, CrashSP.name) == 0)
else if (CrashSP.isNameMatch(name))
{
abort();
}
Expand Down
7 changes: 6 additions & 1 deletion drivers/ccd/ccd_simulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,12 @@ class CCDSim : public INDI::CCD, public INDI::FilterInterface
INDI::PropertyText DirectoryTP {1};
INDI::PropertySwitch DirectorySP {2};

ISwitchVectorProperty CrashSP;
INDI::PropertySwitch CrashSP {1};
enum
{
CRASH
};

ISwitch CrashS[1];

INDI::PropertySwitch ResolutionSP {2};
Expand Down

0 comments on commit b5d2d3a

Please sign in to comment.