From f720c4151a2f151f94b90f7c31b033fd64b0b9e3 Mon Sep 17 00:00:00 2001 From: Erwin Lejeune Date: Fri, 7 Aug 2020 15:22:02 +0200 Subject: [PATCH 1/3] 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 From f61602921e9136c78ddf37afa67e0b5142b85af8 Mon Sep 17 00:00:00 2001 From: Erwin Lejeune Date: Fri, 7 Aug 2020 15:22:20 +0200 Subject: [PATCH 2/3] remove vscode config files --- .vscode/c_cpp_properties.json | 22 ---------------------- .vscode/settings.json | 5 ----- 2 files changed, 27 deletions(-) delete mode 100644 .vscode/c_cpp_properties.json delete mode 100644 .vscode/settings.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json deleted file mode 100644 index 31e5bb7..0000000 --- a/.vscode/c_cpp_properties.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "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 deleted file mode 100644 index a560512..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "python.autoComplete.extraPaths": [ - "/opt/ros/melodic/lib/python2.7/dist-packages" - ] -} \ No newline at end of file From 7debf47443a489050e9c566b42df3231b7b2ebf9 Mon Sep 17 00:00:00 2001 From: Erwin Lejeune Date: Fri, 7 Aug 2020 15:27:45 +0200 Subject: [PATCH 3/3] add attribute number of documents in tag mapping --- constants.go | 1 + 1 file changed, 1 insertion(+) diff --git a/constants.go b/constants.go index 8e4618a..841e9c6 100644 --- a/constants.go +++ b/constants.go @@ -393,6 +393,7 @@ var ( AttributeNumberUp: TagInteger, AttributeOrientationRequested: TagEnum, AttributePPDName: TagName, + AttributeNumberOfDocuments: TagInteger, AttributePrintQuality: TagEnum, AttributePrinterErrorPolicy: TagName, AttributePrinterInfo: TagText,