Skip to content

Commit

Permalink
split ObcTime config into obc_time_config.h
Browse files Browse the repository at this point in the history
  • Loading branch information
sksat committed May 18, 2023
1 parent 12f316e commit 9284b1a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions System/TimeManager/obc_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @brief OBCの時刻情報の定義と演算
*/
#include "obc_time.h"
#include "obc_time_config.h"
#include "../../Library/print.h"

ObcTime OBCT_create(cycle_t total_cycle,
Expand Down
14 changes: 14 additions & 0 deletions System/TimeManager/obc_time_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#ifndef OBC_TIME_CONFIG_H_
#define OBC_TIME_CONFIG_H_

// step, cycleについてはTimeManagerを参照のこと
// デフォルト設定
#define OBCT_STEP_IN_MSEC (1) //!< 1 step で何 ms か
#define OBCT_STEPS_PER_CYCLE (100) //!< 何 step で 1 cycle か
#define OBCT_CYCLES_PER_SEC (1000 / OBCT_STEP_IN_MSEC / OBCT_STEPS_PER_CYCLE) //!< 1 s で何 cycle か
#define OBCT_MAX_CYCLE (0xfffffff0u) //!< 最大 cycle 数.つまり TI がいくつでオーバーフローするか

// user 設定
#include <src_user/Settings/System/obc_time_params.h>

#endif // OBC_TIME_CONFIG_H_

0 comments on commit 9284b1a

Please sign in to comment.