generated from ut-issl/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split obc time config header #583
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
実はこのtypedefもconfigかも?(将来的にはここの型サイズもuser設定にしたい気がしている.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
メモリくうし,step_tはu8のuserがいてもいいじゃん,的な
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
いやー,それは意味合いがかなり変わってくるので,少なくとも今はやめたい
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
認識合わせたいので1つ質問なんだけど,
define のパラメタは config だけど, typedef って何になるんだ?(Cのtypedef,コンテキストが深すぎて,どう捉えていいか謎い)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
どこまでがユーザ定義なのかを明確に分割したい,というのがそもそもの目的であって,将来的にユーザ定義にする かもしれない ものをユーザ定義のものであるかのように扱うべきではない(現状そうでないし,するとしてもそう変更する時にやるべき)
あと,ここがユーザ定義になってしまうと
ObcTime
が実質的にユーザ定義になってしまうので,この分離があんまりうれしくなくなるThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
型変わってしまうので個人的には typedef してるようなものをユーザ定義にはしたくない寄り.それでメモリ切り詰められるとかは確かにあるかもしれないけれど,発生する複雑性に対して得られるメリットがそこまであるかは結構疑問だし,アリだったとしても早すぎる最適化の類に思ってしまう.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なるほどね,理解