Commit Graph

126 Commits

Author SHA1 Message Date
Josh Stewart 650efeb6c4 202311-dev signatures and updates file 2023-10-06 15:01:23 +11:00
Josh Stewart 70d3f61573 Signatures for 202310 release 2023-10-06 12:09:43 +11:00
Josh Stewart f0b6ba030d Increase DFCO Hyster range to 0-500.
Fixes #1100
2023-10-05 23:02:15 +11:00
Josh Stewart 9c3e993b53 Initial commit of new rolling rev limiter 2023-06-09 16:10:43 +10:00
Josh Stewart 6c6cd9488d Add updates section for 202306-dev 2023-06-05 16:41:59 +10:00
Josh Stewart b49c6b6ab8 Add option to power stepper motor constantly. Fixes #1031 2023-05-17 08:17:26 +10:00
Vitor Moreno B. Sales 9a1c3e30c3
Cranking add cold advance option (#872)
Co-authored-by: Josh Stewart <josh@noisymime.org>
2023-05-10 10:32:11 +10:00
Pasi Kemppainen f59d013714
Add deceleration enleanment feature (#939)
* Add decel enleanment feature

* Fix tps and map DOT scaling in TS.

* updates.ino

* Small bug fix.

* One more small bug fix.

* Update cancomms.ino

Cast tps/mapDOT as uint8 to cancomms to retain backwards compatibility

* Fix programmable outputs list.

* Fix programmable outputs in updates.ino

* Add abs around currentStatus.mapDOT
2022-12-14 11:17:47 +11:00
Josh Stewart 22d2b4e38e Add delay to oil pressure engine protection 2022-11-23 16:15:01 +11:00
Josh Stewart 2fc29ceef5 MISRA cleanup rule: misra-c2012-8.2 2022-11-06 09:43:29 +11:00
Afroboltski 75d6c2ff61
Air Conditioning Control - Feature Implementation (#665)
* 19.09.2021

* Final testing of AC Control, some idle features fixed

AC control feature added, better than the existing idle-up feature (which can still be used for other things, e.g. electrical load detection). Air conditioning is locked out with coolant temp, RPM high/low, and high TPS. So the A/C automatically cuts out when driving hard.

Idle step now works correctly with closed loop PWM, open loop PWM, and closed+open loop PWM. Untested with stepper motor, but no reason it shouldn't work.

* Fixed mistakenly incremented page sizes

* Initial changes as per HWright9

-Renamed engineRunSeconds to acAfterEngineStartDelay
-Formatted large if statements better
-Fixed acStartDelay overflow bug
-Improved readability of logic

* Final fixes as per HWright9's feedback

-Add high/low RPM lockout delay, similar to the high TPM lockout delay
-General tidy-up

* Added stand-alone fan, moved config data in EEPROM

-Added additional configurable stand-alone A/C fan output, for when there is dedicated cooling fan for the A/C compressor. This is independent of the engine cooling fan logic.
-Moved config storage in EEPROM to configPage9, as noisymime's SD card logging has used the (previously unused) bytes I had used in configPage13.
-Minor bug fix - rename Aux in 1-16 to Aux in 0-15

* Revert to current master branch - as of master commit 97f8ef795a

* A/C Control Re-Integrated from AC-Control-Clean-3 (@Corey-Harding). Tested & ready to merge.

Additionally, added @HazuTo25's lines into the update() routine to configure default A/C settings.

* Changed updates.ino to just set A/C to disabled

* Fix change reverted by mistake - master merge commit 73badbce8c

* Fix remaining mistakes from previous master merge

* Remove test statements left in by mistake

* define unusedBits

* Remove test statements left in by mistake

* Increase timing granularity to 0.1s

* idleUpRPMAdder

* Remove another line put in by mistake by auto merge

* idleUpRPMFixes

* Update speeduino.ino

* Tweak A/C idle up descriptions

* Tweak A/C TS descriptors again

* Fixed alignment bug that turned page 15 config values into gobbledegook.

This had the symptom of the A/C request never triggering, because when a pin was assigned in TS (e.g. I did 27), a completely different pin would be read from config15 (in my case 22 - connecting the button to pin 22 would work in this case, even though TS was set to 27).

* Fix bit count - should be 6 to match ini file

* Increase minimum RPM lockout granularity

* Change granularity of A/C minimum RPM lockout to 10 RPM; Inline some functions for readability

* Add static inline function prototypes to auxiliaries.h as per the style guide.

* Fixed page 15 merge errors

* Style changes to suit new pinIsUsed() checks in setPinMappings()

* Add PWM Fan Control Minimum Clamp Value when A/C Compressor Engaged

* Fix comment

* Fix bug with stand-alone fan initialisation

Pin was unable to be used in prog. I/O even if fan was disabled, because it was always initialised as an output even if it was disabled. Fixed in this commit.

* Correction to Fahrenheit temperature scaling

* Move A/C updates to correct next release

Co-authored-by: shiznit304 <62686180+shiznit304@users.noreply.github.com>
Co-authored-by: Josh Stewart <josh@noisymime.org>
2022-09-07 10:23:01 +10:00
Josh Stewart 739dc06f24 Add option to specify min absolute delta values for AE 2022-08-30 11:23:25 +10:00
Josh Stewart c129fa3326 Add option for SD logging with external switch 2022-07-08 14:31:48 +10:00
Vitor Moreno B. Sales c6d9fd7a10
Fix for semi-seq inj after #478 (#883) 2022-06-29 16:41:52 +10:00
Daniel Tobias 540b3a4fa2
Correct typos found by codespell (#880) 2022-06-27 10:39:14 +10:00
larmicfre 298d994ba1
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>
2022-06-20 09:52:07 +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
Pasi Kemppainen d7ccf4945b
Added option to fix tacho signal to coil dwell (#825)
* Add dwell fixed tacho option

* Better implentation

Added description to TS. Removed code duplication and unnecessary if's.

* Resolve conflicts and minor changes to wording on this option

Co-authored-by: Josh Stewart <josh@noisymime.org>
2022-05-24 14:29:38 +10:00
Pasi Kemppainen 6388b9d703
Set onboard logging settings to zero. (#849) 2022-05-24 10:36:59 +10:00
Josh Stewart 7c94329bf3 Fix issue when switching to sequential fuel post PR #478 2022-04-28 10:57:36 +10:00
Josh Stewart 97f8ef795a Remove duplicate updates from last PR 2022-04-21 16:37:05 +10:00
Pasi Kemppainen af5272b74c
[WIP] CAN broadcasting menu (#639)
* Add CAN broadcasting menu

* Fix updates.ino

* Remove use of floats and few other fixes.

* Fix building.

* Change updates.ino up to date.
2022-04-21 16:33:10 +10:00
Vitor Moreno B. Sales 4ce8c28c5a
Enable semi sequential and wasted COP on half sync (#478)
* Semi/Full sequential mode

Semi sequential in case of absent phase input at crank, engine will almost aways start in semi sequential mode

Minimal code change at speeduino.ino

Fix RPM reading when in half sync

* Update with latest changes in master

* Less calls to change functions

See #478 chat history for details

* Semi/Full sequential mode

Semi sequential in case of absent phase input at crank, engine will almost aways start in semi sequential mode

Minimal code change at speeduino.ino

Fix RPM reading when in half sync

* Update with latest changes in master

* Less calls to change functions

See #478 chat history for details

* Add sync status to log

* Updates

Updated speeduino.ini
Updated updates.ino

* Fix error in half to full sync function

Co-authored-by: Josh Stewart <josh@noisymime.org>
2022-04-18 14:12:57 +10:00
Daniel Tobias 7020705dbe
fix typos in code documentation (#816)
* fix typos in code documentation

* minor reverts

* fix typos in ini

Co-authored-by: Josh Stewart <josh@noisymime.org>
2022-04-11 10:49:58 +10:00
Josh Stewart f55789e5a3 Reorganise Engine Protection UI 2022-04-10 09:07:21 +10:00
tx_haggis 6c12bcc32d
Separate table axis I/O conversion from iteration (#767)
* Missing include

* 1. Add int16_byte class
2. Add axis factory function for int16_byte instances
(flyweight pattern)

* Separate out axis iteration and I/O conversions

* Optimize for size and performance.

* Fix unit test
2022-02-24 16:11:54 +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 b3843bb293 Fix broken unit tests 2022-01-04 12:49:03 +11:00
Josh Stewart bd9d59a145 Fixes to 202201 update routine 2022-01-04 12:19:58 +11:00
Pasi Kemppainen 23163bc341
VVT fixes (#758) 2022-01-04 09:30:43 +11:00
Vitor Moreno B. Sales 04d21e6dcc
Increase TPS resolution to 0.5% (#608)
* Increase TPS resolution to 0.5%

Fix TPS scale across the code

Fix TPS range for boost table

Update sensors.h

* Update all tables to use TPS resolution

* All tables use new TPS resolution

Fixed wrong MAP scale, added fuel switch % for TPS

Fix rotary

* Fix merge conflicts
2022-01-01 19:30:21 +11:00
Daniel Tobias 241917cc7f
don't manually set values for FILTER defaults, use defines (#698)
fixes a few inconsistencies where defaults are set to different values, defaults for generic pressure sensors
2021-12-22 07:56:55 +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
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
shiznit304 a7281808a6
camelCaseFix (#643) 2021-09-17 00:07:54 +10:00
tx_haggis 5e409445a4
Use table iterator for EEPROM read/write (#620)
* refactor: use a loop for writeAllConfig.

Future proofing: new pages will get automatically
written

* Call existing [read|store]EEPROMVersion functions

* Common function to compute CRC address

* Bulk write calibration tables

* Use EEPROM get/put instead of hand rolled code

* Typedef the EEPROM address

I.e. the EEPROM.read() parameter type

* Encapsulate eepromWritesPending

* Remove C++ namespaces

* Use table iterators for read/write

* Rename storage.ino to .cpp

This fixes a warning
2021-09-14 16:51:26 +10:00
Vitor Moreno B. Sales b5c6127028
Add delay option for idle advance (#601)
* Make idle advance respect delay

Also increased resolution to half second.

Remove code duplication, removed unnecessary math

* Add a new configurable delay

* Fix copy paste error

Co-authored-by: Josh Stewart <josh@noisymime.org>
2021-07-19 18:03:07 +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
Pasi Kemppainen 0e3514980e
Add RPM switch point for instantaneous map sample method. (#572)
* Add RPM switch point for instantaneous MAP reading

* Add descriptions and other stuff to make PR

* Add suggested changes

* Use RPMdiv 100 for reading switch point

Co-authored-by: Josh Stewart <josh@noisymime.org>
2021-07-19 09:07:44 +10:00
DylanRooijakkers 49a251432c
Boost by Gear (#573)
* Boost by Gear

* Minor changes to PR

- Changed *2 into bitwise operator
- Reserved 1 extra bit for boostByGearEnabled for 2 additional boost by gear modes in the future

* Added mode to set percentage of boost target table
2021-07-18 10:37:16 +10:00
Josh Stewart e2d486a116 Add filter for Flex sensor (Eth% and fuel temp) 2021-07-17 09:42:58 +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
Tjeerd 6179d4b5ae
Create better support for STM32F401 and STM32F411 blackpills (#548)
* Create support for STM32F401 and STM32F411 blackpills

* Small bug introduced now fixed.

Co-authored-by: Tjeerd <tjeerdie@users.noreply.github.com>
2021-03-23 08:33:03 +11:00
Josh Stewart 62e889eaa9 Signatures and base tunes for 202103 2021-03-02 21:32:14 +11:00
Pasi Kemppainen a3373878c0
Add option to run PWM idle valve before engine is cranked over (#458)
* Add option to run PWM idle valve before engine is running

* Update updates.ino

Co-authored-by: Pasi Kemppainen <pazi88@users.noreply.github.com>
2021-02-17 08:56:31 +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
Vitor Moreno B. Sales c59153a9d7
Fix pages 13 and 14 EEPROM allocation (#487)
* Fix pages 13 and 14 EEPROM allocation

* Update must start from the end of EEPROM

* Fix allocation
2021-02-02 09:41:51 +11:00
Josh Stewart 23bbee6b82 Add some missed update variables for 202012 2020-12-13 09:40:03 +11:00
Josh Stewart 5de6becbfa Signatures and base tunes for 202012 2020-12-12 08:09:01 +11:00