File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "manifestVersion" : " v3" ,
3+ "name" : " testdigitalauto" ,
4+ "interfaces" : [
5+ {
6+ "type" : " vehicle-signal-interface" ,
7+ "config" : {
8+ "src" : " ./app/vspec.json" ,
9+ "datapoints" : {
10+ "required" : [
11+ {
12+ "path" : " Vehicle.Chassis.Axle.Row1.Wheel.Left.Speed" ,
13+ "access" : " read"
14+ },
15+ {
16+ "path" : " Vehicle.Chassis.Axle.Row1.Wheel.Right.Speed" ,
17+ "access" : " read"
18+ },
19+ {
20+ "path" : " Vehicle.Chassis.Accelerator.PedalPosition" ,
21+ "access" : " read"
22+ },
23+ {
24+ "path" : " Vehicle.Chassis.Brake.PedalPosition" ,
25+ "access" : " read"
26+ }
27+ ]
28+ }
29+ }
30+ },
31+ {
32+ "type" : " pubsub" ,
33+ "config" : {
34+ "reads" : [
35+ " sampleapp/getSpeed"
36+ ],
37+ "writes" : [
38+ " sampleapp/getSpeed/response" ,
39+ " sampleapp/currentSpeed"
40+ ]
41+ }
42+ }
43+ ]
44+ }
Original file line number Diff line number Diff line change 1+ # Quick fix for pre-commit linting issues
2+ import json
3+
4+ # Fix vspec.json - format properly with indentation
5+ print ("Formatting vspec.json..." )
6+ with open ('app/vspec.json' , 'r' , encoding = 'utf-8' ) as f :
7+ data = json .load (f )
8+
9+ with open ('app/vspec.json' , 'w' , encoding = 'utf-8' ) as f :
10+ json .dump (data , f , indent = 4 , ensure_ascii = False )
11+ f .write ('\n ' ) # Ensure trailing newline
12+
13+ print ("Formatting AppManifest.json..." )
14+ with open ('app/AppManifest.json' , 'r' , encoding = 'utf-8' ) as f :
15+ data = json .load (f )
16+
17+ with open ('app/AppManifest.json' , 'w' , encoding = 'utf-8' ) as f :
18+ json .dump (data , f , indent = 4 , ensure_ascii = False )
19+ f .write ('\n ' ) # Ensure trailing newline
20+
21+ print ("Done! Files formatted with proper indentation and trailing newlines." )
You can’t perform that action at this time.
0 commit comments