11import { Layout , Model , TabNode } from "flexlayout-react" ;
2- import { useEffect , useState } from "react" ;
32import SuspensionGauge from "./visualizations/SuspensionGauge" ;
43import CarWireframe from "./visualizations/CarWireframe" ;
54import GForceGauge from "./visualizations/GForceGauge" ;
6- import LineChartLightning from "./visualizations/lightning-charts/LineChartLightning " ;
5+ import LineChart from "./visualizations/lightning-charts/LineChart " ;
76import TextBox from "./visualizations/TextBox" ;
7+ import { CornersOut , X } from "@phosphor-icons/react" ;
8+ import GPSInternal from "./visualizations/GPS/GPS" ;
89
910const model = Model . fromJson ( {
1011 global : { } ,
@@ -17,14 +18,25 @@ const model = Model.fromJson({
1718 type : "row" ,
1819 weight : 30 ,
1920 children : [
21+ // {
22+ // type: "tabset",
23+ // weight: 30,
24+ // children: [
25+ // {
26+ // type: "tab",
27+ // name: "Suspension",
28+ // component: "suspension-gauge",
29+ // },
30+ // ],
31+ // },
2032 {
2133 type : "tabset" ,
22- weight : 30 ,
34+ weight : 33 ,
2335 children : [
2436 {
2537 type : "tab" ,
26- name : "Suspension " ,
27- component : "suspension-gauge " ,
38+ name : "GPS " ,
39+ component : "gps " ,
2840 } ,
2941 ] ,
3042 } ,
@@ -51,17 +63,6 @@ const model = Model.fromJson({
5163 type : "row" ,
5264 weight : 70 ,
5365 children : [
54- {
55- type : "tabset" ,
56- weight : 33 ,
57- children : [
58- {
59- type : "tab" ,
60- name : "Chart 1" ,
61- component : "acc-seg-0-voltage-linegraph" ,
62- } ,
63- ] ,
64- } ,
6566 {
6667 type : "tabset" ,
6768 weight : 33 ,
@@ -133,7 +134,7 @@ export default function FlexLayoutComponent() {
133134 "car-wireframe" : < CarWireframe /> ,
134135 "g-force-gauge" : < GForceGauge x = { 1 } y = { 1 } z = { 1 } /> ,
135136 "acc-seg-0-voltage-linegraph" : (
136- < LineChartLightning
137+ < LineChart
137138 title = { "Acc Seg 0 Voltage" }
138139 yAxisTitle = "Voltage"
139140 yAxisColumns = { [
@@ -144,29 +145,27 @@ export default function FlexLayoutComponent() {
144145 "Seg0_VOLT_4" ,
145146 "Seg0_VOLT_5" ,
146147 ] }
148+ yAxisUnits = "volts"
147149 />
148150 ) ,
149151 "timings-box" : (
150152 < div className = "p-0" >
151- < TextBox
152- title = "Lap Time"
153- keyName = ":LapTime"
154- />
155- < TextBox
156- title = "Lap Number"
157- keyName = ":Lap"
158- />
153+ < TextBox title = "Lap Time" keyName = ":LapTime" />
154+ < TextBox title = "Lap Number" keyName = ":Lap" /> { /*TODO: lcjs datagrid*/ }
155+ < TextBox title = "Speed" keyName = "VDM_GPS_SPEED" /> { " " }
156+ { /*TODO: lcjs guage chart*/ }
159157 </ div >
160158 ) ,
161159 "brake-pressure-linegraph" : (
162- < LineChartLightning
160+ < LineChart
163161 // title={""}
164- yAxisTitle = "Brake Pressure (psi) "
162+ yAxisTitle = "Brake Pressure"
165163 yAxisColumns = { [ "TELEM_STEERBRAKE_BRAKEF" , "TELEM_STEERBRAKE_BRAKER" ] }
164+ yAxisUnits = "psi(?)"
166165 />
167166 ) ,
168167 "long-accel-linegraph" : (
169- < LineChartLightning
168+ < LineChart
170169 // title={""}
171170 yAxisTitle = "Longitudinal Acceleration"
172171 yAxisColumns = { [
@@ -176,6 +175,7 @@ export default function FlexLayoutComponent() {
176175 ] }
177176 />
178177 ) ,
178+ gps : < GPSInternal /> ,
179179 skeleton : < div className = "w-full h-full bg-neutral-500" > </ div > ,
180180 } ;
181181
@@ -188,5 +188,15 @@ export default function FlexLayoutComponent() {
188188 ] ;
189189 }
190190
191- return < Layout realtimeResize = { true } model = { model } factory = { factory } /> ;
191+ return (
192+ < Layout
193+ realtimeResize = { true }
194+ model = { model }
195+ factory = { factory }
196+ icons = { {
197+ close : < X color = "gray" weight = "bold" /> ,
198+ maximize : < CornersOut color = "gray" weight = "bold" /> ,
199+ } }
200+ />
201+ ) ;
192202}
0 commit comments