SalihTuncer / obd_diagnosis

OBD2 Diagnosis tool
MIT License
4 stars 0 forks source link

Validated OBD commands are not working due to faulty encoding functions #11

Closed SalihTuncer closed 1 week ago

SalihTuncer commented 1 week ago

Description

Command encoding functions are not working properly with OBD command data models.

Current situation

We achieved the validation of the OBD commands via Pydantic data models, but these are not working due do not working encoding functions passed to the data models.

Desired output

OBD commands should be validated and work as well.

Example

{
  "request_type": "POST",
  "request_url": "/sync",
  "request_body": [
    {
      "name": "INTAKE_PRESSURE",
      "desc": "Intake Manifold Pressure",
      "command": "010B",
      "bytes": 3,
      "ecu": 2,
      "fast": true,
      "header": "7E0"
    }
  ]
}

This should output valid values on the application console.