Commit Graph

113 Commits

Author SHA1 Message Date
Matthew Kennedy cd98ad35c2 use libfirmware for a few things (#4351)
* use libfirmware

* unit tests

* crc

* missed one

* bootloader
2022-07-16 02:22:51 -04:00
rusefillc 4c4f494904 PID logging: p term #4337 2022-07-08 10:31:34 -04:00
rusefillc 443770e902 PID logging: p term #4337 2022-07-08 09:49:58 -04:00
Matthew Kennedy 67439afb96 rescale RPM values (#4300)
* rpm configs

* fix

* s

* s

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2022-06-29 18:48:30 -04:00
rusefillc adc460fb49 Iss debug (#4290)
* one call only

* oops am idiot

Co-authored-by: David Holdeman <dave@holdemanenterprises.com>
2022-06-27 22:29:34 -04:00
rusefillc 0b96f46f23 borrowing from David 2022-06-26 20:19:54 -04:00
Matthew Kennedy c3532b4635 fix vss/iss filter parameter validation (#4114)
* fix filter parameter validation

* use values that don't get clipped
2022-04-27 22:29:51 -04:00
rusefillc 53f323ca0c Set sensible default for dwell by voltage multiplier table fix #4067 2022-04-13 15:21:44 -04:00
Matthew Kennedy 4c2518c4c0 output channel tweaks (#4023)
* shuffle around output channels

* postState should take a ref

* s

* s

* patch input file

* limits

* accel bad bounds check

* units

* units

* Revert "accel bad bounds check"

This reverts commit b2bb493be331d5d2cf40b9ed01363a53182c883e.

* missed an autoscale
2022-03-24 08:58:55 -04:00
Matthew Kennedy 0c6a369777 flash storage uses 32 bit CRC (#3984)
* better flash logic and warning message

* comment

* s

* ssssss

* simplify logic

* use 32 bit crc

* s

* don't test things that don't exist
2022-03-08 23:17:35 -05:00
rusefillc 5c16186919 safer file name (#3861)
* safer file name

* safer file name

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-01-31 21:51:32 -05:00
Matthew Kennedy a1647fd66e 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
rusefillc e8f980eca0 docs 2022-01-22 22:18:50 -05:00
rusefillc 597a3430d9 https://en.wikipedia.org/wiki/Pi 2022-01-14 21:23:27 -05:00
rusefillc fc996ad339 Code style for methods with zero arguments #3535 2022-01-11 22:26:24 -05:00
GitHub build-firmware Action e4f828c0a1 Auto-generated configs and docs 2022-01-05 06:49:51 +00:00
GitHub build-firmware Action fd23938b2a Auto-generated configs and docs 2022-01-05 05:09:04 +00:00
Matthew Kennedy c92f6b832b ui & config for fuel/ign trim tables (#3704)
* ui & config

* bump flash version

* compaction

* s

* make things happy

* fsio too

* OK, well those defaults were insane

* b

* why are these defaults insane

* adjust cylinder offset ui

* s

* cleanup
2021-12-20 21:58:53 -05:00
rusefillc 44389c5eca helping mac 2021-12-20 01:23:23 -05:00
Andrey 05daba6539 2 byte table axis #3045 2021-12-19 23:20:21 -05:00
rusefillc 1e53844f5b why so many channels are hidden in debug ? #3614 2021-11-29 00:33:05 -05:00
rusefillc 3d8ddbceea j1850 SAE crc8 2021-11-22 14:03:52 -05:00
Scott Smith 07d30285fc Basic framework for high pressure fuel pump control (#3476)
* Basic framework for high pressure fuel pump control

* Many changes

Move calculations to fast callback
Move main object into Engine
Respond to pin changes without requiring a reboot

* Use EngineModule for HpfpController
Schedule pin off after executing pin on so we are sure it ends, even if the motor stops.
Test scheduling.
Less RAM use by only having one event and reordering fields.

* Make scheduling test actually useful - need non-0 activation angle.

Co-authored-by: rusefillc <48498823+rusefillc@users.noreply.github.com>
2021-11-19 23:06:51 -05:00
Scott Smith dac2ae9b1d Programmatically remove EnginePtr/inject, EXPAND_Engine, and WITH_ENGINE_TEST_HELPER* (#3560)
* Programmatically remove EnginePtr/inject, EXPAND_Engine, and WITH_ENGINE_TEST_HELPER*

for i in ": public EnginePtr " ", public EnginePtr" "EXPAND_Engine;" "EXPAND_Engine"; do
    git grep -l "$i" | xargs sed -i "s/$i//g"
done

git grep -l "inject" | xargs sed -i "/inject[(][)]/d"

for i in WITH_ENGINE_TEST_HELPER_SENS WITH_ENGINE_TEST_HELPER_BOARD_CALLBACK WITH_ENGINE_TEST_HELPER; do
    git grep -l "$i" | xargs sed -i "s/$i/EngineTestHelper eth/g"
done

git checkout firmware/controllers/core/engine_ptr.h
git checkout unit_tests/global.h

* Review fixups.
2021-11-16 16:52:11 -05:00
Matthew Kennedy c1941f3a49 (void) -> () (#3550)
* static functions with (void)

* more

* Revert "more"

This reverts commit 246e53441f935451437df186ac92d7df26b62fb6.

* s

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-15 13:02:34 +01:00
Matthew Kennedy bd04dc8352 less macro, more c++ (#3549)
* less macro

* s
2021-11-15 12:44:40 +01:00
racer-coder a18beadb03 Create an interpolate3d function to match the interpolate2d, but for 3d tables. (#3459)
Remove some implicit C array to pointer conversions in Map3D by adding
(), *, and & where appropriate.  This allows us to remove getBinPtr.

Call interpolate3d from Map3d so there's no code duplication.
2021-11-04 14:07:37 -04:00
Matthew Kennedy a2766e5d9b support autoscale on table axes (#3452)
* scale map Y axis

* allow different row/col types

* scaled channel detector

* interpolation

* looks like this actually works

* tests, no manual scaling

* comment
2021-11-03 19:53:26 -04:00
Andrey 592bf2a359 docs 2021-11-02 23:34:44 -04:00
Andrey 14aac56c41 warning(CUSTOM_PID_DTERM, "PID: unexpected dTime") 2021-10-29 18:31:43 -04:00
rusefillc 4ff353b98a pid into lua 2021-10-21 19:43:30 -04:00
rusefillc 8feeb9cacd refactoring 2021-10-20 21:47:49 -04:00
GitHub build-firmware Action 5ab712c51d Auto-generated configs and docs 2021-10-17 01:13:47 +00:00
rusefillc 86db25f94a progress - live doc generator works again! 2021-10-16 21:08:50 -04:00
rusefillc 94be3608a1 better file locations 2021-10-16 20:17:01 -04:00
Andrey 9075888e7b zero dwell warning at zero RPM #3153 2021-08-16 09:11:22 -04:00
rusefillc 47c20c95dd zero dwell warning at zero RPM #3153 2021-08-16 04:20:32 -04:00
Matthew Kennedy e056369f05 actually remove FSIO idle stuff (#3150)
* debug mode

* pid cleanup

* more dead

* more dead

* wow more dead

* much dead many death wow
2021-08-14 09:48:45 +03:00
Matthew Kennedy 39388c75d8 even more pch (#3112)
* s

* more

* s

* f7
2021-08-04 19:30:52 -04:00
Matthew Kennedy 4e6b61234f 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
Matthew Kennedy d3ec2b21d1 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
Andrey 78daeb7cba more details into error message 2021-07-02 19:05:54 -04:00
Matthew Kennedy aadcd0cc6b Check that table axes are ascending (#2866)
* templated interpolation check

* check tables
2021-06-26 15:02:25 -04:00
Matthew Kennedy 68ad12da53 convert a table to scaled_channel (#2724)
* scaled VE table

* use setTable

* efi::clear

* ratio -> struct
2021-05-20 20:00:32 -04:00
Matthew Kennedy 8b042ab9b1 rewrite table3d (#2723)
* post cranking factor limits

* sensible defaults

* but not for tests

* add pointer version of get bin

* test via map3d

* put that back for a minute

* new impl

* fix order

* rename and fix table orientation

* flip the table to the correct orientation

* dead cleanup, rename

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-05-20 22:31:16 +03:00
Matthew Kennedy 737ee444b8 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 992c16b4af 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
rusefillc 8080f3bde7 helping us trace CUSTOM_INTEPOLATE_ERROR 2021-04-08 16:14:06 -04:00
Matthew Kennedy 5e6746c3aa 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 ff5bf3e3c3 error accumulator (#2434)
* error accumulator

* makefile
2021-03-08 07:40:46 -05:00