Commit Graph

320 Commits

Author SHA1 Message Date
Paul Dino Jones 1c1323961c init and destroy logging with thread safety 2025-10-28 00:26:04 -04:00
Paul Dino Jones a98bcbcedb add compilation targets for new mapping structure 2025-10-23 14:01:18 -04:00
Paul Dino Jones ead22efbc8 Updated to latest simapi 2025-10-23 13:52:24 -04:00
Paul Dino Jones f7143e2024 Add gearc to lua and to test sequence 2025-10-22 14:36:59 -04:00
Paul Dino Jones 0780b001f6 working custom serial 2025-10-20 19:37:28 -04:00
Paul Dino Jones 7f3727d2f1 consolidate cleanup gotos 2025-09-01 19:30:43 -04:00
Paul Dino Jones a3059b30ba clean up argument parsing a little 2025-09-01 17:24:26 -04:00
Paul Dino Jones 0e5498f220 fix freeing of xdg handle when help is specified 2025-09-01 11:52:52 -04:00
Paul Dino Jones e380f3a9d4 Add beginnings of custom arduino devices. 2025-09-01 11:38:36 -04:00
Paul Dino Jones 433e2423e8 update to lastest simapi 2025-09-01 10:59:03 -04:00
Paul Dino Jones 7f7a24269a Update to latest simapi 2025-08-29 19:15:15 -04:00
Paul Dino Jones a6b039c292 Update to latest simapi to fix tyre diameters 2025-08-29 19:01:46 -04:00
Paul Dino Jones d7dbab7956 updated to latest simapi for tyre diameter and turbo boost 2025-08-28 17:00:08 -04:00
Paul Dino Jones 88f3e0ebb9 Add led_clear_range lua function so leds can be cleared without clearing them all for certain effects 2025-08-26 18:05:09 -04:00
Paul Dino Jones 811ce77da8 updated to latest simapi 2025-08-25 20:28:16 -04:00
Paul Dino Jones 442a1b88a2 Update to latest simapi 2025-08-25 17:46:48 -04:00
Paul Dino Jones 4684ee49c3 Add disable_audio flag 2025-08-15 04:19:39 -04:00
Paul Dino Jones 10ecfa858a Fix gear and engine effects remove some unnecessary code 2025-07-30 03:32:41 -04:00
Morgan Garcia 23f45d8f56 Update moza.c
Change MOZA_MAGIC_VALUE back to 0x0d from 13.
2025-07-29 20:43:49 -04:00
Morgan Garcia 9f51f03efa Update moza.c
Changed MOZA_TIMEOUT back to 1000.
2025-07-29 20:43:49 -04:00
Morgan Garcia 223cf26e28 Update moza.c
moza_update function

Updated variable name to perctflt and changed the value to multiply the quotient of rpm/maxrpm by 100.

Made int perct variable to round perctflt to nearest whole number.

Updated LED activation ranges so that all 10 LEDs get activated when given rpm percentage is reached.
2025-07-29 20:43:49 -04:00
Morgan Garcia 6bf80673ce Update gameloop.c
Reverted back to default from Spacefreak18 source now that I've tested and gotten the LEDs working.
2025-07-29 20:43:49 -04:00
Morgan Garcia d28719929c Update gameloop.c
Text output update
2025-07-29 20:43:49 -04:00
Morgan Garcia 19f7a12027 Update moza.c
Fixed error in BIT number increasing.
2025-07-29 20:43:49 -04:00
Morgan Garcia 218b8c255c Update gameloop.c
Comment out normal LED test.

Added test for quicker push to the wheel for troubleshooting.
2025-07-29 20:43:49 -04:00
Morgan Garcia 0201b29c49 Update moza.c
moza_update values updated for LED test.

