Commit Graph

164 Commits

Author SHA1 Message Date
rusefillc 8b603aae6d ingles lo hablas 2022-10-01 06:15:00 -04:00
rusefillc cab0177df0
insist on setBoardConfigOverrides fix #4614 (#4615)
* insist on setBoardConfigOverrides fix #4614

* insist on setBoardConfigOverrides fix #4614

* insist on setBoardConfigOverrides fix #4614

* insist on setBoardConfigOverrides fix #4614

* insist on setBoardConfigOverrides fix #4614
2022-09-24 07:35:19 -04:00
Matthew Kennedy b76a7cbcd8
simulator reads/writes configuration (#4605)
* simulator reads/writes configuration

* c_str

* include order
2022-09-23 08:47:50 -04:00
Andrey 7eb453bc54 os_access.h dead? 2022-09-07 16:00:13 -04:00
rusefi f399e275b2 servo is truly not alive 2022-09-06 16:29:12 -04:00
rusefillc fd2efcdb78
Issue 4115 (#4518)
* efiPrint NaN handling #4115

* fresh chibi

* efiPrint NaN handling #4115
2022-09-01 23:13:23 -04:00
Andrey 9d8afea152 a bit of dead code 2022-09-01 11:47:56 -04:00
rusefi 097bfb6e9c efiPrint NaN handling #4115 2022-08-31 20:00:58 -04:00
rusefillc 7cbe3692e8 Detail on how to set up iDrive or equivalent CAN button control #226
boost lua progress
2022-07-14 12:59:09 -04:00
Matthew Kennedy 3c062e02bc
Lua hooks for gear detection (#4328)
* implement

* sim has vss

* write a test

* guard
2022-07-07 23:16:56 -04:00
Matthew Kennedy e9d092f975
big delete ICU (#4270)
* big delete

* icu vestiges

* changelog
2022-07-07 15:27:59 -04:00
Matthew Kennedy a95bc3ad03
implement CAN driver for simulator (#4312)
* stub simulator CAN driver

* comments

* CAN sensor

* maybe implement?

* s

* fix

* tx and rx actually work!?!?!

* check_can_isr

* modify chibios

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

* safer init/deinit, enable assertions

* smarter handling of missing CAN device

* better guards

* guards for windows
2022-07-03 08:25:24 -04:00
rusefillc 88b061dd2c stealing from David 2022-06-26 19:42:08 -04:00
rusefillc 2202c223fe helping simulator a bit 2022-04-30 13:08:53 -04:00
Matthew Kennedy d8073e8b27
remove mock adc (#3888)
* remove mock adc

* do these do /anything/?
2022-02-03 20:43:34 -05:00
Matthew Kennedy 10be2d5f40
Remove FSIO, byeeeeeeeee (#3865)
* vestigial config

* replace last functionality

* engine/board configs include

* files that didn't need to include this

* remove FSIO implementation

* stragglers

* random little bits

* s

* s

* ConfigDefinition

* jar

* s
2022-02-02 02:03:31 -05:00
Scott Smith a87be43c53
Update the simulator TS port macros to match the rest of the product. (#3600) 2021-11-23 19:15:09 -05:00
Matthew Kennedy 178ccdeb4d
simulator writes binary log (#3598)
* simulator writes log

* replace the file

* check that the sim actually fails

* put it back

* did the sim really not fail?

* good, asan does catch it
2021-11-23 11:42:45 -05:00
Matthew Kennedy 3334a6963c
oh my god we've had no asserts (#3595) 2021-11-22 17:52:03 -05:00
Scott Smith 5bc1949aef
Basic framework for high pressure fuel pump control (#3476)
* Basic framework for high pressure fuel pump control

* Many changes

Move calculations to fast callback
Move main object into Engine
Respond to pin changes without requiring a reboot

* Use EngineModule for HpfpController
Schedule pin off after executing pin on so we are sure it ends, even if the motor stops.
Test scheduling.
Less RAM use by only having one event and reordering fields.

* Make scheduling test actually useful - need non-0 activation angle.

Co-authored-by: rusefillc <48498823+rusefillc@users.noreply.github.com>
2021-11-19 23:06:51 -05:00
Matthew Kennedy d40ca0f581
fuel pump doesn't use fsio (#3576)
* fuel pump

* s

* call correct callback

* more dead

* test adjustment

* don't overflow

* don't need separate function

* java

* give it a name

* generated

* generated

* add to generate script

* import *

* this is so cheap we don't need a flag
2021-11-19 22:23:12 -05:00
Matthew Kennedy a29933d7f8
simulator gets a heap (#3563) 2021-11-17 10:00:12 +03:00
rusefillc 6e9db86b38 helping launch enter simulator 2021-11-16 16:34:23 -05:00
Matthew Kennedy 8cdac4cac0
remove engine pointer passing (#3556)
* some

* more

* more

* the last?!
2021-11-16 04:15:29 -05:00
Scott Smith d4132fdf01
Change getTimeNowNt to be lock free. (#3502)
Track the top two bits of the 32-bit time field, along with the bits that comprise the top half of
the 64-bit time field.  We can detect when the 32-bit field is advancing or falling back from the
global time counter as long as the change is less than about 1 billion ticks.  This shows up as
either 01 or 11 in the top 2 bits of the 32-bit time field relative to the 64-bit field.  Or is
there is no change it shows up as 00.  Changes of 2 billion or more cannot be discerned as +2
billion and -2 billion both show up as 10.

Change the simulator to use this logic to make sure it gets some exercise.
2021-11-08 08:24:20 -05:00
Matthew Kennedy 95b5c6fcf9
dead vss flag (#3499) 2021-11-07 14:36:46 -05:00
Matthew Kennedy 9806373dac
dead map (#3316) 2021-10-04 18:33:10 -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
Andrey a926357a01 making code more testable 2021-07-14 22:37:05 -04:00
Matthew Kennedy 5bd3ae3aaa
Disable closed loop idle during cranking->running taper (#2900)
* implement

* dead file?

* implement tests

* new phase
2021-07-06 08:47:06 -04:00
Matthew Kennedy 5a5f25244a
make the simulator usable (#2717)
* these start themselves now

* dead

* configure ports

* start serial

* dead

* minimal pins

* simulator logging works

* why not enable lua

* speeeeeed

* start lua

* spammy print
2021-05-17 12:44:02 +03:00
Andrey G 54eeac2c10
Hw layer rearrangement (#2707)
* Fix unit_tests

* simulator: fix redifinition of TS_PRIMARY_SERIAL warning
2021-05-16 15:19:34 +03:00
Matthew Kennedy 6a060e5cae
remove intermediate buffer (#2668)
* remove define

* goodbye intermediate logging buffer

* free ram! woo!
2021-05-10 08:01:24 -04:00
Matthew Kennedy c26987b96b
Destroy all shared logger (#2574)
* most of shared logger

* a few more

* one more

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-21 14:28:48 -04:00
Matthew Kennedy ad71016862
rip the bandaid: find-replace most of scheduleMsg (#2572)
* biiiig find replace

* more trivial find replace

* pwm

* almost all of them

* few more

* gpio

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-21 12:53:13 -04:00
Matthew Kennedy bd1c84fa62
Logging remove 3 (#2568)
* ts logger

* sensors

* wideband too

* missed one

* init

* motors, pid, etc

* vvt

* more

* idle

* missed one

* dynoview

* launch

* can

* console IO

* s

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-04-20 14:09:41 -04:00
Andrey G 3d138958ce
Hip9011 (#2512)
* hip9011: coexistance with other spi devices

* hip9011: rework so SPI transfer is invoked from thread

also use polling spi exchange to avoid cache problems

* hip9011: move calculations from ADC callback to thread

* hip9011: big cleanup

* hip9011: simplify spi communication

* No need to set knockBandCustom if it is not custom

HIP9011 calculates knockBand from cylinderBore same way

* hip9011: make unit test happy

* hip9011: fix unit test

* hip9011: remove duplicated initialization, reorder

* hip9011: just renames and data type adjustments

* hip9011: rename BAND() to HIP9011_BAND()

* hip9011: move some code from lookup.cpp to logic.cpp

* hip9011: move initEngineNoiseTable to engine_configuration.cpp

* hip9011: move lookup tables to hip9011_logic.c

* hip9011: remove empty files

* hip9011: additional checks
2021-03-30 10:56:25 -04:00
Matthew Kennedy f0cf4f38ff
fix multi-serial-port insanity (#2476)
* carve out UART specific

* implement channel

* config cleanup

* use new config

* bootloader

* dead code

* s

* h7 inherits f7

* oops

* ok now it's right

* tests

* cleanup

* call setup

* put that in its own file

* cleanup

* format

* guard

* not needed

* improve guarding

* portable

* allow override of uart mode

* fixes for bootloader

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-28 09:06:36 -04:00
Matthew Kennedy cd4f367edd dead 2021-03-15 17:12:01 -04:00
Matthew Kennedy e0763c6994
stop trigger emulator PWM when disabled (#2443)
* simplify trig emulator

* spelling is hard

* fix various builds

* spelling again

* add command/button for external stimulation

* enable hw stim for HW-in-loop test

* s

* I does spelling good

* clear flag when disabled

* generate enough for console build

* don't disable that

* this test needs external stimulation enabled

* import

* ui improvements

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-11 08:38:52 -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
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 55ebe223a7
Partition configs by board type (#2106)
* remove old flag

* flags

* reorder switch

* oops
2020-12-22 21:54:40 -05:00
rusefillc 26fbf0527a trigger and start button pins not displayed by "pins" command fix #2084 2020-12-16 22:53:26 -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
rusefillc 90e5630e60 avoid float -> int64 conversion #1977
cherry picking...
2020-11-23 23:33:46 -05:00
Matthew Kennedy 55379463c0
remove (#1985) 2020-11-23 20:10:17 -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