Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

Commit

Permalink
センサーを追加、架線柱をつけて動作確認
Browse files Browse the repository at this point in the history
  • Loading branch information
n4o847 committed Oct 13, 2023
1 parent d7014a8 commit 4880a2c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions ptcs/ptcs_control/mft2023.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,37 @@ def create_control(logger: logging.Logger | None = None) -> Control:
target_junction=j2,
mileage=WATARI_RAIL_B + 4.70 + OUTER_CURVE_RAIL,
)
position_53 = SensorPosition(
id="position_53",
section=s3,
target_junction=j1,
mileage=WATARI_RAIL_A
+ STRAIGHT_RAIL * 2
+ OUTER_CURVE_RAIL * 2
+ STRAIGHT_RAIL
+ STRAIGHT_1_2_RAIL
+ OUTER_CURVE_RAIL,
)
position_99 = SensorPosition(
id="position_99",
section=s1,
target_junction=j0,
mileage=WATARI_RAIL_B + STRAIGHT_RAIL * 3 + CURVE_RAIL * 3 + STRAIGHT_RAIL * 4 + CURVE_RAIL,
)
position_84 = SensorPosition(
id="position_84",
section=s1,
target_junction=j0,
mileage=WATARI_RAIL_B + STRAIGHT_RAIL * 3 + CURVE_RAIL,
)

control.add_sensor_position(position_173)
control.add_sensor_position(position_138)
control.add_sensor_position(position_80)
control.add_sensor_position(position_255)
control.add_sensor_position(position_53)
control.add_sensor_position(position_99)
control.add_sensor_position(position_84)

obstacle_0 = Obstacle(
id="obstacle_0",
Expand Down
2 changes: 1 addition & 1 deletion ptcs/ptcs_server/mft2023.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ def create_bridge() -> Bridge2:
# bridge.add_train(TrainClient("t3", ADDRESS_T3))
# bridge.add_train(TrainSimulator("t4"))
bridge.add_train(TrainClient("t4", ADDRESS_T4))
# bridge.add_obstacle(WirePoleClient("obstacle_0", ADDRESS_WIRE_POLE))
bridge.add_obstacle(WirePoleClient("obstacle_0", ADDRESS_WIRE_POLE))
bridge.add_controller(MasterControllerClient("t0", ADDRESS_MASTER_CONTROLLER))
return bridge

0 comments on commit 4880a2c

Please sign in to comment.