summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornorly <ny-git@enpas.org>2019-02-19 00:49:06 +0100
committernorly <ny-git@enpas.org>2019-02-19 00:49:06 +0100
commit5c7420505e83d592943c0f818350d2c8e509598d (patch)
treec058939462dfd305230e066a286b8846dfa1e9de
parent8376bf6ff844f12088f568d2284a4ef4a69ca9c4 (diff)
Fix up stray comments now that we have elm327_is_ready_char()
-rw-r--r--module/elmcan.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/module/elmcan.c b/module/elmcan.c
index 82ffc86..9cd5e2e 100644
--- a/module/elmcan.c
+++ b/module/elmcan.c
@@ -373,6 +373,9 @@ static inline void elm327_hw_failure(struct elmcan *elm)
static bool elm327_is_ready_char(char c)
{
+ /* Bits 0xc0 are sometimes set (randomly), hence the mask.
+ * Probably bad hardware.
+ */
return (c & 0x3f) == ELM327_READY_CHAR;
}
@@ -707,7 +710,6 @@ static void elm327_parse_rxbuf(struct elmcan *elm)
i++;
break;
} else if (elm327_is_ready_char(elm->rxbuf[i])) {
- /* Mask 0xc0 to work around hardware bugs */
elm327_send(elm, ELM327_MAGIC_STRING, 1);
i++;
break;
@@ -720,10 +722,7 @@ static void elm327_parse_rxbuf(struct elmcan *elm)
}
case ELM_GETPROMPT:
- /* Wait for '>'.
- * Bits 0xc0 are sometimes set (randomly), hence the mask.
- * Probably bad hardware.
- */
+ /* Wait for '>' */
if (elm327_is_ready_char(elm->rxbuf[elm->rxfill - 1])) {
elm327_handle_prompt(elm);
}