hotfix. CF2-75, CF2-76. Скорость тальблока берётся по модулю; Момент ротора меньше 1 считается 0

This commit is contained in:
goodmice 2021-10-14 11:35:38 +05:00
parent c2243f1eb6
commit f3c42568dc

View File

@ -181,12 +181,22 @@ export default function TelemetryView({idWell}) {
const handleDataSaub = (data) => { const handleDataSaub = (data) => {
if (data) { if (data) {
data.forEach((_, idx) => {
if (data[idx].rotorSpeed < 1)
data[idx].rotorSpeed = 0;
data[idx].blockSpeed = Math.abs(data[idx].blockSpeed)
})
setDataSaub(data) setDataSaub(data)
} }
} }
const handleDataSpin = (data) => { const handleDataSpin = (data) => {
if (data) { if (data) {
data.forEach((_, idx) => {
if (data[idx].rotorSpeed < 1)
data[idx].rotorSpeed = 0;
data[idx].blockSpeed = Math.abs(data[idx].blockSpeed)
})
setDataSpin(data) setDataSpin(data)
} }
} }
@ -239,7 +249,8 @@ export default function TelemetryView({idWell}) {
lineGroup={group} lineGroup={group}
interval={chartInterval} interval={chartInterval}
showBorder={getIndexOfDrillingBy(dataSaub) === index}/> showBorder={getIndexOfDrillingBy(dataSaub) === index}/>
</GridItem>)} </GridItem>
)}
<GridItem col='2' row='3' colSpan='7'> <GridItem col='2' row='3' colSpan='7'>
<ActiveMessagesOnline idWell={idWell}/> <ActiveMessagesOnline idWell={idWell}/>