Skip to content
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

新コマンド画面(opslang) #54

Merged
merged 33 commits into from
Feb 22, 2024
Merged

新コマンド画面(opslang) #54

merged 33 commits into from
Feb 22, 2024

Conversation

kobkaz
Copy link
Contributor

@kobkaz kobkaz commented Dec 27, 2023

既存のCommand画面(/devtools/command)に加えて、新たにCommand(Experimental Opslang)画面(/devtools/command_new)を追加

テスト用コマンド

.set DATETIME_ORIGIN.MOBC=time!(2020-01-01T00:00:00Z)
.assert_eq 2, 2
.assert_approx_eq 2.0, 2.01, 0.1

.# MOBC.TLを毎秒取得する
 let target_bc_id = 77
 @RT.MOBC BCT_CLEAR_BLOCK target_bc_id
  let tlmid_tl = 0x20
 @BL.MOBC {
    1: TG_GENERATE_RT_TLM tlmid!(MOBC.TL)
    10: TLCD_DEPLOY_BLOCK 2 target_bc_id
 }
 let tlmid_bl = 0x21
 @RT.MOBC {
    BCE_ACTIVATE_BLOCK
    TG_GENERATE_RT_TLM tlmid!(MOBC.BL)
    TLCD_DEPLOY_BLOCK 2 target_bc_id
 }
 
.let now_unix = 1704067200 # 2024-01-01T00:00:00Z
.let now = time!(2024-01-01T00:00:00Z)
.@RT.MOBC TMGR_UPDATE_UNIXTIME now_unix 0 0
.@UTL.MOBC now + 1234.5s: NOP

.let ti = $RT.MOBC.HK.SH.TI
 @TL.MOBC ti + 100: NOP
# printは現在console.logで実装されている
. print 1s / 3
. let t = 1.2s
  print t + 3s / 2
  wait (1 == 1 && 3s) || (0 == 1 || t)
. print time!(2020-01-01T10:23:45.5+09:00) + 3s
. wait 0.5s
  wait 0.5s
. assert 1 == 1
. assert 2 < 3
  @RT.MOBC NOP
  print 3
  let t = $RT.MOBC.HK.SH.TI
  print $RT.MOBC.HK.SH.TI
  wait $RT.MOBC.HK.SH.TI > t + 20 || 0.5s
  wait $RT.MOBC.HK.SH.TI > t + 40
  #let ts = $RT.MOBC.HK #テレメトリ集合型は未実装
  {    
  }
 @RT.MOBC{
  . NOP
  }

@kobkaz kobkaz self-assigned this Dec 27, 2023
@kobkaz kobkaz force-pushed the opslang branch 4 times, most recently from 82fe086 to 20510e8 Compare January 4, 2024 01:30
@kobkaz kobkaz requested a review from sksat as a code owner January 18, 2024 04:52
@kobkaz kobkaz force-pushed the opslang branch 7 times, most recently from 6792f98 to b5baa23 Compare January 22, 2024 08:29
@kobkaz kobkaz marked this pull request as draft January 22, 2024 08:34
@kobkaz kobkaz force-pushed the opslang branch 3 times, most recently from 22f963c to 66892ed Compare January 24, 2024 02:25
@kobkaz
Copy link
Contributor Author

kobkaz commented Jan 24, 2024

未実装のもの

  • 関数呼び出し (どのような関数を用意するか未定)
  • 他ファイル呼び出し (devtools上での扱いが未定)

@kobkaz kobkaz force-pushed the opslang branch 2 times, most recently from 03e360e to 95f2d7b Compare January 26, 2024 01:46
@kobkaz kobkaz marked this pull request as ready for review January 26, 2024 02:28
@kobkaz kobkaz changed the title (WIP) opslang interpreter (WIP) 新コマンド画面(opn) Jan 26, 2024
@kobkaz kobkaz changed the title (WIP) 新コマンド画面(opn) (WIP) 新コマンド画面(opslang) Jan 26, 2024
@kobkaz kobkaz force-pushed the opslang branch 4 times, most recently from bd960a7 to 036e867 Compare January 30, 2024 05:00
@kobkaz kobkaz changed the title (WIP) 新コマンド画面(opslang) 新コマンド画面(opslang) Feb 20, 2024
tmtc-c2a/build.rs Outdated Show resolved Hide resolved
@kobkaz

This comment was marked as outdated.

@kobkaz

This comment was marked as outdated.

@kobkaz
Copy link
Contributor Author

kobkaz commented Feb 21, 2024

CIも通ったしそろそろマージしたい

Copy link

@s-ylide s-ylide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

特にインタプリタ部分をみました
正規表現で頑張ってるところはのちのちopslang側でちゃんと拾うということで

Cargo.toml Outdated
Comment on lines 12 to 13
exclude = [
"target",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これ Cargo 自身が管理しているディレクトリなので必要無いと思うのだけど,何かあったのかな

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OUT_DIR/devtools_frontend/crates/wasm-opslang に cd して wasm-pack build するようになってしまっているからですね

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あー,wasm を OUT_DIR にコピってからビルドしてるのか(フロントエンドと一緒に)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

やや非自明なのでコメントあるとよさそう

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あと,tmtc-c2a/devtools_frontend/crates/ もですね

@kobkaz kobkaz force-pushed the opslang branch 2 times, most recently from bff5c4f to fbc5aa0 Compare February 22, 2024 02:29
@kobkaz kobkaz merged commit f0b81b4 into main Feb 22, 2024
4 checks passed
@kobkaz kobkaz deleted the opslang branch February 22, 2024 07:35
@KOBA789 KOBA789 added this to the v0.7.0 milestone Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants