@@ -132,10 +132,10 @@ type DeviceInfoREQ_INFO struct {
132132//
133133// Can be given if known at the time of instantiation, e.g. by parsing the USB HID product string.
134134// It must be provided if the version could be less than 4.3.0.
135- // If nil, the version will be queried from the device using the OP_INFO api endpoint. Do this
135+ // If nil, the version will be queried from the device using the REQ_INFO api endpoint. Do this
136136// when you are sure the firmware version is bigger or equal to 4.3.0.
137137//
138- // product: same deal as with the version, after 4.3.0 it can be inferred by OP_INFO .
138+ // product: same deal as with the version, after 4.3.0 it can be inferred by REQ_INFO .
139139func NewDevice (
140140 version * semver.SemVer ,
141141 product * common.Product ,
@@ -232,13 +232,13 @@ func (device *Device) Version() *semver.SemVer {
232232 return device .version
233233}
234234
235- // inferVersionAndProduct either sets the version and product by using OP_INFO if they were not
236- // provided. In this case, the firmware is assumed to be >=v4.3.0, before that OP_INFO was not
235+ // inferVersionAndProduct either sets the version and product by using REQ_INFO if they were not
236+ // provided. In this case, the firmware is assumed to be >=v4.3.0, before that REQ_INFO was not
237237// available.
238238func (device * Device ) inferVersionAndProduct (version * semver.SemVer , product common.Product ) {
239- // The version has not been provided, so we try to get it from OP_INFO .
239+ // The version has not been provided, so we try to get it from REQ_INFO .
240240 if device .version == nil {
241- device .log .Info (fmt .Sprintf ("OP_INFO : version=%s, product=%s" , version , product ))
241+ device .log .Info (fmt .Sprintf ("REQ_INFO : version=%s, product=%s" , version , product ))
242242 device .version = version
243243 device .product = & product
244244 }
@@ -263,7 +263,7 @@ func (device *Device) Init() error {
263263 deviceInfo , err := device .info ()
264264 if err != nil {
265265 return errp .New (
266- "OP_INFO unavailable; need to provide version and product via the USB HID descriptor" )
266+ "REQ_INFO unavailable; need to provide version and product via the USB HID descriptor" )
267267 }
268268 // Does nothing if device.version == nil
269269 device .inferVersionAndProduct (deviceInfo .version , deviceInfo .product )
0 commit comments