Commit Graph

278 Commits

Author SHA1 Message Date
Matthew Kennedy a342bee57e
rpm calculator refactoring, gm 24x test (#3585)
* data

* stub test

* use getTimeSinceSyncPoint

* s

* s

* no

* test

* stray ;

* those were 1/10 what they were supposed to be

* actually check something

* dead log line?
2021-11-20 14:59:02 +03: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
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 abb6513744
faster uniform adc cleanup (#3334)
* dead fast tps

* oooooh map avg on hh7

* adc v4 fast support

* new fast API

* hardware.cpp

* adc v2

* warning

* guard

* no check required

* stub cypress/kinetis

* kinetis and cypress stubs

* cleanup

* h7 adc speed

* adc skip

* configurable oversample
2021-10-10 22:59:25 -04:00
Matthew Kennedy 31ffb0add4
Fast adc API (#3327)
* dead fast tps

* oooooh map avg on hh7

* adc v4 fast support

* new fast API

* hardware.cpp

* adc v2

* warning

* guard

* no check required

* stub cypress/kinetis

* kinetis and cypress stubs
2021-10-07 08:29:01 -04:00
rusefillc b4884498cb OBD error renames 2021-10-03 01:30:42 -04:00
Matthew Kennedy 730b26d034
remove old vss implementation (#3208)
* dead vss

* remove
2021-08-28 01:39:55 -04:00
Matthew Kennedy a18b86a09b
start allowing ADC change while running (#3100)
* allow re-register of the same sensor

* add api to unsubscribe

* do it for tps

* clear the pin

* happy test

* maybe make afr happy for now

* tests build

* happy simulator

* active configuration

* check valid

* we need vbatt now

* manage all pin init in init_sensors.cpp

* don't need that

* cleanup

* thermistors

* do two phase reinit in the right place

* config vs engine

* finally the tests are happy
2021-08-24 16:41:16 -04:00
alxrMironov f926d2ccba
Vehicle speed switching to frequency sensor #3106 (#3148)
* Add vehicle_speed_converter.h with realization.

* Add test_vehicle_speed_converter.cpp with realization.

* Add test_vehicle_speed_converter.cpp to Makefile

* Edit "VehicleSpeedSensor" from function pointer sensor to frequency sensor

* Fix "VehicleSpeedSensor" init function args

* Remove "VehicleSpeedConverter" empty constructor

* Edit vehicle_speed_converter.h code style

* Fix args and engine injection in "VehicleSpeedSensor" initialization procedure

* Remove old "Vehicle Speed" module initialization

* Revert "Remove old "Vehicle Speed" module initialization"

This reverts commit 100b7caa8c615c20eed3d0c23a49824b4e556148.

* Remove old "Vehicle Speed" module initialization pieces

* Revert "Revert "Remove old "Vehicle Speed" module initialization""

This reverts commit f559a726f1f7f5a7acacd1b6517e571743e84327.

* Debug changes

* Revert "Debug changes"

This reverts commit f7e2be1a8a46c6f3f93f14f002b2f2db539da8e2.

* Another debug changes

* More debug changes

* And more debug changes.

* Revert "Another debug changes"

This reverts commit 914fbb1df42c37e4b5ecbb119bb45e7cffdf4064.

* Revert "More debug changes"

This reverts commit 0b2d96d461c3cd9b0f1ae97ed110b8effe6b0cc6.

* Revert "And more debug changes."

This reverts commit 06ae8daded0e6e1c025e4e5058b47283f4adfe92.

* Add "Vehicle Speed" sensor reconfiguration

* Revert "Add "Vehicle Speed" sensor reconfiguration"

This reverts commit a089a6d563.

* Revert "Revert "Add "Vehicle Speed" sensor reconfiguration""

This reverts commit 7b2bb8af4b.

* Debug changes

* Another debug changes

* Fix another debug changes

* Another debug changes 2

* Revert "Another debug changes 2"

This reverts commit cfad55141e.

* Revert "Fix another debug changes"

This reverts commit 9bc2c74a3b.

* Revert "Another debug changes"

This reverts commit 4337ed8cad.

* Edit class  FrequencySensor, make it more RAII

* Debug changes

* Debug changes 2

* Debug changes 3

* Revert "Debug changes 3"

This reverts commit 52a7054c12.

* Revert "Debug changes 2"

This reverts commit dec79fb913.

* Revert "Debug changes"

This reverts commit eb08d7a529.

* Revert "Edit class  FrequencySensor, make it more RAII"

This reverts commit 3a0bb1d3f1.

* Remove VSS pin definition in "Citroen Berlingo" engine config.

This reverts commit 3a0bb1d3f1.

* Remove VSS pin definition in "Dodge Neon" engine config

Co-authored-by: alxrMironov <330OMcorporative>
2021-08-24 00:55:41 -04:00
rusefillc bd410d0c1b No pins should be restarted for no reason during config change #3151 2021-08-14 04:35:43 -04:00
rusefillc 5e663200fd Hellen Nissan defaults are no longer valid #3143 2021-08-12 17:46:10 -04:00
rusefillc c1275af29c reduce chance of invalid CAM setting fix #3105 2021-08-03 22:15:40 -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
Andrey 511b5c22dd unit test for vehicle_speed.cpp #3081 2021-08-01 12:09:53 -04:00
Andrey 17ee26293c todo 2021-07-25 12:45:28 -04:00
Andrey 37247db383 Clutch switch inverted options do not invert detected pedal position
#3044
2021-07-24 18:44:13 -04:00
rusefillc ca34562d5d Clutch switch inverted options do not invert detected pedal position #3044 2021-07-24 15:54:51 -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
Andrey c513e976ed trigger signal debug pins - logic level output #2959 2021-07-15 01:46:30 -04:00
Andrey 23be588af6 trigger signal debug pins - logic level output #2959 2021-07-15 01:28:44 -04:00
rusefillc b65c4b5612 trigger signal debug pins - logic level output #2959 2021-07-15 00:03:31 -04:00
Andrey 6c8e80285e trigger signal debug pins - logic level output #2959 2021-07-14 23:20:18 -04:00
Andrey 85b9bbaa68 trigger signal debug pins - logic level output #2959 2021-07-14 23:05:51 -04:00
Andrey e721c1768f trigger signal debug pins - logic level output #2959 2021-07-14 22:51:08 -04:00
Andrey a926357a01 making code more testable 2021-07-14 22:37:05 -04:00
Matthew Kennedy 7a21f7fbc0
inject (#2938) 2021-07-09 17:02:25 -04:00
Andrey G 710a512fe7
Hw layer rearrangement (#2703)
* max31855: move to sensors

* uart GPS driver: move to sensors and rename

* i2c_bb: move to drivers

* LCD HD44780: move to drivers

* ping?
2021-05-16 06:01:00 -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 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
Matthew Kennedy 6491c83f73
read configuration from flash exactly once (#2481)
* early hw init

* s

* read configuration exactly once

* cleanup

* housekeeping

* test friendly

* ugh bad merge

* that is a noop

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-25 18:16:26 -04:00
Matthew Kennedy 6f05bbc332
move some initialization steps earlier (#2480)
* early hw init

* s

* Revert "s"

This reverts commit 10d3039168.

* bor

* I can't type

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-25 16:22:03 -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 8584256677 trying to fix AuxValves 2021-02-17 08:57:18 -05:00
rusefillc 02a49de390 aux to vvt rename 2021-02-17 08:53:39 -05:00
Matthew Kennedy 39884f8934
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
Matthew Kennedy 878794f9cf
properly put buffers in no-cache regions (#2357)
* configure for no cache

* this doesn't need a setting

* now we don't need invalidate

* reorder and comment

* mmc

* sw knock
2021-02-15 17:39:11 -05:00
rusefi 6f065274e4 aux pid is now VVT 2021-02-10 12:41:38 -05:00
rusefillc cda053f388 H7 compilation #2284 2021-02-06 00:37:12 -05:00
Matthew Kennedy 9151b0c6c1
fix #2269 (#2272)
* fix #2269

* cleanup
2021-02-03 08:04:22 -06:00
Andrey G 777979c3ca
Chibi os 20 (#2212)
* Update ChibiOS

* Fix Makefiles includes paths

* halconf.h: remove flash hack

* mcuconf: fix EXTI ptiorityes

* Digital Input: ICU: use designated initializers, initialize 'arr'

* ChibiOS: lis302dl fix

* ADC: update to new API

* UARTConfig: timeout_cb field, formating

* ChibiOS: remove _exit, _kill, _getpid

* Fix lis302dl

* Bump config versions

* chconfig_common: cosmetic changes

* stm32f4ems: commulative config update

* Update Simulator

* ALLCSRC already contain all needed ChibiOS files.

Same for ALLINC and ALLCPPSRC

* ChibiOS fix for Simulator

* ChibiOS: port lock/unlock hook and MMC over SPI timeout

* STM32F7: update configs

* STM32F7: update linker file

* Cypress: port ADC lld to ChibiOS-20

* Cypress: port SPI lld to ChibiOS-20

* Cypress: port CAN lld to ChibiOS-20

* Cypress: fix include path for rules.ld

* Cypress: update chconf.h and halconf.h for ChibiOS-20

* Kinetis: update ADC lld to ChibiOS-20

* Kinetis: update SPI lld to ChibiOS-20

* Kinetis: update UART lld driver for ChibiOS-20

* Kinetis: update chconf.h and halconf.h for ChibiOS-20

* Kinetis: fix include path for rules.ld

* Nucleo F746: update ld script

* Nucleo F746: fix compile

* Bootloader: fix compilation with ChibiOS-20, cleanup

* Bootloader: add way to pass crosscompiler using CROSS_COMPILE

* Debug build arguments

* Simulator: fix windows compilation

Exclude syscalls_cpp.cpp from compilation
2021-01-19 15:20:35 -05:00
Matthew Kennedy fa30efbc94
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
Andrey G 37cd9266d3
Call startSmartCsPins when applying new settings (#2194)
Only stopSmartCsPins was called from applyNewHardwareSettings.
This cause lost of CS pins for external gpio chips
2021-01-06 08:59:13 -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 19bf208cde
use limp mgr for trigger disable (#2145)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-26 18:12:36 -05:00
rusefi d6b745e1c0 Proteus is compiled without VSS feature #2122 2020-12-22 20:50:01 -05:00