setIlluminationMode method

Future<CommandResponse> setIlluminationMode({
  1. required dynamic deviceId,
  2. required IlluminationMode mode,
})

Sets the illumination mode for the scanner.

deviceId - The identifier of the target device. mode - The illumination mode to set, specified by IlluminationMode.

Returns a CommandResponse indicating the success or failure of the operation.

Implementation

Future<CommandResponse> setIlluminationMode(
    {required deviceId, required IlluminationMode mode}) async {
  final appLogger = getIt<AppLogger>();
  appLogger.warning(
      'Setting illumination mode to $mode with code ${illuminationModeCommands[mode]!}');

  return await sendCommand(deviceId, illuminationModeCommands[mode]!);
}