From f720c4151a2f151f94b90f7c31b033fd64b0b9e3 Mon Sep 17 00:00:00 2001 From: Erwin Lejeune Date: Fri, 7 Aug 2020 15:22:02 +0200 Subject: [PATCH] fix typo --- .vscode/c_cpp_properties.json | 22 ++++++++++++++++++++++ .vscode/settings.json | 5 +++++ attribute.go | 2 +- constants.go | 2 +- cups-client.go | 2 +- 5 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/settings.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..31e5bb7 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,22 @@ +{ + "configurations": [ + { + "browse": { + "databaseFilename": "", + "limitSymbolsToIncludedHeaders": true + }, + "includePath": [ + "/opt/ros/melodic/include/**", + "/home/erwin/catkin_ws/src/ros-xenomai-bridge/ros_nrt/reactive_navigation/include/**", + "/home/erwin/catkin_ws/src/ros-xenomai-bridge/ros_nrt/xddp_utilities/include/**", + "/usr/include/**" + ], + "name": "ROS", + "intelliSenseMode": "gcc-x64", + "compilerPath": "/usr/bin/gcc", + "cStandard": "gnu11", + "cppStandard": "gnu++14" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..a560512 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "python.autoComplete.extraPaths": [ + "/opt/ros/melodic/lib/python2.7/dist-packages" + ] +} \ No newline at end of file diff --git a/attribute.go b/attribute.go index 005b6f8..69610f9 100644 --- a/attribute.go +++ b/attribute.go @@ -303,7 +303,7 @@ func (e *AttributeEncoder) Encode(attribute string, value interface{}) error { } } default: - return fmt.Errorf("type %T is not supportet", value) + return fmt.Errorf("type %T is not supported", value) } return nil diff --git a/constants.go b/constants.go index 21e0c12..8e4618a 100644 --- a/constants.go +++ b/constants.go @@ -401,7 +401,7 @@ var ( AttributePrinterLocation: TagText, AttributePrinterResolution: TagResolution, AttributePrinterState: TagEnum, - AttributePrinterStateReason: TagKeyword, + AttributePrinterStateReasons: TagKeyword, AttributePrinterURI: TagUri, AttributePurgeJobs: TagBoolean, AttributeRequestedAttributes: TagKeyword, diff --git a/cups-client.go b/cups-client.go index 0774a09..3cd4007 100644 --- a/cups-client.go +++ b/cups-client.go @@ -167,7 +167,7 @@ func (c *CUPSClient) CreatePrinter(name, deviceURI, ppd string, shared bool, err req.OperationAttributes[AttributePrinterURI] = c.getPrinterUri(name) req.OperationAttributes[AttributePPDName] = ppd req.OperationAttributes[AttributePrinterIsShared] = shared - req.PrinterAttributes[AttributePrinterStateReason] = "none" + req.PrinterAttributes[AttributePrinterStateReasons] = "none" req.PrinterAttributes[AttributeDeviceURI] = deviceURI req.PrinterAttributes[AttributePrinterInfo] = information req.PrinterAttributes[AttributePrinterLocation] = location