You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37-8
Original file line number
Diff line number
Diff line change
@@ -5,17 +5,17 @@
5
5
6
6
## NOTE:
7
7
8
-
### This *draft* commit of the **FS-AI_API** repository contains the source code for the 2021 software revision version of the IMechE FS-AI ADS-DV.
8
+
### This *release candidate* of the **FS-AI_API** repository contains the source code for the 2021 software revision version of the IMechE FS-AI ADS-DV.
9
9
10
10
It has been provided as a reference for teams to start implementing their vehicle interface code.
11
11
12
12
Previously the 2019 interface was provided as a library 'libfs-ai_api_amd64.a' intended for static linking.
13
13
14
14
Source code for the library is now released under the MIT license so it may be compiled for any Linux architecture and modified if required.
15
15
16
-
The 2021 FS-AI ADS-DV has an updated CAN interface.
16
+
The 2021 FS-AI ADS-DV has an updated CAN interface to support the new vehicle feature of modulated hydraulic brakes. This interface is backward compatible to the 2019 vehicle.
17
17
18
-
Further work will be done to improve the quality of the Console & Tester example programmes.
18
+
Further work has been done to improve the Console & Tester example programmes.
19
19
20
20
21
21
@@ -52,7 +52,7 @@ NOTE: See `setup.sh` for information on configuring a CAN interface under Linux
52
52
53
53
54
54
## How to use
55
-
The library contains 3 functions plus associated data structures and enums:
55
+
The library contains 7 functions plus associated data structures and enums:
56
56
57
57
58
58
@@ -77,17 +77,46 @@ Populates an instance of the `fs_ai_api_vcu2ai` data structure with the latest v
Transmits the CAN frames associated with the data passed in via the `fs_ai_api_ai2vcu` data structure.
79
79
80
-
NOTE: This function must be called frequently enough to prevent the CAN timeout diagnostics of the vehicle ECU from triggering. However calling the function too frequently could overload the CAN bus so an internal timer prevents re-transmission of CAN frames at a period less than approx. 4ms. Calling this function every 5ms is optimal, data updates will be sent to the vehicle as fast as possible.
80
+
NOTE: This function must be called frequently enough to prevent the CAN timeout diagnostics of the vehicle ECU from triggering. However calling the function too frequently could overload the CAN bus so an internal timer prevents re-transmission of CAN frames at a period less than approx. 8ms. Calling this function every 10ms is optimal, data updates will be sent to the vehicle as fast as possible.
Populates an instance of the `fs_ai_api_imu` data structure with the latest values received from the PCAN-GPS fitted to the vehicle. Data receives are asynchronous - each CAN frame is buffered as it is received.
Populates an instance of the `fs_ai_api_gps` data structure with the latest values received from the PCAN-GPS fitted to the vehicle. Data receives are asynchronous - each CAN frame is buffered as it is received.
Populates an instance of the `can_stats_t` data structure with the latest values received from the vehicle. Use this for debugging CAN receives.
101
+
102
+
103
+
104
+
### `void fs_ai_api_clear_can_stats();`
105
+
106
+
Clears the `can_stats_t` data structure.
107
+
108
+
109
+
##
81
110
82
111
83
112
84
113
85
114
## Further Documentation
86
-
Please refer to the full specification document for full information on the FS-AI ADS-DV CAN interface: [ADS-DV Software Interface Specification-v3.0.pdf](./Docs/ADS-DV_Software_Interface_Specification_v3.0.pdf).
115
+
Please refer to the full specification document for full information on the FS-AI ADS-DV CAN interface: [ADS-DV Software Interface Specification-v4.0.pdf](./Docs/ADS-DV_Software_Interface_Specification_v4.0.pdf).
87
116
88
-
(also published on the IMechE website as: https://www.imeche.org/docs/default-source/1-oscar/formula-student/2021/forms/ai/ads-dv-software-interface-specification-v3-0.pdf?sfvrsn=2 ).
117
+
(also published on the IMechE website as: https://www.imeche.org/docs/default-source/1-oscar/formula-student/2021/forms/ai/ads-dv-software-interface-specification-v4-0.pdf?sfvrsn=2 ).
89
118
90
-
The referenced CAN database can be found here: [adsdv_2021_vcu_ai_interface_v1.dbc](./Docs/adsdv_2021_vcu_ai_interface_v1.dbc).
119
+
The referenced CAN database can be found here: [ADSDV_2021_VCU_AI_interface_v2.dbc](./Docs/ADSDV_2021_VCU_AI_interface_v2.dbc).
91
120
92
121
This software library exposes only those aspects of the full interface that are deemed essential for the 2021 Formula Student AI DDT competition using the FS-AI ADS-DV.
0 commit comments