Commit Graph

557 Commits

Author SHA1 Message Date
Andrey e1c41ff798 FATAL on NB2 tune jim stim input signal #2965 2021-07-14 16:03:00 -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
Matthew Kennedy 7a21f7fbc0
inject (#2938) 2021-07-09 17:02:25 -04:00
Matthew Kennedy e00c7d0b98
trailing coils (#2937)
* gpio wiring

* plumbing
2021-07-09 15:51:30 -04:00
Andrey 02d002f081 random progress 2021-07-09 14:43:58 -04:00
rusefillc 70fd233740 random progress 2021-07-09 14:27:10 -04:00
Andrey b8857f5ba8 trailing spark outputs #2931 2021-07-09 10:14:00 -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 2eb0b2a631
Unified cyl count macro (#2914)
* update test framework

* eh

* hey look it's fewer warnings

* unwind

* fix

* config

* configs

* logic

* even java had some

* console needs help
2021-07-06 20:14:08 -04:00
Matthew Kennedy 1bca4843fe
test dc_motor.cpp (#2890)
* use ipwm where possible

* mock ipwm

* initialize

* test
2021-07-01 09:21:18 -04:00
Matthew Kennedy cd055a687d
dc motor api (#2869)
* iwpm

* dc motor has configure

* consume

* format

* spelling
2021-06-26 21:42:40 -04:00
rusefillc 6605935015 unit_tests: mapAveragingTriggerCallback causes segmentation fault #2858 2021-06-25 10:21:31 -04:00
Matthew Kennedy 7eb3b9890d
misc threading/safety improvements (#2854)
* allow termination of thread controller

* no gpio if fatal

* stub for test
2021-06-24 20:18:23 -04:00
Matthew Kennedy 097bf85faf
dual fans (#2806)
* remove fsio

* hard code impl

* test it

* enable fan with AC

* make commented stuff match

* second fan config

* second fan ui

* defaults

* impl
2021-06-13 08:06:45 -04:00
David Holdeman 6d4060d824
Doxygen titles (#2728)
* move addRow call

* undo submo bump

* add header titles
2021-05-22 22:10:58 +03:00
Matthew Kennedy 5a5f25244a
make the simulator usable (#2717)
* these start themselves now

* dead

* configure ports

* start serial

* dead

* minimal pins

* simulator logging works

* why not enable lua

* speeeeeed

* start lua

* spammy print
2021-05-17 12:44:02 +03:00
Andrey 4f63d2b476 More low-level firmware coverage for the simulator/unit-tests #2656 2021-05-15 05:27:33 -04:00
Matthew Kennedy 8b30776016
remove stateChangeCallback from simplepwm (#2644)
* remove callback parameter from cj125

* remove from ext

* remove stateChangeCallback

* alt doesn't need that

* demorgan

* remove call

* bad cut/paste

* check the actual pin in the test
2021-05-07 09:38:41 -04:00
Matthew Kennedy 461903f7e4
pack scheduling_s (#2642)
* pack scheduling_s

* ramz
2021-05-07 08:22:35 -04:00
rusefillc f7d1f2dfac code style 2021-05-06 10:43:42 -04:00
rusefillc 02d4cde3c4 https://rusefi.com/forum/viewtopic.php?f=16&t=1996 2021-04-25 09:18: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
rusefillc 41804736e2 engine sniffer into unit tests 2021-04-04 22:41:38 -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
rusefillc 8584256677 trying to fix AuxValves 2021-02-17 08:57:18 -05:00
Andrey G 3166076839
Some fixes prior to board pull request (#2291)
* ChibiOS: add support for STM32F765

This chip is used on Subaru EG33 p'n'p RusEFI board from Dron_Gus

* drivers: gpio: mc33810: commulative update

- use BIT macro
- fix wake-up method
- fix order of arguments in _add function

* port: stm32f4/7: detectCanDevice check for enabled interfaces only

* ADC: fix internal array size

internalAdcIndexByHardwareIndex should be EFI_ADC_LAST_CHANNEL size
couse adc_channel_e is used as index

* status LEDs: support status LEDs that driven by low level
2021-02-06 12:22:57 -05:00
rusefillc 4bb9762e2e extracting runtime state from trigger central 2021-01-31 22:41:17 -05: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
rusefillc a3173e68d9 typo 2021-01-04 21:20:40 -05:00
rusefillc bbf161752e TCU usability #2118 2020-12-22 14:03:54 -05:00
rusefillc af9bb07eba dead code 2020-12-22 07:10:09 -05:00
Matthew Kennedy 6168bcea80
Fix gpio reinit race condition (#2098)
* fix unregister api for gpio

* consumers

* guard with a critical section

* index

* guard less

* unregister under lock

* fix reinit

* dead flag

* fix most tests

* initialize properly

* initialize properly

* assertions in tests

* fix message

* we must lock earlier to be truly safe

* this was using huge memory

* devirtualize
2020-12-18 17:18:12 -05:00
Matthew Kennedy 7277b04039
force a pwm cycle start (skip cycles) if late (#2097)
* skip cycles if late

* fail at lower count

* start at -1
2020-12-18 08:21:18 -05:00
rusefillc ca79f99be5 More explicit handling of CPU exhaustion #2093 2020-12-17 22:21:12 -05:00
rusefillc 99392d7951 More explicit handling of CPU exhaustion #2093 2020-12-17 21:15:28 -05:00
rusefillc ca0f3ba240 HW CI is flaky :( #2063
more detailed error messages
2020-12-17 20:22:04 -05:00
rusefi 2f690ca6b2 nicer "pins" names 2020-12-17 17:00:00 -05:00
Matthew Kennedy a159ecbf0a
reduce GPIO complexity (#2051) 2020-12-10 19:18:14 -05:00
Matthew Kennedy f2426677db
start fuel pump as soon as trigger events happen (#2038)
* switch pump fsio logic

* value collision

* fuel pump in tests

* mock time since trigger

* test fp

* init pin in test

* fix gpio outputs in tests

* comment

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-10 01:23:24 -05:00
rusefillc e226024a5c MRE pin reuse state validation fails #2006 2020-12-03 15:42:48 -05:00
rusefillc ba33a758e8 avoid float -> int64 conversion #1977
both cases have to be relatively small durations of time cherry picking...
2020-12-03 13:30:17 -05:00
Matthew Kennedy a3a49b02ed
fix gpio the right way (#1990)
* fix the right way

* use the api

* explain

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-11-27 00:24:41 -05:00
rusefillc 641959b9a3 Starter is engaged on start-up in pull-up configuration #1969 2020-11-26 17:48:09 -05:00
rusefillc 24c9e54cde Starter is engaged on start-up in pull-up configuration #1969 2020-11-26 16:20:13 -05:00
rusefi 1238758c0f Starter is engaged on start-up in pull-up configuration #1969 2020-11-26 00:16:59 -05:00
rusefi 63900429a6 Starter is engaged on start-up in pull-up configuration #1969 2020-11-25 23:59:11 -05:00
rusefi b189d85228 Starter is engaged on start-up in pull-up configuration #1969 2020-11-25 23:38:43 -05:00
rusefillc 3878cbb550 Starter is engaged on start-up in pull-up configuration #1969
maintainability
2020-11-19 23:57:06 -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
rusefillc 47fbb92bff Starter seems to be engaged forever fix #1965 2020-11-18 23:54:30 -05:00
rusefillc a9e0bffbbd Starter seems to be engaged forever #1965 2020-11-18 22:47:40 -05:00
rusefillc 53f6f1e661 Starter seems to be engaged forever #1965 2020-11-18 22:42:41 -05:00
Matthew Kennedy 6e4517be8c
adjust microsecond_timer api (#1952)
* change timer api

* don't need all that
2020-11-16 18:50:13 -05:00
rusefillc 77b70f47f7 GDI Epic #1448 2020-11-09 21:41:13 -05:00
rusefillc 9aff6e3103 Output pin init/deinit needs a linked list #1803 2020-11-09 21:10:48 -05:00
rusefillc b2ad14fa63 docs 2020-11-09 19:47:10 -05:00
rusefi 73b18b4a01 Output pin init/deinit needs a linked list #1803 2020-11-06 15:45:15 -05:00
rusefillc cbb00a1a85 Output pin init/deinit needs a linked list #1803 2020-11-05 18:42:45 -05:00
rusefillc 8e8b5256c8 Output pin init/deinit needs a linked list #1803 2020-11-05 17:52:30 -05:00
rusefillc edb016a76e Output pin init/deinit needs a linked list #1803 2020-11-05 17:23:09 -05:00
rusefi a51b68bbed GDI Epic #1448 2020-11-03 13:19:56 -05:00
rusefillc a7c97b3508 Output pin init/deinit needs a linked list #1803 2020-11-03 12:28:13 -05:00
rusefillc 256650aa88 Output pin init/deinit needs a linked list #1803 2020-11-03 11:31:40 -05:00
rusefillc c0ac1649e2 Output pin init/deinit needs a linked list #1803 2020-11-03 11:01:43 -05:00
rusefillc 3d7a6c6729 Output pin init/deinit needs a linked list #1803 2020-11-03 10:51:54 -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
rusefi e5ad8eb5c0 Output pin init/deinit needs a linked list #1803 2020-11-03 00:21:39 -05:00
rusefi 2c322006d8 Output pin init/deinit needs a linked list #1803 2020-11-03 00:09:42 -05:00
rusefi 13b4b02873 typo 2020-11-02 23:52:26 -05:00
rusefi 0f5f0a549b this stuff is just too dead 2020-11-02 23:46:41 -05:00
Matthew Kennedy 7eeb60a8a0
trigger/scheduler perf improvements (#1885)
* 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
2020-10-16 11:04:27 -04:00
Matthew Kennedy 605e2590f1
buffered writer - progress on #1463 (#1875)
* add buffered writer

* rename
2020-10-12 15:10:34 -04:00
Matthew Kennedy 018db0df94
Fix #1873 - compute dynamic PWM iterationLimit (#1874)
* fix

* remove define

* add an assert

* typo

* don't do a 64bit divide

* oh that's a float
2020-10-11 20:25:38 -04:00
Matthew Kennedy c885db32f0
use expected for event queue next event (#1859)
* use expected for event queue next event

* minor cleanup

* tests
2020-10-05 13:53:34 -04:00
Matthew Kennedy dd6b02d555
we don't need two loops (#1855) 2020-10-05 08:57:00 -04:00
Matthew Kennedy aad5d987a2
pwm perf (#1858)
* pwm perf

* this trace is now redundant
2020-10-05 08:23:30 -04:00
rusefillc a9d669ba83 HW CI has failed 11 times since Oct 2 #1849 2020-10-03 20:53:23 -04:00
rusefillc dd7dd3b8eb HW CI has failed 11 times since Oct 2 #1849 2020-10-03 20:25:37 -04:00
Matthew Kennedy c8b4fac456
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 eae7995782 Output pin init/deinit needs a linked list #1803 2020-09-27 07:48:38 -04:00
rusefi 97982cc22f Output pin init/deinit needs a linked list #1803 2020-09-27 07:26:56 -04:00
rusefi 0b628cea75 Output pin init/deinit needs a linked list #1803 2020-09-27 07:22:09 -04:00
rusefi 1e503c2ada Output pin init/deinit needs a linked list #1803
more fun around pin referencing
2020-09-26 05:04:27 -04:00
rusefi dfbbdff4b1 Output pin init/deinit needs a linked list #1803 2020-09-18 13:29:17 -04:00
rusefi 35db68a6ae Output pin init/deinit needs a linked list #1803 2020-09-18 13:01:09 -04:00
rusefi 6c88cbe533 Output pin init/deinit needs a linked list #1803 2020-09-17 19:41:28 -04:00
rusefi c37e1c8b70 Output pin config #1803
alternative to #1800
2020-09-17 19:35:43 -04:00
rusefi e3056bb397 Engine runs we can disengage the starter #1795 2020-09-14 00:45:15 -04:00
rusefi 8bcc387fa7 Merge remote-tracking branch 'origin/Hellen_fork_point' into master
# Conflicts:
#	firmware/controllers/core/error_handling.cpp
#	firmware/controllers/system/efi_gpio.cpp
2020-09-09 18:23:04 -04:00
rusefi 3af04d7824 Hellen says merge #1772 error pin 2020-09-09 18:18:59 -04:00
Matthew Kennedy d2d0ffa1ee
remove tach output pin (#1779)
* remove from cfg

* cfg

* rip out impl

* efi gpio
2020-09-09 16:52:23 -04:00
rusefi 8197209719 https://github.com/rusefi/rusefi/issues/1775 2020-09-08 17:20:14 -04:00
Matthew Kennedy 4527b7694a expose the problem 2020-07-31 14:41:29 -07:00
Matthew Kennedy 93d631b911 init & override 2020-07-29 02:45:39 -07:00
Matthew Kennedy cd62774be1 dead 2020-07-29 02:45:30 -07:00
rusefi f42e08c8e5 bootloader not well? temporary bad workaround #1638 2020-07-25 19:14:09 -04:00
rusefi a81a5e3c04 bootloader not well? fix #1638 2020-07-25 19:04:15 -04:00
Matthew Kennedy 131f4c4e8f Merge remote-tracking branch 'upstream/master' into reset-overlap 2020-07-20 18:43:17 -07:00
rusefi 48cc155144 changing crazy in composite logger 2020-07-20 21:20:58 -04:00