Skip to content

Commit

Permalink
Merge pull request #4 from winup-zhou/master
Browse files Browse the repository at this point in the history
同步TDT问题的更改
  • Loading branch information
winup-zhou authored Sep 30, 2024
2 parents c1a86eb + b2b163e commit 6dc45e4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 23 deletions.
39 changes: 17 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,15 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create tag
run: |
git tag ${{needs.build.outputs.version}}
git push origin ${{needs.build.outputs.version}}
- name: Create release draft
id: create-draft
uses: release-drafter/[email protected]
with:
version: ${{needs.build.outputs.version}}
name: ${{needs.build.outputs.version}}
tag: ${{needs.build.outputs.version}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download a build artifact
uses: actions/[email protected]
- name: Create tag
uses: rickstaa/action-create-tag@v1
id: "tag_create"
with:
tag: "${{needs.build.outputs.version}}"
tag_exists_error: true
message: "Created tag ${{needs.build.outputs.version}}"
- name: Get repository name
run: |
echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#${GITHUB_REPOSITORY_OWNER}/}" >> $GITHUB_ENV
Expand All @@ -83,13 +77,14 @@ jobs:
run: |
cd plugins/
zip ${{env.FILE_NAME}}.zip -r *
- name: Upload release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release and Upload Release Asset
uses: softprops/action-gh-release@v1
with:
upload_url: ${{steps.create-draft.outputs.upload_url}}
asset_path: ./plugins/${{env.FILE_NAME}}.zip
asset_name: ${{env.FILE_NAME}}.zip
asset_content_type: application/zip
tag_name: ${{needs.build.outputs.version}}
name: Release ${{needs.build.outputs.version}}
body: TODO New Release.
draft: true
prerelease: true
files: |
./plugins/${{env.FILE_NAME}}.zip
LICENSE
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Trainguard MT CBTC (AtsEX version)

[![MSBuild](https://github.com/winup-zhou/TGMT-CBTC-EX/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/winup-zhou/TGMT-CBTC-EX/actions/workflows/build.yml)

## Overview
BVE5/6 implementation of the advanced Siemens Trainguard MT CBTC ATP+ATO signalling system.

Expand Down
2 changes: 1 addition & 1 deletion TGMT-CBTC-EX/TickNew.cs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ public override TickResult Tick(TimeSpan elapsed) {

// 显示TDT、车门使能,车门零速保护
if (StationManager.NextStation != null) {
int sectogo = Convert.ToInt32((state.Time.TotalMilliseconds / 1000) - StationManager.NextStation.DepartureTime);
int sectogo = Convert.ToInt32((state.Time.TotalMilliseconds / 1000) - (StationManager.NextStation.DepartureTime / 1000));
if (StationManager.Arrived) {
// 已停稳,可开始显示TDT
if (location - StationManager.NextStation.StopPosition < Config.TDTFreezeDistance) {
Expand Down

0 comments on commit 6dc45e4

Please sign in to comment.