Merge remote-tracking branch 'origin/develop' into some_more_gps_updates
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2023-02-08 13:00:07 +01:00
commit ba5621f4b7
15 changed files with 76 additions and 32 deletions

View File

@ -19,6 +19,8 @@ change warranting a new major release:
## Fixed
- Single sourcing the version information into `CMakeLists.txt`. The `git describe` functionality
is only used to retrieve the git SHA hash now. Also removed `OBSWVersion.h` accordingly.
- Build system: Fixed small bug, where the version itself was
stored as the git SHA hash in `commonConfig.h`. This will be
an empty string now for regular versions.

View File

@ -9,9 +9,9 @@
# ##############################################################################
cmake_minimum_required(VERSION 3.13)
set(OBSW_VERSION_MAJOR_IF_GIT_FAILS 1)
set(OBSW_VERSION_MINOR_IF_GIT_FAILS 25)
set(OBSW_VERSION_REVISION_IF_GIT_FAILS 0)
set(OBSW_VERSION_MAJOR 1)
set(OBSW_VERSION_MINOR 25)
set(OBSW_VERSION_REVISION 0)
# set(CMAKE_VERBOSE TRUE)
@ -168,12 +168,12 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
set(GIT_INFO
${GIT_INFO}
CACHE STRING "Version information retrieved with git describe")
list(GET GIT_INFO 1 OBSW_VERSION_MAJOR)
list(GET GIT_INFO 2 OBSW_VERSION_MINOR)
list(GET GIT_INFO 3 OBSW_VERSION_REVISION)
# CMakeLists.txt is now single source of information. list(GET GIT_INFO 1
# OBSW_VERSION_MAJOR) list(GET GIT_INFO 2 OBSW_VERSION_MINOR) list(GET
# GIT_INFO 3 OBSW_VERSION_REVISION)
list(LENGTH GIT_INFO LIST_LEN)
if(LIST_LEN GREATER 4)
list(GET GIT_INFO 4 OBSW_VERSION_CST_GIT_SHA1)
list(GET GIT_INFO 4 OBSW_VERSION_CST_GIT_SHA1)
endif()
if(NOT OBSW_VERSION_MAJOR)
set(OBSW_VERSION_MAJOR ${OBSW_VERSION_MAJOR_IF_GIT_FAILS})

View File

@ -7,7 +7,6 @@
#define FSFWCONFIG_OBSWCONFIG_H_
#include "commonConfig.h"
#include "OBSWVersion.h"
/*******************************************************************/
/** All of the following flags should be enabled for mission code */

View File

@ -8,7 +8,6 @@
#include "commonConfig.h"
#include "q7sConfig.h"
#include "OBSWVersion.h"
/*******************************************************************/
/** All of the following flags should be enabled for mission code */

View File

