Commit Graph

50 Commits

Author SHA1 Message Date
Josh Stewart c129fa3326 Add option for SD logging with external switch 2022-07-08 14:31:48 +10:00
Vitor Moreno B. Sales adaa6a227e
Enable use of disabled functions pins (#549)
* Enable use pins of disabled functions or unused ign channels

* Added new pins and functions to check
2022-06-29 16:37:50 +10:00
Tjeerd 20c5e17756
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>
2022-06-03 15:44:09 +10:00
tx_haggis 7933bb68c4
Remove previousLoopTime - never used (#706) 2022-04-11 14:16:26 +10:00
Vitor Moreno B. Sales 9c3f745c16
All tapers use byte counters (#746)
Fixes

Update idle.ino
2022-04-05 07:27:54 +10:00
tx_haggis fc9967e31d
Performance: optimize fuel trim PW calcs (#756)
* Consistent set of div100 functions

* Add typedef for trimTable3d

* Performance: use div100() function
when applying fuel trim corrections

* Silly ARM compiler!

* Unit test fixes

* Fix tests: expected & actual parameters were swapped

* div100(): add 8-bit overloads for completeness

* Fix unit tests
1. Force call to correct div100() overload
2. Use appropriately typed assertion

* Restore use of USE_LIBDIVIDE preprocessor symbol

* Add div360() - encapsulate libdivide use

* Fix copy/paste issue.
2022-02-18 14:55:43 +11:00
Benas Brazdziunas 07a4d1ea79
Coolant/RPM Protection (#785)
* Coolant/RPM Protection

* removed test  clear flash option

* Add new update section for coolantProtEnbl rather than using old area

Co-authored-by: Benas <bbrazdziunas@gavea.co.uk>
Co-authored-by: Josh Stewart <josh@noisymime.org>
2022-02-14 10:41:58 +11:00
Josh Stewart 4e00f12415 Fix for boost PWM output not working correctly at 100% DC 2022-01-04 22:58:44 +11:00
Josh Stewart bd9d59a145 Fixes to 202201 update routine 2022-01-04 12:19:58 +11:00
Vitor Moreno B. Sales d9bde09f5e
Enabled softRevLimit time limit (#602)
Co-authored-by: Josh Stewart <josh@noisymime.org>
2021-12-22 13:29:13 +11:00
Josh Stewart 30e566068c Remove extra tooth log buffer definition. Slight RAM free up 2021-12-21 12:54:38 +11:00
Josh Stewart 809fd9d55b New Comms Tooth and Composite loggers 2021-12-20 16:22:23 +11:00
Pasi Kemppainen e213f2534e
PWM Fan addition (#637)
* Added PWM Fan functionality

PWM Fan output for Teensy and STM32

* Teensy3.5 timer fix for PWM Fan.

* Fix the conflicts with incorporate AFR

* Possibility to use PWM fan on mega too

Not tested at this stage!! Do not merge yet.

* Fix log entry size

* Remove duplicate stuff and use same way off toggling fan

* Fix typo errors

* Move fan pin definitions to globals.h

* Fix problems related to PWM fan.

* Revert previous change.

* Fix problems with idle things

* fix idle duty getting stuck at 100%

* Revert "fix idle duty getting stuck at 100%"

This reverts commit 7e9779483b.

* Revert "Fix problems with idle things"

This reverts commit 8bccb56d9a.

* Revert "Revert previous change."

This reverts commit fcb962864a.

* Remove mega support

* fixes

* more fixes

* moar fixes

* Should be working now

* Update speeduino.ini

* Lots of tweaking

* Update to work better with current FW

* Fix compiler warnings and include update things.

* Minor fixes

* Update logger.ino

* Fan duty working on mega too and fan output will be on/off

Co-authored-by: Pasi Kemppainen <pazi88@users.noreply.github.com>
2021-11-24 12:18:41 +11:00
Josh Stewart db2e667abb Initial work on new serial comms (Disabled in ini) 2021-11-19 11:07:38 +11:00
tx_haggis 5ed9ec3ca9
Reduce 3d table memory usage (>500 bytes) (#662)
* Use table_row_iterator_t to adjust ignitionTable

* Separate 2d & 3d table code, abstract page to table iterator conversion.

This is just moving code around in preparation for future changes.

* Reduce table RAM (.bss) usage

Generate a separate type for each possible
3d axis & size combination.

This turns what was runtime information into
compile time data.

* Save 1 byte per table.

Use a flag value (INT16_MAX) instead of a separate boolean
flag

* File renaming

table_iterator -> table3d_iterator.h
table3d.h -> table3d_interpolate.h
table3d.cpp -> table3d_interpolate.cpp
table3d_types.h -> table3d.h

* Optimize page.cpp: reduce code clutter, maintain performance

* Reduce flash usage

* Encapsulate table metadata

* Performance - hoist if statement

* Replace function with macro

* Use a packed enum as a type identifier

Use a packed enum as a type identifier

Slimmer data types

* Use table iterators for random access to table
values and axis.

* Centralize write buffer check

* Encapsulate 16-bit reference concept

* Performance: make table iterators proper classes

This allows us to chain calls on temporaries - not possible
with regular function calls.

* Performance: encapsulate EEPROM update
& address increment

* Save flash - don't duplicate function

* Performance: directly invalidate table cache

* Separate out iterator reversal

* Separate out entity mapping & per-byte access

Much faster, smaller code footprint & easier to understand

* Code quality fixes

* Separate out axis metadata

* Doxygen comments

* Separate int16_ref into separate file

* Separate out table axies & values into separate types

No need for metadata types & more localised code.
E.g. creating iterators is now alongside the data over
which they iterate.

* Doxygen
2021-11-18 11:30:29 +11:00
Josh Stewart 793482a27b Big chunk of SD logging work. 2021-10-13 11:53:46 +11:00
Vitor Moreno B. Sales b0e311b3e4
202108 fixes (#659)
Added correct pin out for SPI flash using BlackPill

Fix fsIntIndex size
2021-09-14 11:23:32 +10:00
Vitor Moreno B. Sales 118e3d40a5
Enhanced programmable outputs (#589)
* Enhanced programmable outputs

Added possibility to set minimum programmable output time.

Added names for the comparators to make it more user friendly, TS will complain about the change for existing tune.

Added more possibilities

Added possibility to set a minimum or a maximum output time

Added possibility to combine any number of rules or all of them

I got a lot of requests for this feature.

Keeps the RAM usage the same.

fix

* Fixed maximum timing

* Fix STM32 build
2021-07-19 09:11:04 +10:00
Olli Hollmen 61b1401b49
Add doxygen documentation (#597)
* Add Doxygen markup for grouping decoders. Tidy-up doucumentation just enough to make
Doxygen 'Modules' page neat / somewhat consistent (w/o stripping any info, on the contrary
some info is now added for few decoders that had only name present).
Add minimally modified Doxygen Doxyfile configuration.

* Document statuses and config* structure members in globals.h:
- Convert existing documentation to doxygen
- Document some of the undocumented members cross-referencing code files
  where they are used (often containing good explanations in code comments) or
  deriving meaning from code (leave question mark as marker of uncertainty
  or need for clarification)
- Same activity in misc .h header files w. struct declarations.
Misc .ino files with code:
- Convert existing code documentation to doxygen
- Add documentation to undocumented functions (deriving idea from raw code and
  code embedded comments)
- Some additions to existing documentation.
End sentences with period, as it has many iportant meanings for Doxygen
e.g. auto-brief ends at first-sentence period and in (doxygen generated)
HTML ascii newline does not break lines (or sentences).
Doxyfile: Add README.md file as INPUT from upper (codebase root) directory.
2021-06-22 15:30:52 +10:00
Pasi Kemppainen 982e52db1b
VVT2 addition and closed loop VVT improvement (#551)
* VVT2 and closed loop VVT improvement

* Fix building for latest changes

* Fix CRC error

Co-authored-by: Josh Stewart <josh@noisymime.org>
2021-04-22 08:56:39 +10:00
tx_haggis 02cb7bebd6
Isolate table3D member access in comms.ino (#545)
* fix!: fix ODR violations

* refactor: move page specific code into a separate CPP file

* refactor: page getter/setter share mapping logic

Extract common page-to-entity mapping logic from
getPageValue() & setPageValue() - place in map_page_offset_to_entity()
and share.

* performance: optimize CRC calc

Calculate page CRC by iterating over entities & tables.

* CRC table calculation - use table iterator

* refactor: use iterators for sendPage()

Re-implement sendPage() using page & table iterators
Future proof & fast

* refactor: sendPageASCII()

Pull put shared code into functions.
Use table iterator

* refactor: use shared axis factor

This puts the axis factor usage in one place

* refactor: encapsulate page size & count

Added getPageCount() & getPageSize()

* Added static_assert for all pages.

* Remove C++ language elements

namesapces, scope resolution, enum struct

* Rename comms.ino to comms.cpp

Provides better encapsulation of non-global
data & functions.

INO files are all mashed together by some
custom process. So everything becomes global and
static functions/variables aren't really private to
 the translation unit. Thus breaking encapsulation :-(
2021-04-21 14:36:27 +10:00
Josh Stewart f02d75bfbe Some initial work for same51 board support 2021-03-13 08:43:51 +11:00
Josh Stewart 62e889eaa9 Signatures and base tunes for 202103 2021-03-02 21:32:14 +11:00
Josh Stewart 3ab898f5dd Missed file from last commit 2021-03-02 13:53:15 +11:00
Josh Stewart 57ebf498a1 Add fuel trim tables 5-8 2021-02-15 16:01:28 +11:00
Pasi Kemppainen f67817b4ad
Dwell map addition (#525)
* Add dwell map

* Add information about the dwell settings

* Fix copy/paste error

Co-authored-by: Pasi Kemppainen <pazi88@users.noreply.github.com>
2021-02-12 09:11:42 +11:00
Josh Stewart a810bfbfd1 Remove fullStatus array for comms 2021-02-02 13:14:47 +11:00
Vitor Moreno B. Sales 00801ad82f
Added pinIsReserved macro (#479)
* Added pinIsReserved macro

Function used to don't initialize reserved pins such as USB on ARM boards, each pin must be defined on board.h file

* Update board_teensy35.h

Include Serial and CAN0 pins
2020-12-02 08:59:44 +11:00
Josh Stewart bfbd04b899 Warnings cleanup from last commit 2020-11-16 23:20:30 +11:00
Josh Stewart 1c3a48de64 Merge branch 'master' of https://github.com/noisymime/speeduino 2020-11-16 22:51:37 +11:00
Josh Stewart 99e36dcf05 Initial work in unifying the MC33810 code 2020-11-16 22:50:23 +11:00
DIY-EFI fe6f0c684a
Add Idle up output (#378)
Implement functionality to allow a defined output pin to toggle (normal or inverted) based on the idle up input pin.

Co-authored-by: Josh Stewart <josh@noisymime.org>
2020-11-16 08:49:22 +11:00
Josh Stewart 61cef9451c Separate logic for secondary fuel and ignition tables 2020-10-22 11:21:48 +11:00
Josh Stewart fb15a565ea
Pr/435 (#445). Closes #435
* Add files via upload

* Add files via upload

* Update storage.h

* Update log size

Co-authored-by: DylanRooijakkers <69131866+DylanRooijakkers@users.noreply.github.com>
Co-authored-by: Dylan Rooijakkers <rooijakkersd@gmail.com>
2020-08-23 08:27:44 +10:00
iLeeeZi 8e9b680be6
Flex fuel sensor temperature and temperature correction (#413). Also closes #252
* Fuel temperature correction

* fix negative temperatures

* typo fixed
2020-08-18 12:34:56 +10:00
Vitor Moreno B. Sales b29fa21775
Programmable outputs (#396)
* Programmable outputs

* Prevent array overflow

* Show fullStatus variables names on dialog

* Further fixes

* Update with master

Co-authored-by: Josh Stewart <josh@noisymime.org>
2020-08-12 14:21:36 +10:00
Josh Stewart 53c0dedde1 Complete new calibration routines for testing 2020-08-11 12:07:12 +10:00
Mateusz Muszyński 5b342d27bd
Water methanol injection (#417). Refer #154
* Add water methanol injection

* Set signature back to default

* Set signature back to default

Co-authored-by: Josh Stewart <josh@noisymime.org>
2020-07-22 11:27:21 +10:00
Vitor Moreno B. Sales 7bcf4bcb15
[FP] Add injector delay for priming (#391)
* [FP] Add injector delay for priming

* Fix build

* Add the startup TPS read back in to ensure proper flood clear check

Co-authored-by: Josh Stewart <josh@noisymime.org>
2020-07-05 14:28:57 +10:00
Josh Stewart ac6f1d1b25 Initial memory reduction work on temp tables (WILL BREAK CALIBRATION) 2020-06-16 08:09:14 +10:00
Josh Stewart 940a6826b5 Initial work on engine protection system 2020-06-06 10:52:27 +10:00
Josh Stewart fc43f3a479 Allocate memory for fuel/oil pressure inputs 2020-05-29 12:21:28 +10:00
Josh Stewart a335820b46 Enable the use of the 50% hardware test modes 2020-05-04 15:08:45 +10:00
Josh Stewart cb89d44746 Change runSecsX10 to uint32_t to avoid overflow issues. See #364 2020-04-26 08:30:46 +10:00
Josh Stewart ccad3d258f VSS calibration routines (untested) 2020-04-23 20:34:31 +10:00
iLeeeZi 8722065168
6 and 8 cylinder sequential injection (#280)
* 6 cyl sequential related cleanup

* disable 6cyl seq fuel trim tables for now

* add the over 2 squirts fix

* Add 5 and 6 cylinder semi and full sequential

* 5 cylinder changes

* fix priming pulse when using paired or semi-sequential injection

* add 5 cyl special case back

* Add missing 8 cyl stuff

* add missing PW8

* allow to change inj4Ang with non sequential 5 cylinder

* add missing helptext
2020-04-01 17:03:11 +11:00
Vitor Moreno B. Sales 63b726cf78
[ASE] Transition time to disable (#342)
* [ASE] Transition time to disable

* Real time ASE

* Fix last commit

* Fix variables declaration
2020-03-24 12:36:24 +11:00
Josh Stewart bc67453098 Addition of 0-720 injector timing curve. See #306 2020-03-17 18:27:05 +11:00
Pasi Kemppainen 3529f6a2f7
6&8 cyl sequential ignition (#323)
* Required changes done

Needs testing

* Additions

* 8cyl changes for mega 2560

* Decoder fixes
2020-02-28 10:22:33 +11:00
Josh Stewart 76ef814847 Large cleanup of global varialbes in preparation for unit test framework 2020-01-24 11:31:39 +11:00