Incomplete device settings sending

This commit is contained in:
Paul Hollinsky
2018-10-01 15:26:13 -04:00
parent a8ef08fae4
commit d7372bbd5a
5 changed files with 225 additions and 36 deletions
+30
View File
@@ -210,4 +210,34 @@ bool icsneo_getProductName(const neodevice_t* device, char* str, size_t* maxLeng
*maxLength = device->device->getType().toString().copy(str, *maxLength);
str[*maxLength] = '\0';
return true;
}
bool icsneo_settingsSend(const neodevice_t* device) {
if(!icsneo_isValidNeoDevice(device))
return false;
if(!device->device->settings) // Settings are not available for this device
return false;
return device->device->settings->send();
}
bool icsneo_settingsCommit(const neodevice_t* device) {
if(!icsneo_isValidNeoDevice(device))
return false;
if(!device->device->settings) // Settings are not available for this device
return false;
return device->device->settings->commit();
}
bool icsneo_setBaudrate(const neodevice_t* device, uint16_t netid, uint32_t newBaudrate) {
if(!icsneo_isValidNeoDevice(device))
return false;
if(!device->device->settings) // Settings are not available for this device
return false;
return device->device->settings->setBaudrateFor(netid, newBaudrate);
}