fix speed

This commit is contained in:
Ivan 2023-08-17 12:33:22 +03:00
parent 831ea1d991
commit 5e3ba53c95
Signed by untrusted user who does not match committer: ppechenkoo
GPG Key ID: 0C191B86D9582583

View File

@ -898,6 +898,13 @@ app.get('/reports/:id', async (req, res) => {
type = "Неизвестный тип"; type = "Неизвестный тип";
} }
var actualSpeed;
if (alarm.speed > 150) {
actualSpeed = alarm.speed / 100
} else {
actualSpeed = alarm.speed
}
templateData.Type = type; templateData.Type = type;
templateData.Speed = actualSpeed; templateData.Speed = actualSpeed;
templateData.Date = formatDate(alarm.time); templateData.Date = formatDate(alarm.time);