Commit Graph

2812 Commits

Author SHA1 Message Date
Josh Stewart 461e632db7 Allow use of RPM2 pin as VSS input with missing tooth 2022-11-22 16:46:32 +11:00
Josh Stewart 4693cb2013 Change to single decoder state variable. Small (12 byte) RAM free up 2022-11-22 15:53:35 +11:00
rafolg 86319f43ca
Update decoders.ino (#944)
Fix an issue where negative trigger angles cause erroneous crankAngles for ignition by tooth.
2022-11-14 10:52:21 +11:00
dependabot[bot] 1f03a7b25e
Bump actions/cache from 2 to 3 (#964)
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-14 10:46:19 +11:00
tx_haggis 56ab7c054d
Table 3d: change X-axis orientation to match Y-axis (#771)
* Change X axis in memory orientation to match Y

* X & Y axes can use the same type (Ie.e class)

* Table3D axis iterator: replace reverse() with rbegin()

* Use iterators as part of unit tests

* Doxygen fixes/corrections
2022-11-14 10:26:14 +11:00
Josh Stewart a71dcffe9f Small memory reduction in AE code 2022-11-07 14:49:49 +11:00
tx_haggis ad7d4f6ae9
Fix Miata 99-05 new ignition mode conditional (#918)
It was being applied when the trigger angle==0 regardless
of the perToothIgn ignition flag: replace || with &&.
2022-11-07 13:54:36 +11:00
Vitor Moreno B. Sales 8e2fb0b36e
Added possibility to configure Steper bounds (#930)
Previous bounding worked only for PWM
2022-11-07 13:52:04 +11:00
Josh Stewart be58be3b18 Add missing pin defaults for v0.3 board 2022-11-07 12:12:31 +11:00
Josh Stewart 2fc29ceef5 MISRA cleanup rule: misra-c2012-8.2 2022-11-06 09:43:29 +11:00
DeionSi a1d3c59af7
Lower max on IAT and CLT gauges for celsius (#958)
* Lower max on IAT and CLT gauges

* CLT, IAT and FuelTemp gauges to max 120c/248f
2022-11-04 12:36:10 +11:00
dependabot[bot] 7062f5381d
Bump actions/checkout from 2 to 3 (#947)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-04 12:03:15 +11:00
Piotr Rogowski 6b98ebbaaf
Add upload INI action (#962)
* Add upload INI action

* Run only when INI changes
2022-11-04 10:39:45 +11:00
Piotr Rogowski 9affde119e
Fix INI validation (#952) 2022-10-24 09:20:39 +11:00
dependabot[bot] 4da699bb39
Bump schneegans/dynamic-badges-action from 1.4.0 to 1.6.0 (#950)
Bumps [schneegans/dynamic-badges-action](https://github.com/schneegans/dynamic-badges-action) from 1.4.0 to 1.6.0.
- [Release notes](https://github.com/schneegans/dynamic-badges-action/releases)
- [Changelog](https://github.com/Schneegans/dynamic-badges-action/blob/master/changelog.md)
- [Commits](https://github.com/schneegans/dynamic-badges-action/compare/v1.4.0...v1.6.0)

---
updated-dependencies:
- dependency-name: schneegans/dynamic-badges-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-20 13:56:39 +11:00
Josh Stewart 2269e688f3 Lower SPI EEPROM write frequency 2022-10-19 12:19:52 +11:00
dependabot[bot] 2f77ce0303
Bump actions/setup-python from 2 to 4 (#949)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-19 10:42:56 +11:00
Piotr Rogowski 5b9f66a8d6
Add `dependabot` (#946) 2022-10-19 10:38:57 +11:00
Josh Stewart eb5ed8e460 Fix syntax error in ini 2022-10-18 11:25:27 +00:00
Piotr Rogowski b1a2277e79
Add `Validate INI` action (#945) 2022-10-18 22:18:39 +11:00
rafolg dd38d0d7fb
Update board_teensy41.ino (#937)
Auxiliary interrupts should be called after timer flag resets to avoid RPM drops at high engine speed
2022-10-09 13:48:53 +11:00
Josh Stewart c8d51d686b Nissan 360: make sure elapsedTime variable is set. Fixes #705 2022-10-03 15:43:43 +11:00
Josh Stewart 3997708997 Improvements to init unit tests 2022-09-29 09:47:37 +10:00
Josh Stewart 960d713889 Reduce spark duration when dwell limit is exceeded.
Potential fix for #932
2022-09-27 11:55:42 +10:00
Josh Stewart 114e9b2c7d Correct Teensy 4.1 PIT clock scaler 2022-09-16 17:52:59 +10:00
tx_haggis b8278e7ecb
Include CPP files in MISRA script (#925)
* Push libdivide #def into build flags

* Allow build without USE_LIBDIVIDE

* Rename libdivide folder before & after scan

It's the only way to really exclude it
2022-09-15 12:16:14 +10:00
Jon Billings f1a4ff014c
Jeep2000 fix (#912)
* Fix Jeep2000 decoder

getCrankAngle_Jeep2000() sets crankangle = 146 if toothcurrentcount = 0, because last tooth was cam tooth  which is 146 ATDC, however, all the timing and angle calculations are not done on the cam tooth read, so crankangle should be set to 118 for previous crank tooth.

* fix the fix

@jaredsellers4 pointed out that to be consistent with the rest of the crank tooth timings, it should be the leading edge, 114, rather than 118.

* Further improvement to Jeep 2000 decoder

1) filter out secondary signals when primary tooth is not 12 or 13 (because it's noise)
2) scale the trigger filter gap according to whether the next gap is bigger, smaller or the same as the previous/current gap.

* Revert "Further improvement to Jeep 2000 decoder"

This reverts commit 3510aa49c3.

* fix Jeep2000 to address #897

getCrankAngle_Jeep2000() sets crankangle = 146 + triggerAngle when toothCurrentCount = 0, because toothCurrentCount was set to 0 on seeing the Cam tooth, and the cam tooth angle is 146.
However, the tooth timings that are subsequently used in calculations are from the previous crank tooth, which was at 114. Therefore 114 is the correct crankangle to work with.

Co-authored-by: Jon Billings <jon.billings@bbc.co.uk>
2022-09-15 09:59:18 +10:00
rafolg a40971dde1
Configuration of PWM for idle, boost and vvt for Teensy4.1 (Take2) (#929)
* Fix VSS not resetting to zero

Reinstated car stop check to avoid  speed not going back to zero.

* Better logic for gear detection

Previous gear detection logic had gears constantly lagging 1 shift behind.

* Update sensors.h

* Update sensors.ino

* Update sensors.ino

* Update sensors.h

* Update board_teensy41.h

Pit timers implementation for idle, boost and vvt

* Update board_teensy41.ino

Pit timers implementation for idle, boost and vvt

* Update board_teensy41.h

Error in fuel5-8 timer disable now corrected

* Update auxiliaries.ino

Enable vvt PWM for Teensy 4.1

* Update idle.ino

* Update board_teensy41.h

For some reason the PIT_LDVAL compares were not showing on  the previous PR

* Update auxiliaries.ino
2022-09-15 09:58:37 +10:00
ric355 659eb8ec0f
Fix for uninitialised variable in OLCL and CL stepper idle control (#926)
* Fix problem of using an uninitialised variable when initialising the stepper
after power on.

* Fix faulty idle taper causing OLCL and CL stepper to get stuck in the cranking position.

Co-authored-by: Richard Metcalfe <richard@richmet.com>
2022-09-13 23:16:31 +10:00
Josh Stewart c8b7c18622 Flush serial rx buffer if a CRC error is found 2022-09-13 17:33:04 +10:00
Josh Stewart 3923ecf12f Tweaks to 2560 EEPROM burn during multi page writes 2022-09-12 11:53:18 +10:00
Josh Stewart 64f1187379 Don't use absolute path in archive 2022-09-08 13:29:02 +10:00
Josh Stewart 08cf42e113 Include all results files in artifact 2022-09-08 13:24:59 +10:00
Josh Stewart e24d388965 Fix yaml formatting 2022-09-08 13:17:00 +10:00
Josh Stewart 25c2d2b907 Archive MISRA results in Github Action 2022-09-08 13:15:32 +10:00
Josh Stewart 7eee585f6b Accurate MISRA scanning for all rules now in place 2022-09-08 12:57:05 +10:00
Josh Stewart cf45e6c289
Migrate MISRA scanning to Github Actions + Update to cppcheck v2.7 (#923)
* Initial creation of test action

* Fix relative directory

* Change to cppcheck v2.7

* Change script call

* Direct error count into file

* Fix env writing

* env update

* More env testing

* Another env test

* More testing

* More testing

* Yet more env testing

* Change to results count file

* Further testing

* Remove continue on error

* Force script to complete successfully

* Force create results dir

* Force set results directory

* Fix bad syntax

* Add badge to README

* Remove Azure pipelines

* Re-add cat of results file

* Add quiet option to script

* Add back missing line
2022-09-07 16:04:51 +10: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 a4b00dca90 Prevent potential init lockup on Teensy boards if invalid pin is selected for aux function 2022-08-31 16:19:09 +10:00
Josh Stewart 03e93bddb0 Do not run SD logging if overall setting is disabled 2022-08-31 14:48:46 +10:00
Josh Stewart 61dbdd50ea Fix typo from last commit 2022-08-31 13:19:52 +10:00
Josh Stewart 739dc06f24 Add option to specify min absolute delta values for AE 2022-08-30 11:23:25 +10:00
Dave Smith aee331af9d
Fix improper log entries (#920)
Format typos that cause the data to not be logged
2022-08-28 21:53:03 +10:00
Josh Stewart a4823c3546 Increase most F temp field max values to 419F 2022-08-16 10:45:27 +10:00
Josh Stewart 16403b41bc Allow for float values in SD log where supported with FPU 2022-08-10 12:12:42 +10:00
Pasi Kemppainen df2627e06f
Disable automatic retransmission (#910) 2022-08-10 11:06:28 +10:00
Tjeerd 827f078e6b
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>
2022-08-02 17:10:29 +10:00
a32guy 7bd1b911bf
Add OLCL mode to initBoard() for teensy (#903)
Co-authored-by: csmergs <christopher@smeraglinolo.com>
2022-07-28 10:22:42 +10:00
tx_haggis 70bf16e16b
libdivide structs can be const - saves a few bytes (#886) 2022-07-27 13:51:45 +10:00
Daniel Tobias ff0296aaf2
cl boost control above baro should use logical and/or (#901) 2022-07-27 10:25:54 +10:00