TDR Distance auf Display anzeigen
This commit is contained in:
@@ -147,12 +147,24 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
||||
slotIndex,
|
||||
modulName
|
||||
);
|
||||
//---------------------------------
|
||||
//---------------------------------
|
||||
const tdmChartData = useSelector((state: RootState) => state.tdmChart.data);
|
||||
const latestTdrDistanceMeters =
|
||||
Array.isArray(tdmChartData?.[slotIndex]) &&
|
||||
tdmChartData[slotIndex].length > 0 &&
|
||||
typeof tdmChartData[slotIndex][0].d === "number"
|
||||
? tdmChartData[slotIndex][0].d
|
||||
: 0;
|
||||
|
||||
const latestTdrDistance = Number((latestTdrDistanceMeters / 1000).toFixed(3));
|
||||
//setLoopDisplayValue(latestTdrDistance);
|
||||
|
||||
//---------------------------------
|
||||
|
||||
const loopValue =
|
||||
activeButton === "TDR"
|
||||
? Array.isArray(tdrLocation) && typeof tdrLocation[slotIndex] === "number"
|
||||
? tdrLocation[slotIndex]
|
||||
: 0
|
||||
? latestTdrDistance
|
||||
: typeof schleifenwiderstand === "number"
|
||||
? schleifenwiderstand
|
||||
: Number(schleifenwiderstand);
|
||||
@@ -166,6 +178,7 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
||||
const { chartInstance } = useTDRChart(selectedChartData);
|
||||
|
||||
//---------------------------------
|
||||
|
||||
return (
|
||||
<div
|
||||
className="relative bg-gray-300 w-[7.25rem] h-[24.375rem] border border-gray-400 transform laptop:-translate-y-12 2xl:-translate-y-0
|
||||
@@ -310,21 +323,22 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
||||
Schleife
|
||||
</button>
|
||||
<button
|
||||
onClick={() =>
|
||||
handleButtonClick(
|
||||
"TDR",
|
||||
setActiveButton,
|
||||
setloopTitleText,
|
||||
(value) =>
|
||||
setLoopDisplayValue(
|
||||
typeof value === "number" ? value : Number(value)
|
||||
), // Hier sicherstellen, dass nur number übergeben wird
|
||||
Number(schleifenwiderstand), // <- Stelle sicher, dass es eine Zahl ist
|
||||
tdrLocation,
|
||||
slotIndex,
|
||||
dispatch
|
||||
)
|
||||
}
|
||||
onClick={() => {
|
||||
setActiveButton("TDR");
|
||||
setloopTitleText("Entfernung [Km]");
|
||||
|
||||
const latestTdrDistanceMeters =
|
||||
Array.isArray(tdmChartData?.[slotIndex]) &&
|
||||
tdmChartData[slotIndex].length > 0 &&
|
||||
typeof tdmChartData[slotIndex][0].d === "number"
|
||||
? tdmChartData[slotIndex][0].d
|
||||
: 0;
|
||||
|
||||
const latestTdrDistance = Number(
|
||||
(latestTdrDistanceMeters / 1000).toFixed(3)
|
||||
);
|
||||
setLoopDisplayValue(latestTdrDistance);
|
||||
}}
|
||||
className={`w-[50%] h-[1.563rem] text-white text-[0.625rem] flex items-center justify-center ${
|
||||
Array.isArray(tdrActive) && tdrActive[slotIndex] === 0
|
||||
? "bg-gray-200 cursor-not-allowed" // Deaktiviert: Hellgrau
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
||||
|
||||
*/
|
||||
const webVersion = "1.6.160";
|
||||
const webVersion = "1.6.161";
|
||||
export default webVersion;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
13
public/CPLmockData/Last100TDR/kue_01/id/Liste.json
Normal file
13
public/CPLmockData/Last100TDR/kue_01/id/Liste.json
Normal file
@@ -0,0 +1,13 @@
|
||||
[
|
||||
{ "id": 99, "t": "2025-03-25 12:31:38", "d": 430, "p": 49, "s": 100, "a": 2 },
|
||||
{ "id": 98, "t": "2025-03-25 12:27:34", "d": 430, "p": 49, "s": 100, "a": 2 },
|
||||
{ "id": 97, "t": "2025-03-25 11:00:11", "d": 430, "p": 49, "s": 100, "a": 2 },
|
||||
{ "id": 93, "t": "2025-03-25 10:25:33", "d": 430, "p": 49, "s": 100, "a": 2 },
|
||||
{ "id": 92, "t": "2025-03-25 10:21:19", "d": 430, "p": 49, "s": 100, "a": 2 },
|
||||
{ "id": 91, "t": "2025-03-25 10:12:59", "d": 430, "p": 49, "s": 100, "a": 2 },
|
||||
{ "id": 90, "t": "2025-03-25 10:05:45", "d": 472, "p": 22, "s": 100, "a": 4 },
|
||||
{ "id": 89, "t": "2025-03-25 10:01:09", "d": 472, "p": 22, "s": 100, "a": 4 },
|
||||
{ "id": 88, "t": "2025-03-25 09:42:36", "d": 472, "p": 22, "s": 100, "a": 4 },
|
||||
{ "id": 87, "t": "2025-03-25 09:38:02", "d": 472, "p": 22, "s": 100, "a": 4 },
|
||||
{ "id": 86, "t": "2025-03-25 09:34:58", "d": 388, "p": 109, "s": 100, "a": 2 }
|
||||
]
|
||||
@@ -1,6 +1,9 @@
|
||||
// redux/types/tdmEntryTypes.ts
|
||||
export interface TDMEntry {
|
||||
id: number;
|
||||
t: string;
|
||||
// ggf. weitere Felder wie m, p usw.
|
||||
id: number; // ID der Messung
|
||||
t: string; // Zeitstempel
|
||||
d: number; // Entfernung (Distance)
|
||||
p: number; // Pulsweite
|
||||
s: number; // Kabelgeschwindigkeit
|
||||
a: number; // Amplitude
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user