File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
src/hardware/korad-kaxxxxp Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -281,14 +281,20 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
281281 sr_dbg ("Want max %zu bytes." , len );
282282
283283 /*
284- * TODO: check if adding the newline breaks some other devices - I cannot do so
285- * This is required for the KA3005PS
284+ * There is a quirk rolled into here:
285+ * - The KORAD_QUIRK_NEWLINE needs a `\n`
286+ * If there's more at the end they still function perfectly fine.
287+ * But the normal ones need an `*IDN?` without anything at the end.
288+ * So this sends a combination that satisfies these constraints.
286289 */
287- ret = korad_kaxxxxp_send_cmd (serial , "*IDN?" , true );
290+ ret = korad_kaxxxxp_send_cmd (serial , "*IDN?\n*IDN? " , false );
288291 if (ret < 0 )
289292 return NULL ;
290293
291- /* Newline stripping enabled by default - doesn't matter for devices that don't add one */
294+ /*
295+ * Newline stripping enabled by default - doesn't matter for devices that
296+ * don't add one
297+ */
292298 ret = korad_kaxxxxp_read_chars (serial , len , reply , true);
293299 if (ret < 0 )
294300 return NULL ;
You can’t perform that action at this time.
0 commit comments