Implemented icsneoLoadDefaultSettings to apply the default settings to the device.

pull/56/head
Joseph Niksa 2023-04-20 05:00:46 +00:00
parent 4fa813ccbc
commit 83f6c611fe
3 changed files with 12 additions and 1 deletions

View File

@ -1079,6 +1079,15 @@ int LegacyDLLExport icsneoGetDeviceSettings(void* hObject, SDeviceSettings* pSet
return !!icsneo_settingsReadStructure(device, &pSettings->Settings, iNumBytes - offset);
}
int LegacyDLLExport icsneoLoadDefaultSettings(void* hObject)
{
if (!icsneoValidateHObject(hObject))
return false;
neodevice_t* device = reinterpret_cast<neodevice_t*>(hObject);
return icsneo_settingsApplyDefaults(device);
}
int LegacyDLLExport icsneoSetBitRateEx(void* hObject, unsigned long BitRate, int NetworkID, int iOptions)
{
if (!icsneoValidateHObject(hObject))

View File

@ -78,6 +78,8 @@ extern int LegacyDLLExport icsneoGetDeviceSettingsType(void* hObject, EPlasmaIon
extern int LegacyDLLExport icsneoSetDeviceSettings(void* hObject, SDeviceSettings* pSettings, int iNumBytes, int bSaveToEEPROM, EPlasmaIonVnetChannel_t vnetSlot);
extern int LegacyDLLExport icsneoGetDeviceSettings(void* hObject, SDeviceSettings* pSettings, int iNumBytes, EPlasmaIonVnetChannel_t vnetSlot);
extern int LegacyDLLExport icsneoLoadDefaultSettings(void* hObject);
extern int LegacyDLLExport icsneoSetUSBLatency(NeoDevice* pNeoDevice, unsigned long LatencyVal);
extern unsigned int LegacyDLLExport icsneoGetCANControllerClockFrequency(void* hObject, int lNetworkID);

View File

@ -128,7 +128,7 @@ EXPORTS
icsneoReceiveHWTimeResponse @143
icsneoSendHWTimeRequest @144
icsneoSetUSBLatency @145
; icsneoLoadDefaultSettings @146
icsneoLoadDefaultSettings @146
; icsneoGetAllChipVersions @149
icsneoSetBitRateEx @ 150
; icsneoScriptGetScriptStatusEx @ 151