修改TMS消息bug
This commit is contained in:
parent
f98dee79a0
commit
885e98dccf
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue