Commit Graph

245 Commits

Author SHA1 Message Date
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
Matthew Kennedy 408d4c6ebf
multi CAN plumbing (#3688)
* framing for multi CAN

* typoooooooo
2021-12-10 17:08:10 -05:00
rusefillc 5830975040 rusEFI console ISO-TP via PCAN #3667
fixing build #3
2021-12-08 16:24:54 -05:00
Andreika 72cefd42de
CAN ISO-TP progress (+unit-tests fix) (#3677)
Co-authored-by: Andrei <andreikagit@users.noreply.github.com>
2021-12-08 15:11:19 -05:00
rusefillc 3a33e59b86 rusEFI console ISO-TP via PCAN #3667 2021-12-08 12:01:28 -05:00
rusefillc b778aa7173 Pause CAN broadcast on engine stop #3665 2021-12-07 10:35:52 -05:00
rusefillc 1dd3370b56 https://rusefi.com/forum/viewtopic.php?f=18&t=2236 2021-12-06 21:31:49 -05:00
Andrei c6fa50d196 CAN update 2021-12-03 21:44:15 -05:00
rusefillc 53d50b5076 doc 2021-12-03 09:57:15 -05:00
rusefillc 26997ab9e3 why so many channels are hidden in debug ? #3614 2021-11-29 01:02:40 -05:00
Matthew Kennedy a071e2a168
verbose CAN bits picker (#3628)
* verbose bits picker

* s
2021-11-28 14:59:26 -05:00
Scott Smith 823d9a07e0
Programmatically replace ENGINE() and CONFIG() with engine-> etc (#3565)
git grep -l -w ENGINE | xargs sed -i -r "s/ENGINE\(([]a-zA-Z_0-9.[]+)\)/engine->\1/g"

git grep -l -w CONFIG | xargs sed -i -r "s/([^a-zA-Z_])CONFIG\(([]a-zA-Z_0-9.[]+)\)/\1engineConfiguration->\2/g"
2021-11-17 03:54:21 -05:00
Matthew Kennedy 8cdac4cac0
remove engine pointer passing (#3556)
* some

* more

* more

* the last?!
2021-11-16 04:15:29 -05:00
Matthew Kennedy cb032fb1ea
(void) -> () (#3550)
* static functions with (void)

* more

* Revert "more"

This reverts commit 246e53441f935451437df186ac92d7df26b62fb6.

* s

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-11-15 13:02:34 +01:00
rusefi 05820ec92d speed into caninfo 2021-11-13 10:41:23 -05:00
Andrey 78fdd5b9a9 UART pins validation and dynamic alternative function recognition #3536 2021-11-11 21:29:18 -05:00
rusefillc b8ccdfb7d8 todo: smarter online change of CAN settings, kill isCanEnabled with fire 2021-11-06 22:23:06 -04:00
Andrey G 780e91f38a
Bunch of small fixes related to EG33 board (#3188)
* Typo fix

* flash_main: always allow to write settings to ext NOR while running

* mc33810: do not enable outputs right after undervoltage

Wait for next active signal

* QSPI flash: set correct dummy cycles for fast read command

* board subaru: fix connector pinout. again.

* board subaru: fix SDMMC pin configuration

* board subaru: fix DMA conflict SPI4_RX vs SDMMC2
2021-08-24 07:39:03 +03:00
Andrey G 3961c6ad84
qspi flash updates (#3169)
* ChibiOS QSPI updates

* board: subaru: speed up NOR flash

* QSPI: add fast read commands
2021-08-17 11:06:37 +03:00
Andrey G c23e02c582
Settings ext storage (#3155)
* flash_main.cpp: reorder code for easy integration of ext storage

* Add EFI_STORAGE_INT_FLASH option

Default set to TRUE

* Add ChibiOS's Managed Flash Storage to build

* Add support for QSPI flash (SST26F064A tested)

* board: subaru: enable WSPI and NOR flash drivers

* Add option to save settings on ext flash MFS partition

* board: subaru: store settings on QSPI NOR flash
2021-08-14 09:36:08 -04:00
rusefillc b141f83a88 No pins should be restarted for no reason during config change #3151 2021-08-14 04:58:10 -04:00
rusefillc bd410d0c1b No pins should be restarted for no reason during config change #3151 2021-08-14 04:35:43 -04:00
Matthew Kennedy d24f1462e2
even more pch (#3112)
* s

* more

* s

* f7
2021-08-04 19:30:52 -04:00
Matthew Kennedy 25414ebdad
yet more pch (#3068)
* big pch energy

* put back ramdisk stub

* tests are happy

* h743 nucleo

* kinetis

* I love deleting code!

* make stepper happy

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-08-03 22:05:01 -04:00
Matthew Kennedy b52d50bbf2
Use pch in lots of files (#3066)
* most engine.h

* most engine_configuration

* more

* more

* more

* more

* more

* moooooore

* ok I'm done for now

* oops
2021-07-26 01:05:17 -04:00
Matthew Kennedy 2ce7777865
don't require EXTERN_ENGINE in every file (#2969)
* move enginePins

* no more extern engine

* uses

* more

* extern config too

* put this where it belongs

* include correct header

* merge
2021-07-16 18:13:33 -04:00
Matthew Kennedy a62d6743bc
lua hooks for CAN tx (#2967)
* CanTxMessage usable from unit test

* testLuaReturnsNil

* CAN hook and tests

* it helps if parameter names exist

* nameless params

* s

* redefinition of default argument

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-07-16 14:06:26 -04:00
Andrey b2f09de277 refactoring - making method available 2021-07-13 19:28:03 -04:00
Andrey G 802afaed34
Fixes eg33 (#2838)
* CAN HW: use designated initizalization

* board subaru eg33: set CAN transceiver EN to active state constantly

While FW does not handle CAN transceiver's EN signal
2021-06-20 08:18:16 -04:00
Andrey G a1387d3bd2
Fixes (#2807)
* tle6240: fix Matt's trap

* map: report some default value if no map sensor configured

Othervise user will get "unexpected MAP value" warning

Thread 2 hit Breakpoint 1, validateMap (mapKPa=3121.66162) at ./controllers/sensors/map.cpp:126
126		if (cisnan(mapKPa) || mapKPa < CONFIG(mapErrorDetectionTooLow) || mapKPa > CONFIG(mapErrorDetectionTooHigh)) {
(gdb) bt
 0  validateMap (mapKPa=3121.66162) at ./controllers/sensors/map.cpp:126
 1  0x002717dc in getMap () at ./controllers/engine_cycle/map_averaging.cpp:334
 2  0x0028175a in GetMapWrapper::getMap (this=0x2004214c <mapWrapper>) at ./init/sensor/init_map.cpp:12
 3  0x0028177c in operator() (__closure=0x0) at ./init/sensor/init_map.cpp:20
 4  0x002817a8 in _FUN () at ./init/sensor/init_map.cpp:21
 5  0x002811de in FunctionPointerSensor::get (this=0x20042150 <mapSensor>) at ./controllers/sensors/function_pointer_sensor.h:24
 6  0x002651c0 in SensorRegistryEntry::get (this=0x2003ddf0 <s_sensorRegistry+48>) at ./controllers/sensors/sensor.cpp:111
 7  0x002653e2 in Sensor::get (type=SensorType::Map) at ./controllers/sensors/sensor.cpp:208
 8  0x00261f38 in updateTunerStudioState (tsOutputChannels=0x2003d2e8 <tsOutputChannels>) at ./console/status_loop.cpp:637
 9  0x00262e48 in prepareTunerStudioOutputs () at ./console/status_loop.cpp:900
 10 0x00260914 in TunerStudio::cmdOutputChannels (this=0x20021a64 <tsInstance>, tsChannel=0x2003d4dc <usbChannel>, offset=0, count=340) at ./console/binary/tunerstudio_commands.cpp:24
 11 0x00260584 in TunerStudioBase::handleCrcCommand (this=0x20021a64 <tsInstance>, tsChannel=0x2003d4dc <usbChannel>, data=0x2003d4e1 <usbChannel+5> "", incomingPacketSize=5)
    at ./console/binary/tunerstudio.cpp:701
 12 0x0025fb3c in tsProcessOne (tsChannel=0x2003d4dc <usbChannel>) at ./console/binary/tunerstudio.cpp:537
 13 0x0025fbe2 in TunerstudioThread::ThreadTask (this=0x2003d608 <usbConsole>) at ./console/binary/tunerstudio.cpp:554
 14 0x0025f094 in ThreadController<1200>::StaticThreadTaskAdapter (thread=0x2003d608 <usbConsole>) at ./controllers/system/thread_controller.h:37
 15 0x0020035e in _port_thread_start () at ChibiOS/os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.S:201
2021-06-10 19:39:48 -04:00
Matthew Kennedy a54a5e7f90
convert gpiochips to c++ (#2761)
* core

* basic header

* tests are happy

* tle6240

* tle8888

* 33972

* 33810

* tle8888_req_init

* unused warning

* warning

* unsigned

* 8888 debug

* fix

* don't qualify

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-06-10 04:11:01 -04:00
Matthew Kennedy 526f1f97a0
Assorted todos (#2762)
* gpiochip todos

* fuel computer

* this was already done
2021-05-30 19:23:29 -04:00
Matthew Kennedy 6d19adb24f
remove old config override (#2763) 2021-05-30 13:31:36 +03:00
Andrey G c81b01b47a
mc33810: set ignition outputs to GP mode (#2756)
IGN mode does not want to fire Subaru ignitor
2021-05-29 05:07:04 -04:00