MOZA_PAYLOAD_SIZE added per update from Spacefreak18
2025-07-29 20:43:49 -04:00
Morgan Garcia 1d9b6cfe1a Update moza.c
Updated MOZA_SERIAL_TEMPLATE[3] from 0x17 to 0x13 which fixed communication issues with the device.
2025-07-29 20:43:49 -04:00
Paul Dino Jones 0abd5e9b68 Bump to latest simapi for unix timestamp ticks. Push unix timestamp ticks to lua variable. Update test logic to test on 8000 rpms. Update example lua scripts with examples of led rpm blink. 2025-07-15 16:39:41 -04:00
Paul Dino Jones d2fa72f47c fix serial receiving 2025-07-14 00:15:47 -04:00
Paul Dino Jones f6a2607273 fix misleading log message 2025-06-16 13:19:13 -04:00
Paul Dino Jones c7c86adf94 accept usbwheel for wheel on usb devices in config 2025-06-16 13:02:34 -04:00
Oleg Makarenko b90c396d34 Add GT Neo LED update feature 2025-06-15 22:59:41 -04:00
Paul Dino Jones 6c902b4c2b update to latest simapi for lmu support 2025-06-14 19:11:44 -04:00
Paul Dino Jones d08ebfa6db Update to latest simapi for improvements to tyre diameter detection 2025-04-30 19:07:05 -04:00
Paul Dino Jones c7cbce7c7b update to latest simapi to fix detecting diameters while simd is running 2025-04-29 00:01:39 -04:00
Paul Dino Jones b5dd003f88 fix code around generating diameters config 2025-04-29 00:00:58 -04:00
Mon ouïe 108d21d30a Fix HID send report commands for Simagic P1000 Haptic modules 2025-04-21 14:09:46 -04:00
Paul Dino Jones 04f01366b1 add function to expand tilde and expand tilde on device specific config files 2025-04-07 10:56:38 -04:00
Paul Dino Jones e627392dda small cleanup to fix memory leaks 2025-04-07 10:56:38 -04:00
Paul Dino Jones 1e96c04de4 add -c for specified config file option 2025-04-07 10:56:38 -04:00
Paul Dino Jones 7ead5ac9f5 fix issue with freeing lua file on cammus c12 2025-03-27 17:12:23 -04:00
Paul Dino Jones a8e6a219bf Add extra log information on revburner 2025-03-27 15:52:51 -04:00
Paul Dino Jones 0d388d96b1 improvements for cammus c12 2025-03-27 15:38:35 -04:00
Paul Dino Jones e80b12eb47 fix arduino lua device free 2025-03-27 14:47:34 -04:00
Paul Dino Jones df39832f4f Temporarily remove feature to ignore reattempting to open a serial device after it had failed once. Increase number of allowed serial device blocks to 20. 2025-03-27 01:51:37 -04:00
Paul Dino Jones 4e6bf4684a Move release of serial adapter to before underlying device is released 2025-03-26 18:25:26 -04:00
Paul Dino Jones 14fb81ee43 Fix some pulseaudio stuff 2025-03-26 17:35:05 -04:00
Paul Dino Jones 2aed9f5b51 Improve logging over device specific configs 2025-03-26 16:41:18 -04:00
Paul Dino Jones c850efbde5 actually pass the config file around 2025-03-26 15:16:04 -04:00
Paul Dino Jones f782823c12 Move device specific config file test to more logical spot 2025-03-26 15:01:06 -04:00
Paul Dino Jones 3f02f09238 Fix tachometer config 2025-03-26 13:03:50 -04:00
Paul Dino Jones e2b5e4b5d1 Fix leak in arduino lua 2025-03-26 12:35:16 -04:00
Paul Dino Jones d1f43aace5 Remove log entries 2025-03-26 11:58:39 -04:00
Paul Dino Jones b380d44521 Cleanup pulseaudio code 2025-03-26 11:58:05 -04:00
Paul Dino Jones 02699d3c47 Fix leak in xdglib 2025-03-26 11:57:40 -04:00
Paul Dino Jones 66886b4d7e fix leak in config 2025-03-26 11:56:31 -04:00
Paul Dino Jones 0d9a171193 fix leak in cammus c12 2025-03-26 11:56:04 -04:00
Paul Dino Jones 4382e2f71f fix leak in wheel device 2025-03-26 11:55:43 -04:00
Paul Dino Jones 7bf2f8b28f Fix leak in serial adapter 2025-03-26 11:55:18 -04:00
Paul Dino Jones 5ed23d1cba Fix segfault freeing cammus c12 2025-03-25 14:57:52 -04:00
Paul Dino Jones f0d501370e Fix off by one on rgb math 2025-03-25 13:52:22 -04:00
Paul Dino Jones 1a22c10b06 Add flags to test loop 2025-03-25 12:57:55 -04:00
Paul Dino Jones ccae4c5f89 Do not write to rpm leds on cammus c12 2025-03-25 12:31:00 -04:00
Paul Dino Jones 46cb401e6b Always write to led 2025-03-25 10:09:39 -04:00
Paul Dino Jones 7afd7f12ed Huge refactor to improve memory efficiency mostly around pulseaudio 2025-03-25 10:04:39 -04:00
Paul Dino Jones e0d9c78f60 Remove some unnecessary variables from lua variable setup 2025-03-25 10:04:14 -04:00
Paul Dino Jones a26ee4da2f Properly release lua if it is used on cammus 2025-03-25 10:03:38 -04:00
Paul Dino Jones 4ed25d7112 Fix logging spam 2025-03-24 16:43:09 -04:00
Paul Dino Jones 88db6c5f04 Fix segfaults on device specific config files 2025-03-24 15:58:37 -04:00
Paul Dino Jones c3a88f3b07 Fix issue with serial devices opening when they have already failed once 2025-03-24 15:57:50 -04:00
Paul Dino Jones 22a41d1ddb Fix issue with not found configs 2025-03-24 14:22:20 -04:00
Paul Dino Jones ed671ecedc Fix off by one error. Fix log format 2025-03-24 14:07:16 -04:00
Paul Dino Jones 7c8ebb0984 Increase cammus c12 leds 2025-03-24 13:22:45 -04:00
Paul Dino Jones f7e92083f2 Make sure leds clear each time 2025-03-24 12:13:39 -04:00
Paul Dino Jones 22930163ec Fix to use lua on c12 if lua script loads properly 2025-03-24 12:05:49 -04:00
Paul Dino Jones b776e05f66 Fix issue with arduino leds not clearing 2025-03-24 11:44:44 -04:00
Paul Dino Jones 336d240be4 change buffer log to first byte, probably safe to assume there will be atleast 1 byte in the buffer. 2025-03-23 18:10:03 -04:00
Paul Dino Jones 8c764358b7 Fix led lua code so the buffer do not include device specific magic values 2025-03-23 18:05:58 -04:00
Paul Dino Jones 1e6bde9da1 Fix some issues with sound device code 2025-03-22 19:24:15 -04:00
Paul Dino Jones 5dc00eb4ce Add ability to use lua on cammus c12 2025-03-22 19:16:54 -04:00
Paul Dino Jones 367c6fed34 Add Suspension travel effect 2025-03-21 19:45:34 -04:00
Paul Dino Jones 8e577c0f87 Fix issues with config segfaults 2025-03-21 19:44:55 -04:00
Paul Dino Jones 3063d0a668 Add ability to use car proximity for lights 2025-03-21 13:55:56 -04:00
Paul Dino Jones a597f29c1f Add more logging to config loading 2025-03-21 13:55:21 -04:00
Paul Dino Jones bec6433969 Add AMPLIFY modulation 2025-03-15 23:42:15 -04:00
Paul Dino Jones 11bd2f71ef Fix lua cmake dependency. Use specified frequency as base frequency for engine effects 2025-03-11 12:01:24 -04:00
Paul Dino Jones 9c0cadffdf Add support for simhub protocol and custom lua scripts to control leds 2025-02-25 18:41:10 -05:00
Paul Dino Jones d0f4a48c35 Updated to latest simapi for getpid improvements 2025-02-19 15:46:44 -05:00
Paul Dino Jones fdb318bfae Update sketches to use 115200 baud 2025-02-12 15:04:38 -05:00
Paul Dino Jones e7751b4e16 fix improper detecting of usb haptic device 2025-02-01 17:01:50 -05:00
Paul Dino Jones 7a5ca94209 Refactor serial devices so a single open handle is shared throughout 2025-01-25 09:52:38 -05:00
Paul Dino Jones 8bf98fae1e moved some confusing code 2025-01-25 09:51:20 -05:00
Paul Dino Jones 0e47f53f88 improve process of closing sound devices 2025-01-25 09:50:11 -05:00
Paul Dino Jones 414b9708f4 pulling in latest simapi for improvements to pcars2 2025-01-21 17:23:28 -05:00
Paul Dino Jones fc95f044bf Adding max frequency and modulation to sound devices 2025-01-21 17:23:10 -05:00
Paul Dino Jones 10c5d2c597 Fix bug causing no tyre effects 2025-01-20 12:13:49 -05:00
Paul Dino Jones f2ba345cab Update to latest simapi, allow sim strings in configs 2025-01-20 10:53:57 -05:00
Paul Dino Jones d97118e19b updated to latest simapi 2025-01-19 15:16:30 -05:00
Paul Dino Jones d927726f77 Updated to latest simapi for AC EVO support 2025-01-19 09:57:57 -05:00
Paul Dino Jones 3b0d75423f Removed calls to abort 2025-01-18 19:01:52 -05:00