Commit Graph

421 Commits

Author SHA1 Message Date
Andrey a67a4ced0d docs 2021-10-24 17:05:37 -04:00
rusefillc d4e9c1597a refactoring - extracting idle state 2021-10-16 23:55:29 -04:00
rusefillc 705295dbfb Whatever we call it, how ever we implement it - we need live data / remote view into rusEFI actual state #3353 2021-10-14 00:47:26 -04:00
Matthew Kennedy dab377d15d getOrZero (#3319) 2021-10-05 19:59:07 -04:00
Matthew Kennedy 48da721c49 dead knock code (#3255)
* more unification

* hip stub

* comment

* guard

* channel idx

* include

* hip

* move in to engine

* hip9011

* dead stuff

* dead

* fsio

* lcd

* more dead
2021-09-21 20:40:20 -04:00
rusefillc 29f3e78f05 36/2/2/2 is an ambiguous trigger wheel fix #3242 2021-09-19 17:26:13 -04:00
rusefillc fd61f25693 36/2/2/2 is an ambiguous trigger wheel fix #3242 2021-09-19 17:08:45 -04:00
Matthew Kennedy ae84ec2044 simpler way for limp manager to handle engine stop (#3194)
* simpler

* why would we lie about spinning?
2021-08-25 11:29:20 +03:00
Matthew Kennedy 210aa31ef3 cleanup missing fsio stuff (#3189) 2021-08-24 08:19:03 +03:00
rusefillc 2962b47787 refactoring: reduce magic constant 2021-08-09 16:33:06 -04:00
Matthew Kennedy 8ebb7b8f24 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 f44a84b40c set up precompiled header (#2971)
* ignore

* set up precompiled header

* makefile

* fixes

* cleanup

* only depend cpp on pch

* efifeatures in pch

* f7 efifeatures

* consolidate

* simulator

* proteus build

* error handling is a good one

* bootloader pch

* don't auto include pch

* dirs

* delete on clean

* bootloader cleans

* clean.sh deletes pch

* disable in bl for now

* there was a typo so maybe it'll work now

* remove todo

* don't need that any more

* don't need these parts

* don't need this part

* undo changes

* use a different cpp as example

* s

* Revert "cleanup"

This reverts commit 8de8698490f5d09c2df753f00a89751aa898be9a.

* also unnecessary now

* buh

* comment

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-07-25 21:23:23 -04:00
Andrey 7e83be426b Clutch switch inverted options do not invert detected pedal position
#3044
2021-07-24 19:32:50 -04:00
Andrey 2f2814e035 VVT C++ magic 2021-07-21 22:14:21 -04:00
Andrey f69690a36a kaiju is asking for vq30de trigger wheel decoder #2974 2021-07-17 00:27:56 -04:00
Matthew Kennedy e3849b95d5 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
Andrey a8d5ff0a85 Nissan VVT trigger decoder #2887 2021-07-03 09:48:59 -04:00
Andrey f3ffecbc2b Nissan VVT trigger decoder #2887 2021-07-03 09:43:27 -04:00
Matthew Kennedy fe6f123be5 Move AC logic out of FSIO (#2872)
* new impl

* remove fsio

* inject "is ac active" to fan

* include the correct code

* include

* test

* more AC features

* AC switch vs. actual AC indicators

* include

* duh
2021-06-27 18:51:34 -04:00
Andrey 25afc6e67c refactoring - explicit read method 2021-06-26 22:11:42 -04:00
Andrey 1003056f85 refactoring - explicit read method 2021-06-26 22:07:45 -04:00
Matthew Kennedy 41104dcca8 hard coded fan logic (#2805)
* remove fsio

* hard code impl

* test it

* enable fan with AC

* make commented stuff match
2021-06-11 06:25:12 -04:00
Andrey e4497358f5 Override trigger gaps feature #2734 2021-05-25 17:19:20 -04:00
Andrey 9865b04bf7 Override trigger gaps feature #2734 2021-05-23 20:52:18 -04:00
Matthew Kennedy 68ad12da53 convert a table to scaled_channel (#2724)
* scaled VE table

* use setTable

* efi::clear

* ratio -> struct
2021-05-20 20:00:32 -04:00
rusefillc cd573a5f9d hiding 8888 mess under the rug
making LPS25 one step more available to Hellen
2021-05-14 10:54:40 -04:00
Matthew Kennedy 5f0791f9fb 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 967383dd8e 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
rusefi 3d89cc2093 trigger and VVT duty cycle integration into limp manager #2523 2021-04-07 15:17:01 -04:00
Matthew Kennedy db7856523c barra vvt cam pattern (#2483)
* barra vvt cam pattern

* two tooth sync

* I think this needs to be here too
2021-03-22 07:48:29 -04:00
Matthew Kennedy 5e6746c3aa Implement nonlinear fuel level sender (#2473)
* table function

* config fields

* sensor type

* switch consumers

* init the sensor

* ui

* 1mv resolution

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-19 08:39:08 -04:00
Matthew Kennedy c168c748ea dead code, warnings (#2461) 2021-03-15 10:23:19 -04:00
rusefillc 9f90387d09 vBatt -> SensorType::vBatt fix #2260 2021-03-11 23:07:18 -05:00
rusefillc 98eae45094 vBatt -> SensorType::vBatt #2260 2021-03-11 22:52:34 -05:00
rusefillc 416c65b475 vBatt -> SensorType::vBatt #2260 2021-03-11 22:44:59 -05:00
Matthew Kennedy a7a82b1aab remove lastTriggerToothEventTimeNt (#2430)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-07 17:11:50 -05:00
Matthew Kennedy 122f31fe4a hook up lps25 on proteus (#2418)
* hook up lps25

* it would help to include all the files

* unguard some stuff

* unguard more

* guarding

* s

* guard

* only register if init worked

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-04 22:39:20 -05:00
Matthew Kennedy 55facb6613 use DECLARE_ENGINE_PTR for Engine class (#2365)
* engine cleanup

* do the cleanup

* one last spot

* expand_engine noop for firmware

* simulator
2021-02-16 16:58:54 -05:00
rusefillc 654a739e6b M62T vanos support #2243 2021-02-08 22:21:02 -05:00
rusefillc dc79ee1511 M62T vanos support #2243 2021-02-08 22:07:14 -05:00
rusefillc 8fa1a6530b M62T vanos support #2243 2021-02-08 21:50:31 -05:00
rusefi d39b285834 M62T vanos support #2243 2021-02-08 21:28:57 -05:00
rusefi 2ccb75a064 refactoring: naming consistency 2021-02-08 18:20:53 -05:00
Matthew Kennedy 8d9db6b5c1 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
rusefillc 4bdc41d723 typo 2021-01-31 12:27:26 -05:00
Matthew Kennedy 4e6c841729 boost fixes (#2230)
* fix boost pin reinit

* call boost from periodic slow

* ui

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-01-18 07:04:14 -05:00
Matthew Kennedy 5bfee13c21 fix instant rpm (#2180)
* consumers

* impl

* instant rpm in idle timing
2021-01-14 20:45:55 -05:00
rusefillc 5e1a94ef1e cmd_test_main_relay 2021-01-10 23:46:50 -05:00
Andrey G b61ae75fe2 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
Andrey G 71fe582ce5 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
rusefillc b286ec8a34 fine-grained check modes 2020-12-27 17:41:28 -05:00
Matthew Kennedy 5e7dc71365 move swtiches out of idle (#2148) 2020-12-26 21:31:41 -05:00
Matthew Kennedy b0f7fbf28a create limp manager (#2142)
* move rev limit to limp manager

* call fatal error

* include order

* fix bug

* tests

* comment

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-26 17:30:46 -05:00
rusefillc 2c3666d194 returning AT validation into QC 2020-12-15 15:43:36 -05:00
rusefillc 8e320209f1 MRE issue with tle8888 - GP3 does not work? #2065 2020-12-13 11:29:19 -05:00
shadowm60 45205e7da7 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 9a897007c4 FORD ST170 CAM TRIGGER PATTERN fix #2009 2020-12-03 23:54:08 -05:00
Matthew Kennedy 2792828dce 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 605269c358 remove idle thread; just call from periodicSlowCallback (#1924)
* remove thread

* remove ui
2020-11-11 21:47:19 -05:00
Matthew Kennedy e8bb0cfd00 extract idle hardware to its own file (#1923)
* extract idle hardware

* should fix the build
2020-11-03 18:06:32 -05:00
Matthew Kennedy 5296de1493 use fuel model (#1901)
* use fuel model

* spit'n'polish
2020-10-23 20:25:47 -04:00
Andrey G 88e830d635 Tle8888 big update 1 (#1892)
* smart gpio: fix tle8888 direct pin mapping for MRE

* MRE: use TLE8888 pins instead of MCU gpios that drives TLE8888

* TLE8888: cleanup

* TLE8888: do not reset driver private data on WD/undervoltage reset

* TLE8888: diagnostic updates

* TLE8888 driver: BIG driver rework

* TLE8888: check SPI answers for abnormal states

Reply with other than requested register can be a sign of:
-Power-On-Reset, then OpStat0 will be replyed
-WatchDog reset, then FWDStat1 will be replyed
-Invalid communication frame, then Diag0 will be replyed

Keep tracking last accessed register and check with the next reply.

* TLE8888: debug clean-up

* TLE8888: implement spi array write

This reduce CS inactive state time between two consequent accesses
from 8.8 uS to 1.4 uS

* TLE8888: fix PP outputs in OD mode

* TLE8888: cleanup register definitions

* TLE8888: run separate driver thread for each chip instance

Calculating poll interval for few chips become more complex, avoid
this running thread for each device.

* TLE8888: fix cypress and kinetic compilation

Both platforms define its own MAX and cause redifination error if
common.h is included in driver.

* MRE: update mapping.yaml and fix direct pin mapping for TLE8888

* TLE8888: diagnnostic: disable switch off in case of overcurrent

For all output, use current limiting instead

* TLE8888: check for overvoltage on OUT8..OUT13

* TLE8888: add TODO note about how to recover from failure condition

Currently TLE8888 automaticly recovers only from overcurrent and
(may be) overtemperature conditions.
Short to bat cause output disable (bit in OECONFIG is reset) and
needs driver/host intervention.

* TLE8888: save few bytes of RAM

* TLE8888: Lada Kalina is test mule for IDLE stepper on TLE8888

Don't forget to enable PP mode for TLE8888 outputs 21..24:
uncomment line 1087 in tle8888.c

* TLE8888: reorder code, cleanup

* TLE8888: mode all debug/statisctic to per-chip struct

* TLE8888: rework poll interval calculation

* MRE: use TLE8888 pins instead of MCU gpios that drives TLE8888 #2
2020-10-23 12:25:30 -04:00
rusefi ca89cf9b95 GDI Epic #1448 2020-10-19 22:04:06 -04:00
rusefi 996806d710 QC control mode to crash if RPM = 0 and to mark successful 3 minute test with self-stimulation RPM increase #1871 2020-10-11 22:57:31 -04:00
rusefi 1c84b0dd9f QC control mode to crash if RPM = 0 and to mark successful 3 minute test with self-stimulation RPM increase fix #1871 2020-10-11 22:46:08 -04:00
rusefi 4743718663 QC control mode to crash if RPM = 0 and to mark successful 3 minute test with self-stimulation RPM increase #1871 2020-10-11 19:05:56 -04:00
Matthew Kennedy e112bbd07e remove virtual calls from hot path (#1857)
* const ref-ify

* no virtual 

* even more const

* tests

* fix tests
2020-10-05 16:42:50 -04:00
Matthew Kennedy 060cfbd778 const ref-ify trigger (#1856)
* const ref-ify

* tests
2020-10-05 14:22:59 -04:00
Matthew Kennedy ebc884e8d5 trigger decode cleanup and perf (#1853)
* trigger decode cleanup

* test config ptr patchup

* disable CDM by default
2020-10-04 19:29:26 -04:00
rusefillc c9bdd59220 new VVT trigger shape? #1847 2020-10-03 10:39:43 -04:00
Matthew Kennedy 5f6955e49f move scheduling to its own file (#1842)
* move scheduling to its own file

* header

* protip don't include a cpp file
2020-10-01 17:55:03 -04:00
rusefi a2ec524c29 better QC procedure 2020-09-19 16:07:09 -04:00
rusefi 437d74e479 Hellen says merge #1772 Kinetis needs more help 2020-09-10 22:02:02 -04:00
rusefi 6726e11579 Hellen says merge #1772 progress 2020-09-10 21:26:21 -04:00
rusefi e289977e37 Hellen says merge #1772 main relay progress 2020-09-10 21:11:02 -04:00
rusefi 2bed967b32 Hellen says merge #1772 import idle 2020-09-07 15:08:54 -04:00
rusefi 4bc18ee475 Hellen says merge #1772
Hellen says stepper
2020-09-07 14:41:04 -04:00
Matthew Kennedy fc02c2bdf4 fix broken master, inject engine ptr to rpmcalculator (#1759)
* fix

* oops
2020-09-05 18:49:42 -04:00
rusefi c476cd3b95 refactoring 2020-09-03 19:29:15 -04:00
Matthew Kennedy 0f95d8fd71 fix #1740 the right way (#1741)
* fix

* put that back
2020-08-31 21:05:04 -04:00
rusefi 70dae6eb4c Default Biquad settings broke MRE QC configuration #1740 2020-08-31 13:07:49 -04:00
rusefi 76816602a4 Default Biquad settings broke MRE QC configuration #1740 2020-08-31 12:36:28 -04:00
rusefi 6401b94399 this does not go as planned :( 2020-08-31 07:45:52 -04:00
rusefi 7e304fdca9 HW_CHECK_MODE is not well? 2020-08-31 06:43:47 -04:00
rusefi 77bb2310a7 VVT support for VAG trigger #883 2020-08-27 00:43:23 -04:00
rusefi ed3eaf319c VVT support for VAG trigger #883 2020-08-27 00:06:10 -04:00
rusefi e46681f552 VVT support for VAG trigger #883 2020-08-26 23:35:11 -04:00
rusefi 866374bf29 VVT support for VAG trigger #883 2020-08-26 13:30:55 -04:00
rusefi b64c9bd9d3 VVT support for VAG trigger #883 2020-08-25 13:14:46 -04:00
rusefi 627d20c436 VVT support for VAG trigger #883 2020-08-25 12:45:25 -04:00
rusefi 7d53f5859d VVT support for VAG trigger #883 2020-08-25 00:59:07 -04:00
rusefi 0f9e8bf83e VVT support for VAG trigger #883 2020-08-24 01:21:42 -04:00
Matthew Kennedy 8d1f0dbe90 don't call tach from trigger, call from periodic fast (#1704)
* tacho

* fix tests
2020-08-21 15:36:43 -04:00
rusefi 4bbb5b8762 trigger and VSS hw integrated testing #1668 2020-08-08 11:25:17 -04:00
rusefi fb250c0309 analog temperature inputs validation for quality control 2020-07-27 22:49:59 -04:00
Matthew Kennedy 531f1c63c7 fuel math simplifications (#1485)
* simplify

* fix

* tweak

* cleaning

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-06-17 17:15:04 -04:00
rusefi b27583a2eb better solution 2020-06-05 00:43:05 -04:00
rusefi cbfdd37243 tuneCrc16 - we use it to match logs to tunes 2020-06-04 20:43:52 -04:00
rusefi 0847dc4683 useFSIO6ForRevLimiter 2020-06-01 09:09:55 -04:00
rusefi 804f4b9db5 better file name 2020-05-25 13:02:05 -04:00