Commit Graph

378 Commits

Author SHA1 Message Date
Andrey b81fb40203 testability: bench test commands should have automated coverage using simulator #5562
only: making CAN frame always available to simulator
2023-09-14 08:34:24 -04:00
rusefi e8c45a2e7d refactoring: reducing code duplication. Also, do we even care for critical error codes?! 2023-08-20 22:23:44 -04:00
rusefi 54797ab559 refactoring: reducing code duplication. Also, do we even care for critical error codes?! 2023-08-20 22:05:19 -04:00
rusefi 80e52f5898 bench_test CAN packets do not use proper IDs #5525
only:hw
2023-08-20 21:41:25 -04:00
rusefi d08fbc2878 bench_test CAN packets do not use proper IDs #5525 2023-08-20 21:35:04 -04:00
Andrey G 9a9495f0fb
Pvs analysis (#5509)
* The 'chip->drv_state' variable is assigned values twice successively.

Found with PVS-Studio

* variable is assigned to itself

Found with PVS-Studio

---------

Co-authored-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
2023-08-11 11:21:43 -04:00
rusefi 18222160d8 reducing code duplication 2023-07-16 15:52:43 -04:00
rusefillc c2c5d5b01f cleaner HAL usage 2023-07-06 16:07:55 -04:00
rusefillc 47d92d3e95 helping gcc 2023-06-15 23:28:27 -04:00
rusefi 3ddc3d42c2 ohh CanCategory was never used?! 2023-05-17 19:56:39 -04:00
Andrey 51d0f6e347 it's going to be painful 2023-04-29 00:44:00 -04:00
Matthew Kennedy 61e5b4b1ad change ObdCode to enum class builds firmware 2023-04-29 00:44:00 -04:00
rusefillc b9d5053288 it's going to be painful 2023-04-28 23:11:40 -04:00
Matthew Kennedy bb49b22294 joystick, lcd
(cherry picked from commit 61c17791b89fc6b5ae17df96d9498c088afdb09f)
2023-04-28 22:32:37 -04:00
rusefillc b213dddcd6 style unification 2023-04-19 16:46:41 -04:00
rusefillc 1f3b3e82fb
Lcd (#5217)
* WS2812 LED strip on TIM1_CH1_UP using pin PE9 and DMA.

* Applied suggestions

* linux and Windows have different approach

* linux and Windows have different approach

---------

Co-authored-by: benas-gavea <bbrazdziunas@gavea.co.uk>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2023-04-03 11:31:07 -04:00
rusefi ceeb819fc8 Indicator for injector HW issues #5189 2023-03-19 03:18:38 -04:00
rusefi 5878a5d310 docs 2023-03-19 02:17:30 -04:00
rusefillc 73c6d7a349
sent
only:mre_f4
2023-03-06 19:30:29 -05:00
Andrey eaba595519 progress: run more code in simulator
only:hellen-honda-k
2023-03-05 02:36:43 -05:00
Andrey 264f265420 CAN GPIO #4096
only:hellen-honda-k
2023-03-05 00:52:57 -05:00
Andrey 130a1eed14 CAN GPIO #4096
only:hellen-honda-k
2023-03-04 22:11:45 -05:00
rusefillc 2b45387eb1 CAN GPIO #4096 2023-03-04 20:50:22 -05:00
rusefi 696f8d566b Native SENT TPS input #5079 2023-03-01 18:56:06 -05:00
rusefi d7778b258d Native SENT TPS input #5079
only:mre_f4
2023-03-01 15:47:37 -05:00
Andrey 68fee9905f Native SENT TPS input #5079
hasValidFast progress!

only:mre_f4
2023-03-01 15:23:38 -05:00
Andrey 28c3af682d Native SENT TPS input #5079
a bit of progress
2023-02-28 22:11:38 -05:00
Andrey 3f537a66fa docs 2023-02-28 22:11:38 -05:00
Andrey 395af95d1e random CAN clean-up 2023-02-26 20:25:24 -05:00
Andrey G 298830ed82
can msg tx: do not ignore bus argument (#5124)
bus argument was introduces in 12c899ddca
but was ignored.
2023-02-23 17:17:27 -04:00
rusefillc 8df963882a Native SENT TPS input #5079 2023-02-20 11:52:10 -05:00
rusefillc bb3b43f038 Native SENT TPS input #5079 2023-02-20 11:38:20 -05:00
Matthew Kennedy 12c899ddca
wideband on second can (#5108) 2023-02-20 11:29:25 -05:00
Matthew Kennedy 28babe5cc2
add 50/83.3/125kbit CAN (#5072)
* fix CAN

* add 83/125 too

* bump config version
2023-02-13 17:13:57 -05:00
rusefillc a331cfa2c9 simpler SENT for now 2022-11-19 09:38:39 -05:00
Andrey Gusakov caebd674ea LUA/SENT: hook to get RAW sig0 and sig1 (WIP)
TODO: how to return two (N) values from LUA hook?
2022-11-17 16:17:27 -05:00
rusefillc f697d6c7dd
Update readme.md 2022-11-15 12:34:17 -05:00
rusefillc 51049b8de5
Update readme.md 2022-11-15 09:44:56 -05:00
rusefillc ed712863c2
Update readme.md 2022-11-15 09:41:16 -05:00
rusefi 37194dfe56 Ford SENT ETB bench test in NJ #4745 2022-11-13 11:23:54 -05:00
Andrey G 27166f4b23
SENT updates (#4774)
* SENT: simplify

* SENT: add crc6 routine, check crc for slow channels enhanced messages

* SENT: helper to get Slow Channel values

* SENT: getTickTime() report tick unit time

* unit_tests: SENT: update tests
2022-11-12 16:57:20 -05:00
rusefi 0e71535727 Ford SENT ETB bench test in NJ #4745 2022-11-11 18:07:13 -05:00
Andrey G 64be738874
SENT unit tests (#4769)
* unit_tests: sent: zero-init

* sent: SENT_SLOW_CHANNELS_MAX to header

* unit_tests: sent: clock, falling edges

* SENT: support and autodetect if device sends pause pulse

Also rework tick time calculation

* unit_tests: SENT: verbose debug on request

* unit_tests: SENT: actual checks

* unit_tests: SENT: extract common code for reuse

* unit_test: SENT: add test with fuel pressue captured data

* unit_test: SENT: add test with Ford ETB CLOSED captured data
2022-11-11 17:25:02 -05:00
Andrey 73e69940ba Ford SENT ETB bench test in NJ #4745
we shall unit test SENT
2022-11-07 10:30:30 -05:00
Andrey be8ba29b42 Ford SENT ETB bench test in NJ #4745
we shall unit test SENT
2022-11-07 00:25:47 -05:00
Andrey a25c9ab520 Ford SENT ETB bench test in NJ #4745
we shall unit test SENT
2022-11-07 00:06:42 -05:00
rusefillc b75f899973 efi::size 2022-10-27 20:35:37 -04:00
Andrey G 7abe3ba112
SENT improvements (#4702)
* smt32_common.mk: reduce copy-paste

* SENT: sentPins is not used

* hw: stm32: add ICU helper

* hw: stm32: icu helpers: also return timer base clock

* SENT: icu: use helper to get ICU & channel and AF

* SENT: icu: use CPU ticks for pulse measurements

* hw: stm32: icu: cleanup
2022-10-26 15:33:47 -04:00
Andrey G afa0bd92e8
SENT glue to LUA (#4700)
* use tabs

* SENT: Lua glue: getSentValue returns ETB position now

Can be tested with following LUA script:
setTickRate(100)
function onTick()
	pos = getSentValue(1)
	setLuaGauge(1, 10000 * pos)
	print(pos)
end
2022-10-26 06:42:14 -04:00
Andrey G dff2693698
SENT fixes (#4698)
* SENT: use shift register for storing nibbles

* SENT: rxReg shift to the left

* SENT: todo
2022-10-24 08:50:11 -04:00
rusefi 6e24020ab5 GM ETB bench test in NJ #4688
SENT to Lua integration
2022-10-22 22:46:37 -04:00
Andrey G d21d5397ac
SENT fixes (#4692)
* SENT: measure more pulses during Unit time calibration

* SENT: no magic numbers

* SENT: fix typo

* SENT: setninfo output: do not show slow channels if not detected

* SENT: fix GM-style CRC calculation

* SENT: another one CRC algorithm, now for pressure sensor

* SENT: show CRC error percentage
2022-10-22 18:07:22 -04:00
rusefillc da0fa03f0a refactoring: wider usage of helper method 2022-10-22 08:39:55 -04:00
rusefillc 23f14d0e21
Update readme.md 2022-10-20 14:30:23 -04:00
Andrey G a50f898982
SENT fixes (#4687)
* SENT: cache current setting to do proper clean-up on stop

* SENT: microRusEfi supports send on "AN temp 2" = PA1 only

* SENT: microRusEfi: fix pin number

* SENT: use activeConfiguration during sentStop()

* MRE: pin 23: can accept events (for SENT)
2022-10-20 13:33:16 -04:00
Matthew Kennedy 6e3efed09c
more f429 business (#4679)
* 429 boots and LEDs work

* oops missed a comma

* enable on f767 too, since it should be the same board

* why not just completely duplicate it

* script should not be fancy

* script should not be fancy

* correct pins

* h743 while we're at it
2022-10-20 00:59:39 -04:00
rusefi b7db5f90c3 SENT protocol capture implementation #4631 2022-10-20 00:04:43 -04:00
Andrey G b4ccef4239
SENT protocol capture implementation (#4631)
* boards: MRE: enable SEND protocol capture

* SENT protocol capture implementation #4631

* SENT protocol capture implementation #4631

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-10-19 17:08:15 -04:00
Andrey G 850848d2ee
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
GitHub gen-configs Action 0d9090de28 Auto-generated configs and docs 2022-09-30 03:15:40 +00:00
rusefillc 234862b2b7 CAN side of automated testing #4630 2022-09-29 23:01:06 -04:00
GitHub gen-configs Action eea87274a8 Auto-generated configs and docs 2022-09-19 01:31:32 +00:00
rusefillc 2be1db62a2 CanCategory 2022-09-18 20:44:00 -04:00
Andrey G 69d9716fa6
tle8888 dead code (#4568) 2022-09-12 18:54:29 -04:00
Andrey 6e8d248408 brutal encapsulation 2022-09-07 19:37:11 -04:00
Andrey ab4b451195 os_access.h dead? 2022-09-07 15:56:45 -04:00
rusefi 755f9926ea 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 b471012838 less violent error handling 2022-08-21 22:46:59 -04:00
rusefi 26eda07424 Lua CAN bus index: let's fail if invalid value specified 2022-08-21 22:31:52 -04:00
rusefi 3396aa865a verboseCan bugfix 2022-08-11 01:19:10 -04:00
rusefi f671f688a9 ISO-TP does not work on real car #4427 2022-08-11 00:29:09 -04:00
rusefillc c4a817dfa0 verboseCan EXT fix 2022-08-09 20:39:27 -04:00
Matthew Kennedy 18351dc43b
tle9104 driver (#4410)
* tle9104

* it works!

* cleanup

* cleanup for pr

* efifeatures

* guards
2022-08-02 19:02:03 -04:00
Matthew Kennedy 165e5bb869
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 ce7fc8e69d
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 c597d6da62 https://github.com/andreika-git/hellen-one/issues/173 2022-07-31 04:39:02 -04:00
rusefillc b0e87c789d [SECURITY] Cheap password protection against tune modification #4243
ohh cute we have name overlap!
2022-07-30 11:28:56 -04:00
Matthew Kennedy b99d90b006
Start -> start (#4366) 2022-07-21 15:17:32 -04:00
Matthew Kennedy a95bc3ad03
implement CAN driver for simulator (#4312)
* stub simulator CAN driver

* comments

* CAN sensor

* maybe implement?

* s

* fix

* tx and rx actually work!?!?!

* check_can_isr

* modify chibios

* Sim has no CAN on Windows (for now?)

* safer init/deinit, enable assertions

* smarter handling of missing CAN device

* better guards

* guards for windows
2022-07-03 08:25:24 -04:00
Matthew Kennedy c6f46128d6
prototype overcurrent protected driver (#4029)
* stub passthrough protected driver

* plumbing

* include the thing

* signature

* dead

* tdg pdm build task

* s

* pdm pins

* tdg

* init properly

* remove gaps

* board doesn't fatal on start
2022-05-17 23:49:18 -04:00
rusefillc 683a723d2f
CAN category (#4148)
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
2022-05-09 16:49:23 -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 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
Andrey G 10cab3390a
L9779: update (#3899)
* L9779: update

* L9779: cleanup macro
2022-02-06 17:47:53 -05:00
rusefi a1ccdb1bd9 unused code? 2022-02-06 17:44:58 -05:00
Andrey G c53fd0eaf9
L9779: update driver (#3898)
* L9779: update driver

* L9779: missed chip_init

* L9779: signature
2022-02-06 11:39:37 -05:00
Andrey G a50f848857
L9779: initial driver (#3897)
* smart_gpio.cpp: glue to L9779

* L9779: fill with some code

* L9779: missed getDiag

* L9779: no l9779 on subaru-eg33 board
2022-02-06 09:47:18 -05:00
Matthew Kennedy 5865f65e1e
remove getDebugChannels (#3850) 2022-01-27 19:21:05 -05:00
rusefillc d0d8e95bd3 L9779WD driver #3768 2022-01-10 19:15:36 -05:00
rusefillc 373d619c16 L9779WD driver #3768 2022-01-10 16:53:38 -05:00
Andrey G 752802b0cc
CAN: do null check first (#3755)
Otherwise it will emit strange error if both can are disabled
2022-01-08 10:25:21 -05:00
Andrey G 020727d65b
TLE8888: do not allow direct gpio drive for Push Pull outputs (#3748)
Some register settings also needs to be changed. Change of direct
drive input is not enought.
2022-01-07 14:11:21 -05:00
rusefillc 914deedb0f TLE8888 diag says OK on disconnected pins and bench test #3737 2022-01-03 20:33:51 -05:00
rusefillc 47444519d6 typo 2022-01-03 03:09:14 -05:00
Matthew Kennedy 6b6fd5e6e8
fix dual CAN init, update UI (#3719)
* CAN init sequence

* config & UI cleanup

* ui

* simplify
2021-12-24 23:33:54 -05:00
rusefillc 2205a57024 Second CAN #3687 2021-12-22 22:02:34 -05:00
rusefillc 15daec77e6 Second CAN #3687 2021-12-22 20:15:22 -05:00
rusefillc 4ad1f887fd Second CAN #3687 2021-12-21 01:10:37 -05:00
rusefillc 7b0179aaa3 Second CAN #3687 2021-12-21 00:48:13 -05:00
rusefillc 9170fd17a1 Second CAN #3687
what could possibly go wrong?
2021-12-19 11:28:42 -05:00