Skip to content

Commit

Permalink
fix: sens id and status
Browse files Browse the repository at this point in the history
  • Loading branch information
FerroO2000 committed Jul 1, 2024
1 parent 624bee4 commit f8be046
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 40 deletions.
60 changes: 30 additions & 30 deletions examples/markdown/SC24.md
Original file line number Diff line number Diff line change
Expand Up @@ -1012,16 +1012,16 @@ Cycle Time: -

Receivers: [DSPACE](#dspace), [SCANNER](#scanner)

| Name | Start Bit | Size | Type | Min | Max | Unit | Description |
|---------------------|-----------|------|---------------------------------------|-----|------|-------------------------|------------------------------------------|
| TIRE_FL_sensID | 0 | 8 | [`tire_sens_id_t`](#signal-types) | 254 | -255 | - | The sensor id of the front left tire. |
| TIRE_FL_status | 8 | 8 | [`tire_sens_status_t`](#signal-types) | 254 | -255 | - | The status the front left tire. |
| TIRE_FL_temperature | 16 | 8 | [`tire_temp_t`](#signal-types) | 10 | 170 | [`degC`](#signal-units) | The temperature of the front left tire. |
| TIRE_FL_pressure | 24 | 8 | [`tire_press_t`](#signal-types) | 1 | 254 | [`mB`](#signal-units) | The pressure of the front left tire. |
| TIRE_FR_sensID | 32 | 8 | [`tire_sens_id_t`](#signal-types) | 254 | -255 | - | The sensor id of the front right tire. |
| TIRE_FR_status | 40 | 8 | [`tire_sens_status_t`](#signal-types) | 254 | -255 | - | The status the front right tire. |
| TIRE_FR_temperature | 48 | 8 | [`tire_temp_t`](#signal-types) | 10 | 170 | [`degC`](#signal-units) | The temperature of the front right tire. |
| TIRE_FR_pressure | 56 | 8 | [`tire_press_t`](#signal-types) | 1 | 254 | [`mB`](#signal-units) | The pressure of the front right tire. |
| Name | Start Bit | Size | Type | Min | Max | Unit | Description |
|---------------------|-----------|------|---------------------------------------|-----|-----|-------------------------|------------------------------------------|
| TIRE_FL_sensID | 0 | 8 | [`tire_sens_id_t`](#signal-types) | 0 | 255 | - | The sensor id of the front left tire. |
| TIRE_FL_status | 8 | 8 | [`tire_sens_status_t`](#signal-types) | 0 | 255 | - | The status the front left tire. |
| TIRE_FL_temperature | 16 | 8 | [`tire_temp_t`](#signal-types) | 10 | 170 | [`degC`](#signal-units) | The temperature of the front left tire. |
| TIRE_FL_pressure | 24 | 8 | [`tire_press_t`](#signal-types) | 1 | 254 | [`mB`](#signal-units) | The pressure of the front left tire. |
| TIRE_FR_sensID | 32 | 8 | [`tire_sens_id_t`](#signal-types) | 0 | 255 | - | The sensor id of the front right tire. |
| TIRE_FR_status | 40 | 8 | [`tire_sens_status_t`](#signal-types) | 0 | 255 | - | The status the front right tire. |
| TIRE_FR_temperature | 48 | 8 | [`tire_temp_t`](#signal-types) | 10 | 170 | [`degC`](#signal-units) | The temperature of the front right tire. |
| TIRE_FR_pressure | 56 | 8 | [`tire_press_t`](#signal-types) | 1 | 254 | [`mB`](#signal-units) | The pressure of the front right tire. |

---
#### TPMS_rear
Expand All @@ -1035,42 +1035,42 @@ Cycle Time: -

Receivers: [DSPACE](#dspace), [SCANNER](#scanner)

| Name | Start Bit | Size | Type | Min | Max | Unit | Description |
|---------------------|-----------|------|---------------------------------------|-----|------|-------------------------|-----------------------------------------|
| TIRE_RL_sensID | 0 | 8 | [`tire_sens_id_t`](#signal-types) | 254 | -255 | - | The sensor id of the rear left tire. |
| TIRE_RL_status | 8 | 8 | [`tire_sens_status_t`](#signal-types) | 254 | -255 | - | The status the rear left tire. |
| TIRE_RL_temperature | 16 | 8 | [`tire_temp_t`](#signal-types) | 10 | 170 | [`degC`](#signal-units) | The temperature of the rear left tire. |
| TIRE_RL_pressure | 24 | 8 | [`tire_press_t`](#signal-types) | 1 | 254 | [`mB`](#signal-units) | The pressure of the rear left tire. |
| TIRE_RR_sensID | 32 | 8 | [`tire_sens_id_t`](#signal-types) | 254 | -255 | - | The sensor id of the rear right tire. |
| TIRE_RR_status | 40 | 8 | [`tire_sens_status_t`](#signal-types) | 254 | -255 | - | The status the rear right tire. |
| TIRE_RR_temperature | 48 | 8 | [`tire_temp_t`](#signal-types) | 10 | 170 | [`degC`](#signal-units) | The temperature of the rear right tire. |
| TIRE_RR_pressure | 56 | 8 | [`tire_press_t`](#signal-types) | 1 | 254 | [`mB`](#signal-units) | The pressure of the rear right tire. |
| Name | Start Bit | Size | Type | Min | Max | Unit | Description |
|---------------------|-----------|------|---------------------------------------|-----|-----|-------------------------|-----------------------------------------|
| TIRE_RL_sensID | 0 | 8 | [`tire_sens_id_t`](#signal-types) | 0 | 255 | - | The sensor id of the rear left tire. |
| TIRE_RL_status | 8 | 8 | [`tire_sens_status_t`](#signal-types) | 0 | 255 | - | The status the rear left tire. |
| TIRE_RL_temperature | 16 | 8 | [`tire_temp_t`](#signal-types) | 10 | 170 | [`degC`](#signal-units) | The temperature of the rear left tire. |
| TIRE_RL_pressure | 24 | 8 | [`tire_press_t`](#signal-types) | 1 | 254 | [`mB`](#signal-units) | The pressure of the rear left tire. |
| TIRE_RR_sensID | 32 | 8 | [`tire_sens_id_t`](#signal-types) | 0 | 255 | - | The sensor id of the rear right tire. |
| TIRE_RR_status | 40 | 8 | [`tire_sens_status_t`](#signal-types) | 0 | 255 | - | The status the rear right tire. |
| TIRE_RR_temperature | 48 | 8 | [`tire_temp_t`](#signal-types) | 10 | 170 | [`degC`](#signal-units) | The temperature of the rear right tire. |
| TIRE_RR_pressure | 56 | 8 | [`tire_press_t`](#signal-types) | 1 | 254 | [`mB`](#signal-units) | The pressure of the rear right tire. |

## Signal Types
The list of all the signal types used in the network.

| Name | Size | Kind | Signed | Min | Max | Scale | Offset | Description |
|-----------------------|------|-----------|---------|-----|-----------|-------|--------|--------------------------------------------------------------------------------------------|
| flag_t | 1 | `flag` | `false` | 0 | 1 | 1 | 0 | - |
| rotary_switch_pos_t | 4 | `integer` | `false` | 0 | 10 | 1 | 0 | - |
| fan_pwm_t | 4 | `integer` | `false` | 0 | 10 | 1 | 0 | - |
| month_t | 4 | `integer` | `false` | 0 | 11 | 1 | 0 | - |
| fan_pwm_t | 4 | `integer` | `false` | 0 | 10 | 1 | 0 | - |
| rotary_switch_pos_t | 4 | `integer` | `false` | 0 | 10 | 1 | 0 | - |
| day_t | 5 | `integer` | `false` | 1 | 31 | 1 | 0 | - |
| hours_t | 5 | `integer` | `false` | 0 | 23 | 1 | 0 | - |
| seconds_t | 6 | `integer` | `false` | 0 | 59 | 1 | 0 | - |
| minutes_t | 6 | `integer` | `false` | 0 | 59 | 1 | 0 | - |
| tire_press_t | 8 | `decimal` | `false` | 1 | 254 | 1 | 0 | - |
| seconds_t | 6 | `integer` | `false` | 0 | 59 | 1 | 0 | - |
| tire_temp_t | 8 | `integer` | `false` | 10 | 170 | 1 | 0 | - |
| tire_sens_id_t | 8 | `integer` | `false` | 0 | 255 | 1 | 0 | - |
| tire_sens_status_t | 8 | `integer` | `false` | 0 | 255 | 1 | 0 | Bit #2: 0 if battery voltage > 2.2V, otherwise 1; Bit #3: 0 if wheel spinning, 1 otherwise |
| rtd_fsm_t | 8 | `integer` | `true` | -1 | 6 | 1 | 0 | - |
| uint8_t | 8 | `integer` | `false` | 0 | 255 | 1 | 0 | - |
| tire_temp_t | 8 | `integer` | `false` | 10 | 170 | 1 | 0 | - |
| tire_sens_id_t | 8 | `decimal` | `false` | 254 | -255 | 1 | 0 | - |
| tire_sens_status_t | 8 | `decimal` | `false` | 254 | -255 | 1 | 0 | Bit #2: 0 if battery voltage > 2.2V, otherwise 1; Bit #3: 0 if wheel spinning, 1 otherwise |
| tire_press_t | 8 | `decimal` | `false` | 1 | 254 | 1 | 0 | - |
| ntc_resistance_t | 10 | `decimal` | `false` | 0 | 31968.75 | 31.25 | 1000 | - |
| bms_lv_password_t | 15 | `integer` | `false` | 0 | 32768 | 1 | 0 | - |
| lv_bat_current_sens_t | 16 | `decimal` | `false` | 0 | 4980.66 | 0.076 | 0 | - |
| lv_cell_voltage_t | 16 | `decimal` | `false` | 0 | 2490.33 | 0.038 | 2000 | - |
| lv_bat_voltage_t | 16 | `decimal` | `false` | 0 | 17497.845 | 0.267 | 14000 | - |
| uint16_t | 16 | `integer` | `false` | 0 | 65535 | 1 | 0 | - |
| lv_bat_voltage_t | 16 | `decimal` | `false` | 0 | 17497.845 | 0.267 | 14000 | - |
| lv_cell_voltage_t | 16 | `decimal` | `false` | 0 | 2490.33 | 0.038 | 2000 | - |
| lv_bat_current_sens_t | 16 | `decimal` | `false` | 0 | 4980.66 | 0.076 | 0 | - |

## Signal Units
The list of all the signal units used in the network.
Expand Down
4 changes: 2 additions & 2 deletions examples/markdown/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ func tpms(mcb *acmelib.Bus, scanner, dspace *acmelib.NodeInterface) *acmelib.Nod
tpmsInt := tpms.Interfaces()[0]
checkErr(mcb.AddNodeInterface(tpmsInt))

idSigType, err := acmelib.NewDecimalSignalType("tire_sens_id_t", 8, false)
idSigType, err := acmelib.NewIntegerSignalType("tire_sens_id_t", 8, false)
checkErr(err)

statusSigType, err := acmelib.NewDecimalSignalType("tire_sens_status_t", 8, false)
statusSigType, err := acmelib.NewIntegerSignalType("tire_sens_status_t", 8, false)
checkErr(err)
statusSigType.SetDesc("Bit #2: 0 if battery voltage > 2.2V, otherwise 1; Bit #3: 0 if wheel spinning, 1 otherwise")

Expand Down
16 changes: 8 additions & 8 deletions examples/markdown/mcb_parsed.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -248,22 +248,22 @@ BO_ 24 TLB_BAT_hello : 3 TLB_BAT
BO_ 1800 unknown_ir : 8 EXTRA_NODE

BO_ 1816 TPMS_front : 8 TPMS
SG_ TIRE_FL_sensID : 0|8@1+ (1,0) [254|-255] "" DSPACE, SCANNER
SG_ TIRE_FL_status : 8|8@1+ (1,0) [254|-255] "" DSPACE, SCANNER
SG_ TIRE_FL_sensID : 0|8@1+ (1,0) [0|255] "" DSPACE, SCANNER
SG_ TIRE_FL_status : 8|8@1+ (1,0) [0|255] "" DSPACE, SCANNER
SG_ TIRE_FL_temperature : 16|8@1+ (1,0) [10|170] "degC" DSPACE, SCANNER
SG_ TIRE_FL_pressure : 24|8@1+ (1,0) [1|254] "mB" DSPACE, SCANNER
SG_ TIRE_FR_sensID : 32|8@1+ (1,0) [254|-255] "" DSPACE, SCANNER
SG_ TIRE_FR_status : 40|8@1+ (1,0) [254|-255] "" DSPACE, SCANNER
SG_ TIRE_FR_sensID : 32|8@1+ (1,0) [0|255] "" DSPACE, SCANNER
SG_ TIRE_FR_status : 40|8@1+ (1,0) [0|255] "" DSPACE, SCANNER
SG_ TIRE_FR_temperature : 48|8@1+ (1,0) [10|170] "degC" DSPACE, SCANNER
SG_ TIRE_FR_pressure : 56|8@1+ (1,0) [1|254] "mB" DSPACE, SCANNER

BO_ 1832 TPMS_rear : 8 TPMS
SG_ TIRE_RL_sensID : 0|8@1+ (1,0) [254|-255] "" DSPACE, SCANNER
SG_ TIRE_RL_status : 8|8@1+ (1,0) [254|-255] "" DSPACE, SCANNER
SG_ TIRE_RL_sensID : 0|8@1+ (1,0) [0|255] "" DSPACE, SCANNER
SG_ TIRE_RL_status : 8|8@1+ (1,0) [0|255] "" DSPACE, SCANNER
SG_ TIRE_RL_temperature : 16|8@1+ (1,0) [10|170] "degC" DSPACE, SCANNER
SG_ TIRE_RL_pressure : 24|8@1+ (1,0) [1|254] "mB" DSPACE, SCANNER
SG_ TIRE_RR_sensID : 32|8@1+ (1,0) [254|-255] "" DSPACE, SCANNER
SG_ TIRE_RR_status : 40|8@1+ (1,0) [254|-255] "" DSPACE, SCANNER
SG_ TIRE_RR_sensID : 32|8@1+ (1,0) [0|255] "" DSPACE, SCANNER
SG_ TIRE_RR_status : 40|8@1+ (1,0) [0|255] "" DSPACE, SCANNER
SG_ TIRE_RR_temperature : 48|8@1+ (1,0) [10|170] "degC" DSPACE, SCANNER
SG_ TIRE_RR_pressure : 56|8@1+ (1,0) [1|254] "mB" DSPACE, SCANNER

Expand Down

0 comments on commit f8be046

Please sign in to comment.