Skip to content

Commit

Permalink
feat: Merges flog and scheduler_test_flog
Browse files Browse the repository at this point in the history
  • Loading branch information
ntlhui committed Nov 1, 2024
1 parent c063faf commit cf0bcb4
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 179 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ set(GTEST_SOURCE_FILES
tests/fixed_google_tests.cpp
tests/file_google_tests.cpp
src/scheduler.cpp
tests/scheduler_test_flog.cpp
src/cli/flog.cpp
tests/test_file_system.cpp
)
set(EXAMINE_BEHAVIOR_SOURCE_FILES
tests/scheduler_test_system.cpp
tests/test_ensembles.cpp
src/scheduler.cpp
tests/scheduler_test_flog.cpp
src/cli/flog.cpp
tests/examine_behavior.cpp
tests/test_file_system.cpp
)
Expand Down
11 changes: 11 additions & 0 deletions src/cli/flog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,16 @@

#include "conio.hpp"
#include "consts.hpp"
#include "product.hpp"

#if SF_PLATFORM == SF_PLATFORM_PARTICLE
#include <Particle.h>
#elif SF_PLATFORM == SF_PLATFORM_GCC
#include "scheduler_test_system.hpp"

#include <stdlib.h>
#include <string.h>
#endif

typedef struct FLOG_Entry_
{
Expand All @@ -37,7 +44,11 @@ typedef struct FLOG_Message_
const char* message;
}FLOG_Message_t;

#if SF_PLATFORM == SF_PLATFORM_PARTICLE
retained FLOG_Data_t flogData;
#elif SF_PLATFORM == SF_PLATFORM_GCC
FLOG_Data_t flogData;
#endif
static char FLOG_unknownMessage[256];

static const char* FLOG_FindMessage(FLOG_CODE_e code);
Expand Down
20 changes: 20 additions & 0 deletions src/product.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,24 @@
*/
#define SF_CLOUD_CONNECT_MAX_ATTEMPTS 5

/**
* @brief Particle Selector
*
*/
#define SF_PLATFORM_PARTICLE 0
/**
* @brief GCC Platform Selector
*
*/
#define SF_PLATFORM_GCC

#ifdef PARTICLE
/**
* @brief Smartfin Platform Designator
*
*/
#define SF_PLATFORM SF_PLATFORM_PARTICLE
#else
#define SF_PLATFORM SF_PLATFORM_GCC
#endif
#endif
177 changes: 0 additions & 177 deletions tests/scheduler_test_flog.cpp

This file was deleted.

0 comments on commit cf0bcb4

Please sign in to comment.