Commit Graph

755 Commits

Author SHA1 Message Date
rusefillc 410e449a22 https://rusefi.com/forum/viewtopic.php?p=42108#p42108
VVT table validation only if camInput defined
2021-09-09 14:11:48 -04:00
rusefillc 22a0b88872 my first Lua 2021-09-01 07:47:50 -04:00
rusefillc 22158cbc4a Revert "partial rollback was requested to revive HW CI"
This reverts commit 6834d0dd
2021-08-27 12:42:53 -04:00
rusefillc 6834d0dd65 partial rollback was requested to revive HW CI 2021-08-26 17:04:27 -04:00
Matthew Kennedy 52a24ee773
memory savings (#3195)
* d

* dead code

* all your ram are belong to me

* turn off gpiochips we don't need

* save

* save by using the same file handle

* smaller stack ok

* these can be on the stack

* this is closer

* what about ccm?

* probing available

* now probe ccm

* ccm

* put stuff in ccm

* fsio

* memory usage

* memory
2021-08-26 23:05:31 +03:00
Andrey 4652c478aa zero dwell warning at zero RPM #3153 2021-08-16 07:21:07 -04:00
rusefillc 6d3b2c5b00 zero dwell warning at zero RPM #3153 2021-08-16 07:00:17 -04:00
Matthew Kennedy 25414ebdad
yet more pch (#3068)
* big pch energy

* put back ramdisk stub

* tests are happy

* h743 nucleo

* kinetis

* I love deleting code!

* make stepper happy

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-08-03 22:05:01 -04:00
Matthew Kennedy 5373594bb7
discrete VR threshold control (#3061)
* vr pwm

* rename

* scaling and ui

* hellen pin

* s

* math

* ooh, pch

* happy test

* not magic
2021-07-28 07:44:44 -04:00
Matthew Kennedy b52d50bbf2
Use pch in lots of files (#3066)
* most engine.h

* most engine_configuration

* more

* more

* more

* more

* more

* moooooore

* ok I'm done for now

* oops
2021-07-26 01:05:17 -04:00
Matthew Kennedy 2368e90ae7
dead (#3016) 2021-07-23 08:31:23 -04:00
Matthew Kennedy 2ce7777865
don't require EXTERN_ENGINE in every file (#2969)
* move enginePins

* no more extern engine

* uses

* more

* extern config too

* put this where it belongs

* include correct header

* merge
2021-07-16 18:13:33 -04:00
rusefi 173d98337c each byte counts 2021-07-14 13:15:15 -04:00
Matthew Kennedy 64177cf899
put names in flash (#2939)
* put names in flash

* probing freed ram

* this one too

* probing memory

* more like that much
2021-07-09 17:05:16 -04:00
Andrey b9c5583477 RX8 wants all the RAM 2021-07-09 15:51:16 -04:00
Matthew Kennedy 86683afca2
trailing spark scheduling (#2932)
* enable bit

* implement trailing sparks

* test trailing spark

* it helps to call the correct function

* add pins

* gobblin ram
2021-07-09 08:37:46 -04:00
Matthew Kennedy 5e08907590
knock sensing peak detect (#2910)
* knock peak detect

* comments

* comment

* initialize

* test

* fix warnings while we're here

* those are functions, not values

* ram
2021-07-06 21:44:59 -04:00
Matthew Kennedy 43e6cef77d
more graceful chibios assertion failure (#2859)
* no custom assert hook

* dead

* setjmp/longjmp

* always call tid hook

* tests get threadid

* simulator threadid

* kick

* stubs for kinetis

* make it happier

* noreturn

* oops

* comments

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-07-05 18:18:58 -04:00
Matthew Kennedy 5cb659a7b0
lua pwm hooks (#2687)
* pwm hook

* dedicated pins

* write hook

* UI

* more info

* zero based, clamp

* memory

* don't compile lua in bootloader at all
2021-05-20 19:01:17 -04:00
Matthew Kennedy 20cef63d32
Lua on f407, try again (#2725)
* lua on f4

* move perf trace to efifeatures

* check that it's defined

* cypress and kinetis

* it would help to define the correct thing

* disable buffer if not used

* we can work with 2k

* turn off ramdisk on mre qc

* wow strncpy is useless for truncated strings

* turn off for bootloader

* lto bootloader

* memory

* memory
2021-05-20 23:05:18 +03:00
Matthew Kennedy 6a060e5cae
remove intermediate buffer (#2668)
* remove define

* goodbye intermediate logging buffer

* free ram! woo!
2021-05-10 08:01:24 -04:00
Matthew Kennedy 4474f9f1c2
Maf in sensor model (#2672)
* init

* consumers

* hasMafSensor

* consumers

* remove

* remove

* s

* guard

* tiny bit of ram

* ram
2021-05-09 20:59:06 -04:00
rusefillc 540bb8e327 Revert "lua on f407 (#2646)"
This reverts commit e8855263
2021-05-09 18:25:50 -04:00
Matthew Kennedy e885526308
lua on f407 (#2646)
* lua on f4

* move perf trace to efifeatures

* check that it's defined

* cypress and kinetis

* it would help to define the correct thing

* disable buffer if not used

* we can work with 2k

* turn off ramdisk on mre qc

* wow strncpy is useless for truncated strings

* turn off for bootloader

* lto bootloader
2021-05-09 16:25:38 -04:00
Matthew Kennedy ca7308e910
move some stuff in to ccm (#2645)
* stuff in ccm

* used memory
2021-05-07 09:35:57 -04:00
Matthew Kennedy 461903f7e4
pack scheduling_s (#2642)
* pack scheduling_s

* ramz
2021-05-07 08:22:35 -04:00
Matthew Kennedy c26987b96b
Destroy all shared logger (#2574)
* most of shared logger

* a few more

* one more

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-21 14:28:48 -04:00
Matthew Kennedy ad71016862
rip the bandaid: find-replace most of scheduleMsg (#2572)
* biiiig find replace

* more trivial find replace

* pwm

* almost all of them

* few more

* gpio

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-21 12:53:13 -04:00
Matthew Kennedy bd1c84fa62
Logging remove 3 (#2568)
* ts logger

* sensors

* wideband too

* missed one

* init

* motors, pid, etc

* vvt

* more

* idle

* missed one

* dynoview

* launch

* can

* console IO

* s

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-20 14:09:41 -04:00
Matthew Kennedy bbb6b6dd14
remove simple cases of LoggingWithStorage (#2569)
* remove simple cases

* more simple

* serial

* s

* more

* try memory

* easy

* mmc acc

* that's how much memory

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-19 08:11:59 -04:00
Matthew Kennedy 5145ee4b62
logging cleanup 2: sensors, pid, etb, etc (#2567)
* ts logger

* sensors

* wideband too

* missed one

* init

* motors, pid, etc

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-18 20:02:32 -04:00
Matthew Kennedy 6b64db7f9c
rewrite text logging system (#2439)
* minor cleanup

* enable mailboxes

* priority

* implement new logger

* more cleaning

* signature

* remove debug

* put the assertion back in

* remove debugging

* spelling

* doy

* tweaks & comments

* cleaning

* size_t

* guard more

* test build now

* needs more ram until we can remove LogginWithSTorage

* hunt for memory

* bootloader

* unused

* stub simulator

* it would help to get the signature right

* geez kinetis only has 64k ram

* more guarding because kinetis

* that's now very legal and very cool

* templatify

* s

* force null terminate

* probably fix

* const

* write a test

* disable sensor chart for now

* hide SC ui

* oh nope that breaks many things

This reverts commit c3c1bb324fb484c3d9cc44b7715c234bc0392e1e.

* missed one

* reset after scheduleLogging

* we can't print out the full message because it contains commas which break parsing

* force terminate long buffers

* let's see how much memory we have to play with

* a lot, is the answer

* real thread name

* shrink this for now before its deleted

* turn that back on

* biiig comment

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-18 18:46:47 -04:00
Matthew Kennedy b110e01638
constexpr-ify log field list (#2548)
* constexprify

* reclaim ram

* more constexpr

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-13 20:16:18 -04:00
Matthew Kennedy eb9cc1a08e
multiple mass storage (#2535)
* driver

* plumbing

* guard adjust

* read correct lun

* de-template

* rearrange

* guard

* guard

* memory

* headers

* memory

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-10 08:35:41 -04:00
Andrey G 89b631a794
Hip9011 and cleanups (#2477)
* hip9011: move hipCs out of EnginePins to hip9011 driver

* hip9011: cleanup debug output, save few RAM bytes

* Supress few signed vs unsigned warnings
2021-03-20 08:40:36 -04:00
Matthew Kennedy 1dd2180f76
VVT uses closed loop controller framework (#2453)
* vvt uses framework

* builds

* rename, update headers

* s

* testable

* write some basic tests

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-14 19:31:46 -04:00
Matthew Kennedy 06e32d937a
avoid various "no connect" scenarios (#2432)
* init mmc and USB earlier

* connect USB faster
2021-03-07 20:21:42 -05:00
rusefillc 6385859cc8 M62T vanos support #2243
need a bit of RAM
2021-02-10 13:31:39 -05:00
rusefi 6f065274e4 aux pid is now VVT 2021-02-10 12:41:38 -05:00
rusefillc b04aa8bb91 M62T vanos support #2243
RAM everything takes a bit of RAM
2021-02-09 00:29:04 -05:00
rusefillc 767183b369 M62T vanos support #2243
RAM everything takes a bit of RAM
2021-02-09 00:08:00 -05:00
rusefi 6793b5d8fc M62T vanos support #2243 2021-02-08 20:38:38 -05:00
Matthew Kennedy 5ceeac93e9
put vbatt in sensor model (#2261)
* vbatt in sensor model

* sensor name

* vbatt

* s

* oy vei

* a little bit of cleanup

* memory apparently

* cj125 test

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-03 07:55:40 -06:00
Matthew Kennedy 0e70d08a22
Add fallback map table (#2248)
* table

* sd math

* config

* debug channel name

* ptr vs not ptr

* actually use return value

* memory

* less magic
2021-01-31 17:19:06 -05:00
rusefillc e219638f60 M62T vanos support #2243 2021-01-26 21:43:23 -05:00
Matthew Kennedy 021dc9d185
fix (#2209) 2021-01-09 16:51:24 -05:00
Andrey G b92e3086d0
Adc isAdcChannelValid helper (#2188)
* Guard define argument

* ADC: isAdcChannelValid

Check for both <= EFI_ADC_NONE and >= EFI_ADC_LAST_CHANNEL
Also check for value out of enum range (corrupted settings)

* Fix unit tests
2021-01-05 16:02:20 -05:00
Matthew Kennedy a08e79789d
second lambda (x-series CAN only, for now) (#2048)
* add sensor

* second sensor

* switch sensor name

* gobblin up your memory

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-09 20:26:23 -05:00
shadowm60 864bd7fa73
Dyno view proposal (#1999)
* DynoView creation

module implementation and unit_tests

* update acc algo

we only calcualte new acceleration value if speed has changed, not on every callback.

* added acceleration ts_channel

* fixed broken unit tests

* fixed accel sign

* review updates

* Update test_dynoview.cpp

fix unit_tests

* Update engine_controller.cpp

Fix .ram4 unused size

* Update test_dynoview.cpp
2020-12-04 20:28:48 -05:00
rusefillc dd902cc707 hemi trigger decoder took some RAM 2020-12-04 18:46:35 -05:00
rusefillc d8264cf2ce hemi trigger decoder took some RAM 2020-12-04 18:22:59 -05:00
rusefillc 7f688f7616 Starter seems to be engaged forever #1965 2020-11-18 20:53:03 -05:00
rusefillc 07e25ccf3c https://rusefi.com/forum/viewtopic.php?p=38367#p38367
idle position/waste gate position sensor usability
2020-11-14 18:05:27 -05:00
Matthew Kennedy 0e3673e78c
remove idle thread; just call from periodicSlowCallback (#1924)
* remove thread

* remove ui
2020-11-11 21:47:19 -05:00
rusefillc 2ae7ac8ced tle8888 drivers wants RAM as well 2020-11-10 18:26:46 -05:00
rusefillc 3625bcb7ae more more more RAM 2020-11-10 13:07:55 -05:00
rusefillc df4fa1f424 GDI Epic #1448 2020-11-09 22:53:46 -05:00
rusefillc 896a55d78e GDI Epic #1448 2020-11-09 22:53:23 -05:00
rusefillc 414ebbc46d GDI Epic #1448 2020-11-09 22:49:06 -05:00
rusefillc b13bc55e4a RAM, ram, ram... 2020-11-09 21:25:44 -05:00
rusefillc 7bfa18295a Proteus TCU gear shift configuration #1927 2020-11-06 23:48:35 -05:00
rusefillc eae48cdda6 GDI Epic #1448 2020-11-05 16:42:56 -05:00
rusefi 7de1fc8e2a Output pin init/deinit needs a linked list #1803
trying to make things more consistent & smarter
2020-11-03 00:46:03 -05:00
Matthew Kennedy 4e249889a6
implement fuel pressure sensors (#1897)
* add

* remove old

* remove more old

* makefile

* fix init

* patch up other stuff

* actually fix it this time

* raw output channels

* gauges, UI

* scaled channel

* fix field ordering
2020-10-23 07:31:47 -04:00
rusefillc 665900d76a GDI Epic #1448 2020-10-17 14:53:56 -04:00
Matthew Kennedy a8057cfc16
write SD header using new Writer class (#1882)
* write header

* hooray, free memory!

* fix test

* is there really this much free space...?

* no, there is not
2020-10-15 16:00:13 -04:00
Matthew Kennedy 2083b34cf9
simplify getTimeNowNt() (#1876)
* remove old impl

* add cpp wrapper to os_access

* clean up os_access

* remove touchTimeCounter

* new impl

* put comment about lock free impl

* include cpp wrappers for BL

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-10-15 08:57:13 -04:00
Matthew Kennedy 2855e04234
start using BufferedWriter (#1878)
* do the part up to actual usage

* borrow some memory for now
2020-10-14 20:06:05 -04:00
rusefillc a71528a458 SD card logs not valid for REO #1864 2020-10-08 20:35:32 -04:00
rusefillc 6b95579706 60/2 perf grab #1850 2020-10-04 01:26:29 -04:00
Matthew Kennedy 16bfd39bac
Remove dead & useless config (#1834)
* remove dead config

* remove enum
2020-09-29 06:34:39 -04:00
rusefi cf7c946c51 Output pin init/deinit needs a linked list #1803 2020-09-27 07:37:43 -04:00
rusefi ab41bccd21 helping CI 2020-09-22 04:57:07 -04:00
shadowm60 a70e24bf6c
Mre sw knock detection (#1815)
* Add SW knock control to MRE on AT4

* Update software_knock.cpp

cleanup

* use knock only for final build

* adjust RAM

* Update engine_controller.cpp

Adjust RAM for HW QC special to build
2020-09-22 03:48:17 -04:00
Matthew Kennedy 1fc55da3ca
two throttles one thread (#1806)
* two throttles one thread

* look at all this RAM!
2020-09-18 13:47:49 -04:00
David Holdeman 337106cd24
DebounceButton A/C switch (#1782)
* change acSwitch name, add mode

* fix

* remove some adc stuff

* remove some adc stuff

* semicolon stupid

* left behind

* add readpinstate

* wrong var name

* add functions back

* fix name

* bool, not void, plus fix name

* move

* not sure what I broke

* try setMockValue

* namespace

* whoops missed one

* switch values because adc was set up for pullup

* try 5

* comment for now

* comment for now

* uncomment tests, add function to mock, add mock to efiReadPin

* fixes

* for F's sake

* if

* add defy

* pass params

* use ASSERT_TRUE/FALSE

* advance time

* remove ifdef from readPin

* try moving if

* move to separate func

* move extern

* move include

* try engine_test_helper

* am confuse

* move func to else

* include hal

* add efi prod check

* remove include

* try extern

* move include

* semicolon stupid

* move extern again

* include

* move mockPinStates

* size

* add if

* add comment

* clean on instantiation
2020-09-10 22:16:20 -04:00
David Holdeman f5d9263ad1
switch start/stop to ButtonDebounce (#1777) 2020-09-09 08:22:15 +01:00
Andrey G 2312b0ae57
Adc improvements (#1765)
* ADC: move DMA buffer outside of AdcDevice (save few bytes)

* ADC: inlcude fast channels to debug output

* ADC: save some CPU ticks (disabled until fully tested)

* ADC: simplify
2020-09-08 17:20:55 -04:00
rusefi 141cad585c do we need RAM?! 2020-09-07 00:23:18 -04:00
rusefi 7d0c8b4870 microRusEFI used as Body Control Module BCM BCU
got stack too low warning with DBG_CAN
2020-09-06 21:45:17 -04:00
Matthew Kennedy 95798a5246
fix broken master, inject engine ptr to rpmcalculator (#1759)
* fix

* oops
2020-09-05 18:49:42 -04:00
rusefi 82f52bf065 helping build 2020-09-02 21:19:10 -04:00
David Holdeman b8838de309
[TCU] Button Shifting (#1750)
* add buttonshift files

* buttonshift includes, targets, and init
2020-09-02 20:17:58 -04:00
David Holdeman 499a430347
[TCU] GearController and TransmissionController base classes (#1749)
* add tcu ts outputs

* accidental change?

* add tcu base classes

* rearrange

* accidental change?

* add files

* missing backslash

* undo accidental change

* buttonshift includes, targets, and init

* Revert "buttonshift includes, targets, and init"

This reverts commit 1b0630511e1948f3d330d74be5bff6c087f118fb.

* use unused bit

* add return documentation

Co-authored-by: rusefillc <48498823+rusefillc@users.noreply.github.com>
2020-09-02 15:39:50 -04:00
Matthew Kennedy 5fec6d0c04
move lambda in to sensor model (#1736)
* lambda sens

* fix init

* fix

* a test for good measure

* he's climbin in your windows, snatchin you ram up

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-09-01 16:22:31 -04:00
rusefi 77ddb49d91 price of lazy progress 2020-08-31 21:30:47 -04:00
rusefi f4f6750308 price of lazy progress 2020-08-31 21:09:51 -04:00
rusefi 3101475769 one of F7 builds reports error? 2020-08-26 23:22:10 -04:00
rusefi 58226c06e5 ? :( 2020-08-26 22:37:15 -04:00
rusefi 7980e68d02 ? 2020-08-26 22:03:07 -04:00
rusefi 39e69ea572 one of F7 builds reports error? 2020-08-26 21:53:12 -04:00
rusefi fa11b969ad docs 2020-08-26 20:49:21 -04:00
rusefi 245b378ac1 progress 2020-08-23 17:21:08 -04:00
rusefi 2e98575751 better TPS naming 2020-08-22 08:06:04 -04:00
rusefi 57e4c071d1 better messages 2020-08-21 19:13:03 -04:00
rusefi add49b0a5c bugfix - PPS second channel was not initialized 2020-08-19 00:46:57 -04:00
rusefi 20ec569e46 TS SD integration #1653 2020-08-07 17:24:02 -04:00
rusefi dc623ba7f0 do we have this RAM? 2020-08-02 17:21:07 -04:00
rusefi e09b9eee3a auxTempSensor text output 2020-07-27 20:23:57 -04:00
Matthew Kennedy a1d39b8de6 more spots 2020-07-20 00:55:45 -07:00