Commit Graph

2050 Commits

Author SHA1 Message Date
Matthew Kennedy 7116670fd0 build tweaks for size (#4661)
* don't align on non-cached mcu

* lua decimal point

* no snprintf

* sort sections by alignment

* unit tests
2022-10-13 20:30:30 -04:00
Matthew Kennedy a13445478f consolidate analog vs. temp info commands (#4646)
* consolidate analog vs. temp info commands

* cleanup

* guard
2022-10-10 07:44:20 -04:00
Andrey G 27e00702f5 SENT core decoder and ICU driver (#4648)
* SENT: copy-paste SENT decoder from rusefi-hardware

* SENT: decoder: refactor, cleanup

* SENT: add ICU implementation

* SENT: decoder: use pch.h

* SENT: EFI_PROD_CODE guard

* SENT: ICU driver: fixes

* SENT: don't forget to SysLock

* SENT: call Start on Init (agrrrr)

* SENT: ICU: some limitations

ICU can capture on two firsts TIM inputs only. So move from PA2 to PA1

* SENT: mmmm... c++... i like it (no)

* SENT: autocalibrate tick time

* SENT: debug

* SENT: clean-up

* SENT: optimize slow channel mailboxes

* SENT: GetSignals() helper
2022-10-09 06:38:28 -04:00
rusefi 75bf7382a2 We are mostly focused in standby, not in stop 2022-10-03 19:37:17 -04:00
GitHub gen-configs Action ad39e5aee9 Auto-generated configs and docs 2022-09-30 03:15:40 +00:00
rusefillc 587c448688 CAN side of automated testing #4630 2022-09-29 23:01:06 -04:00
Matthew Kennedy 9916ff9935 rtc cleanup (#4596)
* rtc formatting and code style

* more cleanup

* s

* time example
2022-09-20 05:28:42 -04:00
GitHub gen-configs Action 7de6639e22 Auto-generated configs and docs 2022-09-19 01:31:32 +00:00
rusefillc dc91281b3b CanCategory 2022-09-18 20:44:00 -04:00
rusefillc 1c28ca0582 tear down Engine god object #4511 2022-09-15 21:46:01 -04:00
Andrey G f5a4cfc06f digital_input: check for valid callback not name! (#4575) 2022-09-13 18:02:00 -04:00
rusefillc 5da9012d70 moving SD logic to better source 2022-09-12 20:39:43 -04:00
Andrey G c1c9d5222a tle8888 dead code (#4568) 2022-09-12 18:54:29 -04:00
Andrey G bf3c6e32c2 stm32: microsecond timer: set correct period value (#4567)
Driver sets (period - 1) to ARR (auto-reload register)
So we need to set period to (1 << 32) to get maximum
0xffffffff value in ARR. But period is uint32_t.
So set it to 0 and it will ovelap to UINT32_MAX at
pwmp->tim->ARR  = pwmp->period - 1;
2022-09-12 07:35:31 -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 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
rusefillc cb3c070928 refactoring: type safety 2022-09-11 02:57:35 -04:00
rusefillc f9b849dd8f refactoring - reducing API between FW and Java 2022-09-11 02:16:47 -04:00
Andrey 3c1cc0b857 trigger: in corner cases like NB2 and VQ35 those are not revolutions 2022-09-07 22:24:28 -04:00
Andrey 91179ac54b brutal encapsulation 2022-09-07 20:31:04 -04:00
Andrey a7c8ce61f4 brutal encapsulation 2022-09-07 19:37:11 -04:00
Andrey 25b6d39802 os_access.h dead? 2022-09-07 15:56:45 -04:00
rusefi 06552b6bee servo is truly not alive 2022-09-06 16:29:12 -04:00
Andrey 6188703384 tear down Engine god object #4511
just trying different things
2022-09-05 04:09:59 -04:00
Andrey 1ffa98ba89 a bit of dead code 2022-09-01 11:47:56 -04:00
rusefillc bd9a177074 helping CI stay green 2022-08-27 14:51:41 -04:00
Matthew Kennedy 58e27505db log missed exti events (#4473)
* log missed exti events

* units

* s

* guard

* stub for non stm32
2022-08-23 19:45:28 -04:00
rusefillc fdde38c203 better method name 2022-08-22 18:07:59 -04:00
rusefi 27c1165560 canRxAdd bus does not convert from Lua/human value into zero-indexed implementation value fix #4467 2022-08-21 23:48:10 -04:00
rusefi b94195255c less violent error handling 2022-08-21 22:46:59 -04:00
rusefi 3eeff9e388 Lua CAN bus index: let's fail if invalid value specified 2022-08-21 22:31:52 -04:00
rusefillc d418a7f288 RUSEFI virtual drive to spell out firmware version fix #4458 2022-08-18 21:02:26 -04:00
rusefillc eb5f0abd3b RUSEFI virtual drive to spell out firmware version fix #4458 2022-08-18 20:13:00 -04:00
rusefillc 09027e90ec RUSEFI virtual drive to spell out firmware version fix #4458 2022-08-18 19:49:01 -04:00
rusefillc 82d2cf2187 RUSEFI virtual drive to spell out firmware version fix #4458
# Mac OS comes with Bash version 3 which is quite limiting and lack key features
2022-08-18 19:46:42 -04:00
rusefillc c65f64200f RUSEFI virtual drive to spell out firmware version fix #4458
80% of the result for 20% of the effort
2022-08-18 19:31:49 -04:00
rusefillc dfd4953f0d unconditional VVT PID logging 2022-08-17 00:47:31 -04:00
Matthew Kennedy aafd128b13 update libfirmware (#4446)
* update libfirmware

* s
2022-08-16 23:02:34 -04:00
rusefi 8a15a4facc verboseCan bugfix 2022-08-11 01:19:10 -04:00
rusefi 5a5f857895 ISO-TP does not work on real car #4427 2022-08-11 00:29:09 -04:00
rusefillc 19ad9672a4 verboseCan EXT fix 2022-08-09 20:39:27 -04:00
Matthew Kennedy 5fc7000834 Pt2001 module (#4396)
* pt2001 uses module

* read flag0

* c

* libfirmware

* makefiles

* are unit tests happy?

* bootloader
2022-08-08 08:53:08 -04:00
Andrey G 074563ddfd OpenBLT shared params (#4417)
* OpenBLT: linker file: use last 16 bytes of ram for shared area

This area is used for communication between FW and OpenBLT.

* OpenBLT: startup: invalidate only DFU breadcumb from startup code

Same location (but different seed) is used for shared param's
signature in OpenBLT.

* OpenBLT: enable shared params

* OpenBLT: enable hooks

If 0x01 is stored in shared param idx=0, then stay in OpenBLT forever.

* Jump to OpenBLT: store proper shared param when OpenBLT is requested

TODO: calculate and store CRC too!

* OpenBLT: move shared_params to start of RAM

* Bootloader: Allocate 16 bytes at start of RAM for bootloader shared area

* OpenBLT: shared_params: reuse same .c and .h file for main application

* OpenBLT: shared_params: enable CRC check

* OpenBLT: no need to manualy set breadcumb before reset

* Revert "OpenBLT: startup: invalidate only DFU breadcumb from startup code"

This reverts commit 6b064714b953560227ae53e38355332cf9f46f7f.

* OpenBLT: guard for builds without OpenBLT

* OpenBLT: reboot to OpenBLT on CAN request with ID=0x667 and DLC=2

* config: options to enable OpenBLT on CAN interfaces

* OpenBLT: comments
2022-08-07 19:33:19 -04:00
Matthew Kennedy 61291ad4a5 tle9104 driver (#4410)
* tle9104

* it works!

* cleanup

* cleanup for pr

* efifeatures

* guards
2022-08-02 19:02:03 -04:00
Matthew Kennedy eb442998dc misc fixes (#4411)
* fix warnings

* break to debugger in case of panic

* move the check

* s
2022-08-02 12:19:50 -04:00
Andrey G b8d6d6bf6c MRE: tle8888 ls2 fix and friends (#4409)
* tle8888: ups IGN1

* tle8888: more BIT() macro

* tle8888: fix typos

* tle8888: fix LS2 output on MRE when stepper is enabled

Default settings casue one (or few) not used direct driver inputs
to be mapped to OUT5 (LS2 on MRE)

* smart_gpio: comments for TLE8888 on MicroRusEFI

* smart_gpio: typo

* tle8888: more comments
2022-08-02 00:50:56 +03:00
rusefillc a4dd43da27 https://github.com/andreika-git/hellen-one/issues/173 2022-07-31 04:39:02 -04:00
rusefillc 4bf82d2611 [SECURITY] Cheap password protection against tune modification #4243
ohh cute we have name overlap!
2022-07-30 11:28:56 -04:00
rusefillc b3e13f12b4 Adc mux (#4379)
* adc mux

* cypress is a special ADC size case

Co-authored-by: Matthew Kennedy <matthewkennedy@outlook.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-07-26 14:12:00 +03:00
rusefillc 87df9d1718 safer without LED 2022-07-26 04:35:12 -04:00