@@ -132,10 +132,10 @@ type DeviceInfoREQ_INFO struct {
132
132
//
133
133
// Can be given if known at the time of instantiation, e.g. by parsing the USB HID product string.
134
134
// 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
136
136
// when you are sure the firmware version is bigger or equal to 4.3.0.
137
137
//
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 .
139
139
func NewDevice (
140
140
version * semver.SemVer ,
141
141
product * common.Product ,
@@ -232,13 +232,13 @@ func (device *Device) Version() *semver.SemVer {
232
232
return device .version
233
233
}
234
234
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
237
237
// available.
238
238
func (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 .
240
240
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 ))
242
242
device .version = version
243
243
device .product = & product
244
244
}
@@ -263,7 +263,7 @@ func (device *Device) Init() error {
263
263
deviceInfo , err := device .info ()
264
264
if err != nil {
265
265
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" )
267
267
}
268
268
// Does nothing if device.version == nil
269
269
device .inferVersionAndProduct (deviceInfo .version , deviceInfo .product )
0 commit comments