Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for CAN Saint hardware #966

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Installation Setup/BUSMASTER INSTALL SCRIPT.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ Section "BUSMASTER"
File ..\Sources\BUSMASTER\BIN\Release\BUSMASTER.exe
File ..\Sources\BUSMASTER\BIN\Release\BUSMASTER.exe.manifest
File ..\Sources\BUSMASTER\Application\BUSMASTER.tlb
File ..\Sources\BUSMASTER\Application\saint_config.cfg
File ..\Sources\BUSMASTER\Application\BUSMASTER_Interface.c
File ..\Sources\BUSMASTER\Application\BUSMASTER_Interface.h
File ..\Sources\BUSMASTER\BIN\Release\CAN_STUB.dll
Expand Down Expand Up @@ -692,6 +693,12 @@ Section "Vector XL"
File ..\Sources\BUSMASTER\BIN\Release\vxlapi.dll
SectionEnd

Section "Saint"
SectionIn 1 2
SetOutPath $INSTDIR
File ..\Sources\BUSMASTER\BIN\Release\CAN_SAINT.dll
SectionEnd

Section "IXXAT VCI"
SectionIn 1 2
SetOutPath $INSTDIR
Expand Down
1 change: 1 addition & 0 deletions Sources/BUSMASTER/Application/BUSMASTER.rc
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,7 @@ BEGIN
MENUITEM "&Main Window", IDM_UDS
MENUITEM "&Settings", IDD_SETTINGS_UDS
END
MENUITEM "Saint Tool", ID_CAN_SAI
END
POPUP "&J1939"
BEGIN
Expand Down
16 changes: 16 additions & 0 deletions Sources/BUSMASTER/Application/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
//Plugin
ON_COMMAND_RANGE( IDR_PLUGIN_MENU_START, IDR_PLUGIN_MENU_END, onPluginMenuClicked )
ON_UPDATE_COMMAND_UI_RANGE( IDR_PLUGIN_MENU_START, IDR_PLUGIN_MENU_END, onPluginMenuUpadate )
ON_COMMAND(ID_CAN_SAI, &CMainFrame::OnCanSaintTool)
END_MESSAGE_MAP()

static UINT indicators[] =
Expand Down Expand Up @@ -17908,3 +17909,18 @@ void CMainFrame::onPluginMenuUpadate( CCmdUI* pCmdUI )
BusmasterMenuItem menuItem(pCmdUI);
mPluginManager->noifyMenuUpdate(pCmdUI->m_nID, &menuItem);
}


void CMainFrame::OnCanSaintTool()
{
if (g_pouDIL_CAN_Interface){
INT nCount = 1;
DWORD temp = g_pouDIL_CAN_Interface->DILC_GetSelectedDriver();
if (temp == 7){
g_pouDIL_CAN_Interface->DILC_ListHwInterfaces(m_asINTERFACE_HW, nCount);
}
else{
AfxMessageBox("Connect to the Saint Driver first");
}
}
}
2 changes: 2 additions & 0 deletions Sources/BUSMASTER/Application/MainFrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -948,4 +948,6 @@ class CMainFrame : public CMDIFrameWnd ,
IBusmasterPluginManager* mPluginManager = nullptr;
frChannelSettingsHandler mFrChannelSettingsHandler;

public:
afx_msg void OnCanSaintTool();
};
3 changes: 2 additions & 1 deletion Sources/BUSMASTER/Application/Resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,7 @@
#define ID_BTN_MSG_SLIDER 40058
#define ID_BUTTON40059 40059
#define ID_BUTTON40060 40060
#define ID_CAN_SAI 40061
#define IDM_UDS 40100
#define IDD_SETTINGS_UDS 40101
#define IDS_INVALID_DB_PROMPT 61447
Expand Down Expand Up @@ -1194,7 +1195,7 @@
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 120
#define _APS_NEXT_COMMAND_VALUE 40061
#define _APS_NEXT_COMMAND_VALUE 40062
#define _APS_NEXT_CONTROL_VALUE 1019
#define _APS_NEXT_SYMED_VALUE 101
#endif
Expand Down
1 change: 1 addition & 0 deletions Sources/BUSMASTER/Application/saint.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NULL,NULL,NULL,NULL,NULL,NULL,
25 changes: 25 additions & 0 deletions Sources/BUSMASTER/Application/saint_config.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
CAN1_Speed={500k,500k,500k,500k,500k,500k,500k,500k} //List in same order as the messages they correlate to
CAN1_Speed_Messages={00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000}
CAN2_Speed={500k,500k,500k,500k,500k,500k,500k,500k}
CAN2_Speed_Messages={00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000}
CAN_Prepare_Message={0000}
CAN_Init_Message={00000000}
CAN1_Set={00000000}
CAN1_Type={CAN,CAN,CAN}
CAN1_Type_Messages={00000000,00000000,00000000}
CAN1_Sleep_Messages={00000000,00000000,00000000}
CAN2_Set={00000000}
CAN2_Type={CAN,CAN,CAN}
CAN2_Type_Messages={00000000,00000000,00000000}
CAN2_Sleep_Messages={00000000,00000000,00000000}
Fault_Code_Requests={00000000,00000000,00000000}
Fault_Code_Data_ID={0000}
Fault_Code_Data_End={00} //Must be same size as fault code data bytes below
Fault_Code_Data_Bytes={0,0}
Clear_Fault_Message={00000000}
ID={0,0}
DTC={0,0}
Type={0,0}
Status={0,0}
Active_History_Mask={00}
Fault_Code_Excel_Page_Name={example_table}
99 changes: 98 additions & 1 deletion Sources/BUSMASTER/BUSMASTER.sln

Large diffs are not rendered by default.

Loading