Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Additionally, users will need to add a dependency for the Serial Java library used by the SDK. This can be done b modifying the settings.gradle file with the following highlighted lines…:

...

Image RemovedImage Added

…and adding a reference to the git repo for the serial library to the VictoRCommunications module.

...

Code Block
languagejava
private final DeviceInformationService.DeviceInformationCallback deviceInformationCallback = new DeviceInformationService.DeviceInformationCallback()
{
    public void onCurrentBatteryLevelChanged(VictorDeviceInfo deviceInfo, short currentBatteryLevel)
    {
        debugTextView.post(() -> debugTextView.append("Current Battery Level: " + currentBatteryLevel + "\n"));
    }
};

deviceInfoService.subscribeToCurrentBatteryLevel(deviceInfo.getAddress(), deviceInformationCallback);

It is important to note that as of the ICD referenced at the start of this guide, the VictoR device does not support subscribing to battery level over USBNOTE: When subscribing to an attribute, please reference the supported ICD document specified above to ensure that subscribing to the attribute itself supported.