修改TMS消息bug

This commit is contained in:
joylink_zhangsai 2023-11-13 13:47:32 +08:00
parent f98dee79a0
commit 885e98dccf
1 changed files with 2 additions and 2 deletions

View File

@ -153,9 +153,9 @@ public class TrainTmsDisplay {
private int getTbLevelPercent(VirtualRealityTrain train) {
if (train.getFk() > 0) {
return Math.min(100, (int) (train.getFk() / train.getCurrentFkMax()) * 100);
return Math.min(100, (int) ((train.getFk() / train.getCurrentFkMax()) * 100));
} else {
return -Math.min(100, (int) (train.getFb() / train.getCurrentFbMax()) * 100);
return -Math.min(100, (int) ((train.getFb() / train.getCurrentFbMax()) * 100));
}
}