Commit Graph

1451 Commits

Author SHA1 Message Date
rusefillc 905d740b4b Starter seems to be engaged forever #1965 2020-11-18 22:45:37 -05:00
rusefillc 4e94324e4f Starter seems to be engaged forever #1965 2020-11-18 21:45:17 -05:00
Matthew Kennedy 8241b0aef6
consolidate to common (#1962) 2020-11-18 16:22:19 -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 dc3b14e5fc better MC33816 start-up status 2020-11-18 01:07:09 -05:00
Andrey G f48621e4c2
TLE8888: disable diagnostic for OUTPUT8..13 (#1956)
Enabled pull-down affects analog inputs that shares same pins.
Disable it.
DOTO: enable diagnostic if ouput requested through tle8888_setPadMode
2020-11-17 18:33:37 -05:00
rusefillc 4d89095890 docs 2020-11-17 08:25:50 -05:00
Matthew Kennedy f9ae075ac6
read SD card config exactly once (#1955)
* only read mmc device once

* format

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-11-17 07:48:43 -05:00
Matthew Kennedy 6e4517be8c
adjust microsecond_timer api (#1952)
* change timer api

* don't need all that
2020-11-16 18:50:13 -05:00
Matthew Kennedy 5a443501fb
prevent MMC preemption by TS thread (#1949)
* prevent preemption by TS thread

* didn't need that
2020-11-15 20:44:36 -05:00
Matthew Kennedy bb8650179c
consolidate EFI_UNIT_TEST and friends (#1940)
* restructure

* guard c++

* idle too

* status_loop.h

* consolidate definitions

* use 1/0 instead, check for existence

* missed a few

* dead define

* defs for bootloader
2020-11-11 20:34:39 -05:00
Andrey G 62f441376c
Tle8888 stepper (#1936)
* TLE8888: enable PP mode for OUT21..24 in case of useTLE8888_stepper

* Lada Kalina is a test mule for stepper idle
2020-11-10 14:16:46 -05:00
rusefi 7c8521f078 debounce unintended auto-increment bug (was: Proteus TCU gear shift configuration) #1927
refactoring
2020-11-07 00:46:59 -05:00
rusefi ee01be3fd2 debounce unintended auto-increment bug (was: Proteus TCU gear shift configuration) #1927
undoing brain fart
2020-11-07 00:43:42 -05:00
rusefillc 7bfa18295a Proteus TCU gear shift configuration #1927 2020-11-06 23:48:35 -05:00
Matthew Kennedy 3241a43a2d
extract idle hardware to its own file (#1923)
* extract idle hardware

* should fix the build
2020-11-03 18:06:32 -05:00
rusefi 7de1fc8e2a Output pin init/deinit needs a linked list #1803
trying to make things more consistent & smarter
2020-11-03 00:46:03 -05:00
rusefi 0f5f0a549b this stuff is just too dead 2020-11-02 23:46:41 -05:00
Andrey G 63c25ab8a7
Tle8888 small update (#1908)
* TLE8888: add support MR switching from SW

Main Relay has limitation - it is always active while KEY=1. When
KEY=0 MR can be switched on from SW.

* TLE8888: support reading of KEY and WAKE inputs

* Rusefi enums: add new TLE8888 pins
2020-11-01 22:19:55 -05:00
Matthew Kennedy 946fe5091c
remove spiMtx (#1907) 2020-10-25 17:26:46 -04:00
Matthew Kennedy 08d8262f77
oops (#1899) 2020-10-23 15:45:44 -04:00
Andrey G 8e11675afd
Tle8888 big update 1 (#1892)
* smart gpio: fix tle8888 direct pin mapping for MRE

* MRE: use TLE8888 pins instead of MCU gpios that drives TLE8888

* TLE8888: cleanup

* TLE8888: do not reset driver private data on WD/undervoltage reset

* TLE8888: diagnostic updates

* TLE8888 driver: BIG driver rework

* TLE8888: check SPI answers for abnormal states

Reply with other than requested register can be a sign of:
-Power-On-Reset, then OpStat0 will be replyed
-WatchDog reset, then FWDStat1 will be replyed
-Invalid communication frame, then Diag0 will be replyed

Keep tracking last accessed register and check with the next reply.

* TLE8888: debug clean-up

* TLE8888: implement spi array write

This reduce CS inactive state time between two consequent accesses
from 8.8 uS to 1.4 uS

* TLE8888: fix PP outputs in OD mode

* TLE8888: cleanup register definitions

* TLE8888: run separate driver thread for each chip instance

Calculating poll interval for few chips become more complex, avoid
this running thread for each device.

* TLE8888: fix cypress and kinetic compilation

Both platforms define its own MAX and cause redifination error if
common.h is included in driver.

* MRE: update mapping.yaml and fix direct pin mapping for TLE8888

* TLE8888: diagnnostic: disable switch off in case of overcurrent

For all output, use current limiting instead

* TLE8888: check for overvoltage on OUT8..OUT13

* TLE8888: add TODO note about how to recover from failure condition

Currently TLE8888 automaticly recovers only from overcurrent and
(may be) overtemperature conditions.
Short to bat cause output disable (bit in OECONFIG is reset) and
needs driver/host intervention.

* TLE8888: save few bytes of RAM

* TLE8888: Lada Kalina is test mule for IDLE stepper on TLE8888

Don't forget to enable PP mode for TLE8888 outputs 21..24:
uncomment line 1087 in tle8888.c

* TLE8888: reorder code, cleanup

* TLE8888: mode all debug/statisctic to per-chip struct

* TLE8888: rework poll interval calculation

* MRE: use TLE8888 pins instead of MCU gpios that drives TLE8888 #2
2020-10-23 12:25:30 -04:00
Matthew Kennedy 4e249889a6
implement fuel pressure sensors (#1897)
* add

* remove old

* remove more old

* makefile

* fix init

* patch up other stuff

* actually fix it this time

* raw output channels

* gauges, UI

* scaled channel

* fix field ordering
2020-10-23 07:31:47 -04:00
Matthew Kennedy e4c5ca4af0
no sd enable (#1894)
* no sd enable

* add assert

* Revert "no sd enable"

This reverts commit fd997381ee884c890fe7664e56ed2b0f0caef2ff.
2020-10-22 20:51:28 -04:00
Matthew Kennedy e0bb7ad581
disable i2c, other unused features (#1891)
* dead

* more
2020-10-20 22:24:32 -04:00
rusefi 51e840eaa6 code style 2020-10-19 22:47:09 -04:00
rusefi e0a5c3dc12 GDI Epic #1448 2020-10-19 22:04:06 -04:00
Matthew Kennedy a68cbae0dc
Remove trigger listener list (#1886)
* avoid 64b on hot path

* no tooth log when fast

* use crit section locker

* final

* only flip pins if not also self stim

* only trace if doing work

* slightly drop lateDelay

* trace if not bailing out

* remove listener array
2020-10-17 08:00:11 -04:00
Matthew Kennedy 7eeb60a8a0
trigger/scheduler perf improvements (#1885)
* avoid 64b on hot path

* no tooth log when fast

* use crit section locker

* final

* only flip pins if not also self stim

* only trace if doing work

* slightly drop lateDelay

* trace if not bailing out
2020-10-16 11:04:27 -04:00
Matthew Kennedy 568ec91fc0
fix temp sensor & validate it (#1879)
* fix temp sensor & validate

* smaller here should work
2020-10-14 22:39:16 -04:00
Matthew Kennedy 2855e04234
start using BufferedWriter (#1878)
* do the part up to actual usage

* borrow some memory for now
2020-10-14 20:06:05 -04:00
rusefi dfa3e69186 GDI Epic #1448 2020-10-11 23:39:40 -04:00
Matthew Kennedy c885db32f0
use expected for event queue next event (#1859)
* use expected for event queue next event

* minor cleanup

* tests
2020-10-05 13:53:34 -04:00
Matthew Kennedy fb85082e01
switch (#1839)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-10-01 01:36:33 -04:00
Matthew Kennedy 16bfd39bac
Remove dead & useless config (#1834)
* remove dead config

* remove enum
2020-09-29 06:34:39 -04:00
David Holdeman 4d0b953129
switch to pass by reference (#1832) 2020-09-28 19:17:17 -04:00
andreika-git 6e5a3fbbe9
Hellen says fix cypress build (#1818)
* fix compilation

* fresh generated files

* more files

Co-authored-by: Andrei <andreikagit@users.noreply.github.com>
2020-09-23 14:06:22 -04:00
David Holdeman 181113ff17
Fix debounce (#1814)
* 1,2,4,7,9

* 6

* fix type mismatch

* change field

* comment

* Revert "comment"

This reverts commit f7ce8ed48d015490ed82d692270198817569b5a3.

* Revert "Revert "comment""

This reverts commit 99f2d5cadcbf444bf58acf9e57a6fed61355d5be.

* Revert "change field"

This reverts commit 55ec050cd947696cdffccae6b29fe48d95ab5f17.

* rename var

* comments

* use func in init

* default values

* remove redundant check

* check

* use bool

* mark false when done

* pointer

* check GPIO_UNASSIGNED

* wat

* merge carnage

* oops, accidentally downgraded submodule
2020-09-21 18:25:24 -04:00
rusefi c957541cf4 ADC progress 2020-09-21 06:10:25 -04:00
Matthew Kennedy 2ee9e837bb
guard against ADC buffer overrun (#1812) 2020-09-21 12:37:51 +03:00
rusefi 33eef982d1 reorder ADC channel index #1763
we forgot about something
2020-09-20 14:20:08 -04:00
David Holdeman 68012c18b7
Debounce refactor (#1809)
* 1,2,4,7,9

* 6

* fix type mismatch

* change field

* comment

* Revert "comment"

This reverts commit f7ce8ed48d015490ed82d692270198817569b5a3.

* Revert "Revert "comment""

This reverts commit 99f2d5cadcbf444bf58acf9e57a6fed61355d5be.

* Revert "change field"

This reverts commit 55ec050cd947696cdffccae6b29fe48d95ab5f17.

* rename var

* comments

* use func in init

* default values

* remove redundant check
2020-09-20 14:01:00 -04:00
David Holdeman 8ebdf6fcdc
fix type mismatch (#1808)
* fix type mismatch

* comment

* change field

* switch to efitimesec16_t

* add typedef

* add type to configdefinition

* build
2020-09-19 17:17:44 -04:00
Matthew Kennedy 3d6a6398ac
Dedicated sensors for wastegate + idle position (#1805)
* config

* add sensor

* listen to new adc channels

* fix

* add gauges to TS

* add gauge values

* TS UI
2020-09-18 10:04:07 +03:00
rusefi 38e38c82b5 Hellen says merge #1772 hardware.cpp 2020-09-15 15:01:31 -04:00
rusefi 78b65ea8aa Merge remote-tracking branch 'origin/master' into master 2020-09-15 14:49:01 -04:00
andreika-git 45c43bb6fd porting adc_inputs.cpp (blindly) (#1792)
Co-authored-by: Andrei <andreikagit@users.noreply.github.com>
2020-09-15 14:48:32 -04:00
Matthew Kennedy 2a1e2c53e3
proteus SD card defaults (#1796)
* proteus SD defaults

* disable serial console pins
2020-09-14 10:54:25 +03:00
Matthew Kennedy 97cb9f45bd
logging simplification: switch bare functions to member functions: try the second (#1794)
* first pass

* first pass

* const means we don't have to check!

* static

* test fixup

* fix sniffer
2020-09-13 11:49:25 +03:00
rusefi 256a4a2637 Revert "logging simplification: switch bare functions to member functions (#1788)"
This reverts commit d941bdc5
2020-09-12 04:36:24 -04:00