Commit Graph

2000 Commits

Author SHA1 Message Date
Matthew Kennedy 4e3e95db2d
replace print/printMsg with scheduleMsg (#2497)
* start cleaning

* disabled feature means don't print that it's disabled

* cli

* usages

* printMsg -> scheduleMsg

* this is alllll dead now

* no crlf please

* all hope is lost if you manage to hit this line

* tests

* tests

* ok we did actually need that part

* sim

* d

* kinetis

* it did ifdef, not if

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-26 17:23:26 -04:00
Matthew Kennedy 6491c83f73
read configuration from flash exactly once (#2481)
* early hw init

* s

* read configuration exactly once

* cleanup

* housekeeping

* test friendly

* ugh bad merge

* that is a noop

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-25 18:16:26 -04:00
Matthew Kennedy 31ef22eecb
use cpp (#2493) 2021-03-25 18:12:17 -04:00
Matthew Kennedy 6f05bbc332
move some initialization steps earlier (#2480)
* early hw init

* s

* Revert "s"

This reverts commit 10d3039168613cfb2b0cf1c960d2f18894745ce3.

* bor

* I can't type

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-25 16:22:03 -04:00
Matthew Kennedy 51a5b4d6d5
rename setBoardConfigurationOverrides (#2479)
* rename

* proteus

* comments

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-22 14:15:09 -04:00
Matthew Kennedy c19f8da5d2
fix (#2478) 2021-03-20 22:07:52 -04:00
Andrey G 89b631a794
Hip9011 and cleanups (#2477)
* hip9011: move hipCs out of EnginePins to hip9011 driver

* hip9011: cleanup debug output, save few RAM bytes

* Supress few signed vs unsigned warnings
2021-03-20 08:40:36 -04:00
Matthew Kennedy 2196c7f9e8
embiggen MSD stack (#2475) 2021-03-19 19:56:47 -04:00
Matthew Kennedy 599a9b0183
USB uses its own channel, add implementations for serial channels (#2472)
* USB uses its own channel

* revise channels

* put serial ports in their own file

* h7 uart incompatible for now

* guard for sim
2021-03-19 17:05:04 -04:00
Matthew Kennedy d7698f6703
Dedicated code path for USB console/TS (#2465)
* new apis

* dedicated USB path

* move decl

* init

* don't init usb twice

* guard

* check that we're initialized before using TS

* comment

* guard

* guard USB

* brain doesn't go good

* make tests happy

* dead define

* cypress

* ifdef != if

* s

* include priority

* don't start a thread we know we don't need

* bad-ish merge

* const

* why did this code exist...?

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-18 14:07:22 -04:00
Matthew Kennedy be70524ced
harden against various no-boot scenarios (#2468)
* zero length trigger

* validate config

* validate cylinder count

* wrong type on cylinder count

* invalid comment

* invalid SPI
2021-03-17 09:24:13 -04:00
Matthew Kennedy 3072d54717
dead code, warnings (#2461) 2021-03-15 10:23:19 -04:00
Matthew Kennedy 1dd2180f76
VVT uses closed loop controller framework (#2453)
* vvt uses framework

* builds

* rename, update headers

* s

* testable

* write some basic tests

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-14 19:31:46 -04:00
Matthew Kennedy 9d7436c062
implement ads1015 driver (#2458)
* first approximation of ads1015

* fix ads

* misc

* comment

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-14 19:02:42 -04:00
Matthew Kennedy 5a003f8638
use full memory on STM32F42x (#2450)
* linker script

* hook it up
2021-03-13 07:26:58 -05:00
Matthew Kennedy 4d69ae7fc7
put back (#2452) 2021-03-13 06:59:33 -05:00
GitHub build-firmware Action 3266dc1e6d Auto-generated configs and docs 2021-03-13 02:26:53 +00:00
GitHub build-firmware Action 05cc3b0129 Auto-generated configs and docs 2021-03-12 05:52:29 +00:00
GitHub build-firmware Action aba69aa4a7 Auto-generated configs and docs 2021-03-12 05:18:18 +00:00
GitHub build-firmware Action 37038eaaa2 Auto-generated configs and docs 2021-03-12 04:19:00 +00:00
rusefillc 16b8fb64ca vBatt -> SensorType::vBatt fix #2260 2021-03-11 23:07:18 -05:00
rusefillc d650271077 vBatt -> SensorType::vBatt #2260 2021-03-11 22:52:34 -05:00
GitHub build-firmware Action e832e4c40b Auto-generated configs and docs 2021-03-11 19:11:45 +00:00
GitHub build-firmware Action fc918ddd02 Auto-generated configs and docs 2021-03-11 13:40:39 +00:00
GitHub build-firmware Action af21cd11b5 Auto-generated configs and docs 2021-03-11 04:22:28 +00:00
GitHub build-firmware Action e9b9572181 Auto-generated configs and docs 2021-03-11 02:16:35 +00:00
GitHub build-firmware Action 3c355f8825 Auto-generated configs and docs 2021-03-11 00:54:18 +00:00
Matthew Kennedy df5403356c
fix h7 adc (#2442) 2021-03-10 19:52:39 -05:00
GitHub build-firmware Action 2eb3a17dba Auto-generated configs and docs 2021-03-10 22:31:48 +00:00
GitHub build-firmware Action 00e610672f Auto-generated configs and docs 2021-03-09 23:55:38 +00:00
Matthew Kennedy 40c4238f13
enable CAN on H7 (#2393)
* enable

* guard correctly

* h7 bit timing

* allow longer frames

* allow data smaller than maximum

* mcu temperature

* typo

* tx message

* testing

* check for CAN or FDCAN

* don't need that any more

* h7 bitrate config

* undo testing

* h7-ify msg tx

* comment

* break out SID/EID macros

* guard differently

* update ChibiOS

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-09 18:54:01 -05:00
GitHub build-firmware Action 3b6d5e9b24 Auto-generated configs and docs 2021-03-09 13:45:05 +00:00
Matthew Kennedy 990c3649ae
logging cleanup before refactor (#2438)
* minor cleanup

* more cleaning

* signature

* spelling

* doy
2021-03-09 08:43:29 -05:00
GitHub build-firmware Action 7dd7d45c7a Auto-generated configs and docs 2021-03-09 00:20:19 +00:00
GitHub build-firmware Action 7974f6d11a Auto-generated configs and docs 2021-03-08 19:52:22 +00:00
Matthew Kennedy 96a14fd649
ADC cleanup, enable oversampling on H7 (#2437)
* cleanup v2 adc

* simplify

* oversample on h7

* output 16b result

* port-ify ADC_MAX_VALUE

* simplify include

* guard for cypress

* make sim/tests happy

* 16x oversample + comment

* this check is uesless

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-08 14:50:50 -05:00
GitHub build-firmware Action b4f1fedc9e Auto-generated configs and docs 2021-03-08 12:42:18 +00:00
GitHub build-firmware Action 6afd9f25b5 Auto-generated configs and docs 2021-03-08 05:02:53 +00:00
GitHub build-firmware Action 6e849712e9 Auto-generated configs and docs 2021-03-08 04:23:16 +00:00
GitHub build-firmware Action 0f43375fe0 Auto-generated configs and docs 2021-03-08 01:23:25 +00:00
Matthew Kennedy 06e32d937a
avoid various "no connect" scenarios (#2432)
* init mmc and USB earlier

* connect USB faster
2021-03-07 20:21:42 -05:00
GitHub build-firmware Action 652cab4148 Auto-generated configs and docs 2021-03-08 01:20:20 +00:00
Matthew Kennedy 3d17e62d65
finish off vbatt -> sensor model (#2433)
* more vbatt

* s

* goodbye voltage

* makefile

* apparently that part was in use

* include

* mocking
2021-03-07 20:18:32 -05:00
GitHub build-firmware Action ec5ee49018 Auto-generated configs and docs 2021-03-08 00:27:34 +00:00
Matthew Kennedy b729bdbcbf
Store ini filesystem in compressed block device (#2420)
* add module

* implement compressed block device

* enable for f7/h7

* script

* stub compressed image

* implement

* call the script

* headers, comments, fix init bug

* set msd options

* update chibios-contrib

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-07 19:25:34 -05:00
GitHub build-firmware Action 4c5868dfbd Auto-generated configs and docs 2021-03-07 22:33:47 +00:00
GitHub build-firmware Action 38d0a25ffd Auto-generated configs and docs 2021-03-07 22:13:26 +00:00
GitHub build-firmware Action 09ddc5094f Auto-generated configs and docs 2021-03-07 21:45:17 +00:00
GitHub build-firmware Action e29daa2b12 Auto-generated configs and docs 2021-03-07 21:37:29 +00:00
GitHub build-firmware Action 29f92a8db7 Auto-generated configs and docs 2021-03-07 20:34:10 +00:00
GitHub build-firmware Action 98067c6ee0 Auto-generated configs and docs 2021-03-06 17:57:53 +00:00
GitHub build-firmware Action 3f1bb4d79f Auto-generated configs and docs 2021-03-06 02:45:40 +00:00
GitHub build-firmware Action ada14307a3 Auto-generated configs and docs 2021-03-06 02:41:20 +00:00
GitHub build-firmware Action c510211957 Auto-generated configs and docs 2021-03-06 02:09:06 +00:00
GitHub build-firmware Action d1056e3972 Auto-generated configs and docs 2021-03-06 01:48:51 +00:00
GitHub build-firmware Action 2ecfabd28e Auto-generated configs and docs 2021-03-06 01:45:12 +00:00
GitHub build-firmware Action 8373725f5e Auto-generated configs and docs 2021-03-06 01:34:46 +00:00
GitHub build-firmware Action 8a5d65cdbc Auto-generated configs and docs 2021-03-06 01:00:28 +00:00
GitHub build-firmware Action 6d40566a10 Auto-generated configs and docs 2021-03-06 00:30:16 +00:00
GitHub build-firmware Action 8d49cc3e48 Auto-generated configs and docs 2021-03-05 22:44:12 +00:00
Matthew Kennedy b86f081d72
don't update ramdisk image in master (#2422)
* put back the default file

* gitignore
2021-03-05 17:42:22 -05:00
GitHub build-firmware Action 8dc17d420c Auto-generated configs and docs 2021-03-05 03:41:12 +00:00
Matthew Kennedy 6aaf02be15
hook up lps25 on proteus (#2418)
* hook up lps25

* it would help to include all the files

* unguard some stuff

* unguard more

* guarding

* s

* guard

* only register if init worked

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-04 22:39:20 -05:00
GitHub build-firmware Action f0098d8bc1 Auto-generated configs and docs 2021-03-05 02:01:14 +00:00
Matthew Kennedy e264029fbc
STM32H7 Slow ADC (#2421)
* extract

* guard

* put some back

* put back

* slow is actually 500hz so slow is fine here

* no magic

* fix printFullAdcReport

* cast

* implement h7 adc ish

* analog switches

* bad merge

* no map avg on h7

* fix master while we're at it

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-04 20:58:56 -05:00
Matthew Kennedy f22f318bdb
Extract slow adc (#2402)
* extract

* guard

* put some back

* put back

* slow is actually 500hz so slow is fine here

* no magic

* fix printFullAdcReport

* cast

* if we turn those off is it happy

* stub cypress/kinetis

* guard fast stuff better

* bad merge

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-04 19:55:09 -05:00
Matthew Kennedy 496acd7fc0
Embed ini (#2417)
* replace null device with rusefi ini

* comment

* warning

* stub ramdisk for when we don' thave an image

* maybe generate the image with a build

* install mtools

* fail on error

* install deps _before_ we need them

* embed a little readme

* oops
2021-03-03 07:50:53 -05:00
Matthew Kennedy 59eecab421
prep proteus config for h7 (#2413)
* prep for h7

* weak link that

* make those weak

* remove other stubs

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-28 16:57:57 -05:00
Andrey G fbcff6f0c8
hip9011 compilation fix, cosmetic clean-ups (#2414)
* Board subaru eg33: has HIP9011 knock sensor

* hip9011: lastExecutionCount does not exist any more

* hip9011: extranc commands to header, use logic math for bitfields
2021-02-28 15:42:57 -05:00
Matthew Kennedy b1873b3d8b
set all thread priorities in the same place (#2412)
* unify thread priority

* header

* mmc
2021-02-28 07:30:45 -05:00
Matthew Kennedy 6fe0cadfc0
allow disabling fast ADC (#2406)
* mostly guard against no fast adc

* disable on h7

* guard more

* guard adc init

* you can't do that in c++

* we need that

* s

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-28 07:30:19 -05:00
Matthew Kennedy 520fc2b4ec
H7 flash (#2408)
* enable

* defines and mpu util

* implement flash for h7

* format
2021-02-26 17:38:17 -05:00
Matthew Kennedy 1acc1f7092
make h7 chconf like f4 (#2405)
* make h7 chconf like f4

* clean up f7 while we're at it

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-26 07:59:39 -05:00
Matthew Kennedy 6dc3c20bab
fixes for f7, sdio/sdmmc (#2400) 2021-02-25 13:37:41 -05:00
Matthew Kennedy d7adbe5fef
maybe hook up sdmmc (#2398)
* maybe hook up sdmmc

* the complier didn't like that very much

* mcuconf

* guard properly

* fix

* duh

* omg that's an extra close paren

* explicitly set which device fatfs should use

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-25 01:37:44 -05:00
Matthew Kennedy 4fe0ceec61
deduplication in halconf (#2377)
* rusefi_halconf

* h7 gpt

* don't redefine that

* maybe this was necessary

* format

* no usb in cypress

* flags for bl

* cypress

* maybe bootloader

* no smart build for cypress/kinetis

* no smart build

* no really, disable smart build

* don't need to clean that env var

* cypress

* format
2021-02-24 14:08:03 -05:00
Matthew Kennedy 9c591c7733
don't cache temperature samples at all (#2392) 2021-02-24 08:15:03 -05:00
Matthew Kennedy 392a7539be
enable H7 spi (#2391)
* enable features

* move MMC SPI config to port

* correct word length

* related cleanup

* doesn't need nocache

* include

* enable that
2021-02-24 08:14:21 -05:00
Matthew Kennedy 86233c4e62
update h7 clock config (#2388)
* h7 clocks

* run the core at 400

* disable LSE

* 8mhz timer clock

* osc

* it has to be even slower

* something is wrong with WFI

* this was wrong anyway
2021-02-23 22:55:38 -05:00
Matthew Kennedy 9226f483a8
yet more TS sanity (#2382)
* ts cleanup part 1

* move more stuff in to the class

* extract base class

* switch to TsChannelBase where we can

* dfu

* more to TsChannelBase

* bad merge

* another bad merge

* bootloader

* bluetooth

* format

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-20 02:11:39 -05:00
Matthew Kennedy a50d1d5ee3
start making tunerstudio more sane: part 2 (#2381)
* ts cleanup part 1

* move more stuff in to the class

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-19 20:48:21 -05:00
rusefillc c836f766af would this give me h72 SD? 2021-02-18 17:04:51 -05:00
rusefillc 384113a984 would this give me h72 SD? 2021-02-18 16:16:45 -05:00
Matthew Kennedy 90ef4c93ad
merge mcuconf for f4/f7 (#2375)
* merge for f4/f7

* more

* include efifeatures

* s

* no TS serial on f7 for now

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-18 15:04:32 -05:00
Matthew Kennedy fa894d55a3
set MCU properly (#2371) 2021-02-17 15:25:57 -05:00
Matthew Kennedy d933d18e29
use spiPolledExchange for small transfers (#2358)
* configure for no cache

* this doesn't need a setting

* now we don't need invalidate

* reorder and comment

* mmc

* sw knock

* use spiPolledExchange for small transfers

* mock spi

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-17 14:48:21 -05:00
rusefillc 8584256677 trying to fix AuxValves 2021-02-17 08:57:18 -05:00
rusefillc 02a49de390 aux to vvt rename 2021-02-17 08:53:39 -05:00
Matthew Kennedy 39884f8934
use DECLARE_ENGINE_PTR for Engine class (#2365)
* engine cleanup

* do the cleanup

* one last spot

* expand_engine noop for firmware

* simulator
2021-02-16 16:58:54 -05:00
Matthew Kennedy 4a1d3de9a6
remove unused msg parameter (#2360)
* dead parameter

* last few
2021-02-16 09:32:16 -05:00
Matthew Kennedy 878794f9cf
properly put buffers in no-cache regions (#2357)
* configure for no cache

* this doesn't need a setting

* now we don't need invalidate

* reorder and comment

* mmc

* sw knock
2021-02-15 17:39:11 -05:00
Matthew Kennedy 187c4d00f7
USB mass storage tweaking (#2352)
* disable TS in case of USB MSD

* housekeeping while we're here

* enable on MRE

* changelog
2021-02-14 15:03:07 -05:00
Andrey G bb5ee69f29
RusEFI is green: put cpu in standby in idle (#2342)
* MRE is green: put cpu in standby in idle

* Revert "MRE is green: put cpu in standby in idle"

This reverts commit 62b5cadda014ace749b145b629da62b182b5e3ce.

* RusEFI is green on all boards
2021-02-14 10:24:21 -05:00
Matthew Kennedy 89391919dc
automatic switch between internal and MSD SD card (#2349)
* auto enable usb msd

* guard and turn on for proteus
2021-02-14 08:10:39 -05:00
Matthew Kennedy 56b7db8e9c
pullup (#2348) 2021-02-14 08:04:09 -05:00
Matthew Kennedy 6ab7e151f1
rewrite SD initialization (#2346)
* rewrite SD init

* static

* return a pointer instead
2021-02-13 21:26:11 -05:00
Andrey G f1785fee11
Config cleanups (#2347)
* Remove duplication

* Ports: STM32F7: we want PAL_USE_CALLBACKS for F7 too
2021-02-13 18:45:33 -05:00
Matthew Kennedy 7562de4f10
usb mass storage progress (#2345)
* usb mass storage

* remove old files

* this file is gone
2021-02-13 15:06:05 -05:00
rusefi 67f5b18f34 not great solution to code duplication, also helping QC build 2021-02-13 11:19:39 -05:00
Matthew Kennedy 9a3f3f34b2
USB mass storage descriptor (#2330)
* enable msd

* modify descriptors for composite device

* makefile cleanup

* format

* define

* embiggen fifos

* needed that

* cleanup too while we're at it

* rename endpoints

* switchable descriptors

* guard the request hook too

* don't need this changed yet

* cleanup

* update ep0 response

* cleanup

* use the msd hook from chibios

* this was wrong

* this was covered by other PR

* this is also covered

* s
2021-02-13 08:54:08 -05:00
Matthew Kennedy 990bfe763e
implement null block device (#2341)
* implement null device

* fix build
2021-02-13 08:53:10 -05:00
Matthew Kennedy d8032fbd8f
fix usb descriptor mistakes (#2340)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-13 01:06:55 -05:00
Matthew Kennedy 315360cb04
Rename USB endpoints, update ChibiOS-Contrib (#2334)
* rename endpoints

* update chibios contrib

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-12 14:21:56 -05:00
Matthew Kennedy 275b058e32
increase SD card speed (#2333)
* fast sd card

* fair enough
2021-02-11 20:42:23 -05:00
Matthew Kennedy fff734502d
turn in to a composite device (#2332) 2021-02-11 15:52:06 -05:00
Matthew Kennedy dade25ef34
move chconf/mcuconf/halconf in to hw_ports (#2321)
* move f4 config files

* don't need this

* f7

* f7

* h7

* this was duplicated

* turn off smart build

* loader too

* update prometheus paths

* bootloader should include confdir

* fix the flash size while we're at it

* move chconf_common

* use wait

* normalize board.mk

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-10 19:38:24 -05:00
rusefi 6f065274e4 aux pid is now VVT 2021-02-10 12:41:38 -05:00
Matthew Kennedy 85fab40d21
get mcu temperature within port (#2326)
* remove EFI_ADC_TEMP_SENSOR

* implement

* comment

* s

* switch adc_inputs over

* header

* s

* I think aligned-on-stack should work ok

* num channels

* cache safety

* move adc init too

* don't compile that file for the h7

* cypress & kinetis

* ports

* guard against bootloader

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-09 22:04:36 -05:00
rusefillc cbfed1a357
Create readme.md 2021-02-09 13:43:26 -05:00
Matthew Kennedy 2c465247e9
stm32h7 usb (#2319)
* enable

* enable

* serial number

* usb defines

* buffer size

* more stuff we can enable
2021-02-08 16:24:49 -06:00
Matthew Kennedy 435f8f7e2b
h7 flash, guard against no CAN (#2317)
* h7 flash

* guard some other stuff

* I guess it just builds now?

* maybe ci too
2021-02-08 16:24:38 -05:00
Matthew Kennedy 36483e870a
consolidate stm32 mpu util (#2314)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-08 15:52:00 -05:00
Matthew Kennedy 3debd2229b
move board.h for f7/h7 (#2316)
* f7 board.h

* h7
2021-02-08 15:46:48 -05:00
Matthew Kennedy ad07166e9d
move f4 board.h (#2313)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-08 15:29:07 -05:00
Matthew Kennedy b995e7bcaa
include board.c from hw_ports.mk (#2311)
* set mcu type in hw_ports

* move f4 linker script

* move f7 linker script

* don't set default linker file in makefiles

* extra line

* prometheus actually didn't depend on anything special for f469

* dead line

* h7

* dead

* move board.c

* set explicit cpu type for simulator

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-08 07:52:31 -06:00
Matthew Kennedy 423acd384b
simplify MCU selection (#2308)
* set mcu type in hw_ports

* move f4 linker script

* move f7 linker script

* don't set default linker file in makefiles

* extra line

* prometheus actually didn't depend on anything special for f469

* dead line

* h7

* dead
2021-02-08 02:11:44 -05:00
Matthew Kennedy 50a860a380
implement lps25 (#2301)
* bb

* implement

* tweaks

* s

* comment, format

* guard

* implement lps25

* headers and comment

* sensor works

* headers

* guard

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-06 23:59:44 -06:00
Matthew Kennedy f518b72260
implement bit-banged I2C driver (#2289)
* bb

* implement

* tweaks

* s

* comment, format

* guard

* headers and comment
2021-02-06 16:59:06 -06:00
Andrey G 3166076839
Some fixes prior to board pull request (#2291)
* ChibiOS: add support for STM32F765

This chip is used on Subaru EG33 p'n'p RusEFI board from Dron_Gus

* drivers: gpio: mc33810: commulative update

- use BIT macro
- fix wake-up method
- fix order of arguments in _add function

* port: stm32f4/7: detectCanDevice check for enabled interfaces only

* ADC: fix internal array size

internalAdcIndexByHardwareIndex should be EFI_ADC_LAST_CHANNEL size
couse adc_channel_e is used as index

* status LEDs: support status LEDs that driven by low level
2021-02-06 12:22:57 -05:00
rusefillc 30358e0526 reducing code duplication 2021-02-06 00:46:40 -05:00
rusefillc cda053f388 H7 compilation #2284 2021-02-06 00:37:12 -05:00
rusefillc 4dbb77415a reducing code duplication 2021-02-06 00:25:13 -05:00
rusefillc a093a839be reducing code duplication 2021-02-06 00:18:47 -05:00
rusefillc 7c231d968f H7 compilation #2284 2021-02-05 23:57:28 -05:00
rusefillc e4a85acb3b H7 compilation #2284 2021-02-05 23:37:18 -05:00
rusefillc aafb5ca28d let's build for h7 2021-02-05 22:29:23 -05:00
rusefillc 908dbd640c let's build for h7 2021-02-05 22:10:59 -05:00
rusefillc ac6c8a6c9f let's build for h7 2021-02-05 21:37:33 -05:00
rusefillc 9d77a35b5a let's build for h7 2021-02-05 21:09:36 -05:00
Matthew Kennedy 9151b0c6c1
fix #2269 (#2272)
* fix #2269

* cleanup
2021-02-03 08:04:22 -06:00
rusefillc 869e4cfc49 vvt/cam events to pass index 2021-01-31 22:24:45 -05:00
rusefillc d116101e1a trigger: exti: callback parameter is now index 2021-01-31 22:10:10 -05:00
rusefillc a411e0d1af code style 2021-01-31 22:02:01 -05:00
rusefillc 73085b3914 code style 2021-01-31 21:45:01 -05:00
Matthew Kennedy 198bdec496
USB reports real STM32 Serial Number (#2254)
* mpu util data

* implementation
2021-01-30 14:51:11 -05:00
rusefillc 5d1c248e4d No hablo inglés 2021-01-28 20:43:23 -05:00
rusefillc e1febfb9e1 fixing port I 2021-01-25 00:29:48 -05:00
rusefillc c069f1c959 fixing port I 2021-01-22 23:31:21 -05:00
rusefillc aaa9f2a608 Hellen needs text representation of GPIOI
H7 dreams are asking for J and K
2021-01-22 01:25:05 -05:00
Andrey G 777979c3ca
Chibi os 20 (#2212)
* Update ChibiOS

* Fix Makefiles includes paths

* halconf.h: remove flash hack

* mcuconf: fix EXTI ptiorityes

* Digital Input: ICU: use designated initializers, initialize 'arr'

* ChibiOS: lis302dl fix

* ADC: update to new API

* UARTConfig: timeout_cb field, formating

* ChibiOS: remove _exit, _kill, _getpid

* Fix lis302dl

* Bump config versions

* chconfig_common: cosmetic changes

* stm32f4ems: commulative config update

* Update Simulator

* ALLCSRC already contain all needed ChibiOS files.

Same for ALLINC and ALLCPPSRC

* ChibiOS fix for Simulator

* ChibiOS: port lock/unlock hook and MMC over SPI timeout

* STM32F7: update configs

* STM32F7: update linker file

* Cypress: port ADC lld to ChibiOS-20

* Cypress: port SPI lld to ChibiOS-20

* Cypress: port CAN lld to ChibiOS-20

* Cypress: fix include path for rules.ld

* Cypress: update chconf.h and halconf.h for ChibiOS-20

* Kinetis: update ADC lld to ChibiOS-20

* Kinetis: update SPI lld to ChibiOS-20

* Kinetis: update UART lld driver for ChibiOS-20

* Kinetis: update chconf.h and halconf.h for ChibiOS-20

* Kinetis: fix include path for rules.ld

* Nucleo F746: update ld script

* Nucleo F746: fix compile

* Bootloader: fix compilation with ChibiOS-20, cleanup

* Bootloader: add way to pass crosscompiler using CROSS_COMPILE

* Debug build arguments

* Simulator: fix windows compilation

Exclude syscalls_cpp.cpp from compilation
2021-01-19 15:20:35 -05:00
rusefi 0dc0ae19be OMG we are not using java yet?! 2021-01-18 19:00:53 -05:00
rusefi bb1ae49534 https://refactoring.com/catalog/replaceMagicLiteral.html 2021-01-18 18:54:18 -05:00
Matthew Kennedy fa30efbc94
boost fixes (#2230)
* fix boost pin reinit

* call boost from periodic slow

* ui

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-01-18 07:04:14 -05:00
Andrey G baea67eccf
Simplify Makefile, unify board.mk files (#2229)
* Proper way to add lis302 driver

* Proper way to add license directory to includes

* Makefile: simplify

All ChibiOS stuff is accumulated in ALLCSRC, ALLINC and so on.

* board.mk: append sources and includes to ALLSRC, ALLCPPSRC, ALLINC

* Cypress: fix CANv2 includence into build
2021-01-17 09:32:06 -05:00
Andrey G 25560b85c2
Supress annoing unused warnings (#2216) 2021-01-11 08:49:20 -05:00
rusefillc 9dfa5e9670 cherry pick from https://github.com/dron0gus/rusefi/tree/ChibiOS-20 2021-01-09 19:15:50 -05:00
rusefillc 4f49c73a45 Lcd fix (I hope) #2211
there is still an issue :(
2021-01-09 17:30:39 -05:00
Andrey G 7803968621
Lcd fix (I hope) (#2211)
* LCD: check if settings are valid on each access

* Lada Kalina: remove duplicate code

All LCD pins are set to GPIO_UNASSIGNED in disableLCD()

* Remove duplicate code

* We still need to know when invalid gpio is used...

This reverts commit c17775231a.
2021-01-09 17:16:10 -05:00
rusefillc c17775231a dron0gus please help 2021-01-09 15:31:09 -05:00
Andrey G 2af32084f4
gpio helper (#2195)
* gpios: isBrainPinValid helper

* LCD HD44780: do not touch pins if DM_NONE or invalid gpio

* Fix isEnabled checks for GPS and Joystick

* LCD HD44780: writePad use this method wider
2021-01-08 20:01:26 -05:00
rusefillc ff765f5f5d knock v12 2021-01-06 19:42:07 -05:00
Andrey G f96ae7525f
Gpio cleanup #2 (#1530)
* pin repository: PIN_USED size in now equal to brain_pin_e enum size

expect special values...

* smart gpios: register gpio chip to given base (no auto-allocation)

* drivers: gpio: core: add gpiochip_unregister()

* drivers: gpio: MC33810 intergation

* smart_gpio.cpp: cleanup ifdef mess, minor cleanups

* gpio: core: additional check for gpio ranges overlaps

* unit test: gpio chip: fixed and extended
2021-01-06 18:29:47 -05:00
Andrey G 37cd9266d3
Call startSmartCsPins when applying new settings (#2194)
Only stopSmartCsPins was called from applyNewHardwareSettings.
This cause lost of CS pins for external gpio chips
2021-01-06 08:59:13 -05:00
Andrey G b92e3086d0
Adc isAdcChannelValid helper (#2188)
* Guard define argument

* ADC: isAdcChannelValid

Check for both <= EFI_ADC_NONE and >= EFI_ADC_LAST_CHANNEL
Also check for value out of enum range (corrupted settings)

* Fix unit tests
2021-01-05 16:02:20 -05:00
Matthew Kennedy 19bf208cde
use limp mgr for trigger disable (#2145)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-26 18:12:36 -05:00
Matthew Kennedy 0df5d0ae3d
actually use button name (#2126)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-24 07:30:56 -05:00
rusefi 6032d0a26f Proteus is compiled without VSS feature #2122 2020-12-22 21:28:51 -05:00
rusefi a254c79d93 trigger and start button pins not displayed by "pins" command #2084 2020-12-22 21:20:57 -05:00
rusefi 42c1fb7b5e trigger and start button pins not displayed by "pins" command #2084 2020-12-22 21:05:49 -05:00
rusefi f62bcca7ea trigger and start button pins not displayed by "pins" command #2084 2020-12-22 20:54:28 -05:00
rusefi c4650076cf trigger and start button pins not displayed by "pins" command #2084 2020-12-22 20:53:05 -05:00
rusefi d6b745e1c0 Proteus is compiled without VSS feature #2122 2020-12-22 20:50:01 -05:00
rusefi fd54e37358 trigger and start button pins not displayed by "pins" command fix #2084 2020-12-22 20:42:30 -05:00
Matthew Kennedy 690ab7e917
gpio unit tests (#2099)
* fix unregister api for gpio

* consumers

* guard with a critical section

* index

* guard less

* unregister under lock

* fix reinit

* dead flag

* fix most tests

* initialize properly

* initialize properly

* assertions in tests

* fix message

* move gpio mocking

* test gpios

* we must lock earlier to be truly safe

* this was using huge memory

* devirtualize

* test deinit
2020-12-18 17:19:02 -05:00
Matthew Kennedy 6168bcea80
Fix gpio reinit race condition (#2098)
* fix unregister api for gpio

* consumers

* guard with a critical section

* index

* guard less

* unregister under lock

* fix reinit

* dead flag

* fix most tests

* initialize properly

* initialize properly

* assertions in tests

* fix message

* we must lock earlier to be truly safe

* this was using huge memory

* devirtualize
2020-12-18 17:18:12 -05:00
rusefillc ca0f3ba240 HW CI is flaky :( #2063
more detailed error messages
2020-12-17 20:22:04 -05:00
rusefillc 26fbf0527a trigger and start button pins not displayed by "pins" command fix #2084 2020-12-16 22:53:26 -05:00
rusefillc 8f2116921c trigger and start button pins not displayed by "pins" command fix #2084 2020-12-16 22:24:19 -05:00
rusefillc a47129693a trigger and start button pins not displayed by "pins" command #2084
progress but not complete fix yet
2020-12-16 22:00:42 -05:00
Andrey G cd546cf932
TLE8888: temp fix of #2065 (#2079) 2020-12-14 15:33:27 -05:00
Matthew Kennedy 360a8c7524
add support for ext ids (#2060)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-12 16:34:21 -05:00
Matthew Kennedy 8ad2080df7
switch stm32 scheduling to use PWM driver (#1983)
* move to folder

* extract hardware part of microsecond_timer

* dead ST forum link

* de-volatile

* simulator build

* guard

* switch stm32 to pwm timer

* comments

* f7 mcuconf

* simulator

* guard

* warning

* header, cleanup

* constant

* less magic

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-11 00:44:40 -05:00
Matthew Kennedy 5f69d23976
fix mock pins array (#2050)
* fix

* fix probably
2020-12-10 00:10:58 -05:00
rusefillc 824f87c2d0 basic hw in the loop - pwm self validation #2028 2020-12-08 04:52:49 -05:00
rusefillc 96c29840ce basic hw in the loop - pwm self validation #2028 2020-12-07 20:42:47 -05:00
rusefillc aca471273d basic hw in the loop - pwm self validation #2028 2020-12-07 20:26:47 -05:00
rusefillc 6712c63160 basic hw in the loop - pwm self validation #2028 2020-12-07 20:01:05 -05:00
rusefillc 2e8ae3ca94 refactoring 2020-12-06 19:04:23 -05:00
Andrey G 7c6974ab43
Fixes after clenup (#2019)
* We still need consoleEventListener for boards with EFI_CONSOLE_SERIAL_DEVICE

* MC33810: add MC_ prefix for command defines

As CMD_PWM define is now used by console command
2020-12-05 11:54:09 -05:00
Andrey G 2b5fc79aa7
ADC: correctly calculate cache invalidate range for STM32F7xxx (#2021)
Bug was introduced in 2312b0ae57 when
sample buffer was moved out of class. So sample become adcsample_t*
instead of adcsample_t[] and sizeof returns 4.
2020-12-05 10:14:33 -05:00
Andrey G 852fdcd4d1
adc: fix CPU temperature read for STM32F76x/77x (#2020) 2020-12-05 09:58:23 -05:00
Matthew Kennedy 4deb875204
fix warnings (#2003)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-03 07:27:27 -05:00
Matthew Kennedy a3a49b02ed
fix gpio the right way (#1990)
* fix the right way

* use the api

* explain

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-11-27 00:24:41 -05:00
rusefillc 2f91ae6f73 Starter is engaged on start-up in pull-up configuration #1969 2020-11-26 10:55:39 -05:00
rusefillc d4d7e7583b Starter is engaged on start-up in pull-up configuration #1969 2020-11-26 10:41:22 -05:00
rusefillc 66ae6a1ecf Starter is engaged on start-up in pull-up configuration #1969 2020-11-26 00:24:15 -05:00
rusefi 1238758c0f Starter is engaged on start-up in pull-up configuration #1969 2020-11-26 00:16:59 -05:00
rusefillc a5d0e4beeb avoid float -> int64 conversion #1977
cherry picking...
2020-11-24 20:33:51 -05:00
Matthew Kennedy 922f0249d2
squash warnings (#1984)
* warnings

* unused

* a few more

* too much

* uint16_t-ify
2020-11-23 09:43:16 -05:00
Matthew Kennedy 6334e5011f
Port-ify microsecond_timer hardware implementation (#1964)
* move to folder

* extract hardware part of microsecond_timer

* dead ST forum link

* de-volatile

* simulator build

* guard
2020-11-22 20:39:32 -05:00
rusefi 98605677f6 adc fixed #1979
partial revert
2020-11-22 15:31:33 -05:00
rusefillc 5678190d5a ADC: fixes: #1979
better error handling?
2020-11-22 13:42:24 -05:00
rusefi eece5496da ADC: fixes: #1979
more detailed error message
2020-11-22 12:57:04 -05:00
Andrey G a285ba6743
ADC: fixes: (#1979)
* ADC: fixes:

-use enums
-internalAdcIndexByHardwareIndex array should be adc_channel_e size
-add sanity checks
-save few bytes of RAM

* ADC: use logical OR instead of math add
2020-11-22 12:23:27 -05:00
Andrey G b60ce1b9f8
Typo fix (#1978) 2020-11-22 08:27:03 -05:00
rusefillc e6fa57db87 Starter is engaged on start-up in pull-up configuration #1969
maintainability
2020-11-20 00:18:38 -05:00
shadowm60 7c793834ef
Launch control unit tests update (#1972)
* testable launch start

* extract base class

* add a test

* fix ts debug

* Launch control unit_tests

updated launch control for a better split
VSS mock for unit tests

Co-authored-by: Matthew Kennedy <matthewkennedy@outlook.com>
2020-11-19 21:14:38 -05:00
Matthew Kennedy f3b7a1d9da
Remove lockAnyContext, replace with CriticalSectionLocker (#1938)
* switch to CriticalSectionLocker

* that's just about all

* clean up last usage

* include hpp for sim

* need the cpp wrappers in the makefile too

* include dir

* include
2020-11-19 06:56:02 -05:00
rusefillc 47fbb92bff Starter seems to be engaged forever fix #1965 2020-11-18 23:54:30 -05:00
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
rusefi 893de62fe6 Merge remote-tracking branch 'origin/master' into master 2020-09-12 04:03:23 -04:00
rusefi 958538e5aa Hellen says merge #1772 adc.h 2020-09-12 04:03:11 -04:00
Matthew Kennedy d941bdc502
logging simplification: switch bare functions to member functions (#1788)
* first pass

* first pass

* const means we don't have to check!

* static

* test fixup
2020-09-12 03:08:11 +03:00
David Holdeman 337106cd24
DebounceButton A/C switch (#1782)
* change acSwitch name, add mode

* fix

* remove some adc stuff

* remove some adc stuff

* semicolon stupid

* left behind

* add readpinstate

* wrong var name

* add functions back

* fix name

* bool, not void, plus fix name

* move

* not sure what I broke

* try setMockValue

* namespace

* whoops missed one

* switch values because adc was set up for pullup

* try 5

* comment for now

* comment for now

* uncomment tests, add function to mock, add mock to efiReadPin

* fixes

* for F's sake

* if

* add defy

* pass params

* use ASSERT_TRUE/FALSE

* advance time

* remove ifdef from readPin

* try moving if

* move to separate func

* move extern

* move include

* try engine_test_helper

* am confuse

* move func to else

* include hal

* add efi prod check

* remove include

* try extern

* move include

* semicolon stupid

* move extern again

* include

* move mockPinStates

* size

* add if

* add comment

* clean on instantiation
2020-09-10 22:16:20 -04:00
rusefi dbb10e7c7d Merge remote-tracking branch 'origin/master' into master 2020-09-09 17:25:09 -04:00
rusefi 3a11ea7e31 Merge remote-tracking branch 'origin/Hellen_fork_point' into master
# Conflicts:
#	firmware/Makefile
#	firmware/hw_layer/smart_gpio.cpp
2020-09-09 17:19:41 -04:00
David Holdeman 2bf3792c53
Debounce pin state function (#1780)
* add readpinstate

* wrong var name
2020-09-09 17:18:54 -04:00
rusefi a0aeeb4919 Hellen says merge #1772 smart gpio 2020-09-09 17:16:51 -04:00
rusefi e94631ad3d Merge remote-tracking branch 'origin/Hellen_fork_point' into master
# Conflicts:
#	firmware/hw_layer/digital_input/trigger/trigger_input.h
#	firmware/hw_layer/hw_layer.mk
#	firmware/hw_layer/ports/stm32/stm32f0/hw_ports.mk
#	firmware/hw_layer/ports/stm32/stm32f1/hw_ports.mk
#	firmware/hw_layer/ports/stm32/stm32f4/hw_ports.mk
#	firmware/hw_layer/ports/stm32/stm32f7/hw_ports.mk
2020-09-09 16:55:27 -04:00
rusefi e1be439682 Hellen says merge #1772 helping merge - Kinetis?! 2020-09-09 16:38:18 -04:00
rusefi 6e64d243da Hellen says merge #1772 helping merge 2020-09-09 14:35:01 -04:00
rusefi 07bc8100c7 Hellen says merge #1772 helping merge 2020-09-09 14:20:54 -04:00
rusefi 59ecf525f5 Hellen says merge #1772 helping merge 2020-09-09 13:43:18 -04:00
rusefi 500d73ef02 Hellen says merge #1772 more about ports 2020-09-09 13:39:51 -04:00
rusefi 995795eeb6 Hellen says merge #1772 trigger h 2020-09-09 10:21:14 -04:00
rusefi 6fdb54d0dc Hellen says merge #1772 backup ram.h 2020-09-09 10:20:21 -04:00
rusefi ed38250fd5 Hellen says merge #1772 more about ports 2020-09-09 10:18:58 -04:00
rusefi 38c4794ef0 Merge remote-tracking branch 'origin/master' into master 2020-09-09 08:58:54 -04:00
rusefi 47b3ad0b9c Hellen says merge #1772 more ports 2020-09-09 08:58:12 -04:00
rusefi 729bf748eb Hellen says merge #1772 more ports 2020-09-09 08:53:11 -04:00
rusefi 0d26894154 Hellen says merge #1772 tle header 2020-09-09 08:52:14 -04:00
David Holdeman f5d9263ad1
switch start/stop to ButtonDebounce (#1777) 2020-09-09 08:22:15 +01:00
Andrey G 2312b0ae57
Adc improvements (#1765)
* ADC: move DMA buffer outside of AdcDevice (save few bytes)

* ADC: inlcude fast channels to debug output

* ADC: save some CPU ticks (disabled until fully tested)

* ADC: simplify
2020-09-08 17:20:55 -04:00
David Holdeman 4ce758db88
use EFI_UNIT_TEST, add check (#1774) 2020-09-08 14:27:23 -04:00
David Holdeman cab4cd0df2
Debounce pin management (#1760)
* add linked list

* macros, and use in buttonshift

* unit_tests macros

* add extern

* add parens

* move extern

* move extern

* move buttonDebounceListHead

* move buttonDebouncePointerHead

* merge gore

* undo

* reduce unused size

* don't store pointer if already initialized

* few changes

* remove oldPin

* fix merge conflict

* merge in changes commited to wrong branch

* fix definition

* out of class?

* brute force programming

* fix few problemos

* am confuse

* am confuse

* am confuse

* am confuse

* oldPin snuck in

* move to public?

* define again

* try constexpr

* def in cpp

* remove constexpr

* fix def

* fix?

* update active

* fix a few things
2020-09-08 11:29:38 -04:00
rusefi 9bea1190a4 Merge remote-tracking branch 'origin/Hellen_fork_point' into master
# Conflicts:
#	firmware/controllers/algo/engine_configuration.cpp
2020-09-07 15:55:43 -04:00
rusefi c4cbdf0d77 Hellen says merge #1772 ADC flexibility 2020-09-07 15:50:37 -04:00
rusefi 279482a298 Hellen says BOARD_DRV8860_COUNT 2020-09-07 15:38:34 -04:00
rusefi f33b3eda8a Merge remote-tracking branch 'origin/Hellen_fork_point' into master
# Conflicts:
#	firmware/controllers/algo/engine.h
#	firmware/hw_layer/drivers/drivers.mk
#	firmware/hw_layer/stepper.h
#	firmware/integration/rusefi_config.txt
#	firmware/tunerstudio/rusefi.input
#	simulator/simulator/efifeatures.h
2020-09-07 15:02:11 -04:00
rusefi 6a3d212370 Hellen says merge #1772
Hellen says stepper

(cherry picked from commit a2f26ac99b)
2020-09-07 14:45:41 -04:00
rusefi a88e142df0 Hellen says misc
(cherry picked from commit 2390c3ae2b)
2020-09-07 14:43:12 -04:00
rusefi a2f26ac99b Hellen says merge #1772
Hellen says stepper
2020-09-07 14:41:04 -04:00
rusefi 2390c3ae2b Hellen says misc 2020-09-07 14:09:00 -04:00
rusefi 38f480741f Hellen says drivers
(cherry picked from commit 02573713f3)
2020-09-07 12:02:40 -04:00
rusefi 0aa76da9f2 Hellen says ports
(cherry picked from commit 4acea75cc8)
2020-09-07 12:02:34 -04:00
rusefi 02573713f3 Hellen says drivers 2020-09-07 12:00:16 -04:00
rusefi 4acea75cc8 Hellen says ports 2020-09-07 11:57:20 -04:00
rusefi 7d0c8b4870 microRusEFI used as Body Control Module BCM BCU
got stack too low warning with DBG_CAN
2020-09-06 21:45:17 -04:00
rusefi 1f6b820a96 microRusEFI used as Body Control Module BCM BCU 2020-09-06 21:30:14 -04:00
rusefi 39d09bc976 microRusEFI used as Body Control Module BCM BCU 2020-09-06 20:21:01 -04:00
Matthew Kennedy 0e14e51179
reorder ADC channel index (#1763)
* change config

* correct logic

* clearing these no longer needed

* test expected this to be set
2020-09-06 18:25:26 -04:00
Matthew Kennedy 95798a5246
fix broken master, inject engine ptr to rpmcalculator (#1759)
* fix

* oops
2020-09-05 18:49:42 -04:00
rusefi ca21d5b4c2 refactoring 2020-09-03 19:29:15 -04:00
David Holdeman 499a430347
[TCU] GearController and TransmissionController base classes (#1749)
* add tcu ts outputs

* accidental change?

* add tcu base classes

* rearrange

* accidental change?

* add files

* missing backslash

* undo accidental change

* buttonshift includes, targets, and init

* Revert "buttonshift includes, targets, and init"

This reverts commit 1b0630511e1948f3d330d74be5bff6c087f118fb.

* use unused bit

* add return documentation

Co-authored-by: rusefillc <48498823+rusefillc@users.noreply.github.com>
2020-09-02 15:39:50 -04:00
dron0gus 182747e907
Adc cleanups (#1743)
* ADC: remove ADC_TwoSamplingDelay*

1. it is related to double or triple interlived mode only
2. it should be writen to CCR register, not CR1

* ADC: use designated initializers
2020-09-01 07:38:35 -04:00
Matthew Kennedy 5fc1b6902c
fix #1740 the right way (#1741)
* fix

* put that back
2020-08-31 21:05:04 -04:00
rusefi e3b41c2387 dead code 2020-08-31 20:52:25 -04:00
Matthew Kennedy 12efd2f6be
generated for pt2001 (#1666)
* generated for pt2001

* don't unicode
2020-08-30 15:38:56 -04:00
NOx-z e1e9e2caf0
Mc33 ucode (#1734)
* mc33 flash check

* DI sanity checks for setting HV config

* mc33816 microcodee source code update for what we got running on the r0.4 board w/ pt2001

Co-authored-by: Christopher W. Anderson <gitstuff@pswitch.com>
2020-08-29 22:24:11 -04:00
rusefi 2971230711 VVT support for VAG trigger #883 2020-08-29 18:13:00 -04:00
rusefi 94daeb7922 OBD CAN sensors #1733 2020-08-29 14:36:23 -04:00
Matthew Kennedy 1a55085bb6
Software knock detection (#1730)
* s

* science

* set pin mode

* turn stuff off so it fits

* filtering maybe

* filtering actually works

* generate filter parameters internally

* shorter window

* guard behind enable flag

* use checked in filter

* add biquad reset

* tracing

* const

* exec order

* do it from a thread

* smaller buffer, comment

* configure with header

* only for proteus

* oops

* unused

* not needed

* guards

* pin config

* don't need that include

* precook filter steady state

* define sample rate

* config enable switch
2020-08-28 21:13:50 -04:00
rusefi 7867e83e43 VVT support for VAG trigger #883 2020-08-24 02:01:50 -04:00
rusefi 938f40cbef more fixing build? 2020-08-21 22:07:55 -04:00
Matthew Kennedy 733008b9d0
Analog input filtering (#1680)
* improve biquad

* cleanup

* add filtering to subscriptions

* config sensors

* comment

* doesn't need to be that fast

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-08-21 19:47:12 -04:00
rusefi add49b0a5c bugfix - PPS second channel was not initialized 2020-08-19 00:46:57 -04:00
Andrei 068f21c616 vss_exti untested 2020-08-13 18:27:31 +03:00
rusefi f04149b489 disable trigger_hw_input should work for PAL and VVT 2020-08-09 00:20:01 -04:00
rusefi ba62727c25 trigger and VSS hw integrated testing #1668 2020-08-08 18:28:43 -04:00
rusefi 512d7c2c49 TS SD integration #1653 2020-08-07 17:20:16 -04:00
rusefi 3b8525b521 TS SD integration #1653 2020-08-07 16:37:36 -04:00
rusefi a8ba5311f2 TS SD integration #1653 2020-08-07 16:27:21 -04:00
rusefi 6efcd3a474 TS SD integration #1653 2020-08-07 15:53:11 -04:00
rusefi cc35325eb7 TS SD integration #1653 2020-08-07 15:01:25 -04:00
rusefi 8764693179 TS SD integration #1653 2020-08-07 00:59:00 -04:00
rusefi 8192247175 TS SD integration #1653 2020-08-06 23:34:47 -04:00
rusefi 526e02af53 TS SD integration #1653 2020-08-06 22:05:26 -04:00
rusefi ea7fed6a16 TS SD integration #1653 2020-08-06 01:15:41 -04:00
rusefi b208f592cd TS SD integration #1653 2020-08-02 23:09:38 -04:00
rusefi 10b8da525d TS SD integration #1653 2020-08-02 22:31:11 -04:00
rusefi 8f4aecf7ca The Big Refactoring of 2019: folder structure #723 2020-08-02 20:46:40 -04:00
rusefi aa2ee8a776 TS SD integration #1653 2020-08-02 17:58:57 -04:00
rusefi 55bf936cee typo 2020-08-01 18:59:09 -04:00
Matthew Kennedy cd696acbe2 init 2020-07-29 02:50:23 -07:00
Matthew Kennedy 8508be5ebd dead 2020-07-29 02:49:37 -07:00
Matthew Kennedy 727f6e78ba explicit 2020-07-29 02:49:31 -07:00
Matthew Kennedy 1f221043ed shadowed 2020-07-29 02:49:23 -07:00
rusefi 064c96836d SD logging 2020-07-09 20:08:18 -04:00
rusefi 0409087606 docs 2020-07-04 21:38:52 -04:00
dron0gus 6992a541f3
stm32/kinetis_pins.cpp: remove PORTS array - duplicates ports array (#1527) 2020-06-21 15:59:18 -04:00
rusefi 048e910957 refactoring 2020-06-21 15:40:59 -04:00
kon 03f4efa0b2
BMW E90 Kombi (#1494)
* second can bus, first steps

* added most important messages; no more errors

* cleaned up can messages

* second can bus, first steps

* added most important messages; no more errors

* cleaned up can messages

* post rebase/merge fixes

* more rebase/merge fixes

* even more rebase/merge fixes

* more fixes, removed auto-gen files

* removed more auto-gen files...
2020-06-14 16:59:43 -04:00
Matthew Kennedy 3a7c6f242b
Hardware pwm (#1283)
* hard pwm

* fix, comments

* PC6-9 and PD12-15

* PB6-9

* dynamic frequency

* f7 mcuconf

* format

* relocate to common, support variable frequency

* error handling

* oops

* fix test build

* noop kinetis

* better guards

* guard for bl

* guards don't work if they have typos

* more mapping

* oops

* don't use for slow pwm

* enable pwm

* guard properly

* save a little memory

* use less mem

* correct timers

* all your ram are belong to us

* update limit & comment

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-05-28 16:02:41 -04:00
rusefi a4329169e9 better file name 2020-05-25 13:02:05 -04:00
rusefi fc28692258 more readable error message thank you Matt! 2020-05-23 17:20:46 -04:00
rusefi f806ca091d partial rollback 2020-05-23 17:13:46 -04:00
Matthew Kennedy b11c5cd8c8
switch some firmware warnings to errors (#1465)
* warnings as errors

* throw instead of exit

* test massaging

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-05-23 10:46:28 -04:00
rusefi 44b5e38d3a "TLE8888 SR Unexpected response" does not work as intended fix #1466 2020-05-22 22:56:19 -04:00
rusefi a0a1a9f9bb "TLE8888 SR Unexpected response" does not work as intended #1466 2020-05-22 08:23:49 -04:00
rusefi 1387ea7582 helping build 2020-05-22 01:14:42 -04:00
rusefi c95a4c552b more info into error message 2020-05-22 01:05:07 -04:00
rusefi 09ff35918b progress 2020-05-21 22:33:48 -04:00
Matthew Kennedy af53939d84
Binary logging to SD (#1461)
* binary log

* remove old text logging

* change file extension

* just use a bare buffer

* more mem :(

* double ugh

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-05-21 15:52:58 -04:00
Matthew Kennedy 4f334c91d5
warnings (#1462)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-05-21 01:08:07 -04:00
Matthew Kennedy 125701f514
free up timers for hardware PWM (#1459)
* free up timers

* put that back
2020-05-20 19:14:42 -04:00
rusefi 725d2b816d WBO 2020-05-20 19:01:55 -04:00
NOx-z b71403de7a
Mc33 timings (#1453)
* mc33 flash check

* DI sanity checks for setting HV config

* mc33 timings

Co-authored-by: Christopher W. Anderson <gitstuff@pswitch.com>
2020-05-20 02:35:18 -04:00
Matthew Kennedy ee15560f3d
pass in write length (#1447) 2020-05-17 17:27:26 -04:00
rusefi 5937ef8123 docs? 2020-05-17 17:08:04 -04:00
Matthew Kennedy 902b11fb5e
improve file format (#1446) 2020-05-17 17:02:22 -04:00
NOx-z d43bc81c24
Mc33 vccp uv (#1445)
* mc33 flash check

* DI sanity checks for setting HV config

* mc33 VccP (7v) under voltage detection - before and after DRIVEN, useful for regulator broken - or DC-DC logic converter broken

Co-authored-by: Christopher W. Anderson <gitstuff@pswitch.com>
2020-05-17 16:28:05 -04:00
rusefi af8de4c84f Revert "Minor fixes (#1442)"
This reverts commit 0c095ddd
2020-05-16 19:28:49 -04:00
dron0gus 0c095ddd15
Minor fixes (#1442)
* exti trigger: mark pins used, handle errors

* MC33810 add to smart gpios
2020-05-16 19:15:49 -04:00
Matthew Kennedy 0c142921d6
don't register ID pin (#1438) 2020-05-16 00:33:47 -04:00
rusefi 656acd1788 REVERT need to get master green 2020-05-15 20:15:34 -04:00
dron0gus e3fd0a186a
Minor fixes (#1437)
* cmpilation warning cleanup

* exti trigger: mark pins used, handle errors
2020-05-15 18:03:18 -04:00
dron0gus 7500e44c8c
tle6240: fix crash in driver wake routine (#1435) 2020-05-15 15:54:41 -04:00
dron0gus 48aa40b344
smart gpios: remove dead code (#1432) 2020-05-14 16:15:55 -04:00
rusefi 4e5a69891d new LED logic: constant WARNING if VBATT is below 7v 2020-05-13 01:52:27 -04:00
rusefi 257ed04fac new LED logic: constant WARNING if VBATT is below 7v 2020-05-13 01:17:48 -04:00
rusefi 52ad619b15 I think it's OK to crash very visibly if no proper SPI response 2020-05-13 01:07:11 -04:00
dron0gus e10259de99
either newline at end of mk file either no backslash on last line (#1425)
This fixes following build issue under linux:
make: *** No rule to make target 'build/obj/.cpp cj125.cpp', needed by 'build/obj/ build/obj/cj125.o'.  Stop.
make: *** Waiting for unfinished jobs....

Introduces in 8d35c35035
2020-05-12 09:55:43 -04:00
NOx-z 2e3c142993
Mc33 undervolt (#1423)
* mc33 flash check

* DI sanity checks for setting HV config

* mc33 under voltage check

* mc33 under voltage check

* mc33 clear driver status on startup

Co-authored-by: Christopher W. Anderson <gitstuff@pswitch.com>
2020-05-11 21:11:16 -04:00
kon 8d35c35035
Aux serial (#1422)
* aux serial updates from last PR

* trying to guess

* wow that's old! also not working maybe?

* hiding diag code which was messing with GP2/GP3 i.e. TLE8888_PIN_22 TLE8888_PIN_23

* date

* Mc33 undervolt (#1421)

* mc33 flash check

* DI sanity checks for setting HV config

* mc33 under voltage check

* mc33 under voltage check

Co-authored-by: Christopher W. Anderson <gitstuff@pswitch.com>

* fixed {}

Co-authored-by: rusefi <rusefillc@gmail.com>
Co-authored-by: NOx-z <50815960+NOx-z@users.noreply.github.com>
Co-authored-by: Christopher W. Anderson <gitstuff@pswitch.com>
Co-authored-by: kon <dev@triggerdevel>
2020-05-11 12:17:42 -04:00
NOx-z 7513b8ea5a
Mc33 undervolt (#1421)
* mc33 flash check

* DI sanity checks for setting HV config

* mc33 under voltage check

* mc33 under voltage check

Co-authored-by: Christopher W. Anderson <gitstuff@pswitch.com>
2020-05-11 01:52:20 -04:00
rusefi 75781f1262 hiding diag code which was messing with GP2/GP3 i.e. TLE8888_PIN_22 TLE8888_PIN_23 2020-05-11 00:53:50 -04:00
rusefi 633afc10c8 trying to guess 2020-05-09 20:45:20 -04:00
rusefi 19a1ad05b1 tle8888 restoration 2020-05-09 16:59:54 -04:00
rusefi b88b1e4aa5 mre 050 compromise 2020-05-09 09:40:00 -04:00
rusefi 8c3485a8dc Revert "Tle8888 for mre 050 (#1408)"
This reverts commit ba1a606d
2020-05-08 23:58:34 -04:00
dron0gus ba1a606d9a
Tle8888 for mre 050 (#1408)
* tle8888: fix tle8888_chip_init flow

* tle8888: set correct pin modes for mcu gpios in tle8888_chip_init

Direct drive, reset, inj_en and ign_en gpio should be outputs
2020-05-08 19:05:30 -04:00
dron0gus d0d5cdd4dd
tle8888: on MRE 0.5.0 we can drive ING_EN and INJ_EN from STM (#1407)
Do it!
2020-05-08 17:47:41 -04:00
dron0gus 98bca0cb23
Tle8888 stage 1 (#1404)
* TLE8888: implement diagnostic

* TLE8888: add support for PP mode on OUT21..24

* tle8888: use helpers to extract register value from 16bit reply
2020-05-07 09:49:57 -04:00
dron0gus 5987fb8b88
[SAFE] Debug cleanups (#1403)
* electronic throttle: inprove debug

* idle thread: show debug info for configured idle driver

* gpio-chips: make private functions static
2020-05-06 20:06:50 -04:00
rusefi 07e6e2c4ad steps towards tle8888 2020-05-06 19:20:12 -04:00
Matthew Kennedy 858821ed66
proteus -> exti (#1378)
* proteus -> exti

* do frankenso pal the same way

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-05-06 18:52:15 -04:00
rusefi 11a02b6395 class constructors are a great way to have simple initialization sequence 2020-05-03 10:58:52 -04:00
rusefi 244d1ea7e8 docs 2020-05-03 10:41:48 -04:00
rusefi 96ceae7d17 refactoring: using constructor life-cycle to simplify initialization sequence 2020-05-02 23:15:48 -04:00
rusefi d371af5b89 CJ125 PI commands 2020-05-01 20:22:49 -04:00
rusefi 669322311f cj125 progress 2020-05-01 19:42:09 -04:00
rusefi de519474ef cj125 less verbose when running 2020-05-01 19:27:26 -04:00
rusefi d6db0d1013 bugfix 2020-05-01 19:19:29 -04:00
rusefi c39662b5c6 better state messages 2020-05-01 18:52:06 -04:00
rusefi fe25c8162a Attempting cj125 2020-05-01 17:52:25 -04:00
rusefi 865531193d docs 2020-04-30 22:30:37 -04:00
rusefi 7686ee271c https://github.com/rusefi/rusefi_documentation/issues/37 2020-04-29 18:46:51 -04:00
rusefi 0c5e41a36d fix master #1375 2020-04-28 08:10:36 -04:00
Matthew Kennedy cb668e5234
fix master (#1375)
* fix

* put back how it was

* missed a spot
2020-04-28 08:08:41 -04:00
Matthew Kennedy fe4b531aeb
Move ETB control to a thread (#1374)
* switch to thread

* actually use default frequency define

* crank ADC too

* make space in RAM

* remove TS field

* this should work for test

* fix dt

* re-resize ram
2020-04-28 07:22:31 -04:00
rusefi 1b84406e77 dead code 2020-04-26 17:40:12 -04:00
Matthew Kennedy 83cca6ec7a
allow overriding configuration (#1341)
* config overrides

* proteus too

* comment

* remove wno-error

* comment
2020-04-26 00:07:59 -04:00
dron0gus 474d5e64cf
Update chibios (#1364)
* Update ChibiOS

* Fix coexistance of ChibiOS and our flash drivers

* Add 'int' = internal prefix for all on-chip flash functions

This avoid conflict with ChibiOS functions available after
enabling HAL_USE_EFL

* Exclude ChibiOS flash driver from bootloader

* Makefile magic?

* Kinetis: fix build after ChibiOS update and switching to SMART_BUILD

* Bootloader now use SMART_BUILD too
2020-04-25 16:32:32 -04:00
Matthew Kennedy a8db44d48a
Remove scheduler debug pins (#1359)
* trigger gen refactoring

* missed one

* remove microsecond timer debug pins

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-04-24 23:13:05 -04:00
Matthew Kennedy f704bf22cb
use the linker! (#1363) 2020-04-24 21:21:04 -04:00
Matthew Kennedy b6ee79327d
switch ADC to gpt (#1343)
* switch to gpt

* halconf

* fix kinetis

* fix kinetis

* fix guards

* comment cleanup
2020-04-23 22:50:18 -04:00
rusefi ac9ca1343a tle8888 modes corrected 2020-04-23 19:49:22 -04:00
rusefi c52c7e2f1f TLE8888 mode flexibility 2020-04-23 16:57:37 -04:00
shadowm60 638cb64b54
Can vss updates (#1345)
* Vss over Can implementation proposal

Working for BMW e46

* fixed Firmware CI?

* kinetis fix.

* minor fixes

* Added W202 + fixed broken configs

- w202 Vel decoded
- added dbc checks
2020-04-22 13:40:08 -04:00
shadowm60 fe3030bb23
Vss over Can implementation proposal (#1340)
* Vss over Can implementation proposal

Working for BMW e46

* fixed Firmware CI?

* kinetis fix.

* minor fixes
2020-04-21 20:48:37 -04:00
rusEfi 1ced7eafbc Better handling in case of ETB idle without ETB #1332 2020-04-19 21:51:27 -04:00