Commit Graph

1868 Commits

Author SHA1 Message Date
rusefillc 807357505e Hellen Nissan defaults are no longer valid #3143 2021-09-05 19:29:40 -04:00
Andrey be221bb913 Hellen Nissan defaults are no longer valid #3143 2021-09-05 15:15:25 -04:00
rusefillc d005cd6891 my first Lua 2021-09-01 02:37:36 -04:00
rusefillc cbdd36df92 my first Lua 2021-08-31 12:32:05 -04:00
Matthew Kennedy f6e269a3ab remove old vss implementation (#3208)
* dead vss

* remove
2021-08-28 01:39:55 -04:00
rusefillc 6247a50662 Revert "Revert "memory savings (#3195)""
This reverts commit 86cf9cf7
2021-08-27 06:18:05 -04:00
rusefillc 86cf9cf7c9 Revert "memory savings (#3195)"
This reverts commit 1b485ca2
2021-08-27 02:32:31 -04:00
Matthew Kennedy 1b485ca2d8 memory savings (#3195)
* d

* dead code

* all your ram are belong to me

* turn off gpiochips we don't need

* save

* save by using the same file handle

* smaller stack ok

* these can be on the stack

* this is closer

* what about ccm?

* probing available

* now probe ccm

* ccm

* put stuff in ccm

* fsio

* memory usage

* memory
2021-08-26 23:05:31 +03:00
Matthew Kennedy fe74ace049 missed a little bit (#3192) 2021-08-24 17:00:14 -04:00
Matthew Kennedy df48806ec0 start allowing ADC change while running (#3100)
* allow re-register of the same sensor

* add api to unsubscribe

* do it for tps

* clear the pin

* happy test

* maybe make afr happy for now

* tests build

* happy simulator

* active configuration

* check valid

* we need vbatt now

* manage all pin init in init_sensors.cpp

* don't need that

* cleanup

* thermistors

* do two phase reinit in the right place

* config vs engine

* finally the tests are happy
2021-08-24 16:41:16 -04:00
alxrMironov dd1b7ffa24 Vehicle speed switching to frequency sensor #3106 (#3148)
* Add vehicle_speed_converter.h with realization.

* Add test_vehicle_speed_converter.cpp with realization.

* Add test_vehicle_speed_converter.cpp to Makefile

* Edit "VehicleSpeedSensor" from function pointer sensor to frequency sensor

* Fix "VehicleSpeedSensor" init function args

* Remove "VehicleSpeedConverter" empty constructor

* Edit vehicle_speed_converter.h code style

* Fix args and engine injection in "VehicleSpeedSensor" initialization procedure

* Remove old "Vehicle Speed" module initialization

* Revert "Remove old "Vehicle Speed" module initialization"

This reverts commit 100b7caa8c615c20eed3d0c23a49824b4e556148.

* Remove old "Vehicle Speed" module initialization pieces

* Revert "Revert "Remove old "Vehicle Speed" module initialization""

This reverts commit f559a726f1f7f5a7acacd1b6517e571743e84327.

* Debug changes

* Revert "Debug changes"

This reverts commit f7e2be1a8a46c6f3f93f14f002b2f2db539da8e2.

* Another debug changes

* More debug changes

* And more debug changes.

* Revert "Another debug changes"

This reverts commit 914fbb1df42c37e4b5ecbb119bb45e7cffdf4064.

* Revert "More debug changes"

This reverts commit 0b2d96d461c3cd9b0f1ae97ed110b8effe6b0cc6.

* Revert "And more debug changes."

This reverts commit 06ae8daded0e6e1c025e4e5058b47283f4adfe92.

* Add "Vehicle Speed" sensor reconfiguration

* Revert "Add "Vehicle Speed" sensor reconfiguration"

This reverts commit a089a6d563dd710004ce1a7da1744b0b4b90c3b1.

* Revert "Revert "Add "Vehicle Speed" sensor reconfiguration""

This reverts commit 7b2bb8af4b3caa547236ca59e4c4bdb3ac1200cc.

* Debug changes

* Another debug changes

* Fix another debug changes

* Another debug changes 2

* Revert "Another debug changes 2"

This reverts commit cfad55141eec125b2f1d35fb95d9f46b54f666b6.

* Revert "Fix another debug changes"

This reverts commit 9bc2c74a3be6fd896827ff48cf4580e7657529c0.

* Revert "Another debug changes"

This reverts commit 4337ed8cad8dff508d093944eb3f75e9a69e4a77.

* Edit class  FrequencySensor, make it more RAII

* Debug changes

* Debug changes 2

* Debug changes 3

* Revert "Debug changes 3"

This reverts commit 52a7054c122b5157540fe45a055a84b57478d722.

* Revert "Debug changes 2"

This reverts commit dec79fb913344ccb4b8614910ad62e6c129a243e.

* Revert "Debug changes"

This reverts commit eb08d7a529b55ba397a7dd2c154b76eab42f212b.

* Revert "Edit class  FrequencySensor, make it more RAII"

This reverts commit 3a0bb1d3f1dd23c1b04e4cc1c526cfdc67ae86a3.

* Remove VSS pin definition in "Citroen Berlingo" engine config.

This reverts commit 3a0bb1d3f1dd23c1b04e4cc1c526cfdc67ae86a3.

* Remove VSS pin definition in "Dodge Neon" engine config

Co-authored-by: alxrMironov <330OMcorporative>
2021-08-24 00:55:41 -04:00
Andrey G fc17c63d51 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 bd7c73c109 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 859c4f3902 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
Matthew Kennedy 29407db1a3 everybody is pulldown (#3131) 2021-08-14 09:34:13 -04:00
Matthew Kennedy e6a6548b2a implement adc unsubscription (#3149)
* allow re-register of the same sensor

* adc unsub
2021-08-14 15:41:27 +03:00
rusefillc 7afc52c620 No pins should be restarted for no reason during config change #3151 2021-08-14 06:15:29 -04:00
rusefillc 6dcf405850 No pins should be restarted for no reason during config change #3151 2021-08-14 05:20:12 -04:00
rusefillc 72d29f319d No pins should be restarted for no reason during config change #3151 2021-08-14 04:58:10 -04:00
rusefillc 22c0021751 No pins should be restarted for no reason during config change #3151 2021-08-14 04:35:43 -04:00
rusefillc bc991eb816 Hellen Nissan defaults are no longer valid #3143 2021-08-12 17:46:10 -04:00
rusefillc 2bf6ee768c Hellen Nissan defaults are no longer valid #3143 2021-08-12 13:44:54 -04:00
rusefillc 98ce0f1f88 Nissan progress 2021-08-11 18:04:57 -04:00
Matthew Kennedy 90c9c7d00c fix vss crash (#3130)
* don't deref null pointer

* error on invalid

* no logic analyzer

* print out function in case of error
2021-08-10 14:20:57 -04:00
rusefillc 49497dec6d Hellen72: Set the default pin states to input-pulldown instead of input-pullup #2525 2021-08-05 04:53:37 -04:00
Matthew Kennedy 39388c75d8 even more pch (#3112)
* s

* more

* s

* f7
2021-08-04 19:30:52 -04:00
rusefillc 46e6e621da reduce chance of invalid CAM setting fix #3105 2021-08-03 22:15:40 -04:00
Matthew Kennedy 4e6b61234f 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
Andrey 5ec7af456b unit test for vehicle_speed.cpp fix #3081 2021-08-03 20:22:48 -04:00
Andrey e62244a623 unit test for vehicle_speed.cpp #3081 2021-08-03 19:48:24 -04:00
Andrey 73cbb388b7 boards file clean-up 2021-08-03 04:06:06 -04:00
Matthew Kennedy 0158327469 s (#3101) 2021-08-02 19:17:17 -04:00
Matthew Kennedy 0ebc59b80f perform extra-step-prevention in the stepper driver itself (#3038)
* perform extra-step-prevention in the stepper driver itself

* isBusy flag

* I am unable to type

* the court of public opinion has decided that greater-equal is correct

* that sets target in steps, not percent

* correct var name

* mock stepper motor

* testable stepper

* build is happy

* helping build
2021-08-02 07:03:57 -04:00
Andrey G 54f0aeb06f Int flash fixes (#3089)
* STM32F7xx: flash write parallelism settings

Datasheed allows 32bit program operation only for 2.7..3.0
While RM defines wider range...

* Add parentheses to defines

* intFlash: show all errors to user

Currently only erase error was exported to user. Flash write error
was silent. Also define few additional error codes and show it to
user.
2021-08-01 18:26:42 -04:00
rusefillc 1825457e9f unit test for vehicle_speed.cpp #3081 2021-08-01 12:19:59 -04:00
Andrey 84e1f216d6 unit test for vehicle_speed.cpp #3081 2021-08-01 12:09:53 -04:00
Andrey G adede96583 Remove outdated option CH_DBG_ENABLE_TRACE (#3087)
Not used since RT5
2021-07-31 07:51:13 -04:00
Andrey 156717f48d another dead line 2021-07-31 01:37:51 -04:00
Andrey 09804f2846 dead var 2021-07-31 01:36:50 -04:00
Andrey d92110c3ce RUSEFI MSD to contain bundle-specific URL #2848 2021-07-30 22:47:35 -04:00
Andrey 5d4e39b061 RUSEFI MSD to contain bundle-specific URL #2848 2021-07-30 22:26:30 -04:00
Andrey 1bef7e5731 RUSEFI MSD to contain bundle-specific URL #2848 2021-07-30 22:23:52 -04:00
Andrey ecd77cc5b5 RUSEFI MSD to contain bundle-specific URL #2848 2021-07-30 21:45:55 -04:00
Andrey f309ddf2cd RUSEFI MSD to contain bundle-specific URL #2848 2021-07-30 21:18:51 -04:00
Andrey a8355dd28f Wrap PAL driver into universal 'startDigitalCapture' #2123 2021-07-30 20:57:01 -04:00
Andrey 6da3696c4c Wrap PAL driver into universal 'startDigitalCapture' #2123 2021-07-30 20:48:26 -04:00
Andrey 9629db799b Wrap PAL driver into universal 'startDigitalCapture' #2123 2021-07-30 20:30:52 -04:00
Andrey c5044f16c9 Wrap PAL driver into universal 'startDigitalCapture' #2123 2021-07-30 20:15:53 -04:00
Andrey a2aaaa7b55 Wrap PAL driver into universal 'startDigitalCapture' #2123 2021-07-30 20:10:34 -04:00
rusefillc af2e54f02d more details into output 2021-07-30 19:33:31 -04:00
rusefillc 08cc30d7c1 RUSEFI MSD to contain bundle-specific URL #2848 2021-07-30 19:13:43 -04:00
Matthew Kennedy 58202a97f3 flash erase cache invalidate (#3073)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-07-30 16:52:55 -04:00
Andrey 77659443a1 RUSEFI MSD to contain bundle-specific URL #2848
refactoring and progress
2021-07-30 16:23:01 -04:00
Andrey cda52ee946 RUSEFI MSD to contain bundle-specific URL #2848
refactoring and progress
2021-07-30 16:07:37 -04:00
Matthew Kennedy d3ec2b21d1 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
Andrey 379996bf81 todo 2021-07-25 12:45:28 -04:00
Andrey 230a5d46e7 Clutch switch inverted options do not invert detected pedal position
#3044
2021-07-24 18:44:13 -04:00
rusefillc 809ece6c91 Clutch switch inverted options do not invert detected pedal position #3044 2021-07-24 15:54:51 -04:00
Matthew Kennedy 098469b88c H7 ADC triggered by hardware timer (#3028)
* config

* allow changing adc speed

* timer triggered ADC

* ICU on nucleo

* turn that off too

* 10khz

* make those default for all h7

* I can't type
2021-07-23 14:50:35 -04:00
Matthew Kennedy 1a73dcc46e fast adc callback (#3031)
* fast adc callback

* guard

* missed one

* now cypress will be happy
2021-07-23 14:19:59 -04:00
Matthew Kennedy 0fde085a44 remove TS file read (#3004)
* remove

* more defines

* test

* lots of java

* s
2021-07-21 14:24:53 -04:00
Matthew Kennedy dfaac25df1 sd card indicators (#3001)
* sd bits

* rusefi.input
2021-07-20 21:29:24 -04:00
Matthew Kennedy 2255ce37b4 H7 turn off USB before reset (#2999)
* turn off USB before reset

* comment

* add link
2021-07-20 19:39:26 -04:00
Andrey fb30117acc Button to apply nDBANK #2996
still does not work
2021-07-20 15:42:57 -04:00
Andrey 8eb407627e Button to apply nDBANK #2996
it does not work, i give up for now time to install STM Cube :(
2021-07-20 14:15:58 -04:00
Andrey 668c342b34 Button to apply nDBANK #2996 2021-07-20 13:20:34 -04:00
Matthew Kennedy 7c2f20af49 osc detector on H7 (#2992)
* detect clock with TIM11 instead of TIM5

* s

* h7 has a different register name

* detect on H7

* cleanup

* comment

* use define

* f4 typo
2021-07-19 21:58:23 -04:00
Matthew Kennedy dec215f199 detect clock with TIM11 instead of TIM5 (#2989)
* detect clock with TIM11 instead of TIM5

* s

* h7 has a different register name

* s

* rename
2021-07-19 18:04:59 -04:00
rusefillc 79f04983eb New hardware testing commands #2978 2021-07-17 13:42:10 -04:00
Matthew Kennedy e3849b95d5 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 45d185b09d 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 85d6d6c70d trigger signal debug pins - logic level output #2959
test driven development is still amazing
2021-07-15 09:29:14 -04:00
Andrey 8a49009f44 trigger signal debug pins - logic level output #2959 2021-07-15 02:12:57 -04:00
Andrey 0f7def86dc all aboard the God object! 2021-07-15 02:00:48 -04:00
Andrey aed7afa1d4 trigger signal debug pins - logic level output #2959 2021-07-15 01:56:04 -04:00
Andrey 8dff4c3c31 trigger signal debug pins - logic level output #2959 2021-07-15 01:49:07 -04:00
Andrey 050a009b3d trigger signal debug pins - logic level output #2959 2021-07-15 01:46:30 -04:00
Andrey 0f30fec7c2 trigger signal debug pins - logic level output #2959 2021-07-15 01:28:44 -04:00
Andrey 3327dc0199 progress 2021-07-15 01:18:38 -04:00
Andrey 1d2fdb0f04 progress 2021-07-15 01:17:42 -04:00
Andrey e4c498e042 trigger signal debug pins - logic level output #2959 2021-07-15 00:50:29 -04:00
rusefillc 8e8737d6ce trigger signal debug pins - logic level output #2959 2021-07-15 00:03:31 -04:00
Andrey d1b3eb065d trigger signal debug pins - logic level output #2959 2021-07-14 23:20:18 -04:00
Andrey bb38cc60eb trigger signal debug pins - logic level output #2959 2021-07-14 23:05:51 -04:00
Andrey b53b23b140 trigger signal debug pins - logic level output #2959 2021-07-14 22:51:08 -04:00
Andrey 122ef9f637 making code more testable 2021-07-14 22:37:05 -04:00
Andrey 072243370f making code more testable 2021-07-14 22:02:28 -04:00
Matthew Kennedy c08eb18ca7 Start on HSI clock (#2957)
* chibios uses HSI

* set pll to use HSE

* simplify capture

* even better logging

* string

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-07-14 15:20:38 -04:00
rusefi ad37021a0b printing autoDetectedPllMValue in console 2021-07-14 12:42:35 -04:00
Andrey 564c380851 trigger signal debug pins - logic level output #2959 2021-07-13 20:15:55 -04:00
Andrey 903c6e7305 refactoring - making method available 2021-07-13 19:28:03 -04:00
Andrey b3f33a1249 trigger signal debug pins - logic level output #2959 2021-07-13 18:16:32 -04:00
Matthew Kennedy 15931dd56c auto detect HSE clock speed (#2952)
* detect hse

* implementation

* these boards don't need to set their own HSECLK

* assertions

* name

* tweaks

* how did this compile?

* s

* biiiig comment

* this script doesn't need to set 25mhz any more

* ....or PLLM

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-07-12 20:51:35 -04:00
rusefillc b0bfff2c4d typo 2021-07-11 10:16:35 -04:00
Matthew Kennedy 1bba234920 inject (#2938) 2021-07-09 17:02:25 -04:00
Matthew Kennedy a3d3638232 more graceful chibios assertion failure (#2859)
* no custom assert hook

* dead

* setjmp/longjmp

* always call tid hook

* tests get threadid

* simulator threadid

* kick

* stubs for kinetis

* make it happier

* noreturn

* oops

* comments

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-07-05 18:18:58 -04:00
Andrey G d508537374 Chibios-Contrib for stm32 (#2903)
* Add Chibios-Contrib for STM32F/H too

* ports: stm32: add community hal and cmu configs for STM32

* ports: stm32: community: disable CRC driver
2021-07-05 09:53:45 -04:00
Matthew Kennedy ee6f49e65f Consolidate hwHandleShaftSignal (#2875)
* consolidate trigger input

* merge functions

* comment

* dead

* hw vs. not hw

* stray comma

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-06-28 10:06:22 -04:00
Matthew Kennedy b0ef8313cd warnings (#2862)
Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-06-25 20:58:38 -04:00
Andrey G 77b9a9a99d 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