Commit Graph

112 Commits

Author SHA1 Message Date
Matthew Kennedy b56a31143e
fix error/warning buffer overflow (#2456)
* fix error printing overflow

* make the worst offender shorter

* error as warning

* these don't need that flag set
2021-03-14 09:31:11 -04: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 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
Matthew Kennedy 8d5495111e
Fix master fatal error (#2206)
* print the fatal that caused test failure

* fix the error
2021-01-09 15:13:43 -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
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
Matthew Kennedy 67269aa637
maybe fix sensor init checks (#2034)
* enums

* don't collide

* auto_generated_enums

* check based on new enum val

* maybe this will make generate tool happy

* add a test

* fix test

* fix and add another test

* make clang happier

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-06 23:19:57 -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
rusefillc f6691eb4aa one step back #2017 2020-12-06 08:34:10 -05:00
rusefillc bcf404cdae code formatting & more info into message 2020-12-06 08:30:31 -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
rusefillc 07e25ccf3c https://rusefi.com/forum/viewtopic.php?p=38367#p38367
idle position/waste gate position sensor usability
2020-11-14 18:05:27 -05:00
rusefillc ae5f0a80a4 docs 2020-10-28 00:07:34 -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
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
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
rusefi 39d09bc976 microRusEFI used as Body Control Module BCM BCU 2020-09-06 20:21:01 -04:00
rusefi bc115e70a0 OBD CAN sensors #1733 2020-09-03 23:27:53 -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 d683a092a4 OBD CAN sensors #1733 2020-08-31 22:47:33 -04:00
rusefi 43915cb771 this does not go as planned :( 2020-08-31 08:15:05 -04:00
rusefi 938fbafd9e this does not go as planned :( 2020-08-31 08:12:33 -04:00
rusefi 5f125f3db0 this does not go as planned :( 2020-08-31 07:45:52 -04:00
Matthew Kennedy 733008b9d0
Analog input filtering (#1680)
* improve biquad

* cleanup

* add filtering to subscriptions

* config sensors

* comment

* doesn't need to be that fast

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-08-21 19:47:12 -04:00
rusefi a4329169e9 better file name 2020-05-25 13:02:05 -04:00
Matthew Kennedy 0290a268ab
Redundant accelerator pedal (#1470)
* add second boudns

* init logic

* test changes

* reconfigure correctly

* rams
2020-05-23 19:48:32 -04:00
Matthew Kennedy 9dda1a21bc
Redundant tps (#1427)
* add redundant sensor

* add tests

* add configure, info printing

* tests

* tests

* partial hookup

* fix

* fix

* bad makefile merge

* use second TPS config

* update test

* update test

* sensor names

* set second pin by default

* fix auto cal

* auto cal both sensors

* add reconfigure of secondary sensors

* gobblin' up your ram

* slow down write a little bit

* put split in debug gauge

* s

Co-authored-by: Matthew Kennedy <matthew@mck-mbp-15.local>
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-05-18 14:32:00 -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 3186741ddc
TPS Initialization Testing (#1264)
* test support

* stub for tests

* plumbing so we can test this

* add test

* comments
2020-04-05 09:10:08 -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
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 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 986b80671b
warnings (#1169) 2020-03-03 08:37:02 -05:00
Matthew Kennedy 98e6e4b0eb Fix master (#1134)
* Revert "something went very wrong."

This reverts commit 53179dfd22.

* Revert "trying to fix build broken by "Sensor reconfiguration while running (#1131)""

This reverts commit 0bf32a7291.

* Revert "partial Revert of "Stricter compile options (#1132)""

This reverts commit a17cc28382.

* temp prometheus fix

* fix bootloader

* fix batch files
2020-02-08 16:34:29 -05:00
rusefi 53179dfd22 something went very wrong.
first we have functional defects
that we do not write test to cover newly intdroduced defects
then attempts to fix defects do not compile
2020-02-08 08:15:46 -05:00
Matthew Kennedy a00c1a5be9 Sensor reconfiguration while running (#1131)
* reconfigure sensors

* docs

* doc
2020-02-08 06:22:23 -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 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
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 1ed2711c02 consistency 2019-11-07 15:22:17 -05:00
rusefi d2e24cf2e5 evil manual merge of https://github.com/DonaldBecker/rusefi 2019-11-06 20:33:40 -05:00
Matthew Kennedy 29804cbc8a move tsOutputChannels to header (#970) 2019-10-08 21:02:51 -04:00
Matthew Kennedy ee5643f1bf Hmm, that didn't quite work right (#955)
* maybe that wasn't a good idea

* we don't need a copy because you can't clear the func after setting it

* no longer a template - move logic to cpp

* fix tests

* rename to avoid object collision
2019-09-25 07:26:56 -04:00
Matthew Kennedy 3bd1ddcc1f Sensors: composition >> inheritance (#953)
* functional sensors

* format

* tests

* sim makefile

* eol

* format tests
2019-09-24 21:11:41 -04:00
rusefi 9ad82b03b5 fixing build 2019-09-21 15:33:13 -04:00
Matthew Kennedy f629ec038b add sensor framework, tests (#929)
* add framework, tests

* move oil pressure to new way

* add init logic

* brackets on the same line

* spaces -> tabs

* spaces -> tabs for tests

* bracket on same line

* hook up sensor mocking

* add nan check

* fix nan check

* I wrote an essay

* casing

* only init if we have a sensor to init

* style, actually call init

* format

* fix casing

* typo

* implement linear sensor

* wire up producer

* smarter limiting

* setup comments

* add reporting

* doxyfile

* oops

* add adc subscription

* clarity

* fix logic

* multiply voltage

* test styling

* test guards

* remove dependencies

* linear sensor test

* remove unused

* fix merge

* format, implicit convert op

* explicit

* format tests

* fix merge
2019-09-21 14:33:38 -04:00