Commit Graph

35 Commits

Author SHA1 Message Date
rusefillc bf5802ee29 [EPIC] [Feature Request] Transmission Control #1454 2022-03-29 02:35:27 -04:00
Matthew Kennedy f5d4690fe1
baro fully in sensor model (#3829)
* consumers and api

* dead test

* baro uses sensor model

* remove old (copy of?) map lookup logic

* I guess we don't need FastInterpolation any more?

* don't double init analog input
2022-01-23 09:42:11 -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 bc40f2c207
fix map sensor reinit (#3331) 2021-10-06 21:20:35 -04:00
Matthew Kennedy db12cdbe19
put MAP in the sensor model (#3292)
* map averaging in sensor model

* deadly, deadly code!

* mpxh

* Revert "deadly, deadly code!"

This reverts commit 346fe25267966a313145a809792dced84be348cf.

* comments

* sensor types

* last sensor

* channel init

* correct spot

* deinit properly

* simplify

* fix

* mocks

* map init test

* showInfo

* comment

* singleton identity function

* sensor info print

* multiple cylinder averaging buffer

* comments

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-10-04 17:18:08 -04:00
Matthew Kennedy f72c4656c4
Reinit pressure sensors (#3287)
* pressure sensors reinit

* oops

* typo

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-09-30 19:58:01 -04:00
alxrMironov bb341c4c07
Turbo speed sensor implementation #2935 (#3209)
* Add turbocharger speed converter class

* Add turbocharger speed converter tests

* Add turbocharger speed sensor initialization functions

* Add turbocharger speed sensor to initialization

Co-authored-by: alxrMironov <330OMcorporative>
Co-authored-by: rusefillc <48498823+rusefillc@users.noreply.github.com>
2021-09-19 20:50:11 -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 a089a6d563dd710004ce1a7da1744b0b4b90c3b1.

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

This reverts commit 7b2bb8af4b3caa547236ca59e4c4bdb3ac1200cc.

* Debug changes

* Another debug changes

* Fix another debug changes

* Another debug changes 2

* Revert "Another debug changes 2"

This reverts commit cfad55141eec125b2f1d35fb95d9f46b54f666b6.

* Revert "Fix another debug changes"

This reverts commit 9bc2c74a3be6fd896827ff48cf4580e7657529c0.

* Revert "Another debug changes"

This reverts commit 4337ed8cad8dff508d093944eb3f75e9a69e4a77.

* Edit class  FrequencySensor, make it more RAII

* Debug changes

* Debug changes 2

* Debug changes 3

* Revert "Debug changes 3"

This reverts commit 52a7054c122b5157540fe45a055a84b57478d722.

* Revert "Debug changes 2"

This reverts commit dec79fb913344ccb4b8614910ad62e6c129a243e.

* Revert "Debug changes"

This reverts commit eb08d7a529b55ba397a7dd2c154b76eab42f212b.

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

This reverts commit 3a0bb1d3f1dd23c1b04e4cc1c526cfdc67ae86a3.

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

This reverts commit 3a0bb1d3f1dd23c1b04e4cc1c526cfdc67ae86a3.

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

Co-authored-by: alxrMironov <330OMcorporative>
2021-08-24 00:55:41 -04:00
Matthew Kennedy ec9dcce377
de init frequency sensor (#3183)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-08-21 09:02:05 +03:00
alxrMironov 7ebebd6922
Begin "vehicleSpeed" refactoring. Module switched to "FunctionalPointerSensor" class. #3106 #3107 #3108. (#3132)
* Add new sensor type "VehicleSpeed"

* Add "Vehicle speed" sensor to name list

* Add Vehicle speed sensor initialization with function pointer sensor.

* Add init_vehicle_speed_sensor.cpp to Makefile

* Replace dependencies from "getVehicleSpeed" to OOP-like "Sensor::get()"

* Add warning and TODO to "mock vehicle speed" call

* Replace get & mock "VehicleSpeed" methods in tests

* Remove #warning directive (cause error by current settings)

* Remove stray tab

* Remove explicitly type casting.

* Add "InitVehicleSpeedSensor" function declaration to init.h

* Add "VehicleSpeedSensor" initialization call into "InitNewSensors"

Co-authored-by: alxrMironov <330OMcorporative>
2021-08-12 22:16:51 +03:00
Matthew Kennedy b52d50bbf2
Use pch in lots of files (#3066)
* most engine.h

* most engine_configuration

* more

* more

* more

* more

* more

* moooooore

* ok I'm done for now

* oops
2021-07-26 01:05:17 -04:00
Matthew Kennedy 4474f9f1c2
Maf in sensor model (#2672)
* init

* consumers

* hasMafSensor

* consumers

* remove

* remove

* s

* guard

* tiny bit of ram

* ram
2021-05-09 20:59:06 -04:00
Matthew Kennedy 5ba7577496
move FSIO aux analog inputs to sensor model (#2669)
* sensor entries

* init

* non-explicit for list init to work

* switch fsio

* no longer need this lua hook

* init
2021-05-09 19:47:37 -04:00
Matthew Kennedy 742ea83bfa
Baro config (#2591)
* adjust API to allow i2c init to fail

* init

* proteus config

* 🎠🎠🎠

* buh

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-27 15:29:22 -04:00
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 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 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 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 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 de4990bfa2
encapsulate entry logic in to entry (#2018)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-05 10:16:52 -05: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 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 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 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 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 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
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