2021-04-16 15:50:01 +05:00
|
|
|
|
const modeNames = {
|
|
|
|
|
0: "Ручной",
|
|
|
|
|
1: "Бурение в роторе",
|
|
|
|
|
2: "Проработка",
|
|
|
|
|
3: "Бурение в слайде",
|
|
|
|
|
4: "Спуск СПО",
|
|
|
|
|
5: "Подъем СПО",
|
|
|
|
|
6: "Подъем с проработкой",
|
|
|
|
|
|
|
|
|
|
10: "БЛОКИРОВКА",
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-12 17:54:04 +05:00
|
|
|
|
export const ModeDisplay = ({data})=>{
|
2021-04-16 15:50:01 +05:00
|
|
|
|
let value = '---'
|
|
|
|
|
|
2021-08-12 17:54:04 +05:00
|
|
|
|
if(data.length > 0){
|
|
|
|
|
let lastFullData = data[data.length - 1]
|
2021-04-16 15:50:01 +05:00
|
|
|
|
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
|
|
|
|
}
|