Skip to content

Commit

Permalink
examples/subobc: apply settings dir rename migration
Browse files Browse the repository at this point in the history
  • Loading branch information
sksat committed Oct 26, 2023
1 parent 40a63fc commit 10c01b3
Show file tree
Hide file tree
Showing 77 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion examples/subobc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ add_subdirectory(${C2A_USER_DIR}/applications)
add_subdirectory(${C2A_USER_DIR}/component_driver)
add_subdirectory(${C2A_USER_DIR}/hal)
add_subdirectory(${C2A_USER_DIR}/library)
add_subdirectory(${C2A_USER_DIR}/Settings)
add_subdirectory(${C2A_USER_DIR}/settings)
add_subdirectory(${C2A_USER_DIR}/tlm_cmd)

set(C2A_SRCS
Expand Down
2 changes: 1 addition & 1 deletion examples/subobc/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "c2a-example-subobc",
"scripts": {
"build:tlmcmddb": "tlmcmddb-cli bundle --pretty src/src_user/Settings/tlm_cmd/data_base/TLM_DB/calced_data src/src_user/Settings/tlm_cmd/data_base/CMD_DB tlmcmddb.json",
"build:tlmcmddb": "tlmcmddb-cli bundle --pretty src/src_user/settings/tlm_cmd/data_base/TLM_DB/calced_data src/src_user/settings/tlm_cmd/data_base/CMD_DB tlmcmddb.json",
"run:c2a": "cargo run",
"run:gaia": "tmtc-c2a --satconfig satconfig.json --tlmcmddb tlmcmddb.json",
"run:kble": "bash -c 'while :; do kble -s <(jrsonnet spaghetti.jsonnet); sleep 1; done'",
Expand Down
2 changes: 1 addition & 1 deletion examples/subobc/src/src_user/applications/app_registry.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef APP_REGISTRY_H_
#define APP_REGISTRY_H_
#include <src_user/Settings/applications/timeline_command_dispatcher_define.h>
#include <src_user/settings/applications/timeline_command_dispatcher_define.h>

// こいつの自動生成がほしい...
typedef enum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include "csrv_mobc.h"
#include <src_core/tlm_cmd/packet_handler.h>
#include <src_core/library/print.h>
#include "../../Settings/port_config.h"
#include "../../Settings/component_driver_super/driver_buffer_define.h"
#include "../../settings/port_config.h"
#include "../../settings/component_driver_super/driver_buffer_define.h"
#include <src_core/library/result.h>

static RESULT CSRV_MOBC_init_(void);
Expand Down
2 changes: 1 addition & 1 deletion examples/subobc/src/src_user/c2a_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <src_core/c2a_core_main.h>
#include <src_core/system/time_manager/time_manager.h>
#include <src_core/system/watchdog_timer/watchdog_timer.h>
#include "./Settings/sils_define.h"
#include "./settings/sils_define.h"

// SILSの時,通常main関数はC2A外にある
#ifdef DEFINE_MAIN_ON_SILS
Expand Down
2 changes: 1 addition & 1 deletion examples/subobc/src/src_user/hal/sils/uart_sils.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma section REPRO
#include <src_core/hal/uart.h>
#include "../../Settings/port_config.h"
#include "../../settings/port_config.h"

#ifdef USE_SCI_COM_WINGS
#include "uart_sils_sci_if.hpp"
Expand Down
2 changes: 1 addition & 1 deletion examples/subobc/src/src_user/library/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <stdio.h>
#include <stdarg.h>

#include "../Settings/sils_define.h"
#include "../settings/sils_define.h"

// バッファサイズよりでかい文字列が来ると死ぬ
static char PRINT_buffer_[512];
Expand Down
8 changes: 4 additions & 4 deletions examples/subobc/src/src_user/script/activate_sils_define.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ REM
cd /d %~dp0
setlocal enabledelayedexpansion

for /f "tokens=1* delims=:" %%A in ('findstr /n "^" ..\Settings\sils_define.h') do (
for /f "tokens=1* delims=:" %%A in ('findstr /n "^" ..\settings\sils_define.h') do (
set line0=%%B

REM 空の行はechoで表示できないので分岐しておく
if "%%B" == "" (
echo.>>..\Settings\sils_define.tmp
echo.>>..\settings\sils_define.tmp
) else (
set line1=!line0:// #define SILS_FW=#define SILS_FW!
echo !line1!>>..\Settings\sils_define.tmp
echo !line1!>>..\settings\sils_define.tmp
)
)

REM 一時ファイルを削除し,変更を反映
move ..\Settings\sils_define.tmp ..\Settings\sils_define.h
move ..\settings\sils_define.tmp ..\settings\sils_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ REM
cd /d %~dp0
setlocal enabledelayedexpansion

for /f "tokens=1* delims=:" %%A in ('findstr /n "^" ..\Settings\sils_define.h') do (
for /f "tokens=1* delims=:" %%A in ('findstr /n "^" ..\settings\sils_define.h') do (
set line0=%%B

REM 空の行はechoで表示できないので分岐しておく
if "%%B" == "" (
echo.>>..\Settings\sils_define.tmp
echo.>>..\settings\sils_define.tmp
) else (
set line0=!line0:#define SILS_FW=// #define SILS_FW!
set line0=!line0:////=//!
echo !line0!>>..\Settings\sils_define.tmp
echo !line0!>>..\settings\sils_define.tmp
)
)

REM 一時ファイルを削除し、変更を反映
move ..\Settings\sils_define.tmp ..\Settings\sils_define.h
move ..\settings\sils_define.tmp ..\settings\sils_define.h
2 changes: 1 addition & 1 deletion examples/subobc/src/src_user/script/git/revision.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ echo.#define GIT_REVISION_C2A_USER "%git_rev_user%"
echo.#define GIT_REVISION_C2A_USER_SHORT 0x%git_rev_user_short%
echo.
echo.#endif // GIT_REVISION_CONFIG_H_
) > Settings\git_revision_config.h
) > settings\git_revision_config.h

REM current directoryに移動(src_user/script/git)
cd /d %~dp0
2 changes: 1 addition & 1 deletion examples/subobc/src/src_user/script/git/revision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ git_revs_core=$(../src_core/script/git/revision.sh)
git_rev_user=$(git log --pretty=format:%H -1)
git_rev_user_short=$(git log --pretty=format:%h -1)

tee Settings/git_revision_config.h << EOS
tee settings/git_revision_config.h << EOS
#ifndef GIT_REVISION_CONFIG_H_
#define GIT_REVISION_CONFIG_H_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ project(C2A_USER_SETTINGS)

set(C2A_SRCS
component_driver_super/hal_handler_registry.c
Modes/mode_definitions.c
Modes/TaskLists/tl_initial.c
Modes/TaskLists/Elements/tl_elem_debug_display.c
Modes/TaskLists/Elements/tl_elem_gs_related_process.c
Modes/TaskLists/Elements/tl_elem_tlm_cmd_hirate.c
Modes/Transitions/sl_initial.c
Modes/Transitions/sl_nop.c
modes/mode_definitions.c
modes/task_lists/tl_initial.c
modes/task_lists/elements/tl_elem_debug_display.c
modes/task_lists/elements/tl_elem_gs_related_process.c
modes/task_lists/elements/tl_elem_tlm_cmd_hirate.c
modes/transitions/sl_initial.c
modes/transitions/sl_nop.c
system/event_logger_settings.c
system/event_handler_rules/event_handler_rules.c
tlm_cmd/common_cmd_packet_define.c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define GIT_REVISION_CONFIG_H_

/**
* src/src_user/Settings/git_revision_config.hは自動生成される場合と設定だけを書く場合があります.
* src/src_user/settings/git_revision_config.hは自動生成される場合と設定だけを書く場合があります.
* C2A core/userのcommit hashはコマンドラインオプションないしこのファイルでdefineされ,
* 実際の埋め込みについてはsrc_core/Librari/git_revision.hとsrc_core/c2a_core_main.cが制御します.
* このexample userのファイルは例・ドキュメントなので,実際の内容は各C2A userで判断してください(そのままコピペしないでください).
Expand All @@ -23,8 +23,8 @@

#if 0
/*!< @brief このファイルを自動生成する場合
* src_user/script/git/revision.sh/batが以下のような内容でsrc/src_user/Settings/git_revision_config.hを生成します
* 注意!!!: この場合はsrc/src_user/Settings/git_revision_config.hは自分で記述しないでください
* src_user/script/git/revision.sh/batが以下のような内容でsrc/src_user/settings/git_revision_config.hを生成します
* 注意!!!: この場合はsrc/src_user/settings/git_revision_config.hは自分で記述しないでください
* また,基本的にGitで管理する必要がないです(gitignoreしてください).
*/

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Comment,Name,ShortName,BCID,エイリアス,,,,,Danger Flag,Description,Note
,,,,Deploy,SetBlockPosition,Clear,Activate,Inactivate,,,
**,Block Cmds for Mode Transition (シーケンスリスト),,,,,,,,,,
*,./src_user/Settings/Modes/Transitions/ で定義,,,,,,,,,,
*,./src_user/settings/modes/transitions/ で定義,,,,,,,,,,
,BC_SL_START_UP_TO_INITIAL,,0,,,,,,danger,,
,BC_SL_NOP ,,17,,,,,,danger,,
**,Block Cmds for TaskList (タスクリスト) : 286-300,,,,,,,,,,
*,./src_user/Settings/Modes/TaskLists/ で定義,,,,,,,,,,
*,./src_user/settings/modes/task_lists/ で定義,,,,,,,,,,
,BC_TL_START_UP,,20,,,,,,danger,,
,BC_TL_INITIAL,,21,,,,,,danger,,
**,Block Cmds for Elements (App Rotator@@ Combinar),,,,,,,,,,
*,./src_user/Settings/Modes/TaskLists/Elements/ で定義,,,,,,,,,,
*,./src_user/settings/modes/task_lists/elements/ で定義,,,,,,,,,,
,BC_AR_DEBUG_DISPLAY_INI,,40,,,,,,danger,,
,BC_AR_GS_RELATED_PROCESS,,44,,,,,,danger,,
,BC_AC_TLM_CMD_HIRATE,,50,,,,,,danger,,
Expand Down
Binary file not shown.
12 changes: 6 additions & 6 deletions examples/subobc/src/src_user/tlm_cmd/block_command_definitions.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
#include <string.h> // for memcpy
#include "command_definitions.h"

#include "../Settings/Modes/Transitions/sl_initial.h"
#include "../Settings/Modes/Transitions/sl_nop.h"
#include "../Settings/Modes/TaskLists/tl_initial.h"
#include "../Settings/Modes/TaskLists/Elements/tl_elem_tlm_cmd_hirate.h"
#include "../Settings/Modes/TaskLists/Elements/tl_elem_debug_display.h"
#include "../Settings/Modes/TaskLists/Elements/tl_elem_gs_related_process.h"
#include "../settings/modes/transitions/sl_initial.h"
#include "../settings/modes/transitions/sl_nop.h"
#include "../settings/modes/task_lists/tl_initial.h"
#include "../settings/modes/task_lists/elements/tl_elem_tlm_cmd_hirate.h"
#include "../settings/modes/task_lists/elements/tl_elem_debug_display.h"
#include "../settings/modes/task_lists/elements/tl_elem_gs_related_process.h"
#include "./normal_block_command_definition/nbc_header.h"

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ typedef enum
{

// Block Cmds for Mode Transition (シーケンスリスト)
// ./src_user/Settings/Modes/Transitions/ で定義
// ./src_user/settings/modes/transitions/ で定義
BC_SL_START_UP_TO_INITIAL = 0,
BC_SL_NOP = 17,

// Block Cmds for TaskList (タスクリスト) : 286-300
// ./src_user/Settings/Modes/TaskLists/ で定義
// ./src_user/settings/modes/task_lists/ で定義
BC_TL_START_UP = 20,
BC_TL_INITIAL = 21,

// Block Cmds for Elements (App Rotator, Combinar)
// ./src_user/Settings/Modes/TaskLists/Elements/ で定義
// ./src_user/settings/modes/task_lists/elements/ で定義
BC_AR_DEBUG_DISPLAY_INI = 40,
BC_AR_GS_RELATED_PROCESS = 44,
BC_AC_TLM_CMD_HIRATE = 50,
Expand Down
2 changes: 1 addition & 1 deletion examples/subobc/src/src_user/tlm_cmd/telemetry_source.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
#include <src_core/tlm_cmd/command_dispatcher_manager.h>
#include <src_core/tlm_cmd/block_command_executor.h>
#include "../applications/app_headers.h"
#include "../Settings/build_settings.h"
#include "../settings/build_settings.h"

#endif
2 changes: 1 addition & 1 deletion examples/subobc/src/src_user/tlm_cmd/user_packet_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <src_core/tlm_cmd/packet_handler.h>
#include <src_core/tlm_cmd/telemetry_frame.h>
#include "telemetry_definitions.h"
#include "../Settings/tlm_cmd/ccsds/apid_define.h"
#include "../settings/tlm_cmd/ccsds/apid_define.h"

/**
* @brief PH のユーザー固有部初期化処理
Expand Down
10 changes: 5 additions & 5 deletions examples/subobc/sync_with_mobc_example.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ call :sync_dir ".\src\src_user\BootLoader\" "..\mobc\src\src_user\BootLoader\"
call :sync_dir ".\src\src_user\library\" "..\mobc\src\src_user\library\"
call :sync_dir ".\src\src_user\ReProgramming\" "..\mobc\src\src_user\ReProgramming\"
call :sync_dir ".\src\src_user\script\" "..\mobc\src\src_user\script\"
call :sync_dir ".\src\src_user\Settings\tlm_cmd\ccsds\" "..\mobc\src\src_user\Settings\tlm_cmd\ccsds\"
call :sync_dir ".\src\src_user\settings\tlm_cmd\ccsds\" "..\mobc\src\src_user\settings\tlm_cmd\ccsds\"

call :sync_file ".\src\src_user\applications\user_defined\debug_apps.h" "..\mobc\src\src_user\applications\user_defined\debug_apps.h"
call :sync_file ".\src\src_user\hal\sils\uart_sils_sci_if.hpp" "..\mobc\src\src_user\hal\sils\uart_sils_sci_if.hpp"
call :sync_file ".\src\src_user\hal\sils\wdt_sils.cpp" "..\mobc\src\src_user\hal\sils\wdt_sils.cpp"
call :sync_file ".\src\src_user\hal\sils_mockup\README.md" "..\mobc\src\src_user\hal\sils_mockup\README.md"
call :sync_file ".\src\src_user\hal\sils_mockup\uart_sils.c" "..\mobc\src\src_user\hal\sils_mockup\uart_sils.c"
call :sync_file ".\src\src_user\hal\sils_mockup\wdt_sils.c" "..\mobc\src\src_user\hal\sils_mockup\wdt_sils.c"
call :sync_file ".\src\src_user\Settings\git_revision_config.h" "..\mobc\src\src_user\Settings\git_revision_config.h"
call :sync_file ".\src\src_user\Settings\ComponentDriverSuper\driver_buffer_define.h" "..\mobc\src\src_user\Settings\ComponentDriverSuper\driver_buffer_define.h"
call :sync_file ".\src\src_user\Settings\tlm_cmd\common_cmd_packet_define.c" "..\mobc\src\src_user\Settings\tlm_cmd\common_cmd_packet_define.c"
call :sync_file ".\src\src_user\Settings\tlm_cmd\common_tlm_cmd_packet_define.h" "..\mobc\src\src_user\Settings\tlm_cmd\common_tlm_cmd_packet_define.h"
call :sync_file ".\src\src_user\settings\git_revision_config.h" "..\mobc\src\src_user\settings\git_revision_config.h"
call :sync_file ".\src\src_user\settings\component_driver_super\driver_buffer_define.h" "..\mobc\src\src_user\settings\component_driver_super\driver_buffer_define.h"
call :sync_file ".\src\src_user\settings\tlm_cmd\common_cmd_packet_define.c" "..\mobc\src\src_user\settings\tlm_cmd\common_cmd_packet_define.c"
call :sync_file ".\src\src_user\settings\tlm_cmd\common_tlm_cmd_packet_define.h" "..\mobc\src\src_user\settings\tlm_cmd\common_tlm_cmd_packet_define.h"
call :sync_file ".\src\src_user\tlm_cmd\block_command_user_settings.c" "..\mobc\src\src_user\tlm_cmd\block_command_user_settings.c"
call :sync_file ".\src\src_user\tlm_cmd\block_command_user_settings.h" "..\mobc\src\src_user\tlm_cmd\block_command_user_settings.h"
call :sync_file ".\src\src_user\tlm_cmd\command_source.h" "..\mobc\src\src_user\tlm_cmd\command_source.h"
Expand Down

0 comments on commit 10c01b3

Please sign in to comment.