@ -5,7 +5,7 @@
#include <fsfw/ipc/QueueFactory.h>
#include <fsfw/tasks/TaskFactory.h>
#include "OBSWVersion.h"
#include "commonConfig.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/timemanager/Stopwatch.h"
#include "fsfw/version.h"
@ -179,6 +179,26 @@ ReturnValue_t CoreController::initializeAfterTaskCreation() {
ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t *data, size_t size) {
switch (actionId) {
case (ANNOUNCE_VERSION): {
uint32_t p1 = (common::OBSW_VERSION_MAJOR << 24) | (common::OBSW_VERSION_MINOR << 16) |
(common::OBSW_VERSION_REVISION << 8);
uint32_t p2 = 0;
if (strcmp("", common::OBSW_VERSION_CST_GIT_SHA1) != 0) {
p1 |= 1;
auto shaAsStr = std::string(common::OBSW_VERSION_CST_GIT_SHA1);
size_t posDash = shaAsStr.find("-");
auto gitHash = shaAsStr.substr(posDash + 2, 4);
// Only copy first 4 letters of git hash
memcpy(&p2, gitHash.c_str(), 4);
}
triggerEvent(VERSION_INFO, p1, p2);
return HasActionsIF::EXECUTION_FINISHED;
}
case (ANNOUNCE_CURRENT_IMAGE): {
triggerEvent(CURRENT_IMAGE_INFO, CURRENT_CHIP, CURRENT_COPY);
return HasActionsIF::EXECUTION_FINISHED;
}
case (LIST_DIRECTORY_INTO_FILE): {
return actionListDirectoryIntoFile(actionId, commandedBy, data, size);
}
@ -673,9 +693,9 @@ ReturnValue_t CoreController::initVersionFile() {
sif::warning << "CoreController::versionFileInit: Retrieving uname line failed" << std::endl;
}
std::string fullObswVersionString = "OBSW: v" + std::to_string(SW_VERSION) + "." +
std::to_string(SW_SUBVERSION) + "." +
std::to_string(SW_REVISION);
std::string fullObswVersionString = "OBSW: v" + std::to_string(common::OBSW_VERSION_MAJOR) + "." +
std::to_string(common::OBSW_VERSION_MINOR) + "." +
std::to_string(common::OBSW_VERSION_REVISION);
char versionString[16] = {};
fsfw::FSFW_VERSION.getVersion(versionString, sizeof(versionString));
std::string fullFsfwVersionString = "FSFW: v" + std::string(versionString);

View File

@ -74,6 +74,8 @@ class CoreController : public ExtendedControllerBase {
static constexpr dur_millis_t DEFAULT_SD_CARD_CHECK_TIMEOUT = 60000;
static constexpr ActionId_t LIST_DIRECTORY_INTO_FILE = 0;
static constexpr ActionId_t ANNOUNCE_VERSION = 1;
static constexpr ActionId_t ANNOUNCE_CURRENT_IMAGE = 2;
static constexpr ActionId_t SWITCH_REBOOT_FILE_HANDLING = 5;
static constexpr ActionId_t RESET_REBOOT_COUNTERS = 6;
static constexpr ActionId_t SWITCH_IMG_LOCK = 7;
@ -109,6 +111,12 @@ class CoreController : public ExtendedControllerBase {
//! [EXPORT] : [COMMENT] No SD card was active. Core controller will attempt to re-initialize
//! a SD card.
static constexpr Event NO_SD_CARD_ACTIVE = event::makeEvent(SUBSYSTEM_ID, 4, severity::HIGH);
//! [EXPORT] : [COMMENT]
//! P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash
//! P2: First four letters of Git SHA is the last byte of P1 is set.
static constexpr Event VERSION_INFO = event::makeEvent(SUBSYSTEM_ID, 5, severity::INFO);
//! [EXPORT] : [COMMENT] P1: Current Chip, P2: Current Copy
static constexpr Event CURRENT_IMAGE_INFO = event::makeEvent(SUBSYSTEM_ID, 6, severity::INFO);
CoreController(object_id_t objectId);
virtual ~CoreController();

View File

@ -1,10 +0,0 @@
#ifndef COMMON_CONFIG_OBSWVERSION_H_
#define COMMON_CONFIG_OBSWVERSION_H_
const char* const SW_NAME = "eive";
#define SW_VERSION 1
#define SW_SUBVERSION 12
#define SW_REVISION 1
#endif /* COMMON_CONFIG_OBSWVERSION_H_ */

View File

@ -244,3 +244,5 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
14002;0x36b2;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;bsp_q7s/core/CoreController.h
14003;0x36b3;REBOOT_HW;MEDIUM;;bsp_q7s/core/CoreController.h
14004;0x36b4;NO_SD_CARD_ACTIVE;HIGH;No SD card was active. Core controller will attempt to re-initialize a SD card.;bsp_q7s/core/CoreController.h
14005;0x36b5;VERSION_INFO;INFO;P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;bsp_q7s/core/CoreController.h
14006;0x36b6;CURRENT_IMAGE_INFO;INFO;P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
244 14002 0x36b2 REBOOT_MECHANISM_TRIGGERED MEDIUM The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots bsp_q7s/core/CoreController.h
245 14003 0x36b3 REBOOT_HW MEDIUM bsp_q7s/core/CoreController.h
246 14004 0x36b4 NO_SD_CARD_ACTIVE HIGH No SD card was active. Core controller will attempt to re-initialize a SD card. bsp_q7s/core/CoreController.h
247 14005 0x36b5 VERSION_INFO INFO P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set. bsp_q7s/core/CoreController.h
248 14006 0x36b6 CURRENT_IMAGE_INFO INFO P1: Current Chip, P2: Current Copy bsp_q7s/core/CoreController.h

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 245 translations.
* @brief Auto-generated event translation file. Contains 247 translations.
* @details
* Generated on: 2023-02-03 10:52:53
* Generated on: 2023-02-08 11:22:40
*/
#include "translateEvents.h"
@ -245,6 +245,8 @@ const char *REBOOT_SW_STRING = "REBOOT_SW";
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
const char *REBOOT_HW_STRING = "REBOOT_HW";
const char *NO_SD_CARD_ACTIVE_STRING = "NO_SD_CARD_ACTIVE";
const char *VERSION_INFO_STRING = "VERSION_INFO";
const char *CURRENT_IMAGE_INFO_STRING = "CURRENT_IMAGE_INFO";
const char *translateEvents(Event event) {
switch ((event & 0xFFFF)) {
@ -728,6 +730,10 @@ const char *translateEvents(Event event) {
return REBOOT_HW_STRING;
case (14004):
return NO_SD_CARD_ACTIVE_STRING;
case (14005):
return VERSION_INFO_STRING;
case (14006):
return CURRENT_IMAGE_INFO_STRING;
default:
return "UNKNOWN_EVENT";
}

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 152 translations.
* Generated on: 2023-02-03 10:52:53
* Generated on: 2023-02-08 11:22:40
*/
#include "translateObjects.h"

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 245 translations.
* @brief Auto-generated event translation file. Contains 247 translations.
* @details
* Generated on: 2023-02-03 10:52:53
* Generated on: 2023-02-08 11:22:40
*/
#include "translateEvents.h"
@ -245,6 +245,8 @@ const char *REBOOT_SW_STRING = "REBOOT_SW";
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
const char *REBOOT_HW_STRING = "REBOOT_HW";
const char *NO_SD_CARD_ACTIVE_STRING = "NO_SD_CARD_ACTIVE";
const char *VERSION_INFO_STRING = "VERSION_INFO";
const char *CURRENT_IMAGE_INFO_STRING = "CURRENT_IMAGE_INFO";
const char *translateEvents(Event event) {
switch ((event & 0xFFFF)) {
@ -728,6 +730,10 @@ const char *translateEvents(Event event) {
return REBOOT_HW_STRING;
case (14004):
return NO_SD_CARD_ACTIVE_STRING;
case (14005):
return VERSION_INFO_STRING;
case (14006):
return CURRENT_IMAGE_INFO_STRING;
default:
return "UNKNOWN_EVENT";
}

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 152 translations.
* Generated on: 2023-02-03 10:52:53
* Generated on: 2023-02-08 11:22:40
*/
#include "translateObjects.h"

View File

@ -58,7 +58,7 @@ void AcsSubsystem::handleEventMessages() {
case EventMessage::EVENT_MESSAGE:
if (event.getEvent() == acs::SAFE_RATE_VIOLATION) {
CommandMessage msg;
ModeMessage::setCmdModeModeMessage(msg, acs::CtrlSubmode::DETUMBLE, 0);
ModeMessage::setCmdModeMessage(msg, acs::CtrlSubmode::DETUMBLE, 0);
ReturnValue_t result = commandQueue->sendMessage(commandQueue->getId(), &msg);
if (result != returnvalue::OK) {
sif::error << "AcsSubsystem: sending DETUMBLE mode cmd to self has failed" << std::endl;
@ -66,7 +66,7 @@ void AcsSubsystem::handleEventMessages() {
}
if (event.getEvent() == acs::SAFE_RATE_RECOVERY) {
CommandMessage msg;
ModeMessage::setCmdModeModeMessage(msg, acs::CtrlSubmode::SAFE, 0);
ModeMessage::setCmdModeMessage(msg, acs::CtrlSubmode::SAFE, 0);
ReturnValue_t result = commandQueue->sendMessage(commandQueue->getId(), &msg);
if (result != returnvalue::OK) {
sif::error << "AcsSubsystem: sending IDLE mode cmd to self has failed" << std::endl;

12
release_checklist.md Normal file
View File

@ -0,0 +1,12 @@
OBSW Release Checklist
=========
# Pre-Release
1. Update version in `CMakeLists.txt`
2. Verify that the Q7S, Q7S EM and Host build are working
3. Wait for CI/CD results
# Post-Release
1. Create a new release with tag on `EGit`

2
tmtc

@ -1 +1 @@
Subproject commit f16e27b79b9996f5a6c246cea560b783eb566d7e
Subproject commit 4086e7947b4458bcbbd47c78e67c23d3a47885c8