Add saving support to network protocol

This commit is contained in:
Adam Honse 2021-07-04 18:53:33 -05:00
parent eade8fea1a
commit 5130f07e21
6 changed files with 50 additions and 0 deletions

View file

@ -79,6 +79,18 @@ void RGBController_Network::DeviceUpdateMode()
delete[] data;
}
void RGBController_Network::DeviceSaveMode()
{
unsigned char * data = GetModeDescription(active_mode, client->GetProtocolVersion());
unsigned int size;
memcpy(&size, &data[0], sizeof(unsigned int));
client->SendRequest_RGBController_SaveMode(dev_idx, data, size);
delete[] data;
}
/*-----------------------------------------------------*\
| This function overrides RGBController::UpdateLEDs()! |
| Normally, UpdateLEDs() sets a flag for the updater |

View file

@ -26,6 +26,7 @@ public:
void SetCustomMode();
void DeviceUpdateMode();
void DeviceSaveMode();
void UpdateLEDs();