Commit Graph

505 Commits

Author SHA1 Message Date
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 46e38447e5
Ford redundant ETB tps (#2519)
* ford tps

* configurable maximum

* initialization

* check consistency when in the low range

* print info

* default

* config field

* config parameter

* test

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-05 15:57:03 -04:00
Andrey G fa840a7593
hip9011 and friends (#2527)
* engine math: extrant getFiringOrderTable for reuse

* engine math: getNextFiringCylinderId helper

* introduce knock_logic: first member is getCylinderKnockBank()

moved from software_knock.cpp

* hip9011: support two inputs/banks

* fix CI

* Board Subaru EG33: populated with TPIC8101 with Advanced mode

* hip9011: test communication in advanced mode

* hip9011: handle situation when chip is already in advanced mode

* Board Subaru EG33: cylinder to knock bank mapping

* hip9011: count spi transactions in advansed mode too

* hip9011: reset incalid responce counter after chip initialization

* hip9011: make debug output more structured
2021-04-04 18:13:21 -04:00
Matthew Kennedy c637307238
not all listeners are sensors (#2514)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-31 22:51:49 -04:00
Andrey G 3d138958ce
Hip9011 (#2512)
* hip9011: coexistance with other spi devices

* hip9011: rework so SPI transfer is invoked from thread

also use polling spi exchange to avoid cache problems

* hip9011: move calculations from ADC callback to thread

* hip9011: big cleanup

* hip9011: simplify spi communication

* No need to set knockBandCustom if it is not custom

HIP9011 calculates knockBand from cylinderBore same way

* hip9011: make unit test happy

* hip9011: fix unit test

* hip9011: remove duplicated initialization, reorder

* hip9011: just renames and data type adjustments

* hip9011: rename BAND() to HIP9011_BAND()

* hip9011: move some code from lookup.cpp to logic.cpp

* hip9011: move initEngineNoiseTable to engine_configuration.cpp

* hip9011: move lookup tables to hip9011_logic.c

* hip9011: remove empty files

* hip9011: additional checks
2021-03-30 10:56:25 -04:00
Matthew Kennedy 31ef22eecb
use cpp (#2493) 2021-03-25 18:12:17 -04:00
Matthew Kennedy 95b08c433f
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 3072d54717
dead code, warnings (#2461) 2021-03-15 10:23:19 -04:00
Matthew Kennedy 2328c1be6b
Fuel pressure sensor checks (#2449)
* test for missing sensor

* test negative pressure delta checking logic

* test new hasSensor logic
2021-03-12 23:32:41 -05:00
rusefillc c7d8997a3a vBatt -> SensorType::vBatt #2260 2021-03-11 22:44:59 -05:00
Matthew Kennedy 40c4238f13
enable CAN on H7 (#2393)
* enable

* guard correctly

* h7 bit timing

* allow longer frames

* allow data smaller than maximum

* mcu temperature

* typo

* tx message

* testing

* check for CAN or FDCAN

* don't need that any more

* h7 bitrate config

* undo testing

* h7-ify msg tx

* comment

* break out SID/EID macros

* guard differently

* update ChibiOS

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-09 18:54:01 -05:00
Matthew Kennedy 3d17e62d65
finish off vbatt -> sensor model (#2433)
* more vbatt

* s

* goodbye voltage

* makefile

* apparently that part was in use

* include

* mocking
2021-03-07 20:18:32 -05:00
Matthew Kennedy 6aaf02be15
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 b1873b3d8b
set all thread priorities in the same place (#2412)
* unify thread priority

* header

* mmc
2021-02-28 07:30:45 -05:00
Matthew Kennedy 4a1d3de9a6
remove unused msg parameter (#2360)
* dead parameter

* last few
2021-02-16 09:32:16 -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
Matthew Kennedy 7d3cadfc87
baro in sensor model (#2306)
* baro in sensor model

* missed

* typo

* init baro

* needs an include there
2021-02-07 17:54:41 -06: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
Brenton Hewitt 9d9c3c266d
Gm map sensors (#2265)
* GM 2 and 1 Bar Map Sensors

* GM MAP Sensor Selection Options
2021-02-02 08:15:28 -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
rusefillc 717e36a7a4 todo: reduce magic constants 2021-01-14 22:34:06 -05:00
Andrey G 25560b85c2
Supress annoing unused warnings (#2216) 2021-01-11 08:49:20 -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
Matthew Kennedy 44b5427813
better error checking of thermistor config (#2199)
* add bounds check on result

* validate thermistor config

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-01-07 20:37:15 -05:00
Matthew Kennedy 20a967edf1
Implement flex sensor (#2189)
* config & ui

* stub sensor

* stub init

* output channel, gauge, SD log

* linky linky

* fix

* add sensor & init

* clamp

* update comment

* filter the resultant signal

* changelog

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-01-05 17:13:56 -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 edee10ee1c
Flex fuel stubs (#2187)
* config & ui

* stub sensor

* stub init

* output channel, gauge, SD log

* linky linky

* fix

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-01-05 07:57:26 -05:00
Matthew Kennedy acdf6fdc85
Put map in the sensor model (#2161)
* hook up map

* check for init

* switch some consumers

* don't do limp for now

* oops

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-30 08:43:49 -05:00
rusefi 521e561d4b removing warning? 2020-12-28 19:19:11 -05:00
Matthew Kennedy 6151f8c334
extra data for rusEfi wideband controller (#2082)
* add config

* logic

* remove old

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-16 18:25:11 -05:00
rusefillc b41ca74386 clang warnings again #2055 2020-12-11 12:50:10 -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
rusefi ac186d2b85 Merge remote-tracking branch 'origin/master' into master
# Conflicts:
#	firmware/controllers/engine_cycle/high_pressure_fuel_pump.cpp
2020-12-08 21:37:45 -05:00
Matthew Kennedy bad0e6b949
require redundant TPS for ETB (#2041)
* Require redundant tps for ETB (#2037)

* mod sensor api

* require redundancy

* fix tests

* check that it fails

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>

* add a test that fails but should not

* fix the bug

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-08 06:24:20 -05:00
rusefi bb3cb0ba22 Revert "Require redundant tps for ETB (#2037)"
This reverts commit 4f1085a8
2020-12-07 01:11:32 -05:00
Matthew Kennedy 4f1085a87a
Require redundant tps for ETB (#2037)
* mod sensor api

* require redundancy

* fix tests

* check that it fails

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-07 00:05:06 -05:00
Matthew Kennedy c5e3657d45
don't duplicate sensor error logic (#2032)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-06 15:00:30 -05:00
Matthew Kennedy 9ccda6bbe7
add isRedundant (#2031)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-06 14:55:06 -05:00
Matthew Kennedy 2d9be1077b
require TPS values to be different (#2017)
* require values to be different

* fix not

* oops

* missed another spot

* test negative cases too

* resets

* test no sensor case

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-06 00:41:49 -05:00
Matthew Kennedy de4990bfa2
encapsulate entry logic in to entry (#2018)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-05 10:16:52 -05:00
rusefi 8ee609fa3e Merge remote-tracking branch 'origin/master' into master 2020-11-29 12:51:04 -05:00
Matthew Kennedy 922f0249d2
squash warnings (#1984)
* warnings

* unused

* a few more

* too much

* uint16_t-ify
2020-11-23 09:43:16 -05:00
rusefi b329cc66ed GDI Epic #1448 2020-11-23 01:10:12 -05:00
rusefillc 3878cbb550 Starter is engaged on start-up in pull-up configuration #1969
maintainability
2020-11-19 23:57:06 -05:00
rusefillc 7bfa18295a Proteus TCU gear shift configuration #1927 2020-11-06 23:48:35 -05:00
rusefi 93d37634a8 B6 GDI 2020-11-01 00:33:18 -04:00
rusefillc 67789a4b2f GDI 2020-10-28 01:01:54 -04:00
Matthew Kennedy d84cd385ce
add Injector pressure sensor (#1898)
* add sensor type

* add config

* initialize injector pressure

* add UI
2020-10-23 15:46:16 -04: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 efacf26554 Re-applying #1841
Revert "HW CI has failed 11 times since Oct 2 #1849"

This reverts commit 7f6a8311
2020-10-04 01:54:29 -04:00
rusefillc 7f6a831117 HW CI has failed 11 times since Oct 2 #1849
Revert "configure all sample times - fix MRE knock sampling (#1841)"

This reverts commit b3596f89
2020-10-03 21:36:09 -04:00
Matthew Kennedy b3596f8969
configure all sample times - fix MRE knock sampling (#1841)
* configure all sample times

* smpr 1 vs smpr 2

* man I can't type

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-10-02 20:49:56 -04:00
David Holdeman 4d0b953129
switch to pass by reference (#1832) 2020-09-28 19:17:17 -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 df551d77fb
move AEM xseries lambda to new sensor (#1764)
* lambda sens

* fix init

* new sensor aem

* comment

* g

* format

* x

* guard

* fix init for tests

* fix

* put back

* put back

* fix

* fix init

* why is this different

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-09-21 06:01:54 -04:00
Matthew Kennedy 3d6a6398ac
Dedicated sensors for wastegate + idle position (#1805)
* config

* add sensor

* listen to new adc channels

* fix

* add gauges to TS

* add gauge values

* TS UI
2020-09-18 10:04:07 +03: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
rusefi 02bc0a9608 microRusEFI used as Body Control Module BCM BCU 2020-09-07 20:06:13 -04:00
rusefi 0c1ac0c932 microRusEFI used as Body Control Module BCM BCU 2020-09-07 16:25:00 -04:00
rusefi 294ca5aae3 microRusEFI used as Body Control Module BCM BCU 2020-09-06 23:39:25 -04:00
rusefi b04a4ec04c microRusEFI used as Body Control Module BCM BCU 2020-09-06 23:19:32 -04:00
rusefi 8296f54923 microRusEFI used as Body Control Module BCM BCU 2020-09-06 22:36:31 -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 675cce3854 less hacky testing implementation 2020-09-03 22:52:29 -04:00
rusefi 7bb5560150 less hacky implementation 2020-09-03 21:47:50 -04:00
rusefi c584e0d386 OBD CAN sensors #1733 2020-09-03 19:09:05 -04:00
rusefi 6ce016959a OBD CAN sensors #1733 2020-09-03 16:58:10 -04:00
Matthew Kennedy 484f1ba5a0
Multiple knock sensors (#1745)
* fw

* cfg fields

* fix order

* ui for channel select

* clarify

* comments

* config
2020-09-02 07:19:02 -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 d72ba63527 OBD CAN sensors #1733 2020-08-31 23:01:17 -04:00
rusefi f2a80a4eb7 OBD CAN sensors #1733 2020-08-31 22:50:01 -04:00
rusefi d683a092a4 OBD CAN sensors #1733 2020-08-31 22:47:33 -04:00
Matthew Kennedy 988d9b138c
detect which cylinder knocked (#1732)
* 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

* multi cylinder knock

* TS

* only sense when running
2020-08-31 21:05:33 -04:00
rusefi b7c75e4c52 going human 2020-08-31 10:49:16 -04:00
rusefi f18f7741ca OBD CAN sensors #1733 2020-08-31 04:39:27 -04:00
rusefi 70f2c88d40 OBD CAN sensors #1733 2020-08-30 14:27:41 -04:00
rusefi 6f69bd1609 OBD CAN sensors #1733 2020-08-30 09:16:37 -04:00
rusefi fff58289ee OBD CAN sensors #1733
refactoring getters/setters
2020-08-29 16:22:57 -04:00
rusefi 94daeb7922 OBD CAN sensors #1733 2020-08-29 14:36:23 -04: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
Matthew Kennedy 3decf8241a
consolidate (#1728) 2020-08-24 08:10:58 -04:00
Matthew Kennedy bbe7ac43db misc 2020-07-29 02:29:55 -07:00
Matthew Kennedy f874ee5dc2
dead (#1480) 2020-06-02 19:21:48 -04:00
Matthew Kennedy 105460dada
Remove old thermistor implementation (#1458)
* remove test clt/iat

* remove warning since this code is nearly dead

* remove old therm impl

* tests & live doc

* not quite right
2020-05-28 17:51:33 -04:00
Matthew Kennedy bef53d8ba5
remove maf2map mode (#1474)
* remove

* remove fully

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-05-28 14:06:18 -04:00
rusefi 61d481d40e Merge remote-tracking branch 'origin/master'
# Conflicts:
#	firmware/config/boards/kinetis/config/controllers/algo/auto_generated_enums.cpp
2020-05-20 21:22:46 -04:00
Matthew Kennedy 44e2a1c970
remove test clt/iat (#1457)
* remove test clt/iat

* remove warning since this code is nearly dead
2020-05-20 03:16:01 -04:00
rusefi aa517d96cd hard-coding NB2 OEM sensor 2020-05-18 01:39:41 -04:00
rusefi 4e5a69891d new LED logic: constant WARNING if VBATT is below 7v 2020-05-13 01:52:27 -04:00
rusefi 257ed04fac new LED logic: constant WARNING if VBATT is below 7v 2020-05-13 01:17:48 -04:00
kon 8d35c35035
Aux serial (#1422)
* aux serial updates from last PR

* trying to guess

* wow that's old! also not working maybe?

* hiding diag code which was messing with GP2/GP3 i.e. TLE8888_PIN_22 TLE8888_PIN_23

* date

* Mc33 undervolt (#1421)

* mc33 flash check

* DI sanity checks for setting HV config

* mc33 under voltage check

* mc33 under voltage check

Co-authored-by: Christopher W. Anderson <gitstuff@pswitch.com>

* fixed {}

Co-authored-by: rusefi <rusefillc@gmail.com>
Co-authored-by: NOx-z <50815960+NOx-z@users.noreply.github.com>
Co-authored-by: Christopher W. Anderson <gitstuff@pswitch.com>
Co-authored-by: kon <dev@triggerdevel>
2020-05-11 12:17:42 -04:00
Matthew Kennedy 858821ed66
proteus -> exti (#1378)
* proteus -> exti

* do frankenso pal the same way

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-05-06 18:52:15 -04:00
rusefi aa04de0000 Nick says we need this MAP sensor 2020-05-04 19:08:36 -04:00
Matthew Kennedy 0d699bcfe9
Improve unexpected (#1323)
* use type instead of value

* fix remaining initializer-list users

* impruv

* last consumer?

* consumer

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-04-19 08:37:43 -04:00
Matthew Kennedy 7f60384c75
add expected helper class (#1321)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-04-19 01:53:04 -04:00
Matthew Kennedy 4d24fdd57d
Fuel/ign correctino on new temp sensors (#1318)
* corrections

* test

* adv map

* tests

* cleanup

* lcd

* fsio

* unneeded

* more math

* last consumer

* cleanup

* fix kinetis
2020-04-18 18:45:30 -04:00
Matthew Kennedy ff867b9301
fix warnings (#1282)
* warnings

* don't need to template those
2020-04-12 09:39:14 -04:00
Matthew Kennedy 8006c0a548
CLT/IAT/Aux in the new sensor world (#1269)
* hook up clt

* init test

* probably fix test

* aux temp

* relax checking

* more significant figures

* remove old aux temp

* hand generate

* claim RAM

* move to ccm

* subscribe

* info printing

* warnings

* raise high voltage failure threshold

* fix test

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-04-07 16:07:09 -04:00
Matthew Kennedy 595df15dfd
fix (#1268) 2020-04-06 09:00:26 -04:00
Matthew Kennedy 345bf61bd5
Goodbye, old TPS (#1266)
* clear out tps

* boost control

* aux valves

* launch, aux valves

* unused field
2020-04-05 19:33:33 -04:00
Matthew Kennedy 7d5df29fbd
yet more tps consumers (#1258)
* advance_map

* tests

* unneeded

* idle

* use driver intent instead

* and obd and lcd

* engine load

* ve lookup

* unused

* oops we needed that

* oops needed that too

* mocking

* test mocks

* oops

* helps to use the right sensor

* and cylinder cleanup

* fuel math

* typo

* old tests

* kill dead stuff

* cleanup

* more

* fix

* test

* s

* fix signature

* fix test

* comment

* priming pulse

* remove mock tps

* remove more dead

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-04-05 09:11:25 -04:00
Matthew Kennedy b015ec5944
Add redundant sensor (#1249)
* add redundant sensor

* add tests

* add configure, info printing

* tests

* tests

* casing

Co-authored-by: Matthew Kennedy <matthew@mck-mbp-15.local>
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-04-02 08:55:21 -04:00
Matthew Kennedy 22267e5479
Replace hasPedalPositionSensor (#1245)
* remove

* add Sensor::hasSensor

* consume in etb

* remove unused state

* don't use it there either

* format

* fix up tests

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-04-02 08:04:12 -04:00
Matthew Kennedy 8151793ec7
Improve tps error message (#1244)
* improve error messages

* fix

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-04-02 08:02:44 -04:00
Matthew Kennedy 50cd6549a2
Fully switch acc pedal to new sensors (#1212)
* proxy sensor

* header

* idle

* can

* settings

* remove old mocking

* remove old impl

* etb

* oops, gotta actually register it

* fix test

* structured bindings ftw!

* driver intent for stepper

* tear out old

* oops too much
2020-04-01 20:21:03 -04:00
Matthew Kennedy 15c40ffb5b
Sensor-via-CAN (#1241)
* CAN sensor impl

* subscription hookup

* printing

* init

* inject stamp

* don't init const field

* clarify

* guard for non-CAN builds

* fix merge

* guard with EFI_CANBUS_SLAVE

* headers, guards

* include

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-03-31 23:21:05 -04:00
rusefi 81211219f2 CAN progress 2020-03-31 16:49:19 -04:00
Matthew Kennedy f41f0454bd
Debugging for sensor converter functions (#1239)
* func print

* resistance func, func chain

* formatting

* resistance func format

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-03-31 01:07:08 -04:00
Matthew Kennedy 483d4a2204
Debuggability in the new sensor world (#1238)
* rename to avoid conflict

* fix efilib

* add sensor printing

* makefile

* that check was already there

* const

* const

* fix tests

* formatting

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-03-30 18:29:42 -04:00
Matthew Kennedy 8fd9842310
cleanup extern mess (#1237)
* cleanup

* move outside define
2020-03-29 19:06:03 -04:00
rusEfi ff6fd10537 dual ETB progress 2020-03-24 20:22:01 -04:00
Matthew Kennedy 4740f525ee
save some ram (#1211)
* remove dead stuff

* why store those pointers twice?
2020-03-22 19:06:29 -04:00
Matthew Kennedy f587b9f555
Proxy sensor for extra magic (#1210)
* proxy sensor

* header
2020-03-22 17:29:01 -04:00
Matthew Kennedy 701f7fd7aa
Accelerator pedal with new sensors (#1208)
* add pedal sensor

* update status loop

* add bit to ts

* fix math

* divide at config time

* this used a little bit of ram
2020-03-22 17:09:46 -04:00
Matthew Kennedy 985269808e
Pedal rx shim (#1207)
* rx pedal over can

* guard

* guard

* don't cast away qualifiers
2020-03-21 22:35:27 -04:00
Matthew Kennedy e76f567608
Grow CAN TX stack (#1201)
* grow

* check mock first
2020-03-19 19:29:56 -04:00
Matthew Kennedy 7b44f618e7
custom verbose can format (#1200)
* config

* ts

* default cfg

* hand generate

* tx struct helper

* add data sending

* wire up

* value_or helper

* add file

* more sensors

* header

* compactify

* add status frame

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-03-19 17:58:46 -04:00
Matthew Kennedy 9f26e6d894
fix icu trigger polarity (#1177)
* fix polarity

* fix confusing names
2020-03-08 08:57:21 -04:00
Matthew Kennedy 397907a06f
Support disabling most/all features (#1162)
* this flag did nothing

* guard features properly
2020-02-26 18:16:35 -05:00
Matthew Kennedy 4d1d2672ce
tps header cleanup (#1130)
* tps header cleanup

* dead code
2020-02-07 23:20:14 -03:00
Matthew Kennedy f7282966d2
Consume new tps in status_loop.cpp, settings.cpp (#1129)
* new tps

* more

* settings.cpp too

* more

* comment
2020-02-07 06:05:15 -03:00
Matthew Kennedy 6ebc49ce8b
Use new sensors for TPS (#1111)
* tps init

* fix init

* call init

* use correct sensors, scale using constant

* includes

* handle error
2020-02-04 01:54:05 -05:00
Matthew Kennedy c7dce2e38b
Rescale TPS (#1112)
* fake adc ticks

* consumers

* fix test 1

* fix tests
2020-02-01 16:41:07 -05:00
rusefi 0c3f73c2b4 code style 2020-01-21 01:47:58 -05:00
rusefi 83b1ca00a4 code style 2020-01-21 01:40:11 -05:00
rusefi bb217b01dd happy new year unification 2020-01-13 21:57:43 -05:00
Matthew Kennedy ecd240d6f2 AEM X-Series CAN Wideband Support (#1096)
* aem xseries

* parens to avoid operator precedence issues

* put in cfg

* disable that too

* fix sim/unit

* enough generated for ci

* this will guard correctly
2020-01-12 03:44:37 -05:00
Matthew Kennedy e4c4e90981 how tf did this ever build...? (#1099) 2020-01-12 03:25:34 -05:00
Matthew Kennedy d3d088676b Add timeout + raw value access for sensors (#1098)
* timeout

* inject stamp

* allow getting raw value

* plumb timeout

* fix tests
2020-01-12 03:25:23 -05:00
rusefi 19df4661ab better method name 2020-01-10 02:02:22 -05:00
rusefi b83a5310be happy new year 2020-01-08 00:02:40 -05:00
Matthew Kennedy b9454790c7 Add new sensor function types (#1065)
* add functions

* add tests

* add chain tests

* float suffix
2019-12-17 09:06:29 -05:00
Matthew Kennedy eb27bcf3d6 Terrible ADC3 hack for Proteus vbatt support (#1066)
* this is a great idea!

* typo

* simplify

* simplify, cache coherency

* enable adc3 in board file

* copyright

* fix tests, probably
2019-12-17 08:34:56 -05:00
Matthew Kennedy 08a8fa8d1e Remove sensor reporting loc (#1064)
* remove raw rept loc

* remove normal reporting location

* fix up oil pressure

* format
2019-12-16 22:45:46 -05:00
rusefi 521b27ff35 codes clean-up 2019-12-14 00:14:36 -05:00
rusefi e9e7a66cf8 etbActualCount logic to handle the scenario where only one ETB is present 2019-12-13 12:50:34 -05:00
rusefi af4f20551b getting rid of boardConfiguration / binary compatible change 2019-12-11 17:48:55 -05:00
rusEfi 1cc71ef8ec dual-ETB progress 2019-12-10 00:07:46 -05:00
rusefi b04166d173 that's how we can move all fields one by one from boardConfiguration to engineConfiguration
my approach is to move fields from the bottom of BC struct
2019-11-30 10:24:37 -05:00
rusefi 73e3edc3d8 dual ETB seems to work! 2019-11-29 20:15:29 -05:00
rusEfi e2074388ff dual ETB seems to work! 2019-11-29 19:06:50 -05:00
Matthew Kennedy 9ee8616cb0 Use templated array references (#1027)
* update defs

* consumers, use default params

* setArrayValues in tests

* floats

* test fixing
2019-11-22 23:27:24 -05:00
rusefi 3c57c3d216 refactoring: time to unify digital pin API 2019-11-11 23:32:09 -05:00
rusefi f082ac48b1 refactoring: time to unify digital pin API 2019-11-11 23:04:27 -05:00
rusefi b9f0f2c592 need better higher-level API :( 2019-11-11 22:14:45 -05:00
rusefi bab1744d1d progress towards #961 2019-11-04 22:44:52 -05:00
rusefi 79fd7fc8ce kind of todo 2019-11-04 22:29:22 -05:00
rusefi 9cbdbb794e pieces of #971 2019-11-03 22:02:52 -05:00
rusefi 62577c47da preparation for #961
more unified access to pre-calculated value
2019-10-10 08:25:58 -04:00
rusefi 71e904e421 preparation for #961
more unified access to pre-calculated value
2019-10-10 08:16:21 -04:00