Skip to content

Commit

Permalink
Merge pull request #168 from arkedge/feature/rename-settings-dir-exam…
Browse files Browse the repository at this point in the history
…ples

Apply rename migration: user Settings dir
  • Loading branch information
sksat authored Oct 26, 2023
2 parents 04b7207 + 1bddeed commit 48769e4
Show file tree
Hide file tree
Showing 211 changed files with 103 additions and 103 deletions.
2 changes: 1 addition & 1 deletion examples/mobc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,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
4 changes: 2 additions & 2 deletions examples/mobc/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "c2a-example-mobc",
"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'",
"run-all": "run-p run:*",
"devtools:sils": "run-s build:* run-all",
"build:tlmcmddb-sub": "tlmcmddb-cli bundle --pretty ../subobc/src/src_user/Settings/tlm_cmd/data_base/TLM_DB/calced_data ../subobc/src/src_user/Settings/tlm_cmd/data_base/CMD_DB tlmcmddb-subobc.json",
"build:tlmcmddb-sub": "tlmcmddb-cli bundle --pretty ../subobc/src/src_user/settings/tlm_cmd/data_base/TLM_DB/calced_data ../subobc/src/src_user/settings/tlm_cmd/data_base/CMD_DB tlmcmddb-subobc.json",
"tlmcmddb-merge": "tlmcmddb-cli merge --pretty --output tlmcmddb.json tlmcmddb.json tlmcmddb-subobc.json",
"run-subobc:c2a-subobc": "env UART_KBLE_PORT=9697 cargo run --manifest-path ../subobc/Cargo.toml",
"run-subobc:c2a": "run-s run:c2a",
Expand Down
2 changes: 1 addition & 1 deletion examples/mobc/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 @@ -10,8 +10,8 @@
#include "../../tlm_cmd/user_packet_handler.h"
#include <src_core/library/print.h>
#include <src_core/tlm_cmd/common_cmd_packet_util.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_AOBC_init_(void);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <src_core/library/print.h>
#include <src_core/library/result.h>
#include "../../component_driver/com/gs_validate.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"

static RESULT CSRV_GS_init_(void);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include <stddef.h> // for NULL
#include <src_core/library/print.h>
#include <src_core/tlm_cmd/common_cmd_packet_util.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 UART_TEST_init_by_AM_(void);
Expand Down
2 changes: 1 addition & 1 deletion examples/mobc/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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "uart_test.h"
#include <src_core/tlm_cmd/common_cmd_packet.h>
#include <src_core/library/print.h>
#include "../../Settings/sils_define.h"
#include "../../settings/sils_define.h"
#include "string.h" // for memcpy
#include <stdio.h> // SILSでのprint

Expand Down
2 changes: 1 addition & 1 deletion examples/mobc/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_UART
#include "uart_sils_sci_if.hpp"
Expand Down
2 changes: 1 addition & 1 deletion examples/mobc/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/mobc/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
4 changes: 2 additions & 2 deletions examples/mobc/src/src_user/script/add_section/settings.pl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# package sub;

sub GetSetting {
print "Laod Settings...\n";
print "Laod settings...\n";

my %SETTING;

Expand All @@ -20,7 +20,7 @@ sub GetSetting {
'driver',
'hal',
'library',
'Settings',
'settings',
'tlm_cmd'
];

Expand Down
8 changes: 4 additions & 4 deletions examples/mobc/src/src_user/script/deactivate_sils_define.bat
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/mobc/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/mobc/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,15 +4,15 @@ 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_drivers_update.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/Transitions/sequence_items.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_drivers_update.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
modes/transitions/sequence_items.c
system/event_logger_settings.c
system/event_handler_rules/event_handler_rules.c
system/event_handler_rules/event_handler_rule_test.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_DRIVERS_UPDATE_INI,,42,,,,,,danger,,
,BC_AR_GS_RELATED_PROCESS,,44,,,,,,danger,,
Expand Down
Binary file not shown.
14 changes: 7 additions & 7 deletions examples/mobc/src/src_user/tlm_cmd/block_command_definitions.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
#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_drivers_update.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_drivers_update.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_DRIVERS_UPDATE_INI = 42,
BC_AR_GS_RELATED_PROCESS = 44,
Expand Down
2 changes: 1 addition & 1 deletion examples/mobc/src/src_user/tlm_cmd/ccsds/tc_segment.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <stdint.h>
#include <src_core/tlm_cmd/ccsds/cmd_space_packet.h>
#include <src_user/Settings/tlm_cmd/ccsds/space_packet_typedef_params.h>
#include <src_user/settings/tlm_cmd/ccsds/space_packet_typedef_params.h>

#define TCS_HEADER_SIZE (1)
#define TCS_PACKET_MAX_LENGTH (TCS_HEADER_SIZE + CSP_MAX_LEN)
Expand Down
2 changes: 1 addition & 1 deletion examples/mobc/src/src_user/tlm_cmd/telemetry_source.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
#include "../applications/app_headers.h"
#include "../component_driver/aocs/aobc_telemetry_buffer.h"
#include "../component_driver/com/gs_validate.h"
#include "../Settings/build_settings.h"
#include "../settings/build_settings.h"

#endif
2 changes: 1 addition & 1 deletion examples/mobc/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"

extern PacketList PH_aobc_cmd_list;
extern PacketList PH_tobc_cmd_list;
Expand Down
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
Loading

0 comments on commit 48769e4

Please sign in to comment.