Commit Graph

611 Commits

Author SHA1 Message Date
Matthew Kennedy 614dc2f260
Strictly validate stack use in hardware CI (#4880)
* firmware error in case of low stack only on HW CI

* send date

* I don't java good

* I still don't java good

* send the right command

* I guess we can check it on every single test?

* javaaaaaa

* atoi breaks on later non-digit

* avoid sscanf use (for atoi)

to avoid bloating the stack

* less churn

* less churn

Co-authored-by: Nathan Schulte <nmschulte@desmas.net>
2022-12-08 13:20:55 -05:00
rusefillc 3606580178 error=parentheses 2022-12-03 01:12:31 -05:00
rusefillc 5e62595d69 reduce flash footprint by smarter code generation #4163 2022-12-03 00:51:41 -05:00
Andrey 3070e1b3c8 ETB duty cycle jitter #4833 2022-11-29 14:59:08 -05:00
Andrey 5b88c6b535 exp average is pretty cool 2022-11-28 19:22:45 -05:00
rusefillc 9321aae600 ETB duty cycle jitter #4833 2022-11-27 18:13:10 -05:00
Matthew Kennedy 8ea5969607
fix warnings (#4840)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2022-11-27 10:11:14 -05:00
rusefillc 926168a0d4 docs 2022-11-27 00:08:34 -05:00
rusefillc c8fa9a1ead reducing confusion 2022-11-25 18:59:43 -05:00
Nathan Schulte fd1115d01a
code style, GPS fixes (test, firmware) (#4822)
* tidy NMEA

* const in nmea

* correct gps test output

* fix GPS UART print statements

* cleanup feature toggles in settings

* fix comment typos, misc whitespace
2022-11-23 07:01:34 -04:00
Andrey 4a26b0973d A gem of dead code 2022-11-05 21:57:26 -04:00
Andrey c6e34be447 A gem of dead code 2022-11-05 21:53:38 -04:00
rusefillc f9fa729d8d less horrible constant name 2022-10-27 22:17:50 -04:00
rusefillc fe9b50e4b7 random progress 2022-10-27 21:32:23 -04:00
rusefillc ac08ffbdc4 GM SENT ETB bench test in NJ #4688 2022-10-26 10:37:35 -04:00
Andrey G 68e007caa3
loggingcentral: hotfix (#4654) 2022-10-10 19:12:04 -04:00
Andrey G b5ebb7d00e
Logging asserts (#4652)
* logingcentral: check final string for prohibited chars

Invalid char can come from arguments, not only format string so
scan final buffer.

* logingcentral: comment say '\r' is also not allowed

* logingcentral: just replace all non-printable chars with space

Do not assert

* loging: remove strlen()
2022-10-10 17:14:44 -04:00
Matthew Kennedy a9cc3223dc
plumbing for 4513 (#4599)
* plumbing for 4513

* not static
2022-09-20 06:19:51 -04:00
rusefillc 50cef9a201 tear down Engine god object #4511 2022-09-15 22:12:49 -04:00
rusefillc 52f52376de tear down Engine god object #4511 2022-09-15 21:55:15 -04:00
rusefillc 9e7f36a5ca tear down Engine god object #4511 2022-09-15 21:28:27 -04:00
Andrey G a269287b70
Os util update (#4574)
* chVTSetAny: "this could be simplified"

* os_utils: use Chibi's CriticalSectionLocker
2022-09-13 17:57:13 -04:00
Andrey G 55c1f53c75
dead code, reduce typedefs (#4566)
* Do lightweight checks first

* Dead getTimeIgnitionSeconds()

Dead since 81fffe87b7

* Get rid of efitime_t.

Purpose are not clear. Use efitick_t where ticks are used,
use efitimeus_t for uS, use efitimems_t or efitimems64_t for mS.

* Fix unit tests

* Fix misc: stm32f1_test_project
2022-09-11 16:08:11 -04:00
Andrey G 8069506135
EFI_PROD_CODE guard around port_mpu_util.h include (#4564) 2022-09-11 13:42:07 -04:00
Andrey G 91d4844e38
time routines refactor (#4563)
* Extract time helpers from engine_controller_misc to efitime.cpp

* Rename currentTimeMillis() to getTimeNowMs()

We have getTimeNowNt(), getTimeNowUs(), currentTimeMillis() and getTimeNowSeconds()
Align a bit.

find . -type f -name '*.c*' -exec sed -i 's/currentTimeMillis/getTimeNowMs/g' {} \;

* Rename getTimeNowSeconds() to getTimeNowS()

To align with Nt, Us, Ms versions.

* Some comments about getTimeNowLowerNt()
2022-09-11 13:06:03 -04:00
Andrey ab4b451195 os_access.h dead? 2022-09-07 15:56:45 -04:00
Andrey b756456450 tear down Engine god object #4511
just trying different things
2022-09-05 04:00:24 -04:00
Andrey 0253575c79 tear down Engine god object #4511
just trying different things
2022-09-05 03:07:03 -04:00
Andrey a0b52eeb2f different file names for different entities 2022-09-04 23:11:19 -04:00
Andrey 1da080c529 reducing warnings 2022-09-01 21:04:52 -04:00
Andrey fcd0636a01 tear down Engine god object #4511
just trying different things
2022-09-01 19:00:16 -04:00
Andrey b89217b596 reducing confusion between library header and rusefi main repo header 2022-09-01 11:35:35 -04:00
Matthew Kennedy 423f69a842
allow logging multiple warnings at once (#4414)
* allow logging multiple warnings at once

* comment

* .Code

* Revert ".Code"

This reverts commit 2b986bd500.

* add a better comparison operator instead of conversion

* dot code

* Revert "dot code"

This reverts commit 35f6ae1007.

* force gcc-10 maybe?

* Revert "force gcc-10 maybe?"

This reverts commit 4ddf8bcefd.

* vq

* dot code

* dead

* dot code

* return may be null

* static_vector; maybe cyclic_buffer is broken or wrong tool for the job?

* move static vector

* put cyclic buffer back how it was since we don't use it now
2022-08-17 01:12:25 -04:00
rusefillc db8a965288 unconditional VVT PID logging 2022-08-17 00:47:31 -04:00
Matthew Kennedy 923d2c2e44
unexpected contains information about why it failed (#4393)
* unexpected can contain information

* info printing

* sensors return appropriate error codes

* remove reliance on undefined behavior

* s
2022-07-28 10:04:28 +03:00
Matthew Kennedy b99d90b006
Start -> start (#4366) 2022-07-21 15:17:32 -04:00
Matthew Kennedy 2b2eb04aba
libfirmware gets efi::size (#4354) 2022-07-18 01:56:58 -04:00
Matthew Kennedy acf18c7072
move math (#4353) 2022-07-17 00:16:22 -04:00
Matthew Kennedy a0d8ae3f4f
use libfirmware for a few things (#4351)
* use libfirmware

* unit tests

* crc

* missed one

* bootloader
2022-07-16 02:22:51 -04:00
rusefillc 5db378970d PID logging: p term #4337 2022-07-08 10:31:34 -04:00
rusefillc 668a57353a PID logging: p term #4337 2022-07-08 09:49:58 -04:00
Matthew Kennedy 3284282be7
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 5607baefa2
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 4fa1f4071a borrowing from David 2022-06-26 20:19:54 -04:00
rusefillc 149f6ea110
ChibiOS 20.3.5 (#4285)
* ChibiOS 20.3.5

* chibios bump

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-06-25 12:43:28 -04:00
rusefi dd22cc520f looks like some lines are longer than 128 2022-05-19 22:55:03 -04:00
rusefillc d5e131b1d0 m_hasSynchronizedSymmetrical handling improvements #4099
API progress
2022-05-09 04:04:38 -04:00
Matthew Kennedy 58619b4115
Scaled channel ints (#4129)
* test that fails today

* Revert "int32 scaled_channel has float precision #4128"

This reverts commit 03d44b75ea.

* fix the problem

* format

* x

* s
2022-05-02 15:20:02 -04:00
Matthew Kennedy e4a0979dc2
Brain pin is enum class (#4108)
* change most usages to Gpio::

* board configs

* engine configs etc

* isBrainPinValid, smart gpio

* generator

* generator

* generator

* connector yamls

* kinetis enums

* cypress txt

* kinetis config

* frankenso

* config generator

* actually do it for the others

* disable skips for pr ci

* fix tle8888

* misc

* weird cast from int

* needs this operator too

* this can be an unsigned subtract

* happy tests

* s

* kinetis isConfigurationChanged weirdness

* missed J/K

* cypress efifeatures

* build script mistake (!)

* mistake in smart gpio

* debounce

* eg33

* kinetis, so needy

* it's pretty green, we can skip these again
2022-04-28 17:32:39 -04:00
Matthew Kennedy c3fb211d6b
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
Matthew Kennedy bc6a87cadc
allow enum_class in rusefi_hw_enums.h (#4104)
* make things c++ friendly

* install various canaries in coal mines

* using is much clearer than typedef

* fixing builds

* lps25

* trigger includes were a mess

* c -> c++ cleanup

* os util

* why did so many include os_util.h?

* fwd declare

* cypress/kinetis

* s

* eg33 happy

* happy sim

* cypress usb

* pch

* cypress

* doesn't need to include all that

* h7
2022-04-25 20:38:16 -04:00
rusefillc d2205a7fd6 Set sensible default for dwell by voltage multiplier table fix #4067 2022-04-13 15:21:44 -04:00
rusefillc b776003989 do not control VVT during cranking fix #3443 2022-04-10 19:22:39 -04:00
Matthew Kennedy f1742c44ff
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 b2bb493be3.

* missed an autoscale
2022-03-24 08:58:55 -04:00
Matthew Kennedy 7d657106d7
warning cleanup (#4020) 2022-03-22 16:53:24 -04:00
Andrey 9c5bd03bba docs 2022-03-19 19:33:37 -04:00
Andrey G 54a2204f80
cli_registry: save 99 bytes (#3992) 2022-03-13 09:18:45 -04:00
Andrey G 3c5f5901ee
Fix unknown command #3980 (#3987) 2022-03-09 18:52:12 -05:00
Matthew Kennedy 0937de1b84
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 38cb44717e volatile increment warning 2022-02-26 22:58:51 -05:00
rusefillc c5860ce731 volatile increment warning 2022-02-26 22:51:43 -05:00
Andrey G 067055095f
cli registry: rework this hell, add FFF and FFFFF (#3964)
* cli registry: rework this hell, add FFF and FFFFF

* kinetis: no nodefaultlib

* revert back token helpers

* cli_registery: argument parser: do not eat qoutes

* Unit test for FFF

* cli_registry: remove debug
2022-02-26 16:58:10 -05:00
Matthew Kennedy f1897ba7aa
less dependence on that logger (#3884)
* less dependence on that logger

* comma

* refactor a bit, make it clear what this thing actually *does*

* static

* shrink the buffer a bit and make names useful

* dead util that's just subtraction lol
2022-02-09 06:53:16 -05:00
Andreika 2beca221a3
hellen_board_id + hellen-common.mk (#3885)
* Hellen_board_id

* move EXTI init before config load

* add NT2USF()

* Hellen_board_id unit-tests

* hellen-common.mk

* fix for older macos compiler
2022-02-03 11:24:31 -05:00
Matthew Kennedy 2595decb58
delayedShutoffRequested (#3881) 2022-02-02 14:57:19 -05:00
rusefillc 42deca0fd0
Main relay shutdown rebase (#3880)
* aggregate

* main relay controller handles delayed shutoff

* main relay controller handles delayed shutdown

Co-authored-by: Matthew Kennedy <matthewkennedy@outlook.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-02-02 00:45:11 -05:00
rusefillc ca98e270e1
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 493dcb4d66
flash savings (#3858)
* save table space

* turn some stuff off on some boards

* comment
2022-01-31 08:57:37 -05: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
rusefillc b8eafd7652 docs 2022-01-22 22:18:50 -05:00
Matthew Kennedy 71fb9e9a7d
does this help? (#3795)
* does this help?

* maybe this helps

* oops I snuck in an O0

* only firmware
2022-01-16 08:55:40 -05:00
rusefillc 71b2dc762a https://en.wikipedia.org/wiki/Pi 2022-01-14 21:23:27 -05:00
rusefillc 4db4ac060c Code style for methods with zero arguments #3535 2022-01-11 22:40:52 -05:00
rusefillc 963c168788 Code style for methods with zero arguments #3535 2022-01-11 22:26:24 -05:00
rusefillc 316a67c234 dead code 2022-01-11 22:20:15 -05:00
GitHub build-firmware Action 2208947bb3 Auto-generated configs and docs 2022-01-05 06:49:51 +00:00
GitHub build-firmware Action 38b17f5859 Auto-generated configs and docs 2022-01-05 05:09:04 +00:00
rusefillc 51ade79641 itoa unit test, not a very detailed one 2022-01-03 03:31:57 -05:00
Matthew Kennedy 4981eb43d0
extract isSyncPoint function (#3726)
* extract isSyncPoint

* test because why not

* check vvt resync nb2

* clean up noise from test case

* clarify and comment
2021-12-30 11:39:04 -05:00
Matthew Kennedy a4871c703c
Autoscale all the things! (#3713)
* Map3D accepts any scaled_channel type

* consistency

* reinstate test

* fix ratio

* throttle, boost, gppwm

* scale ignition and VE

* tests
2021-12-22 08:09:41 -05:00
Matthew Kennedy dff6d9b2f1
Map3D accepts any scaled_channel type (#3712)
* Map3D accepts any scaled_channel type

* consistency

* reinstate test

* fix ratio
2021-12-21 18:52:46 -05:00
Matthew Kennedy b6a8bed429
tables support non-integer-scaled scaled_channel (#3708)
* support dividers

* float

* format
2021-12-21 00:59:07 -05:00
Matthew Kennedy c176bbebc1
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
Matthew Kennedy 3a4a0ba18d
simplify some table lookups (#3692)
* simplify

* expand interpolation test
2021-12-20 08:14:30 -05:00
rusefillc 87a8c0831d helping mac 2021-12-20 01:23:23 -05:00
Andrey e0b5352cbe 2 byte table axis #3045 2021-12-19 23:23:33 -05:00
Andrey 3789d570f7 2 byte table axis #3045 2021-12-19 23:20:21 -05:00
Andrey 0002570791 2 byte table axis #3045 2021-12-19 23:17:17 -05:00
Andreika 72cefd42de
CAN ISO-TP progress (+unit-tests fix) (#3677)
Co-authored-by: Andrei <andreikagit@users.noreply.github.com>
2021-12-08 15:11:19 -05:00
rusefillc 5f4b224b5f tune via CAN #3361
CAN testability
2021-12-04 01:01:48 -05:00
rusefillc 85ec5aa8e7 hellen81 util changes 2021-12-01 20:46:36 -05:00
rusefillc f79ae3c623 why so many channels are hidden in debug ? #3614 2021-11-29 00:33:05 -05:00
rusefillc bdde177e04 skipspark script kills ECU fix #3611 2021-11-25 22:40:19 -05:00
Andrey c2fa1cea78 minor progress 2021-11-24 22:35:56 -05:00
Andrey 756f64eb17 dead file 2021-11-24 20:26:40 -05:00
Matthew Kennedy 3334a6963c
oh my god we've had no asserts (#3595) 2021-11-22 17:52:03 -05:00
rusefillc da68ff5ad6 j1850 SAE crc8 2021-11-22 14:03:52 -05:00
Scott Smith cbc7c61b3e
Fix potential buffer overrun in cyclic_buffer. (#3583)
This exposed a buffer overrun, so double the size of the buffer (to account for 720 degree engine
cycle vs 360 degree crank events).

Also use proper numeric limits when computing min/max.
Finally, add a lock around the call to cyclic_buffer that actually caused the contention.
2021-11-20 03:01:11 -05:00
Matthew Kennedy bb57a4b084
detect more overflows with asan (#3582)
* overflow detector

* type list dynamic allocate

* fix the buffer length

* comment

* pr fb

* sanitize sim

* fix sim sanitizer bug

* didn't mean to turn off optimization for sim

* asan can do that, if you turn it on!

* cleaning
2021-11-20 01:38:39 -05:00
Scott Smith 5bc1949aef
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