Ich hab das mal als kaitai struct gebaut #1

Open
opened 2025-10-04 09:30:08 +00:00 by werti · 0 comments
Owner
meta:
  id: unicorns
  file-extension: unicorns

seq:
  - id: magic_start
    size: 2
    
  - id: unidentified_1
    type: u1
    
  - id: unidentified_2
    type: u1
    
  - id: destination_angle
    type: u1
    doc: "(small=left, straight~=0x78, right=big)"
    
  - id: travel_time
    type: u1
    doc: "(0x32=slow-ish,0x02=very fast)"
    
  - id: unidentified_3
    type: u1
    
  - id: unidentified_4
    type: u1
    
  - id: check_sum
    type: u1
    doc: "(sum 2...7, mod 256?)"

  - id: magic_end
    size: 2
    
instances:
  check_sum_calc:
    value: (unidentified_1 + unidentified_2 + destination_angle + travel_time + unidentified_3 + unidentified_4) % 256

  check_sum_valid:
    value: check_sum == check_sum_calc

Das ist jetzt nur für den lenkmotor bisher und sieht dann angewendet auf das drive straight paket wie folgt aus:

grafik

```yaml meta: id: unicorns file-extension: unicorns seq: - id: magic_start size: 2 - id: unidentified_1 type: u1 - id: unidentified_2 type: u1 - id: destination_angle type: u1 doc: "(small=left, straight~=0x78, right=big)" - id: travel_time type: u1 doc: "(0x32=slow-ish,0x02=very fast)" - id: unidentified_3 type: u1 - id: unidentified_4 type: u1 - id: check_sum type: u1 doc: "(sum 2...7, mod 256?)" - id: magic_end size: 2 instances: check_sum_calc: value: (unidentified_1 + unidentified_2 + destination_angle + travel_time + unidentified_3 + unidentified_4) % 256 check_sum_valid: value: check_sum == check_sum_calc ``` Das ist jetzt nur für den lenkmotor bisher und sieht dann angewendet auf das drive straight paket wie folgt aus: ![grafik](/attachments/d4e8ecc5-87bc-4dd4-b1ed-81731200c95e)
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: c3h/UnJimuUnicorns#1
No description provided.