WIP: Fixes for Pointing Controller #616

Closed
meggert wants to merge 49 commits from acs-ptg-ctrl-fixes into v2.1.0-dev
9 changed files with 13 additions and 2 deletions
Showing only changes of commit fcaabb4e42 - Show all commits

View File

@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 3.13)
set(OBSW_VERSION_MAJOR 2) set(OBSW_VERSION_MAJOR 2)
set(OBSW_VERSION_MINOR 0) set(OBSW_VERSION_MINOR 0)
set(OBSW_VERSION_REVISION 3) set(OBSW_VERSION_REVISION 4)
# set(CMAKE_VERBOSE TRUE) # set(CMAKE_VERBOSE TRUE)

View File

@ -59,6 +59,9 @@ void ObjectFactory::produce(void* args) {
// The ACU broke. // The ACU broke.
dummyCfg.addOnlyAcuDummy = true; dummyCfg.addOnlyAcuDummy = true;
#endif #endif
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
dummyCfg.addBpxBattDummy = false;
#endif
#if OBSW_ADD_ACS_BOARD == 1 #if OBSW_ADD_ACS_BOARD == 1
dummyCfg.addAcsBoardDummies = false; dummyCfg.addAcsBoardDummies = false;
#endif #endif

View File

@ -45,7 +45,9 @@
void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpioIF) { void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpioIF) {
new ComIFDummy(objects::DUMMY_COM_IF); new ComIFDummy(objects::DUMMY_COM_IF);
auto* comCookieDummy = new ComCookieDummy(); auto* comCookieDummy = new ComCookieDummy();
if (cfg.addBpxBattDummy) {
new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
}
if (cfg.addCoreCtrlCfg) { if (cfg.addCoreCtrlCfg) {
new CoreControllerDummy(objects::CORE_CONTROLLER); new CoreControllerDummy(objects::CORE_CONTROLLER);
} }

View File

@ -12,6 +12,7 @@ struct DummyCfg {
// Special variant because the ACU broke. Overrides addPowerDummies, only ACU dummy will be added. // Special variant because the ACU broke. Overrides addPowerDummies, only ACU dummy will be added.
bool addOnlyAcuDummy = false; bool addOnlyAcuDummy = false;
bool addPowerDummies = true; bool addPowerDummies = true;
bool addBpxBattDummy = true;
bool addSyrlinksDummies = true; bool addSyrlinksDummies = true;
bool addAcsBoardDummies = true; bool addAcsBoardDummies = true;
bool addSusDummies = true; bool addSusDummies = true;

View File

@ -37,6 +37,7 @@ void GyrAdis1650XHandler::doStartUp() {
void GyrAdis1650XHandler::doShutDown() { void GyrAdis1650XHandler::doShutDown() {
if (internalState != InternalState::SHUTDOWN) { if (internalState != InternalState::SHUTDOWN) {
commandExecuted = false; commandExecuted = false;
PoolReadGuard pg(&primaryDataset);
primaryDataset.setValidity(false, true); primaryDataset.setValidity(false, true);
internalState = InternalState::SHUTDOWN; internalState = InternalState::SHUTDOWN;
} }

View File

@ -33,6 +33,7 @@ void GyrL3gCustomHandler::doStartUp() {
void GyrL3gCustomHandler::doShutDown() { void GyrL3gCustomHandler::doShutDown() {
if (internalState != InternalState::SHUTDOWN) { if (internalState != InternalState::SHUTDOWN) {
internalState = InternalState::SHUTDOWN; internalState = InternalState::SHUTDOWN;
PoolReadGuard pg(&dataset);
dataset.setValidity(false, true); dataset.setValidity(false, true);
commandExecuted = false; commandExecuted = false;
} }

View File

@ -29,6 +29,7 @@ void MgmLis3CustomHandler::doStartUp() {
void MgmLis3CustomHandler::doShutDown() { void MgmLis3CustomHandler::doShutDown() {
if (internalState != InternalState::SHUTDOWN) { if (internalState != InternalState::SHUTDOWN) {
PoolReadGuard pg(&dataset);
dataset.setValidity(false, true); dataset.setValidity(false, true);
internalState = InternalState::SHUTDOWN; internalState = InternalState::SHUTDOWN;
commandExecuted = false; commandExecuted = false;

View File

@ -33,6 +33,7 @@ void MgmRm3100CustomHandler::doStartUp() {
void MgmRm3100CustomHandler::doShutDown() { void MgmRm3100CustomHandler::doShutDown() {
if (internalState != InternalState::SHUTDOWN) { if (internalState != InternalState::SHUTDOWN) {
commandExecuted = false; commandExecuted = false;
PoolReadGuard pg(&primaryDataset);
primaryDataset.setValidity(false, true); primaryDataset.setValidity(false, true);
internalState = InternalState::SHUTDOWN; internalState = InternalState::SHUTDOWN;
} }

View File

@ -29,6 +29,7 @@ void SusHandler::doStartUp() {
void SusHandler::doShutDown() { void SusHandler::doShutDown() {
if (internalState != InternalState::SHUTDOWN) { if (internalState != InternalState::SHUTDOWN) {
PoolReadGuard pg(&dataset);
dataset.setValidity(false, true); dataset.setValidity(false, true);
internalState = InternalState::SHUTDOWN; internalState = InternalState::SHUTDOWN;
commandExecuted = false; commandExecuted = false;