Skip to content

Commit

Permalink
Toyota: add drive force signal for hybrids (commaai#1246)
Browse files Browse the repository at this point in the history
* add new signal

* set minmax

* better comments

* clarify

* add FDRVREAL for hybrids

* forgot scaling factor
  • Loading branch information
sshane authored Sep 17, 2024
1 parent cb92fc8 commit de025ae
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
7 changes: 4 additions & 3 deletions opendbc/dbc/generator/toyota/_toyota_2017.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ BO_ 180 SPEED: 8 XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX

BO_ 295 GEAR_PACKET_HYBRID: 8 XXX
SG_ CAR_MOVEMENT : 25|10@0- (1,0) [0|255] "" XXX
SG_ COUNTER : 55|8@0+ (1,0) [0|255] "" XXX
SG_ FDRVREAL : 26|11@0- (25,0) [-25600|25575] "N" XXX
SG_ UNKNOWN : 55|8@0+ (1,0) [0|255] "" XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
SG_ GEAR : 47|4@0+ (1,0) [0|15] "" XXX

Expand Down Expand Up @@ -462,7 +462,8 @@ CM_ SG_ 36 YAW_RATE "verify";
CM_ SG_ 36 ACCEL_X "x-axis accel";
CM_ SG_ 37 STEER_FRACTION "1/15th of the signal STEER_ANGLE, which is 1.5 deg; note that 0x8 is never set";
CM_ SG_ 37 STEER_RATE "factor is tbd";
CM_ SG_ 119 FDRV "force applied by wheels from the engine and/or electric motors. includes creeping force, regen, and engine braking";
CM_ SG_ 119 FDRVREAL "ICE only: force applied by wheels from the engine. includes creeping force, regen, and engine braking";
CM_ SG_ 295 FDRVREAL "hybrid only: force applied by wheels from the engine and/or electric motors. includes creeping force, regen, and engine braking";
CM_ SG_ 466 NEUTRAL_FORCE "force in newtons the engine/electric motors are applying without any acceleration commands or user input";
CM_ SG_ 466 ACC_BRAKING "whether brakes are being actuated from ACC command";
CM_ SG_ 466 ACCEL_NET "net negative acceleration (braking) applied by the system if on flat ground";
Expand Down
7 changes: 4 additions & 3 deletions opendbc/dbc/toyota_new_mc_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ BO_ 180 SPEED: 8 XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX

BO_ 295 GEAR_PACKET_HYBRID: 8 XXX
SG_ CAR_MOVEMENT : 25|10@0- (1,0) [0|255] "" XXX
SG_ COUNTER : 55|8@0+ (1,0) [0|255] "" XXX
SG_ FDRVREAL : 26|11@0- (25,0) [-25600|25575] "N" XXX
SG_ UNKNOWN : 55|8@0+ (1,0) [0|255] "" XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
SG_ GEAR : 47|4@0+ (1,0) [0|15] "" XXX

Expand Down Expand Up @@ -466,7 +466,8 @@ CM_ SG_ 36 YAW_RATE "verify";
CM_ SG_ 36 ACCEL_X "x-axis accel";
CM_ SG_ 37 STEER_FRACTION "1/15th of the signal STEER_ANGLE, which is 1.5 deg; note that 0x8 is never set";
CM_ SG_ 37 STEER_RATE "factor is tbd";
CM_ SG_ 119 FDRV "force applied by wheels from the engine and/or electric motors. includes creeping force, regen, and engine braking";
CM_ SG_ 119 FDRVREAL "ICE only: force applied by wheels from the engine. includes creeping force, regen, and engine braking";
CM_ SG_ 295 FDRVREAL "hybrid only: force applied by wheels from the engine and/or electric motors. includes creeping force, regen, and engine braking";
CM_ SG_ 466 NEUTRAL_FORCE "force in newtons the engine/electric motors are applying without any acceleration commands or user input";
CM_ SG_ 466 ACC_BRAKING "whether brakes are being actuated from ACC command";
CM_ SG_ 466 ACCEL_NET "net negative acceleration (braking) applied by the system if on flat ground";
Expand Down
7 changes: 4 additions & 3 deletions opendbc/dbc/toyota_nodsu_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ BO_ 180 SPEED: 8 XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX

BO_ 295 GEAR_PACKET_HYBRID: 8 XXX
SG_ CAR_MOVEMENT : 25|10@0- (1,0) [0|255] "" XXX
SG_ COUNTER : 55|8@0+ (1,0) [0|255] "" XXX
SG_ FDRVREAL : 26|11@0- (25,0) [-25600|25575] "N" XXX
SG_ UNKNOWN : 55|8@0+ (1,0) [0|255] "" XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
SG_ GEAR : 47|4@0+ (1,0) [0|15] "" XXX

Expand Down Expand Up @@ -466,7 +466,8 @@ CM_ SG_ 36 YAW_RATE "verify";
CM_ SG_ 36 ACCEL_X "x-axis accel";
CM_ SG_ 37 STEER_FRACTION "1/15th of the signal STEER_ANGLE, which is 1.5 deg; note that 0x8 is never set";
CM_ SG_ 37 STEER_RATE "factor is tbd";
CM_ SG_ 119 FDRV "force applied by wheels from the engine and/or electric motors. includes creeping force, regen, and engine braking";
CM_ SG_ 119 FDRVREAL "ICE only: force applied by wheels from the engine. includes creeping force, regen, and engine braking";
CM_ SG_ 295 FDRVREAL "hybrid only: force applied by wheels from the engine and/or electric motors. includes creeping force, regen, and engine braking";
CM_ SG_ 466 NEUTRAL_FORCE "force in newtons the engine/electric motors are applying without any acceleration commands or user input";
CM_ SG_ 466 ACC_BRAKING "whether brakes are being actuated from ACC command";
CM_ SG_ 466 ACCEL_NET "net negative acceleration (braking) applied by the system if on flat ground";
Expand Down
7 changes: 4 additions & 3 deletions opendbc/dbc/toyota_tnga_k_pt_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ BO_ 180 SPEED: 8 XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX

BO_ 295 GEAR_PACKET_HYBRID: 8 XXX
SG_ CAR_MOVEMENT : 25|10@0- (1,0) [0|255] "" XXX
SG_ COUNTER : 55|8@0+ (1,0) [0|255] "" XXX
SG_ FDRVREAL : 26|11@0- (25,0) [-25600|25575] "N" XXX
SG_ UNKNOWN : 55|8@0+ (1,0) [0|255] "" XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
SG_ GEAR : 47|4@0+ (1,0) [0|15] "" XXX

Expand Down Expand Up @@ -466,7 +466,8 @@ CM_ SG_ 36 YAW_RATE "verify";
CM_ SG_ 36 ACCEL_X "x-axis accel";
CM_ SG_ 37 STEER_FRACTION "1/15th of the signal STEER_ANGLE, which is 1.5 deg; note that 0x8 is never set";
CM_ SG_ 37 STEER_RATE "factor is tbd";
CM_ SG_ 119 FDRV "force applied by wheels from the engine and/or electric motors. includes creeping force, regen, and engine braking";
CM_ SG_ 119 FDRVREAL "ICE only: force applied by wheels from the engine. includes creeping force, regen, and engine braking";
CM_ SG_ 295 FDRVREAL "hybrid only: force applied by wheels from the engine and/or electric motors. includes creeping force, regen, and engine braking";
CM_ SG_ 466 NEUTRAL_FORCE "force in newtons the engine/electric motors are applying without any acceleration commands or user input";
CM_ SG_ 466 ACC_BRAKING "whether brakes are being actuated from ACC command";
CM_ SG_ 466 ACCEL_NET "net negative acceleration (braking) applied by the system if on flat ground";
Expand Down

0 comments on commit de025ae

Please sign in to comment.