both magnetic sensors working at once now

This commit is contained in:
Robin Müller 2021-03-06 20:49:22 +01:00 committed by Robin.Mueller
parent 6b0f9757c2
commit 47336041d8
2 changed files with 13 additions and 14 deletions

View File

@ -99,16 +99,16 @@ ReturnValue_t pst::gomspacePstInit(FixedTimeslotTaskIF *thisSequence){
ReturnValue_t pst::pollingSequenceAcsTest(FixedTimeslotTaskIF *thisSequence) { ReturnValue_t pst::pollingSequenceAcsTest(FixedTimeslotTaskIF *thisSequence) {
uint32_t length = thisSequence->getPeriodMs(); uint32_t length = thisSequence->getPeriodMs();
// thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0, thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0,
// DeviceHandlerIF::PERFORM_OPERATION); DeviceHandlerIF::PERFORM_OPERATION);
// thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.2, thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.2,
// DeviceHandlerIF::SEND_WRITE); DeviceHandlerIF::SEND_WRITE);
// thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.4, thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.4,
// DeviceHandlerIF::GET_WRITE); DeviceHandlerIF::GET_WRITE);
// thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.6, thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.6,
// DeviceHandlerIF::SEND_READ); DeviceHandlerIF::SEND_READ);
// thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.8, thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0.8,
// DeviceHandlerIF::GET_READ); DeviceHandlerIF::GET_READ);
thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0, thisSequence->addSlot(objects::MGM_1_RM3100_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION); DeviceHandlerIF::PERFORM_OPERATION);

View File

@ -41,8 +41,7 @@ void MGMHandlerRM3100::doStartUp() {
case(InternalState::STATE_READ_TMRC): { case(InternalState::STATE_READ_TMRC): {
if(commandExecuted) { if(commandExecuted) {
internalState = InternalState::STATE_NORMAL; internalState = InternalState::STATE_NORMAL;
//setMode(_MODE_TO_ON); setMode(_MODE_TO_ON);
setMode(MODE_NORMAL);
} }
break; break;
} }
@ -317,7 +316,7 @@ ReturnValue_t MGMHandlerRM3100::initializeLocalDataPool(
} }
uint32_t MGMHandlerRM3100::getTransitionDelayMs(Mode_t from, Mode_t to) { uint32_t MGMHandlerRM3100::getTransitionDelayMs(Mode_t from, Mode_t to) {
return 60000; return 10000;
} }
ReturnValue_t MGMHandlerRM3100::handleDataReadout(const uint8_t *packet) { ReturnValue_t MGMHandlerRM3100::handleDataReadout(const uint8_t *packet) {
@ -334,7 +333,7 @@ ReturnValue_t MGMHandlerRM3100::handleDataReadout(const uint8_t *packet) {
#if OBSW_VERBOSE_LEVEL >= 1 #if OBSW_VERBOSE_LEVEL >= 1
if(debugDivider->checkAndIncrement()) { if(debugDivider->checkAndIncrement()) {
sif::info << "MGMHandlerLIS3: Magnetic field strength in" sif::info << "MGMHandlerRM3100: Magnetic field strength in"
" microtesla:" << std::endl; " microtesla:" << std::endl;
/* Set terminal to utf-8 if there is an issue with micro printout. */ /* Set terminal to utf-8 if there is an issue with micro printout. */
sif::info << "X: " << fieldStrengthX << " \xC2\xB5T" << std::endl; sif::info << "X: " << fieldStrengthX << " \xC2\xB5T" << std::endl;