Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 4 additions & 45 deletions Autogen/CAN/Doc/GRCAN.CANdo
Original file line number Diff line number Diff line change
Expand Up @@ -3519,7 +3519,7 @@ Message ID:
Dash Config:
MSG ID: 0x01B
MSG LENGTH: 1
BMS LED:
led_bits:
bit_start: 0
comment: LED command (0: off, 1: on)
data type: b
Expand All @@ -3537,29 +3537,10 @@ Message ID:
TCM Status:
MSG ID: 0x029
MSG LENGTH: 8
Connection Status:
status_bits:
bit_start: 0
comment: 1: OK, 0: Timeout
data type: b
units: Bool
MQTT Status:
bit_start: 1
comment: 1: OK, 0: Timeout
data type: b
units: Bool
Epic Shelter Status:
bit_start: 2
comment: 1: In Progress, 0: Idle
data type: b
units: Bool
Camera Status:
bit_start: 3
comment: 1: Recording, 0: Idle
data type: b
units: Bool
Reserved:
bit_start: 4-7
Ping:
comment: "Connection Status = bit 0, MQTT Status = bit 1, Epic Shelter Status = bit 2, Camera Status = bit 3, bits 4-7 reserved"
Mapache Ping:
bit_start: 8
comment: Mapache ping (upload)
data type: u16
Expand Down Expand Up @@ -3685,28 +3666,6 @@ Message ID:
comment: power draw in mW
data type: u16
units: Celsius
Dash Warning Flags:
MSG ID: 0x02B
MSG LENGTH: 1
BSE APPS Violation:
bit_start: 0
comment: 1: Violation, 0: OK
data type: b
units: Bool
Reserved:
bit_start: 1
Reserved:
bit_start: 2
Reserved:
bit_start: 3
Reserved:
bit_start: 4
Reserved:
bit_start: 5
Reserved:
bit_start: 6
Reserved:
bit_start: 7
Specific Brake IR:
MSG ID: 0x02C
MSG LENGTH: 2
Expand Down
11 changes: 6 additions & 5 deletions Autogen/CAN/Src/STRUCTparser.pl
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ sub process_byte_entry {
my $b_idx = ${$sorted_ref}[ ${$idx_ref} ];
my $fields = ${$map_ref}{$b_idx};

if ( scalar @{$fields} > 2 && ${$fields}[0]->{name} =~ /reserved|ping|byte/ismx ) {
if ( scalar @{$fields} > 2 ) {
push @out, handle_multi_field_range( $sorted_ref, $map_ref, $idx_ref );
}
else {
Expand Down Expand Up @@ -301,8 +301,9 @@ sub handle_multi_field_range {
}
}

my $len = ( ${$bytes_ref}[ ${$idx_ref} ] - $start_byte ) + 1;
my $v_name = $has_error ? 'error_fault_violation_bits' : 'ping_block';
my $suffix = ( $len > 1 ) ? "[$len]" : $EMPTY_STR;
return sprintf "\tuint8_t %s%s;\n", $v_name, $suffix;
my $len = ( ${$bytes_ref}[ ${$idx_ref} ] - $start_byte ) + 1;
my $base = $has_error ? 'error_fault_violation_bits' : 'ping_block';
my $identifier = $base . '_b' . $start_byte;
my $suffix = ( $len > 1 ) ? "[$len]" : $EMPTY_STR;
return sprintf "\tuint8_t %s%s;\n", $identifier, $suffix;
}
Loading