Commit f6d1513
refactor(gantry): use the shared speed util
Main added src/frontend/utils/units.ts as the single home for speed
conversion, so the Gantry copy has to go. Deletes gantryUnits.ts and
the two hooks that wrapped it. Nothing used them.
Renames the setting to speedUnit with 'mph' | 'km/h' | 'auto' values,
matching Battle, so it passes straight into resolveSpeedUnit with no
mapping in between.
Auto now falls back to mph when it cannot read iRacing's setting. That
is what the shared util does. It used to fall back to km/h.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 53f31f5 commit f6d1513
7 files changed
Lines changed: 30 additions & 268 deletions
File tree
- src
- frontend/components
- Gantry/hooks
- Settings/sections
- types
Lines changed: 0 additions & 121 deletions
This file was deleted.
This file was deleted.
Lines changed: 0 additions & 57 deletions
This file was deleted.
This file was deleted.
Lines changed: 28 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
28 | 38 | | |
29 | 39 | | |
30 | 40 | | |
| |||
153 | 163 | | |
154 | 164 | | |
155 | 165 | | |
156 | | - | |
157 | | - | |
| 166 | + | |
| 167 | + | |
158 | 168 | | |
159 | | - | |
| 169 | + | |
160 | 170 | | |
161 | 171 | | |
162 | 172 | | |
| |||
218 | 228 | | |
219 | 229 | | |
220 | 230 | | |
221 | | - | |
| 231 | + | |
222 | 232 | | |
223 | 233 | | |
224 | 234 | | |
225 | | - | |
| 235 | + | |
226 | 236 | | |
227 | 237 | | |
228 | 238 | | |
229 | 239 | | |
230 | 240 | | |
231 | | - | |
232 | | - | |
| 241 | + | |
| 242 | + | |
233 | 243 | | |
234 | | - | |
| 244 | + | |
235 | 245 | | |
236 | 246 | | |
237 | 247 | | |
| |||
264 | 274 | | |
265 | 275 | | |
266 | 276 | | |
267 | | - | |
| 277 | + | |
268 | 278 | | |
269 | 279 | | |
270 | 280 | | |
271 | 281 | | |
272 | | - | |
| 282 | + | |
273 | 283 | | |
274 | 284 | | |
275 | 285 | | |
276 | 286 | | |
277 | | - | |
| 287 | + | |
278 | 288 | | |
279 | 289 | | |
280 | 290 | | |
281 | 291 | | |
282 | 292 | | |
283 | 293 | | |
284 | | - | |
| 294 | + | |
285 | 295 | | |
286 | 296 | | |
287 | 297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1420 | 1420 | | |
1421 | 1421 | | |
1422 | 1422 | | |
1423 | | - | |
| 1423 | + | |
1424 | 1424 | | |
1425 | 1425 | | |
1426 | 1426 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
656 | 656 | | |
657 | 657 | | |
658 | 658 | | |
659 | | - | |
| 659 | + | |
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
| |||
0 commit comments