From 7c6e3ace394ace03af9a3ec1b44a230d0dc90417 Mon Sep 17 00:00:00 2001 From: eigger Date: Thu, 30 Jul 2026 09:23:59 +0900 Subject: [PATCH] docs(obd): correct the 22B002 byte map note from OBDb data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The comment claimed some Kia clusters shift the odometer to i:k:k:l. That misread a search snippet: bytes j:k:l are a separate field holding the same odometer in miles for North American clusters, not an alternate km layout. Verified against OBDb (obdb.community), where 11 Hyundai/Kia models — Elantra, Sonata, Tucson, Kona, Santa Fe, Veloster, Forte, K5, Seltos, Sportage, Telluride — all publish the identical layout for 7C6 / 22 B002: e fuel level (liters) f cluster volts div 12.8 g:h:i odometer 24-bit km j:h:l odometer 24-bit miles OBDb's 12.8 divisor for byte f equals the 0.078125 multiplier already in the template, which confirms OBDb indexes bytes the same way Torque letters do, i.e. excluding the 62 B0 02 echo. So g:h:i is right as written. Fuel level stays at e*0.5. OBDb is split — Santa Fe and Soul carry div 2 while ten others carry no scale and max 255, the uncalibrated 8-bit default. The awesomeit plugin (35 models) and the Elantra CN7 list both scale by 0.5, and e*1.0989 % maps to a 45.5 L full tank, so 0.5 is the calibrated value. Co-Authored-By: Claude Opus 5 --- templates.yaml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/templates.yaml b/templates.yaml index d3e1550..cac1e73 100644 --- a/templates.yaml +++ b/templates.yaml @@ -128,14 +128,16 @@ templates: sensors: - { key: rpm, preset: rpm, update_interval: 1s } - { key: speed, preset: speed, update_interval: 1s } - # 계기판(CLU) UDS. 한 응답에 주행거리·연료·전압이 함께 담겨 온다. - # 응답: 62 B0 02 [a][b][c][d][e][f][g][h][i]… (a = 62B002 에코 다음 바이트) - # e → 연료잔량 e*0.5 L - # f → 계기판 전압 f*0.078125 V - # g:h:i → 총 주행거리 24bit km - # 2013년식 이후 현대·기아·제네시스에서 널리 동작. 미지원 차는 NO DATA. - # 일부 기아는 주행거리가 i:j:k:l(32bit)로 밀려 있다는 보고가 있음. - # 값이 이상하면 formula를 "i*16777216+j*65536+k*256+l" 로 바꿔볼 것. + # 계기판(CLU) UDS. 요청 7C6 → 응답 7CE. 한 응답에 주행거리·연료·전압이 함께 온다. + # 응답: 62 B0 02 [a][b][c][d][e][f][g][h][i][j][k][l]… + # (a = 62B002 에코 바로 다음 바이트) + # e → 연료잔량 e*0.5 L + # f → 계기판 전압 f/12.8 = f*0.078125 V + # g:h:i → 총 주행거리 24bit km + # j:k:l → 위와 같은 주행거리의 mile 값 (북미 사양 계기판) + # 출처: OBDb(obdb.community)에서 현대·기아 11개 차종이 동일한 바이트 배치로 확인. + # awesomeit Torque 플러그인(35개 차종)·Elantra CN7 PID 목록과도 일치. + # 2013년식 이후에서 널리 동작하며, 미지원 차는 NO DATA를 반환한다. - key: odometer mode: "22" pid: "B002"