This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import fire | |
| import pickle | |
| import os | |
| from sys import stderr, stdout | |
| from dataclasses import dataclass | |
| import datetime | |
| from typing import Optional, TextIO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdbool.h> | |
| #include <stdio.h> | |
| #include <sys/fcntl.h> | |
| #include <sys/mman.h> | |
| #include <sys/wait.h> | |
| #include <unistd.h> | |
| static volatile bool *running; | |
| void handler(int sig) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from evdev import UInput, ecodes, AbsInfo | |
| import asyncio | |
| from bleak import BleakClient, BleakError | |
| gearshift_uuid = "64bb31a7-432a-4d12-a646-efa0df31c789" | |
| rotary_uuid = "4d9ef14c-e4f7-48c6-9cdc-8ded226b067d" | |
| rumble_uuid = "798449fc-e2a1-4fa2-9e17-b77f87c98499" | |
| accel_uuid = "f10d896b-a37c-43b7-b702-b324da1cfb99" | |
| brake_uuid = "e62e34d0-3d83-4b9e-b3ff-0ab6f957a3be" | |
| clutch_uuid = "c0a12cc1-302a-4847-819b-1e76a549611c" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <assert.h> | |
| #include <signal.h> | |
| #include <stdbool.h> | |
| #include <stddef.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <sys/types.h> | |
| #include <sys/wait.h> | |
| #include <unistd.h> |