Commit Graph

29 Commits

Author SHA1 Message Date
rusefi 1d64003dd6 only:WrapAround62 goes to libfirmware 2023-08-30 23:47:26 -04:00
rusefi 78e48d3718 only:timer.h goes to libfirmware! 2023-08-30 23:11:24 -04: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
rusefillc ac08ffbdc4 GM SENT ETB bench test in NJ #4688 2022-10-26 10:37:35 -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
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 b776003989 do not control VVT during cranking fix #3443 2022-04-10 19:22:39 -04: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
rusefillc 4db4ac060c Code style for methods with zero arguments #3535 2022-01-11 22:40:52 -05:00
rusefillc 316a67c234 dead code 2022-01-11 22:20:15 -05:00
rusefillc 825a57e33a Overflow in currentTimeMillis and getTimeNowSeconds #3531
it now takes 1000 times longer to overflow
2021-11-11 16:39:23 -05:00
Scott Smith 13c496b79b
Make getTimeNowNt even faster (#3504)
The last version is already much better than the original, mostly because it doesn't call
CriticalSectionLocker, which has a ton of overhead due to debug tracking.  But this version is
another 4 instructions / 12 bytes shorter.  Does as much match in 32-bit land as possible, and
avoids math operations that span 64-bits (i.e. either operate on the lower half or upper half, but
not both).  The result is only 3 instructions not including the necessary 4 loads (ptr to now, now,
ptr to upper, upper), 1 store (upper), and 1 return/branch.
2021-11-08 14:24:31 -05:00
Matthew Kennedy f6095b8339
fix nonlinear correction threshold (#3060)
* s

* macro

* test has to do the inverse
2021-07-25 20:42:26 -04:00
rusefillc 7dbc9afa38 Avoid float -> int64 conversion #1993 2020-12-03 10:31:16 -05:00
rusefillc df5c33ea86 Avoid float -> int64 conversion #1993 2020-12-03 10:26:50 -05:00
rusefillc 90e5630e60 avoid float -> int64 conversion #1977
cherry picking...
2020-11-23 23:33:46 -05:00
Matthew Kennedy 5d3d85d644
put getTimeNowLowerNt in to mpu_util (#1950)
* put getTimeNowLowerNt in to mpu_util

* move GPTDEVICE to port_mpu_util

* and remove from efifeatures
2020-11-18 14:17:00 -05:00
rusefi 9653eebe9d Trigger sync lost every 2^32 CPU cycles #1873
only a random code comment
2020-10-11 18:17:30 -04:00
rusefi d48a57d599 refactoring: extracting DEEP_IN_THE_PAST_SECONDS contant 2020-01-31 01:21:56 -05:00
rusefi 83b1ca00a4 code style 2020-01-21 01:40:11 -05:00
Matthew Kennedy ba0c48e0ac use NT_PER_SECOND instead of convert from microseconds (#1107)
* add NT_PER_SECOND

* missed a few

* inject tooth logger timestamp

* inject
2020-01-19 22:23:41 -05:00
rusefi bb217b01dd happy new year unification 2020-01-13 21:57:43 -05:00
rusefi 609865da0f hopefully useful macro? 2019-12-21 21:18:38 -05:00
rusefi e79287f537 Delayed A/C compressor switch #922 2019-09-08 21:05:03 -04:00
rusefi d7fd0ce6c1 refactoring: better method name 2019-05-07 19:32:08 -04:00
rusefi bc4d76a144 The Big Refactoring of 2019: folder structure #723 2019-04-25 22:10:58 -04:00