Skip to content

Commit

Permalink
Update Readme.md
Browse files Browse the repository at this point in the history
Fix fAC show 0, sometime
  • Loading branch information
icaros7 committed Nov 22, 2018
1 parent 6c20205 commit 3b6af70
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 44 deletions.
81 changes: 40 additions & 41 deletions Readme.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions server/Html/skins/default-mph/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@
.game-nextRestStopTime,
.navigation-estimatedTime,
.navigation-estimatedDistance,
._estimatedCom,
._estDis {
color: #54d9a8;
}
Expand All @@ -382,6 +383,7 @@
.navigation-estimatedDistance,
._jobIncome,
._jobSource,
._estimatedCom,
._jobDestionation {
visibility: hidden;
}
Expand Down Expand Up @@ -409,6 +411,7 @@
.hasJob.yes .navigation-estimatedTime,
.hasJob.yes ._jobSource,
.hasJob.yes ._estimatedTime,
.hasJob.yes ._estimatedCom,
.hasJob.yes ._jobDestionation {
visibility: visible;
}
Expand Down
2 changes: 1 addition & 1 deletion server/Html/skins/default-mph/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</tr>
<tr>
<th>예상 시간 :</th>
<td><span class="hasJob navigation-estimatedTime">, </span><span class="hasJob navigation-estimatedDistance"></span></td>
<td><span class="hasJob navigation-estimatedTime"></span><span class="_estimatedCom">, </span><span class="hasJob navigation-estimatedDistance"></span></td>
</tr>
<th>다음 휴식 시간 : </th>
<td><span class="game-nextRestStopTime"></span></td>
Expand Down
9 changes: 8 additions & 1 deletion server/Html/skins/default-mph/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,14 @@ Funbit.Ets.Telemetry.Dashboard.prototype.filter = function (data, utils) {
data.job.sourceCompany = "";
data.job.income = "0";
data.job.remainingTime = 'own'
};
};
// Fix sometimes show 0 value in fuelAverageConsumption
if (data.truck.fuelAverageConsumption != 0) {
localStorage.setItem("FAC",data.truck.fuelAverageConsumption);
}
else {
data.truck.fuelAverageConsumption = localStorage.getItem("FAC");
}
// return changed data to the core for rendering
return data;
};
3 changes: 3 additions & 0 deletions server/Html/skins/default/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@
.job-remainingTime,
.game-nextRestStopTime,
.navigation-estimatedTime,
._estimatedCom,
.navigation-estimatedDistance {
color: #54d9a8;
}
Expand All @@ -381,6 +382,7 @@
.navigation-estimatedDistance,
._jobIncome,
._jobSource,
._estimatedCom,
._jobDestionation {
visibility: hidden;
}
Expand Down Expand Up @@ -408,6 +410,7 @@
.hasJob.yes .navigation-estimatedTime,
.hasJob.yes ._jobSource,
.hasJob.yes ._estimatedTime,
.hasJob.yes ._estimatedCom,
.hasJob.yes ._jobDestionation {
visibility: visible;
}
Expand Down
2 changes: 1 addition & 1 deletion server/Html/skins/default/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</tr>
<tr>
<th>예상 시간 :</th>
<td><span class="hasJob navigation-estimatedTime">, </span><span class="hasJob navigation-estimatedDistance"></span></td>
<td><span class="hasJob navigation-estimatedTime"></span><span class="_estimatedCom">, </span><span class="hasJob navigation-estimatedDistance"></span></td>
</tr>
<th>다음 휴식 시간 : </th>
<td><span class="game-nextRestStopTime"></span></td>
Expand Down
7 changes: 7 additions & 0 deletions server/Html/skins/default/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ Funbit.Ets.Telemetry.Dashboard.prototype.filter = function (data, utils) {
data.job.remainingTime = 'own';
data.navigation.estimatedDistance = '';
};
// Fix sometimes show 0 value in fuelAverageConsumption
if (data.truck.fuelAverageConsumption != 0) {
localStorage.setItem("FAC",data.truck.fuelAverageConsumption);
}
else {
data.truck.fuelAverageConsumption = localStorage.getItem("FAC");
}
// return changed data to the core for rendering
return data;
};

0 comments on commit 3b6af70

Please sign in to comment.