Skip to content

Commit cfbc01e

Browse files
committed
Merge update to canProcessor.ts from commit 8ca5a17
1 parent 103b910 commit cfbc01e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

pecan/Frontend/pecan-live-dashboard/src/utils/canProcessor.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ import { Dbc, Can } from 'candied';
22
import { dataStore } from '../lib/DataStore';
33
// Import DBC file as raw text - Vite's ?raw suffix loads file content at build time
44
// Note: Files in src/assets/ cannot be fetched via URL, they must be imported
5-
import dbcFile from '../assets/example.dbc?raw';
5+
// Import both DBC files
6+
import localDbc from '../assets/local.dbc?raw';
7+
import exampleDbc from '../assets/example.dbc?raw';
8+
9+
// Use local.dbc for development, example.dbc for production
10+
const dbcFile = import.meta.env.DEV ? localDbc : exampleDbc;
611

712
// Simple type definitions for our use, align with InfluxDB3 schema for consistency
813
// InfluxDB3 Schema: id -> canId, name -> messageName, signalName, sensorReading, time

0 commit comments

Comments
 (0)