Commit Graph

238 Commits

Author SHA1 Message Date
Andrey 940b04ab24 Let's always have TS structure so that unit tests can check values in outputChannels, kind of making outputChannels a god dump for state but whatever since Live View is coming 2021-12-07 20:18:47 -05:00
Matthew Kennedy caee2a5439
delimeter is not comma (#3533)
* delimeter is not comma

* do it in config txt

* use txt

* s

* string

* compat

* also, spelling is hard

* use new name

* use new name

* generate enough for happy console

* use an even less common character

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-19 12:01:45 +03:00
Scott Smith 69d36dad6e
Final cleanup of ENGINE macros (#3567)
Fix some uses of ENGINE() not detected by regex due to parenthesis.
Remove now empty engine_ptr.h
Don't worry about EFI_* not being defined, the compiler defaults to 0 if they aren't.
2021-11-17 13:45:10 -05:00
Scott Smith 823d9a07e0
Programmatically replace ENGINE() and CONFIG() with engine-> etc (#3565)
git grep -l -w ENGINE | xargs sed -i -r "s/ENGINE\(([]a-zA-Z_0-9.[]+)\)/engine->\1/g"

git grep -l -w CONFIG | xargs sed -i -r "s/([^a-zA-Z_])CONFIG\(([]a-zA-Z_0-9.[]+)\)/\1engineConfiguration->\2/g"
2021-11-17 03:54:21 -05:00
Scott Smith cc95bd6c8e
Programmatically remove EnginePtr/inject, EXPAND_Engine, and WITH_ENGINE_TEST_HELPER* (#3560)
* Programmatically remove EnginePtr/inject, EXPAND_Engine, and WITH_ENGINE_TEST_HELPER*

for i in ": public EnginePtr " ", public EnginePtr" "EXPAND_Engine;" "EXPAND_Engine"; do
    git grep -l "$i" | xargs sed -i "s/$i//g"
done

git grep -l "inject" | xargs sed -i "/inject[(][)]/d"

for i in WITH_ENGINE_TEST_HELPER_SENS WITH_ENGINE_TEST_HELPER_BOARD_CALLBACK WITH_ENGINE_TEST_HELPER; do
    git grep -l "$i" | xargs sed -i "s/$i/EngineTestHelper eth/g"
done

git checkout firmware/controllers/core/engine_ptr.h
git checkout unit_tests/global.h

* Review fixups.
2021-11-16 16:52:11 -05:00
Matthew Kennedy 8cdac4cac0
remove engine pointer passing (#3556)
* some

* more

* more

* the last?!
2021-11-16 04:15:29 -05:00
Matthew Kennedy cb032fb1ea
(void) -> () (#3550)
* static functions with (void)

* more

* Revert "more"

This reverts commit 246e53441f.

* s

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-15 13:02:34 +01:00
Matthew Kennedy 145316c497
less macro, more c++ (#3549)
* less macro

* s
2021-11-15 12:44:40 +01:00
Andrey 3ed50dbea7 SD-card log fields improvement (warning counter & last code) #3162 2021-09-05 14:43:35 -04:00
Andrey f8233b11b5 SD-card log fields improvement (warning counter & last code) #3162 2021-09-05 10:01:04 -04:00
Andrey 8c5dab5bd6 SD-card log fields improvement (warning counter & last code) #3162 2021-09-05 09:16:35 -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 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 09192cfc4d
fast adc callback (#3031)
* fast adc callback

* guard

* missed one

* now cypress will be happy
2021-07-23 14:19:59 -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
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
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 830575a306
lua 5.4 (#2590)
* thread priority

* build

* makefile prep

* call startup

* lua 5.1

* mk

* 5.3

* mk

* I guess lua does something?

* extract hooks, builds for tests

* a bit of error handling

* guard

* bootloader makefile

* remove lua

* submodule

* submodule update

* builds with submodule

* disabled by default

* h7 chconf

* tweaks

* add a useful hook

* move luaconf

* perf trace lua

* test helpers

* lua unit tests

* include to satiate clang
2021-04-28 22:41:25 -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 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 5e2e18d2b9
improve sensor chart flush behavior (#2545)
* disable sensor chart

* type signature, guards

* we can't log the message as that confuses the parser

* dead

* this syntax was technically illegal

* more

* turn it back on

* remove config

* api

* implement

* ui

* java ui
2021-04-12 14:05:52 -04:00
rusefillc f877d32be4 engine sniffer into unit tests 2021-04-04 22:48:48 -04:00
rusefillc cb1f9b4b61 engine sniffer into unit tests 2021-04-04 22:04:59 -04:00
Matthew Kennedy 4e3e95db2d
replace print/printMsg with scheduleMsg (#2497)
* start cleaning

* disabled feature means don't print that it's disabled

* cli

* usages

* printMsg -> scheduleMsg

* this is alllll dead now

* no crlf please

* all hope is lost if you manage to hit this line

* tests

* tests

* ok we did actually need that part

* sim

* d

* kinetis

* it did ifdef, not if

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-26 17:23:26 -04:00
Andrey G 2af32084f4
gpio helper (#2195)
* gpios: isBrainPinValid helper

* LCD HD44780: do not touch pins if DM_NONE or invalid gpio

* Fix isEnabled checks for GPS and Joystick

* LCD HD44780: writePad use this method wider
2021-01-08 20:01:26 -05:00
shadowm60 92247c58db
Logic analyzer ts report (#2080)
* Logic analyzer

progress of integration with debug channels

* Update logic_analyzer.cpp

fixed duty report in %

* Update logic_analyzer.cpp

* Update logic_analyzer.cpp

fix for setting one channel to unused, and use the same pin for another channel. this way we clear out hw pointer and we do not have the risk of reporting wrong values.
2020-12-15 14:52:48 -05:00
rusefillc 96c29840ce basic hw in the loop - pwm self validation #2028 2020-12-07 20:42:47 -05:00
rusefillc aca471273d basic hw in the loop - pwm self validation #2028 2020-12-07 20:26:47 -05:00
rusefillc 6712c63160 basic hw in the loop - pwm self validation #2028 2020-12-07 20:01:05 -05:00
rusefillc 8739e192f5 basic hw in the loop - pwm self validation #2028 2020-12-06 18:39:50 -05:00
Matthew Kennedy f3b7a1d9da
Remove lockAnyContext, replace with CriticalSectionLocker (#1938)
* switch to CriticalSectionLocker

* that's just about all

* clean up last usage

* include hpp for sim

* need the cpp wrappers in the makefile too

* include dir

* include
2020-11-19 06:56:02 -05:00
Matthew Kennedy d992bab241
Move all DECLARE_ENGINE_PTR etc to one place (#1937)
* restructure

* guard c++

* idle too

* status_loop.h
2020-11-11 19:06:04 -05:00
Matthew Kennedy a68cbae0dc
Remove trigger listener list (#1886)
* avoid 64b on hot path

* no tooth log when fast

* use crit section locker

* final

* only flip pins if not also self stim

* only trace if doing work

* slightly drop lateDelay

* trace if not bailing out

* remove listener array
2020-10-17 08:00:11 -04:00
rusefillc 14ddec0336 docs 2020-10-12 09:18:36 -04:00
Matthew Kennedy aad5d987a2
pwm perf (#1858)
* pwm perf

* this trace is now redundant
2020-10-05 08:23:30 -04:00
rusefillc e2ca642f97 60/2 perf grab #1850 2020-10-04 00:15:40 -04:00
Matthew Kennedy 97cb9f45bd
logging simplification: switch bare functions to member functions: try the second (#1794)
* first pass

* first pass

* const means we don't have to check!

* static

* test fixup

* fix sniffer
2020-09-13 11:49:25 +03:00
rusefi 256a4a2637 Revert "logging simplification: switch bare functions to member functions (#1788)"
This reverts commit d941bdc5
2020-09-12 04:36:24 -04:00
Matthew Kennedy d941bdc502
logging simplification: switch bare functions to member functions (#1788)
* first pass

* first pass

* const means we don't have to check!

* static

* test fixup
2020-09-12 03:08:11 +03:00
Matthew Kennedy 1a55085bb6
Software knock detection (#1730)
* s

* science

* set pin mode

* turn stuff off so it fits

* filtering maybe

* filtering actually works

* generate filter parameters internally

* shorter window

* guard behind enable flag

* use checked in filter

* add biquad reset

* tracing

* const

* exec order

* do it from a thread

* smaller buffer, comment

* configure with header

* only for proteus

* oops

* unused

* not needed

* guards

* pin config

* don't need that include

* precook filter steady state

* define sample rate

* config enable switch
2020-08-28 21:13:50 -04:00
rusefi 72290df894 a bit of flexibility 2020-08-26 23:08:48 -04:00
rusefi 1aef47030d :( 2020-08-26 22:59:47 -04:00
rusefi aa2ee8a776 TS SD integration #1653 2020-08-02 17:58:57 -04:00
Matthew Kennedy 978fa20916 Merge remote-tracking branch 'upstream/master' into remove-plain-maf 2020-07-31 14:56:29 -07:00
Matthew Kennedy 132ee12974 cleanup 2020-07-30 21:20:10 -07:00
Matthew Kennedy fc112d2526 dead code 2020-07-29 02:32:48 -07:00
Matthew Kennedy 38d3641c00
trace global lock/unlock (#1582)
* trace global lock/unlock

* bootloader stub

* add to java

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-07-10 23:27:27 -04:00
rusefi 50e01b4041 connecting time units 2020-05-26 01:08:21 -04:00