speeduino/speeduino
mike501 ef39476f8f
Adds support for toyota 3 tooth secondary and 2 tooth tertiary input (#1040)
* Disable SD on T4.1 temporarily to prevent lockups. See #847

* Fix unit test value

* Improve closedloop boost control (#736)

* First try on updating closedloop boost control

* added eeprom updates for backward comp[atibility

* fix merge conflict

* Change updates to next release EEPROM version.

* Fix some issues after merging master

* some cleanup to minimize changes and speedup review

* cleanup updates

* chances on updates to alaign with new table format

* move LUT to new config page in eeprom

* little cleanup

* Update storage.h comments

* fix some ini warnings

Co-authored-by: Tjeerd <tjeerdie@users.noreply.github.com>

* Minor cleanup of boost dialog from previous PR

* Add dynamic EEPROM block write limit based on RPM. Should fix #859

* Only set the idle up pin state on init if it's enabled

* AFR protection function (#861)

* Implementing AFR protection

* Update globals.h

* Bug fixes and code refactoring

* Moved variables to prevent ODR

* Dialog for AFR protection

* Data size and math corrections

* Possibility to use either AFR or lambda

* Updated default AFR protection values

* No need to do multiplications due to existing RPMdiv100 variable

* The X100 multiplier was wrongfully removed

* Add defaults in updates.ino, minor formatting cleanups

Co-authored-by: Josh Stewart <josh@noisymime.org>

* Prevent cranking and ASE corrections running at once. Alternative fix to #868

* Corrected RPM to TPS (#878). Fixes #874

* Fixed value mode for AFR protection (#877)

* bug fix. A workaround for failing emulated on internal flash writes + a root cause fix (#876)

* workaround for failing flash writes

* Root cause fix for EEPROM emulation on STM32

* Oops, remove some debugging functions.

Co-authored-by: Tjeerd <tjeerdie@users.noreply.github.com>

* Correct typos found by codespell (#880)

* Fix broken build on Teensy from #880

* Narrow scope of EEPROM_MAX_WRITE_BLOCK to writeConfig (#881)

* EEPROM_MAX_WRITE_BLOCK can be local to writeConfig()
This saves a byte of memory ;-)

* Fix MISRA/lint warnings
Correctly cast address parameter of eeprom_read_block
Statically access table 3d type_key member

* Remove force burn code - unused

* Replace eepromWritesPending with bit set/check

* Refactor: chain write_location instances.
Clearer code.

* Fix hanging on boot (#858)

* Further fixes to the ASE correction

* Enable use of disabled functions pins (#549)

* Enable use pins of disabled functions or unused ign channels

* Added new pins and functions to check

* Fix for semi-seq inj after #478 (#883)

* Don't try to run inappropriate CI on forked repositories (#871)

* Remove old unused corrections code

* Remove controller priority on trigger edge. Fixes #860

This was added for a specific FW update in 2018 and no longer needed.

* Add engine protection flags to datalog

* Add option for SD logging with external switch

* TS option to display pressure in bar #842 (#864)

Adds options in TunerStudio project settings to have default units
for fuel and oil pressure in bar. Adds gauge in kPa. This only
adds convertion from psi to bar, not affecting firmware.

Co-authored-by: Min <min@infcof.com>

* Fix typo from last commit

* Missing commas in ini

* bug fix EGO PID controller + some improvements.  (#879)

* Fix for EGO pid

* Further improvements on ego PID

* Stop EGO controllers from calculating while DFCO is active. To prevent integrator windup.

* Fix bug in DFCO enable/disable of the controller

Co-authored-by: Tjeerd <tjeerdie@users.noreply.github.com>

* Add necessary pin translations (#887). Fixes #867

* Signatures for 202207

* Update README.md

* Update signatures for 202207 in legacy comms

* Dev signatures for 202210-dev

* Volatile decoder variables (#902)

* triggerToothAngle is modified by interrupts

* triggerActualTeeth is never modified in interrupts

* fix check for DFCO off in correctionAFRclosedLoop() (#899)

line 608 has bit-and of configpage6.egotype > 0  & DFCO off.
it should be logical and &&

* cl boost control above baro should use logical and/or (#901)

* libdivide structs can be const - saves a few bytes (#886)

* Add OLCL mode to initBoard() for teensy (#903)

Co-authored-by: csmergs <christopher@smeraglinolo.com>

* Fix for idle PWM on STM32. Enable idle timer when idle pwm is enabled. Fixes #907 

Co-authored-by: Tjeerd <tjeerdie@users.noreply.github.com>

* Disable automatic retransmission (#910)

* Allow for float values in SD log where supported with FPU

* Increase most F temp field max values to 419F

* Revert "Merge branch 'master' into DoubleMissing"

This reverts commit bda3d89bf553df40951167870c826792ba92a715.

* recover missing files

* add vvt

* missing files

* fix stall time from debug version

* Add 3 tooth cam support

* added vvt2 and potential I4 cam

* fix

* fixes to VVT1 to always trigger on rotation 1

* fix attempt to vtt1 trigger

* fixed VVT trigger

* updated how vvt2 is calculated

* made code more readable and portable

instead of trying to set an unsigned int to its max value and handling different sized unsigned ints across different processes, using -1 and adding a comment to explain why. This will then work across all processors

* Allow updating of trigger edge for third cam

* Add logging to second cam & filtering

* include high speed logger in legacy comms

* adding VVT logging and trigger edge editing


fix missing define (temp fix?)


Revert "fix missing define (temp fix?)"

This reverts commit c6280f38ff69cc41278148a79c888736a71754b1.

fixes

* Create an additional logger screen in tunerstudio

Changes to create a third high speed logger window in tuner studio.

* missed save

* Change variable name 

Discord discussion requested compositeLogEnabled didn't do a test for false as the type is now a byte. Variable renamed to be compositeTriggerUsed and false replaced with 0. Variable name and values used should now make more logical sense.

* fix tertiary cam trigger

tertiary cam trigger is supposed to trigger on 2nd tooth, code had bug meaning it would never trigger.

* change how tertiary cam reset

(needs testing)

* added 4th composite logger for both cams

allows you to log both cams together and see the relationship between them.

* added more logging

Log the primary, secondary and third inputs as well as engine cycle on all composite logs. Still have 3 different logs to allow you to visualise which is the best way to present the information.

* Improve VVT1 detection

* fixes to merge

* update VVT2 trigger detection and reduce filtering

* Revert "Merge remote-tracking branch 'noisymime/master'"

This reverts commit 58e6e283e6.

* Correct merge error with master

missed decoders.h merge missing a reference to recordVVT1Angle which has been renamed to fit better into the naming convention within this file to triggerRecordVVT1Angle

* Removed tertiary decoder

Tertiary decoder hasn't completed testing & is specifically for certain v8 engines, removing so this can be submitted and built into the next release covering other Toyota engines (eg those used in Lexius inline 6)

* Make triggerRecordVVT1Angle static

---------

Co-authored-by: Josh Stewart <josh@noisymime.org>
Co-authored-by: Tjeerd <33102280+Tjeerdie@users.noreply.github.com>
Co-authored-by: Tjeerd <tjeerdie@users.noreply.github.com>
Co-authored-by: larmicfre <49905831+larmicfre@users.noreply.github.com>
Co-authored-by: Daniel Tobias <dantob@users.noreply.github.com>
Co-authored-by: tx_haggis <13982343+adbancroft@users.noreply.github.com>
Co-authored-by: Pasi Kemppainen <48950874+pazi88@users.noreply.github.com>
Co-authored-by: Vitor Moreno B. Sales <vitor.m.benevides@outlook.com>
Co-authored-by: Min <72794870+zceemja@users.noreply.github.com>
Co-authored-by: Min <min@infcof.com>
Co-authored-by: Afroboltski <70011435+Afroboltski@users.noreply.github.com>
Co-authored-by: DeionSi <DeionSi@users.noreply.github.com>
Co-authored-by: Jon Billings <jon.billings@bbc.co.uk>
Co-authored-by: a32guy <turboe30@gmail.com>
Co-authored-by: csmergs <christopher@smeraglinolo.com>
2023-12-11 13:30:51 +11:00
..
src Performance: optimize division (#1082) 2023-11-06 09:10:08 +11:00
SD_logger.cpp Remove warning about sprintf potential overflow 2023-11-15 08:24:58 +11:00
SD_logger.h Remove warning about sprintf potential overflow 2023-11-15 08:24:58 +11:00
TS_CommandButtonHandler.cpp Performance: optimize division (#1082) 2023-11-06 09:10:08 +11:00
TS_CommandButtonHandler.h Initial work on pulsed HW test outputs (#1120) 2023-10-27 10:07:05 +11:00
acc_mc33810.cpp Rename all ino files to cpp (Excluding speeduino.ino). 2023-10-06 18:10:20 +11:00
acc_mc33810.h Rename all ino files to cpp (Excluding speeduino.ino). 2023-10-06 18:10:20 +11:00
auxiliaries.cpp Moved WMI to VVT2 (#845) 2023-12-11 11:53:34 +11:00
auxiliaries.h No need for bit masks on bit fields. (#1139) 2023-11-24 08:07:47 +11:00
board_avr2560.cpp Fix build on mega2560 2023-11-21 17:05:47 +11:00
board_avr2560.h Fix build on mega2560 2023-11-21 17:05:47 +11:00
board_same51.cpp Rename all ino files to cpp (Excluding speeduino.ino). 2023-10-06 18:10:20 +11:00
board_same51.h Save 600+ bytes RAM (step 4 of 9) - deduplicate scheduler ISR functions (#1063) 2023-10-07 08:25:26 +11:00
board_stm32_official.cpp Allow secondary serial interface to be set on a per board basis rather than MCU only 2023-11-21 16:47:24 +11:00
board_stm32_official.h Allow secondary serial interface to be set on a per board basis rather than MCU only 2023-11-21 16:47:24 +11:00
board_teensy35.cpp Allow secondary serial interface to be set on a per board basis rather than MCU only 2023-11-21 16:47:24 +11:00
board_teensy35.h Allow secondary serial interface to be set on a per board basis rather than MCU only 2023-11-21 16:47:24 +11:00
board_teensy41.cpp Allow secondary serial interface to be set on a per board basis rather than MCU only 2023-11-21 16:47:24 +11:00
board_teensy41.h Allow secondary serial interface to be set on a per board basis rather than MCU only 2023-11-21 16:47:24 +11:00
board_template.cpp Rename all ino files to cpp (Excluding speeduino.ino). 2023-10-06 18:10:20 +11:00
board_template.h Save 600+ bytes RAM (step 4 of 9) - deduplicate scheduler ISR functions (#1063) 2023-10-07 08:25:26 +11:00
comms.cpp 202311-dev signatures and updates file 2023-10-06 15:01:23 +11:00
comms.h Remove legacy comms option from TunerStudio. Add legacy comms lock 2023-04-26 13:45:22 +10:00
comms_CAN.cpp Move CAN buffers into the relevant comms files rather than boards 2023-11-03 15:22:11 +11:00
comms_CAN.h Move CAN buffers into the relevant comms files rather than boards 2023-11-03 15:22:11 +11:00
comms_legacy.cpp Simplify 3D table I/O conversions - save 12 bytes RAM (#1107) 2023-11-02 09:08:31 +11:00
comms_legacy.h Add option on secondary serial to use previous generic data list 2023-10-10 15:49:36 +11:00
comms_sd.h Allow SD card formatting through TS Native interface 2023-09-18 10:12:02 +10:00
comms_secondary.cpp Allow secondary serial interface to be set on a per board basis rather than MCU only 2023-11-21 16:47:24 +11:00
comms_secondary.h Allow secondary serial interface to be set on a per board basis rather than MCU only 2023-11-21 16:47:24 +11:00
corrections.cpp Minor memory optimisation 2023-12-06 14:47:13 +11:00
corrections.h Added taper entering DFCO (#1118) 2023-10-25 10:09:57 +11:00
crankMaths.cpp Performance: optimize division (#1082) 2023-11-06 09:10:08 +11:00
crankMaths.h Performance: optimize division (#1082) 2023-11-06 09:10:08 +11:00
decoders.cpp Adds support for toyota 3 tooth secondary and 2 tooth tertiary input (#1040) 2023-12-11 13:30:51 +11:00
decoders.h Adds support for toyota 3 tooth secondary and 2 tooth tertiary input (#1040) 2023-12-11 13:30:51 +11:00
engineProtection.cpp Performance: optimize division (#1082) 2023-11-06 09:10:08 +11:00
engineProtection.h MISRA cleanup rule: misra-c2012-8.2 2022-11-06 09:43:29 +11:00
errors.cpp Rename all ino files to cpp (Excluding speeduino.ino). 2023-10-06 18:10:20 +11:00
errors.h MISRA cleanup rule: misra-c2012-8.2 2022-11-06 09:43:29 +11:00
globals.cpp Initial work on pulsed HW test outputs (#1120) 2023-10-27 10:07:05 +11:00
globals.h Adds support for toyota 3 tooth secondary and 2 tooth tertiary input (#1040) 2023-12-11 13:30:51 +11:00
idle.cpp Correct idle frequency check for Teensy41 2023-11-15 07:26:34 +11:00
idle.h Performance: optimize division (#1082) 2023-11-06 09:10:08 +11:00
init.cpp Minor memory optimisation 2023-12-06 14:47:13 +11:00
init.h MISRA: clean up logger header (#1108) 2023-10-06 15:07:12 +11:00
logger.cpp Add option on secondary serial to use previous generic data list 2023-10-10 15:49:36 +11:00
logger.h Add option on secondary serial to use previous generic data list 2023-10-10 15:49:36 +11:00
maths.cpp Performance: optimize division (#1082) 2023-11-06 09:10:08 +11:00
maths.h Performance: optimize division (#1082) 2023-11-06 09:10:08 +11:00
page_crc.cpp Simplify 3D table I/O conversions - save 12 bytes RAM (#1107) 2023-11-02 09:08:31 +11:00
page_crc.h Initial work on new serial comms (Disabled in ini) 2021-11-19 11:07:38 +11:00
pages.cpp Simplify 3D table I/O conversions - save 12 bytes RAM (#1107) 2023-11-02 09:08:31 +11:00
pages.h Table 3d: change X-axis orientation to match Y-axis (#771) 2022-11-14 10:26:14 +11:00
rtc_common.cpp Rename all ino files to cpp (Excluding speeduino.ino). 2023-10-06 18:10:20 +11:00
rtc_common.h Change name of rtc.h/.ino files to avoid conflict for stm32 2021-01-23 08:49:44 +11:00
schedule_calcs.cpp Save 600+ bytes RAM (step 4 of 9) - deduplicate scheduler ISR functions (#1063) 2023-10-07 08:25:26 +11:00
schedule_calcs.h Performance: optimize division (#1082) 2023-11-06 09:10:08 +11:00
schedule_calcs.hpp Save 600+ bytes RAM (step 5 of 9) - De-duplicate setSchedule functions (#1111) 2023-11-24 09:35:43 +11:00
scheduledIO.cpp Rename all ino files to cpp (Excluding speeduino.ino). 2023-10-06 18:10:20 +11:00
scheduledIO.h Rename all ino files to cpp (Excluding speeduino.ino). 2023-10-06 18:10:20 +11:00
scheduler.cpp Save 600+ bytes RAM (step 5 of 9) - De-duplicate setSchedule functions (#1111) 2023-11-24 09:35:43 +11:00
scheduler.h Save 600+ bytes RAM (step 5 of 9) - De-duplicate setSchedule functions (#1111) 2023-11-24 09:35:43 +11:00
secondaryTables.cpp Performance: optimize division (#1082) 2023-11-06 09:10:08 +11:00
secondaryTables.h MISRA cleanup rule: misra-c2012-8.2 2022-11-06 09:43:29 +11:00
sensors.cpp Minor memory optimisation 2023-12-06 14:47:13 +11:00
sensors.h Working ADC ISR for AVR. Not enabled. 2023-12-05 17:35:45 +11:00
speeduino.h Rename all ino files to cpp (Excluding speeduino.ino). 2023-10-06 18:10:20 +11:00
speeduino.ino Minor memory optimisation 2023-12-06 14:47:13 +11:00
storage.cpp Simplify 3D table I/O conversions - save 12 bytes RAM (#1107) 2023-11-02 09:08:31 +11:00
storage.h Performance: optimize division (#1082) 2023-11-06 09:10:08 +11:00
table2d.cpp Rename all ino files to cpp (Excluding speeduino.ino). 2023-10-06 18:10:20 +11:00
table2d.h Rename all ino files to cpp (Excluding speeduino.ino). 2023-10-06 18:10:20 +11:00
table3d.cpp Simplify 3D table I/O conversions - save 12 bytes RAM (#1107) 2023-11-02 09:08:31 +11:00
table3d.h Simplify 3D table I/O conversions - save 12 bytes RAM (#1107) 2023-11-02 09:08:31 +11:00
table3d_axes.h Simplify 3D table I/O conversions - save 12 bytes RAM (#1107) 2023-11-02 09:08:31 +11:00
table3d_axis_io.cpp Simplify 3D table I/O conversions - save 12 bytes RAM (#1107) 2023-11-02 09:08:31 +11:00
table3d_axis_io.h Simplify 3D table I/O conversions - save 12 bytes RAM (#1107) 2023-11-02 09:08:31 +11:00
table3d_interpolate.cpp Performance: optimize division (#1082) 2023-11-06 09:10:08 +11:00
table3d_interpolate.h Table3D: MISRA fixes (#973) 2023-01-11 10:58:48 +09:00
table3d_typedefs.h Table3D: MISRA fixes (#973) 2023-01-11 10:58:48 +09:00
table3d_values.h Table3D: MISRA fixes (#973) 2023-01-11 10:58:48 +09:00
timers.cpp Minor memory optimisation 2023-12-06 14:47:13 +11:00
timers.h Save 600+ bytes RAM (step 4 of 9) - deduplicate scheduler ISR functions (#1063) 2023-10-07 08:25:26 +11:00
updates.cpp Moved WMI to VVT2 (#845) 2023-12-11 11:53:34 +11:00
updates.h Moved WMI to VVT2 (#845) 2023-12-11 11:53:34 +11:00
utilities.cpp Bug fix: reset control can be enabled but pin can be set to zero (#1142) 2023-11-28 10:13:00 +11:00
utilities.h MISRA cleanup rule: misra-c2012-8.2 2022-11-06 09:43:29 +11:00