another small fix
This commit is contained in:
parent
4f6a594707
commit
193c45ee33
@ -74,6 +74,7 @@ void FreshSupvHandler::performDeviceOperation(uint8_t opCode) {
|
||||
auto cmdIter = activeActionCmds.find(
|
||||
buildActiveCmdKey(Apid::HK, static_cast<uint8_t>(tc::HkId::GET_REPORT)));
|
||||
if (cmdIter == activeActionCmds.end() or not cmdIter->second.isPending) {
|
||||
spParams.buf = commandBuffer.data();
|
||||
sendEmptyCmd(Apid::HK, static_cast<uint8_t>(tc::HkId::GET_REPORT), true);
|
||||
}
|
||||
}
|
||||
@ -192,8 +193,6 @@ ReturnValue_t FreshSupvHandler::initializeLocalDataPool(localpool::DataPool& loc
|
||||
|
||||
ReturnValue_t FreshSupvHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||
const uint8_t* data, size_t size) {
|
||||
// TODO: Handle all commands here. Need to add them to some command map. Send command immediately
|
||||
// then.
|
||||
using namespace supv;
|
||||
ReturnValue_t result;
|
||||
if (uartManager.longerRequestActive()) {
|
||||
@ -478,6 +477,7 @@ void FreshSupvHandler::handleTransitionToOn() {
|
||||
}
|
||||
}
|
||||
if (startupState == StartupState::SET_TIME) {
|
||||
spParams.buf = commandBuffer.data();
|
||||
ReturnValue_t result = prepareSetTimeRefCmd();
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "FreshSupvHandler: Setting time command prepration failed" << std::endl;
|
||||
|
@ -116,7 +116,7 @@ class FreshSupvHandler : public FreshDeviceHandlerBase {
|
||||
struct ActiveCmdInfo {
|
||||
ActiveCmdInfo(uint32_t cmdCountdownMs) : cmdCountdown(cmdCountdownMs) {}
|
||||
|
||||
DeviceCommandId_t commandId;
|
||||
DeviceCommandId_t commandId = DeviceHandlerIF::NO_COMMAND_ID;
|
||||
bool isPending = false;
|
||||
bool ackRecv = false;
|
||||
bool ackExeRecv = false;
|
||||
|
@ -20,9 +20,9 @@ PlocMpsocHandler::PlocMpsocHandler(object_id_t objectId, object_id_t uartComIFid
|
||||
if (comCookie == nullptr) {
|
||||
sif::error << "PlocMPSoCHandler: Invalid communication cookie" << std::endl;
|
||||
}
|
||||
eventQueue = QueueFactory::instance()->createMessageQueue(EventMessage::EVENT_MESSAGE_SIZE * 5);
|
||||
eventQueue = QueueFactory::instance()->createMessageQueue(10);
|
||||
commandActionHelperQueue =
|
||||
QueueFactory::instance()->createMessageQueue(EventMessage::EVENT_MESSAGE_SIZE * 5);
|
||||
QueueFactory::instance()->createMessageQueue(10);
|
||||
spParams.maxSize = sizeof(commandBuffer);
|
||||
spParams.buf = commandBuffer;
|
||||
}
|
||||
|
@ -80,6 +80,7 @@ ReturnValue_t PlocSupvUartManager::initializeInterface(CookieIF* cookie) {
|
||||
}
|
||||
// Flush received and unread data
|
||||
tcflush(serialPort, TCIOFLUSH);
|
||||
sif::debug << "serial port: " << serialPort << std::endl;
|
||||
return OK;
|
||||
}
|
||||
|
||||
@ -140,7 +141,8 @@ ReturnValue_t PlocSupvUartManager::handleUartReception() {
|
||||
ReturnValue_t result = OK;
|
||||
ReturnValue_t status = OK;
|
||||
sif::debug << "reading port " << serialPort << std::endl;
|
||||
ssize_t bytesRead = read(serialPort, reinterpret_cast<void*>(recBuf.data()),
|
||||
TaskFactory::delayTask(100);
|
||||
ssize_t bytesRead = read(302, reinterpret_cast<void*>(recBuf.data()),
|
||||
static_cast<unsigned int>(recBuf.size()));
|
||||
if (bytesRead == 0) {
|
||||
while (result != NO_PACKET_FOUND) {
|
||||
@ -968,6 +970,8 @@ ReturnValue_t PlocSupvUartManager::encodeAndSendPacket(const uint8_t* sendData,
|
||||
sif::debug << "Sending TC" << std::endl;
|
||||
arrayprinter::print(encodedSendBuf.data(), encodedLen);
|
||||
}
|
||||
sif::debug << "writing to serial port: " << serialPort << std::endl;
|
||||
TaskFactory::delayTask(50);
|
||||
size_t bytesWritten = write(serialPort, encodedSendBuf.data(), encodedLen);
|
||||
if (bytesWritten != encodedLen) {
|
||||
sif::warning
|
||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit c4bd355146a2f5894a93a30f0c7f61aeef43e764
|
||||
Subproject commit 07b13c153dab03c35ea3c7921f68c6ba77049d1e
|
Loading…
Reference in New Issue
Block a user