Skip to content

Spacefreak18/simmonitor

Repository files navigation

SimMonitor

Customizable Simulator dashboards and telemetry data logger

Features

  • cli mode
  • web ui
  • ncurses ui
  • customizable embedded UI
  • records telemetry sampled 4 times a second to database, with data channels for steering, brake, acceleration, speed, and rpms

gilles1.png (ncurses interface simonitor play -u curses)

multiple-plots-1.png

(sample gnuplot output of multiple laps telmetry comparison, accessed through simmonitor browse)

Suported Games

Dependencies

  • argtable2
  • libconfig
  • ncurses
  • microhttpd
  • libxdg
  • libuv (as a submodule)
  • hoel
  • lvgl (for configurable embedded displays, as a submodule)
  • sdl2 (and sdl2_image, required by lvgl)
  • tar
  • postgresql, mariadb, sqlite3 (required to link to libhoel) -- the rest are git submodules
  • Nuklear
  • ctemplate
  • lvgl
  • slog
  • simshmbridge
  • simapi

Arch Linux Dependencies

pacman -Syu libxdg-basedir argtable libconfig ncurses libmicrohttpd libuv hoel sdl2 sdl2_image libtar postgresql mariadb-libs sqlite3

Building

This code depends on the shared memory data headers in the simapi repo. When pulling lastest if the submodule does not download run:

git submodule sync --recursive
git submodule update --init --recursive

Then to compile simply:

mkdir build; cd build
cmake ..
make

Once compiled copy conf files to ~/.config/simmonitor and data files to ~/.local/share/simmonitor.

DB Setup

CREATE DATABASE simmonitor;
psql -d simmonitor -f data/simmonitor-psql.sql

for postgres 15+

GRANT pg_read_all_data TO USER;
GRANT pg_write_all_data TO USER;

for postgres 15 and below

GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO USER;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO USER;
GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA pbulic TO USER;

Usage

normal Second Monitor display with x gui

simmonitor play -u x

normal Second Monitor display with web

simmonitor play -u web

Options are curses, web, x, cli, fb

Run in CLI mode and capture telemetry

simmonitor play -u cli -m

Browse previous sessions

simmonitor browse

Currently the browser is only in ncurses.

Testing

Static Analysis

    mkdir build; cd build
    make clean
    CFLAGS=-fanalyzer cmake ..
    make

Valgrind

    cd build
    valgrind -v --leak-check=full --show-leak-kinds=all --suppressions=../.valgrindrc ./simmonitor play

Join the Discussion

Sim Racing Matrix Space

ToDo

  • much, much more

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •