From 5c7420505e83d592943c0f818350d2c8e509598d Mon Sep 17 00:00:00 2001 From: norly Date: Tue, 19 Feb 2019 00:49:06 +0100 Subject: [PATCH] Fix up stray comments now that we have elm327_is_ready_char() --- module/elmcan.c | 9 ++++----- 1 file 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); } -- 2.30.2