### UltraSim.CAN
Cockpit Test Tool is a Python3 based can bus tool built using the dearpygui. (Vector, Pcan)
### Documentation
Guide can be found at Guide.docx
### Compatibility
Python 3 (recommended 3.7 )
### Usage
Copy all files to your private PC since some configs are changed.
<!-- Copy all files to your private PC if you have never downloaded before.
Or just copy main.exe and replace it to your files. -->
### Requirements
pip install dearpygui -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip install thread6 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip install cantools -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip install python-can -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip install can-isotp -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip install udsoncan -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip install openpyxl -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip install serial -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip install pyserial -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip install opencv-python -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip install numpy -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
### Function
(1) Smoke Test for cockpit project;
(2) General Diag;
(3) DBC loaded and send messages;
(4) Flash MCU.
### History
(1) release 1
2022.03.08
a. Smoke test function implemented;
b. General diagnostics function implemented;
c. Bus messages display in trace implemented.
(2) release 2
2022.03.14
a. Dual channel implemented;
b. DBC loaded function implemented;
c. Free define for message function implemented;
d. Smoke test relevant messages are modified to be configured through the messages.conf file, which can be modified according to different projects;
e. Diagnostics DIDs are modified to be configured through the did.conf file, which can be modified by user;
(3) release 3
2022.03.17
a. Modify the signals (from DBC messages) input box to different input box (float or int) according to the type (define in DBC) of signal;
b. Update Raw Data each time when the signal value was changed;
c. Change the initial value of signal to minimum value (define in DBC) if the initial value (define in DBC) is out of range;
d. Display minimum, maxmum, is_float field in signals panel as well;
e. Update signals values in GUI and resend messages when modify message data in raw data panel.
f. Change items for command_list get from did.conf
(4) release 4
2022.03.21
a. Add security unlock function for EOL function
(5) release 5
2022.03.29
a.Several different clients that use the same connection. When the client exit, at the end of the 'with' block, the connection is closed and the other clients can't use the connection. So change
the client to global client instead of a global connection. Open the client and the connection at the beginning of the program, and exit the client at the very end. Everything in between will
use the client;
b. Change p2_timeout to 10, p2_star_timeout to 20, request_timeout to 20 and use_server_timing to False;
c. Implement flash mcu function;
2022.03.30
a. Change the display of messages from name to id + name in Symbol Selection;
b. Modify the format of did.conf (data type is needed);
c. Modify mcu flashing function (data of F184 and F189) due to the modifications of b.
2022.03.31
a. Modify the function of [Start/Stop] button from stop bus displaying on trace only to stop all can bus;
b. Load DBC once per start/stop cycle.
2022.04.01
a. Fix the [Start/Stop] button function that the messages sent by smoke test bus cannot stop;
b. Send command from file function optimization, add support for session control, unlock(01/11/61) and write(2E).
(6) release 6
2022.04.13
a. Add semi-auto test. (including test case loading and executing)
2022.04.14
a. Add run full case/run full sheet/run full excel;
b. Fix loading test cases;
c. Make some optimizations.
2022.04.15
a. Fix bugs in loading test cases and extract sequences.
2022.04.19
a. Fix the display of diag in trace.
2022.04.20
a. Add on-off stress test.
2022.04.23
a. Fix bugs in flashing.
2022.04.27
a. Fix bugs in constructing the bus, modify app_name from "CANalyzer" to "None" so we can use CANcaseXL as well.
b. Add "Check All" and "Uncheck All" function in IG panel.
c. Cancel send messages in startup.
2022.04.28
a. Change the definition of bus1 and bus2 in both main.py and Send_CAN_Messages.py to only define in Send_CAN_Messages.py.
(7) release 7
2022.05.07
a. Fix bug: messages cannot display in bus when bus1 and bus2 use different channel, method: Use receive_own_messages=True if you want to receive messages that you sent;
b. Add graphics function;
2022.05.10
a. Fix bug: add cv2.CAP_DSHOW for cv2.VideoCapture, the cv2.CAP_DSHOW is a flag passed as part of the open call, there are many others you can pass, and this CAP_DSHOW is Microsoft specific;
b. Add "Send Selected" button;
c. Fix bugs in graphics function;
d. Fix bug: displays previously sent messages as well;
e. Add random value for off-time and on-time;
2022.05.11
a. Set servoltage.write(KL15ON) for 3 times to ensure setup successfully;
(8) release 8
2022.05.15
a. Add routine control for Diag function;
b. Add save messages log when nothing was sent;
2022.05.25
a. Add simple script just like capl.
b. For the unset value, the default value was obtained directly from dbc before, but now it is modified to first determine whether the message exists in the bus, and if it exists, get its value;
if it is not found within 1 second in the bus, then get its default value from dbc.
2022.05.26
a. Fixed bugs:Originally, if the value of timer_cycles is None, 'on timer' will execute infinite times, but the value remains unchanged; now it is modified to: increase addition, subtraction, multiplication and division, and modify the value each time
b. Fixed bugs in on_message.
2022.05.27
a. Fixed bugs: get values of signals from bus first, if failed, then get values from dbc for on_start;
b. Fixed bugs in on_message;
c. Add output(message) in on_timer;
d. Add support for "INNO-4RD-SUB".
(9) release 9
2022.06.02
a. Modify save path for sequences;
b. Modify settings save logic;
c. Add frame_count for on_message.
2022.06.16
a. Change frame_count value back to 0 after executing if scripts in on_message.
2022.06.17
a. Add support for Chinese.
2022.06.19
b. Add print function.
(10) release 10
2022.06.25
a. Add trailing edge detection and execution.
release 10.1
2022.06.29
a. Add annotation function by writing comments after "//".
b. Modify format of on_message.
release 10.2
2022.07.01
a. Modify logic for on-off test: add record video when errors occured.
(11) release 11
2022.07.04
a. Add load and save function for on-off test.
b. Add modify function for on_timer_config.
c. Modify record video function: set videowriter fps to 23 or the video duration will be shortened.
2022.07.05
a. Modify the format of on_message, support multiple if else.
release 11.1
2022.07.06
a. Modify the save and load function for simulation.
(12) release 12
2022.07.07-2022.07.08
a. Modify the way to get messages from the bus to avoid messages loss;
b. Modify the l