Commit Graph

262 Commits

Author SHA1 Message Date
rusefillc 8730782cd3 Refactoring: less confusion macro names around serial/uart/etc in connectivity fix #4999 2023-01-23 05:26:59 -05:00
rusefillc 3aa9ffca60 Refactoring: less confusion macro names around serial/uart/etc in connectivity #4999 2023-01-23 05:09:32 -05:00
rusefillc 886ec74442 antilag and anti-lag #2403
TurboMarian is the ALS boss
2022-12-21 20:12:00 -05:00
rusefillc 1f08781383 Update readme.md 2022-11-19 20:15:21 -05:00
rusefillc 0efe42e07e Update readme.md 2022-11-19 19:34:23 -05:00
rusefillc f08b483a20 Create readme.md 2022-11-19 18:53:43 -05:00
Nathan Schulte 877fa21bd8 fix simulator build (via MinGW) (#4799)
* firmware: kill -9 dead hipLastExecutionCount

* firmware: pin_repository C includes efi_gpio.h

* firmware: controllers: tidy #endif comments

* firmware: primary_pins logic depends EFI_GPIO_HARDWARE

* firmware: only print ADC info if HAL_USE_ADC

* firmware: digital_input: tidy #endif comments

* firmware: digital_input logic depends on e.g. HAL_USE_ADC

* firmware: digital_input logic depends !EFI_SIMULATOR

* firmware: digital_input logic depends e.g. HAL_USE_ADC

* simulator: Makefile includes RUSEFI_LIB_C as CSRC

* Revert "GHA/build-firmware: pin agents to Ubuntu 20.04 (#4793)"

This reverts commit 51e368245b.
2022-11-18 23:43:43 -05:00
Nathan Schulte a4198e2486 simulator: use CC and CPPC for LD (#4794)
this allows to specify a different GCC when building
2022-11-18 21:15:13 -05:00
Nathan Schulte 2d394cceee simulator: compile.sh passes arguments to make 2022-11-18 10:19:54 -05:00
Nathan Schulte 199a892fb5 simulator: tweak case of rusEFI in compile.sh log 2022-11-18 10:09:53 -05:00
Nathan Schulte 814f69cd39 simulator: Makefile uses spaces ...
... tabs are reserved for recipes
2022-11-18 10:09:28 -05:00
Nathan Schulte a0c1b738e6 simulator: add missing stdc++ include to CAN HAL LLD (#4795)
for std::remove -- GCC 12 exposes this issue
2022-11-18 09:27:54 -05:00
rusefillc 359c682896 ingles lo hablas 2022-10-01 06:15:00 -04:00
rusefillc 35bf947f06 insist on setBoardConfigOverrides fix #4614 (#4615)
* insist on setBoardConfigOverrides fix #4614

* insist on setBoardConfigOverrides fix #4614

* insist on setBoardConfigOverrides fix #4614

* insist on setBoardConfigOverrides fix #4614

* insist on setBoardConfigOverrides fix #4614
2022-09-24 07:35:19 -04:00
Matthew Kennedy 91566b86d3 simulator reads/writes configuration (#4605)
* simulator reads/writes configuration

* c_str

* include order
2022-09-23 08:47:50 -04:00
Andrey 31dbf06c84 os_access.h dead? 2022-09-07 16:00:13 -04:00
rusefi 06552b6bee servo is truly not alive 2022-09-06 16:29:12 -04:00
rusefillc 07702cab5d Issue 4115 (#4518)
* efiPrint NaN handling #4115

* fresh chibi

* efiPrint NaN handling #4115
2022-09-01 23:13:23 -04:00
Andrey 1ffa98ba89 a bit of dead code 2022-09-01 11:47:56 -04:00
rusefi 21a1b022e7 efiPrint NaN handling #4115 2022-08-31 20:00:58 -04:00
Matthew Kennedy 5fc7000834 Pt2001 module (#4396)
* pt2001 uses module

* read flag0

* c

* libfirmware

* makefiles

* are unit tests happy?

* bootloader
2022-08-08 08:53:08 -04:00
Matthew Kennedy cd98ad35c2 use libfirmware for a few things (#4351)
* use libfirmware

* unit tests

* crc

* missed one

* bootloader
2022-07-16 02:22:51 -04:00
rusefillc 8d250448e0 Detail on how to set up iDrive or equivalent CAN button control #226
boost lua progress
2022-07-14 12:59:09 -04:00
Matthew Kennedy 68fb838641 Lua hooks for gear detection (#4328)
* implement

* sim has vss

* write a test

* guard
2022-07-07 23:16:56 -04:00
Matthew Kennedy 6267b8621a big delete ICU (#4270)
* big delete

* icu vestiges

* changelog
2022-07-07 15:27:59 -04:00
Matthew Kennedy 2c80b8cf19 implement CAN driver for simulator (#4312)
* stub simulator CAN driver

* comments

* CAN sensor

* maybe implement?

* s

* fix

* tx and rx actually work!?!?!

* check_can_isr

* modify chibios

* Sim has no CAN on Windows (for now?)

* safer init/deinit, enable assertions

* smarter handling of missing CAN device

* better guards

* guards for windows
2022-07-03 08:25:24 -04:00
rusefillc ce1d80ec33 stealing from David 2022-06-26 19:42:08 -04:00
rusefillc 78c520ac06 helping simulator a bit 2022-04-30 13:08:53 -04:00
Matthew Kennedy a2e1a079b8 allow enum_class in rusefi_hw_enums.h (#4104)
* make things c++ friendly

* install various canaries in coal mines

* using is much clearer than typedef

* fixing builds

* lps25

* trigger includes were a mess

* c -> c++ cleanup

* os util

* why did so many include os_util.h?

* fwd declare

* cypress/kinetis

* s

* eg33 happy

* happy sim

* cypress usb

* pch

* cypress

* doesn't need to include all that

* h7
2022-04-25 20:38:16 -04:00
rusefillc 95168053f0 Explicit fw (#3968)
* explicit FW ID

* explicit FW ID

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-02-27 00:49:47 -05:00
Matthew Kennedy 31c0afc79f remove mock adc (#3888)
* remove mock adc

* do these do /anything/?
2022-02-03 20:43:34 -05:00
Matthew Kennedy 57525283ac Remove FSIO, byeeeeeeeee (#3865)
* vestigial config

* replace last functionality

* engine/board configs include

* files that didn't need to include this

* remove FSIO implementation

* stragglers

* random little bits

* s

* s

* ConfigDefinition

* jar

* s
2022-02-02 02:03:31 -05:00
Matthew Kennedy 95541ce8cf make the simulator smaller (#3869)
* small sim

* o2 is ok
2022-02-01 16:19:46 -05:00
rusefillc 0335802d7e mk files refactoring
saving build
2022-01-06 22:19:00 -05:00
rusefillc d447e34344 mk files refactoring 2022-01-06 21:48:48 -05:00
rusefillc 47f0423b73 mk files refactoring 2022-01-06 20:32:39 -05:00
rusefillc 1955c5a3c2 mk files refactoring 2022-01-06 20:06:31 -05:00
rusefillc 433ff5c62e Live Data progress 2022-01-06 19:02:35 -05:00
Scott Smith 43e4e09d70 Update the simulator TS port macros to match the rest of the product. (#3600) 2021-11-23 19:15:09 -05:00
Matthew Kennedy e7417ef0c0 simulator writes binary log (#3598)
* simulator writes log

* replace the file

* check that the sim actually fails

* put it back

* did the sim really not fail?

* good, asan does catch it
2021-11-23 11:42:45 -05:00
Matthew Kennedy 9bd8a19564 oh my god we've had no asserts (#3595) 2021-11-22 17:52:03 -05:00
Matthew Kennedy 569415930c detect more overflows with asan (#3582)
* overflow detector

* type list dynamic allocate

* fix the buffer length

* comment

* pr fb

* sanitize sim

* fix sim sanitizer bug

* didn't mean to turn off optimization for sim

* asan can do that, if you turn it on!

* cleaning
2021-11-20 01:38:39 -05:00
Scott Smith 07d30285fc Basic framework for high pressure fuel pump control (#3476)
* Basic framework for high pressure fuel pump control

* Many changes

Move calculations to fast callback
Move main object into Engine
Respond to pin changes without requiring a reboot

* Use EngineModule for HpfpController
Schedule pin off after executing pin on so we are sure it ends, even if the motor stops.
Test scheduling.
Less RAM use by only having one event and reordering fields.

* Make scheduling test actually useful - need non-0 activation angle.

Co-authored-by: rusefillc <48498823+rusefillc@users.noreply.github.com>
2021-11-19 23:06:51 -05:00
Matthew Kennedy e7956a53f6 fuel pump doesn't use fsio (#3576)
* fuel pump

* s

* call correct callback

* more dead

* test adjustment

* don't overflow

* don't need separate function

* java

* give it a name

* generated

* generated

* add to generate script

* import *

* this is so cheap we don't need a flag
2021-11-19 22:23:12 -05:00
Matthew Kennedy a79b0c424c turn on c++ 20 (#3579)
* set flags

* emit initializers

* jar
2021-11-19 22:19:34 -05:00
Matthew Kennedy 26502351f1 simulator gets a heap (#3563) 2021-11-17 10:00:12 +03:00
rusefillc 4807c0bf87 helping launch enter simulator 2021-11-16 16:34:23 -05:00
Matthew Kennedy 7296593448 remove engine pointer passing (#3556)
* some

* more

* more

* the last?!
2021-11-16 04:15:29 -05:00
Scott Smith 7367aa5b8a Compile each project's PCH to a separate file to reduce developer friction. (#3505)
Having to remove the precompiled header when switching from firmware to simulator to unit_tests and
back again is annoying.  Use a directory to store the precompiled header output.  Turn off
precompiled header warnings as GCC still complains even if it finds a valid one eventually.
2021-11-08 15:52:58 -05:00
Scott Smith 2752c39d7f Change getTimeNowNt to be lock free. (#3502)
Track the top two bits of the 32-bit time field, along with the bits that comprise the top half of
the 64-bit time field.  We can detect when the 32-bit field is advancing or falling back from the
global time counter as long as the change is less than about 1 billion ticks.  This shows up as
either 01 or 11 in the top 2 bits of the 32-bit time field relative to the 64-bit field.  Or is
there is no change it shows up as 00.  Changes of 2 billion or more cannot be discerned as +2
billion and -2 billion both show up as 10.

Change the simulator to use this logic to make sure it gets some exercise.
2021-11-08 08:24:20 -05:00