2021-04-16 15:50:01 +05:00
|
|
|
|
const modeNames = {
|
|
|
|
|
0: "Ручной",
|
|
|
|
|
1: "Бурение в роторе",
|
|
|
|
|
2: "Проработка",
|
|
|
|
|
3: "Бурение в слайде",
|
|
|
|
|
4: "Спуск СПО",
|
|
|
|
|
5: "Подъем СПО",
|
|
|
|
|
6: "Подъем с проработкой",
|
|
|
|
|
|
|
|
|
|
10: "БЛОКИРОВКА",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const ModeDisplay = (props)=>{
|
|
|
|
|
let value = '---'
|
|
|
|
|
|
|
|
|
|
if(props.data.length > 0){
|
|
|
|
|
let lastFullData = props.data[props.data.length - 1]
|
|
|
|
|
let index = lastFullData['mode']
|
|
|
|
|
if(index >= 0)
|
|
|
|
|
value = modeNames[index] ?? index
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-27 12:53:42 +05:00
|
|
|
|
return(<div className="display_header">
|
2021-04-16 15:50:01 +05:00
|
|
|
|
<span className="display_label">Режим:</span>
|
|
|
|
|
<span className="display_value">{value}</span>
|
2021-05-27 12:53:42 +05:00
|
|
|
|
</div>)
|
2021-04-16 15:50:01 +05:00
|
|
|
|
}
|