Commit Graph

28 Commits

Author SHA1 Message Date
Matthew Kennedy 9dc183a173
we use small time units here in the future (#287) 2023-11-01 22:31:27 -07:00
Nathan Schulte d4cc3caeab 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 107562a569 GM SENT ETB bench test in NJ #4688 2022-10-26 10:37:35 -04:00
Andrey G 2b4012b279 dead code, reduce typedefs (#4566)
* Do lightweight checks first

* Dead getTimeIgnitionSeconds()

Dead since 5274cffff3

* 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 a98ad15984 EFI_PROD_CODE guard around port_mpu_util.h include (#4564) 2022-09-11 13:42:07 -04:00
Andrey G 1ca5988877 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 6218edd040 allow logging multiple warnings at once (#4414)
* allow logging multiple warnings at once

* comment

* .Code

* Revert ".Code"

This reverts commit 2b986bd50035aeec051d11aafd83fdbc1694351c.

* add a better comparison operator instead of conversion

* dot code

* Revert "dot code"

This reverts commit 35f6ae1007c41e3b30ea129a324f33ab4205036d.

* force gcc-10 maybe?

* Revert "force gcc-10 maybe?"

This reverts commit 4ddf8bcefddd354ccdc1da682c5fff1e68d44273.

* 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 5f288d88dc do not control VVT during cranking fix #3443 2022-04-10 19:22:39 -04:00
Matthew Kennedy 47b4ace4cb 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 e6c705ece1 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 dd4950f850 Code style for methods with zero arguments #3535 2022-01-11 22:40:52 -05:00
rusefillc 433aedd036 dead code 2022-01-11 22:20:15 -05:00
rusefillc 677a2ede70 Overflow in currentTimeMillis and getTimeNowSeconds #3531
it now takes 1000 times longer to overflow
2021-11-11 16:39:23 -05:00
Scott Smith 8639b7c7e4 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 be7ef805c9 fix nonlinear correction threshold (#3060)
* s

* macro

* test has to do the inverse
2021-07-25 20:42:26 -04:00
rusefillc 16f4aa0281 Avoid float -> int64 conversion #1993 2020-12-03 10:31:16 -05:00
rusefillc cf77902193 Avoid float -> int64 conversion #1993 2020-12-03 10:26:50 -05:00
rusefillc 315bfe6531 avoid float -> int64 conversion #1977
cherry picking...
2020-11-23 23:33:46 -05:00
Matthew Kennedy 786aaf2e3c 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 6fe1f18067 Trigger sync lost every 2^32 CPU cycles #1873
only a random code comment
2020-10-11 18:17:30 -04:00
rusefi 1735529a6b refactoring: extracting DEEP_IN_THE_PAST_SECONDS contant 2020-01-31 01:21:56 -05:00
rusefi d91a7a6a8f code style 2020-01-21 01:40:11 -05:00
Matthew Kennedy f8cd2ad3ce 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 a222ecdfe1 happy new year unification 2020-01-13 21:57:43 -05:00
rusefi 4c30e7b1b9 hopefully useful macro? 2019-12-21 21:18:38 -05:00
rusefi 50e0887c96 Delayed A/C compressor switch #922 2019-09-08 21:05:03 -04:00
rusefi 8a90297160 refactoring: better method name 2019-05-07 19:32:08 -04:00
rusefi 65fb45c8a6 The Big Refactoring of 2019: folder structure #723 2019-04-25 22:10:58 -04:00