chonky #670

Merged
muellerr merged 278 commits from v3.0.0-dev into main 2023-06-11 14:25:21 +02:00
2 changed files with 6 additions and 4 deletions
Showing only changes of commit 06c5344d8a - Show all commits

View File

@ -591,7 +591,6 @@ void AcsBoardPolling::gyroAdisHandler(GyroAdis& gyro) {
gyro.performStartup = false; gyro.performStartup = false;
gyro.replyResult = returnvalue::OK; gyro.replyResult = returnvalue::OK;
} }
sif::debug << "hello world 2" << std::endl;
// Read regular registers // Read regular registers
std::memcpy(cmdBuf.data(), adis1650x::BURST_READ_ENABLE.data(), std::memcpy(cmdBuf.data(), adis1650x::BURST_READ_ENABLE.data(),
adis1650x::BURST_READ_ENABLE.size()); adis1650x::BURST_READ_ENABLE.size());

View File

@ -15,7 +15,7 @@ GyrAdis1650XHandler::GyrAdis1650XHandler(object_id_t objectId, object_id_t devic
} }
void GyrAdis1650XHandler::doStartUp() { void GyrAdis1650XHandler::doStartUp() {
if (internalState != InternalState::STARTUP) { if (internalState == InternalState::NONE) {
internalState = InternalState::STARTUP; internalState = InternalState::STARTUP;
commandExecuted = false; commandExecuted = false;
} }
@ -24,12 +24,13 @@ void GyrAdis1650XHandler::doStartUp() {
if (not commandExecuted) { if (not commandExecuted) {
warningSwitch = true; warningSwitch = true;
breakCountdown.setTimeout(adis1650x::START_UP_TIME); breakCountdown.setTimeout(adis1650x::START_UP_TIME);
updatePeriodicReply(true, adis1650x::REPLY);
commandExecuted = true; commandExecuted = true;
} }
updatePeriodicReply(true, adis1650x::REPLY);
} }
if (internalState == InternalState::STARTUP_DONE) { if (internalState == InternalState::STARTUP_DONE) {
setMode(MODE_ON); setMode(MODE_ON);
commandExecuted = false;
internalState = InternalState::NONE; internalState = InternalState::NONE;
} }
} }
@ -62,7 +63,6 @@ ReturnValue_t GyrAdis1650XHandler::buildTransitionDeviceCommand(DeviceCommandId_
} }
*id = adis1650x::REQUEST; *id = adis1650x::REQUEST;
adisRequest.cfg.decRateReg = adis1650x::DEC_RATE; adisRequest.cfg.decRateReg = adis1650x::DEC_RATE;
internalState = InternalState::STARTUP_DONE;
return preparePeriodicRequest(acs::SimpleSensorMode::NORMAL); return preparePeriodicRequest(acs::SimpleSensorMode::NORMAL);
} }
case (InternalState::SHUTDOWN): { case (InternalState::SHUTDOWN): {
@ -93,6 +93,9 @@ ReturnValue_t GyrAdis1650XHandler::scanForReply(const uint8_t *start, size_t rem
getMode() == _MODE_POWER_DOWN) { getMode() == _MODE_POWER_DOWN) {
return IGNORE_FULL_PACKET; return IGNORE_FULL_PACKET;
} }
if (internalState == InternalState::STARTUP) {
internalState = InternalState::STARTUP_DONE;
}
*foundLen = remainingSize; *foundLen = remainingSize;
if (remainingSize != sizeof(acs::Adis1650XReply)) { if (remainingSize != sizeof(acs::Adis1650XReply)) {
return returnvalue::FAILED; return returnvalue::FAILED;