2022-10-31 15:11:02 +00:00
# Monocoque
```
___ |/ /____________________________________ ____ ______
__ /|_/ /_ __ \_ __ \ __ \ ___/ __ \ __ `/ / / / _ \
_ / / / / /_/ / / / / /_/ / /__ / /_/ / /_/ // /_/ // __/
/_/ /_/ \____//_/ /_/\____/\___/ \____/\__, / \__,_/ \___/
/_/
```
Cross Platform device manager for driving and flight simulators, for use with common simulator software titles.
2026-01-05 13:05:11 -05:00
📚 **Usage Documentation:** [spacefreak18.github.io/simapi/ ](https://spacefreak18.github.io/simapi/ )
2025-12-23 23:11:51 +01:00
2022-10-31 15:11:02 +00:00
## Features
2024-10-06 00:12:50 -04:00
- Updates at 60 frames per seconds.
2022-10-31 15:11:02 +00:00
- Modular design for support with various titles and devices.
2026-01-05 13:05:11 -05:00
- Supports bass shakers, tachometers, several wheels and pedals, simlights, simwind etc, through usb and arduino serial.
2022-10-31 15:11:02 +00:00
- Tachometer support is currently limited to the Revburner model. Supports existing revburner xml configuration files.
- Includes utility to configure revburner tachometer
2026-01-05 13:05:11 -05:00
- Can send data to any serial device. So far only tested with arduino. and ESP32. Includes sample arduino sketch for sim lights, simwind, and simhaptic effects for motors.
2026-01-07 01:01:08 -05:00
- Support for custom arduino (or any serial) device, with a [custom lua format ](https://spacefreak18.github.io/simapi/serial_custom ) for sending data
2024-10-06 00:12:50 -04:00
- Convincing shaker effects for noise tranducers for wheel slip, wheel lock, and abs, as well as engine rpm and gear shifts.
2026-01-07 01:01:08 -05:00
- Support for many [wheels and pedals ](https://spacefreak18.github.io/simapi/thirdpartydevices ) including Clubsport Elite V3, [Logitech G29 ](https://spacefreak18.github.io/simapi/logitechg29 ), and Moza R5.
2022-10-31 15:11:02 +00:00
2026-02-14 13:45:02 -05:00
## Adding More Devices
- If a device isn't already supported, feel free to assist in the reverse engineering process by submitting a pcap or even better working code in a pull request!
https://santeri.pikarinen.com/pages/usb_hid_reverse_engineering/
2025-12-23 23:11:51 +01:00
## Quick Install
**One-Line Installation:**
```bash
curl -fsSL https://raw.githubusercontent.com/Spacefreak18/monocoque/master/install.sh | bash
```
2026-01-05 13:05:11 -05:00
** *AUR Package following git master:***
```https://aur.archlinux.org/packages/monocoque-git` ``
2025-12-23 23:11:51 +01:00
**Or download and review first:**
` ``bash
wget https://raw.githubusercontent.com/Spacefreak18/monocoque/master/install.sh
chmod +x install.sh
./install.sh
` ``
**TUI Manager:**
After installation, use the interactive manager:
` ``bash
monocoque-manager
` ``
2026-01-05 13:05:11 -05:00
**Supported Games**
[Supported Sims](https://spacefreak18.github.io/simapi/supportedsims)
***please note on Linux some titles will require a compatibility exe from simshmbridge to be setup. Please follow the linked Documentation
for installation instructions***
2025-12-23 23:11:51 +01:00
2026-01-05 13:05:11 -05:00
## Building
2024-10-06 00:12:50 -04:00
2026-01-05 13:05:11 -05:00
### Dependencies
2022-10-31 15:11:02 +00:00
- libserialport - arduino serial devices
2026-01-09 16:41:58 -05:00
- hidapi - usb hid devices (hidraw)
2022-10-31 15:11:02 +00:00
- portaudio - sound devices (haptic bass shakers)
2024-10-06 00:12:50 -04:00
- libpulse - sound devices (haptic bass shakers)
- libuv base event loop
2022-10-31 15:11:02 +00:00
- libxml2
- argtable2
- libconfig
2024-10-06 00:52:17 -04:00
- xdg-basedir
2025-11-22 11:39:41 -05:00
- lua
2022-12-01 21:27:57 +00:00
- [slog](https://github.com/kala13x/slog) (static)
2024-02-27 17:36:02 -05:00
- [simshmbridge](https://github.com/spacefreak18/simshmbridge) - for sims that need shared memory mapping like AC and Project Cars related.
2022-10-31 15:11:02 +00:00
- [simapi](https://github.com/spacefreak18/simapi)
2025-01-11 03:06:15 -05:00
` ``
2025-11-22 11:39:41 -05:00
pacman -Syu git cmake pulse-native-provider libxdg-basedir libserialport libconfig libuv argtable hidapi lua
2025-01-11 03:06:15 -05:00
` ``
2022-10-31 15:11:02 +00:00
This code depends on the shared memory data headers in the simapi [repo](https://github.com/spacefreak18/simapi). When pulling lastest if the submodule does not download run:
` ``
git submodule sync --recursive
git submodule update --init --recursive
` ``
2023-09-21 10:06:48 -04:00
2022-10-31 15:11:02 +00:00
Then to compile simply:
` ``
mkdir build; cd build
cmake ..
make
` ``
2023-09-21 10:06:48 -04:00
2025-09-01 01:57:41 +00:00
## User Setup Guide
See the dedicated [How To](HOW-TO-USE.md) for detailed instructions to set up and run 'monocoque`
2024-02-27 17:36:02 -05:00
## Testing
2024-07-17 17:14:28 +03:00
```
./monocoque test -vv # Make sure that ~/.config/monocque/monocoque.config only contains the devices you have connected.
```
2023-05-17 16:00:26 +00:00
2026-01-05 13:05:11 -05:00
### Logs file location
`~/.cache/monocoque/*.log`
2022-10-31 15:11:02 +00:00
### Static Analysis
```
mkdir build; cd build
make clean
2022-12-23 22:43:37 +00:00
cmake -Danalyze=on ..
2022-10-31 15:11:02 +00:00
make
```
2024-10-06 00:12:50 -04:00
2022-10-31 15:11:02 +00:00
### Valgrind
```
cd build
valgrind -v --leak-check=full --show-leak-kinds=all --suppressions=../.valgrindrc ./monocoque play
```
2024-09-02 12:50:06 -04:00
## Join the Discussion
[Sim Racing Matrix Space ](https://matrix.to/#/#simracing:matrix.org )
2022-10-31 15:11:02 +00:00
## ToDo
2024-12-04 14:42:37 -05:00
- add frequency cap (low pass filter) to sound haptic effects
2024-12-04 14:44:09 -05:00
- add road and kerb sound haptic effects
2022-12-01 21:27:57 +00:00
- windows port
2022-10-31 15:11:02 +00:00
- more memory testing
- cleanup tests which are basically just copies of the example from their respective projects
- much, much more