Commit Graph

2582 Commits

Author SHA1 Message Date
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 07bfc6025c Add file listing of SD card through to TS 2021-11-24 10:23:15 +11:00
Josh Stewart 4e15c77c00 Fix broken Teensy 4.1 build 2021-11-20 08:39:38 +11:00
Josh Stewart 2439883a69 Further SD compatibility work with new comms 2021-11-20 08:29:11 +11:00
tx_haggis a65beb46e0
AVR fast eeprom read - 45% speed up (#715)
* Optimize EEPROM read on AVR

* .
2021-11-19 14:22:21 +11:00
Josh Stewart 4f1809ba9d Fix for new comms not compiling on stm32 2021-11-19 11:26:12 +11:00
Josh Stewart db2e667abb Initial work on new serial comms (Disabled in ini) 2021-11-19 11:07:38 +11:00
Josh Stewart 61de6ff038 Fix tests from PR #662 2021-11-18 11:51:32 +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 aaa5b9090f Merge branch 'master' of https://github.com/noisymime/speeduino 2021-11-15 15:49:44 +11:00
Josh Stewart 0678173a54 Add handling of cam speed dual wheel in decoder 2021-11-15 15:49:41 +11:00
Josh Stewart bafa160834 Change logic for performing Baro reads from MAP 2021-11-15 15:47:55 +11:00
DeionSi eafd4030d1
Add SET_COMPARE; Change some types to COMPARE_TYPE (#691) 2021-11-12 15:11:42 +11:00
Josh Stewart 20b4693c64 Add CODEOWNERS to maintainer of stm32 2021-11-12 08:26:16 +11:00
Josh Stewart 606fac30ff Merge branch 'master' of https://github.com/noisymime/speeduino 2021-11-11 12:06:53 +11:00
Josh Stewart bb9a7135aa Remove controllerPriority for the ADC filters 2021-11-11 12:06:48 +11:00
tx_haggis b3b32a489a
Allow logging of loopsPerSecond (#699) 2021-11-09 17:48:24 +11:00
DeionSi 366f720455
Ignition advance range changes (#701)
* Signed int8 for fixed crank angle (range -10to80)

* Limit ignition advance in tables to 70 and use different range for multiplied

* Limit WMI and Nitrous ign adv to reasonable values

* Fix IAT timing retard table

* Don't let IAT retard correction set a fixed advance. No other correction does this and this fixed correction can be changed by other corrections. Also the current code is not working as ignition offset is not used for IAT retard.
2021-11-09 07:57:15 +11:00
Daniel Tobias b0acb92742
update documentation of EEPROM layout (#694) 2021-10-26 10:01:13 +11:00
tx_haggis 6344fdc76f
Use -fshort-enums instead of packing individual enums (#692) 2021-10-23 09:04:31 +11:00
Josh Stewart bc68e6b8ee Attempt #3 on Doxygen Action 2021-10-21 16:32:17 +11:00
Josh Stewart 6fecd7a414 Attempt #2 on doxygen Action 2021-10-21 16:25:15 +11:00
Josh Stewart 8e7ed92d30 1st attempt at Doxygen compiling on Actions 2021-10-21 16:18:26 +11:00
Daniel Tobias 03650d80eb
Doxygen fixes (#689)
* doxygen warning fixes

* run doxygen -u, add speeduino logo to src tree for doxygen

* increase DOT_GRAPH_MAX_NODES

so we generate the complete call graph for loop() and setup()
2021-10-21 08:03:29 +11:00
Josh Stewart fa481c5724 Don't lock trigger speed field in TS for dual wheel pattern 2021-10-18 14:34:44 +11:00
Josh Stewart d63a7d5af0 Fix incorrect tacho pin map on Dropbear 2021-10-14 07:37:03 +11:00
Josh Stewart 3160e88b61 Fix readable log alignment 2021-10-13 17:54:55 +11:00
Josh Stewart ef59fbabf0 First complete (Basic!) SD logging 2021-10-13 17:10:05 +11:00
Josh Stewart f62195d511 Hopeful fix for Github Actions not finding required library 2021-10-13 12:55:37 +11:00
Josh Stewart b7c97ce2b9 Add missing include for 2560 2021-10-13 12:42:52 +11:00
Josh Stewart 793482a27b Big chunk of SD logging work. 2021-10-13 11:53:46 +11:00
DeionSi 01f4eb90f7
Don't activate engine protection when it is disabled (#683)
* Don't enable engine protection when it is disabled

* This is already checked in each function
2021-10-12 10:25:14 +11:00
DeionSi b5f60ba012
Chrysler NGC pattern for 4-cylinder cam pattern (#679)
* Chrysler NGC pattern for 4-cylinder cam pattern

* New ignition mode for NGC decoder

* NGC decoder: Cleanup/performance improvements

* NGC decoder: Comment fixes
2021-10-11 10:55:32 +11:00
DeionSi e83c77d166
Change teeth numbers for both revolutions (#681) 2021-10-08 07:37:01 +11:00
Pasi Kemppainen 968e6304a2
Fix speeduino.ini (#630)
Add missing description.
2021-10-06 18:35:03 +11:00
Pasi Kemppainen 45b73c242a
Fixes and improvements to OBD2 real time data (#677) 2021-10-06 14:36:02 +11:00
Josh Stewart 814ae52a35 Minor fix to Unit Tests 2021-10-05 15:40:35 +11:00
Josh Stewart efe962598a Fix for OUTPUT test failing due to random pin assignments 2021-10-05 11:15:14 +11:00
XPbIM3 f8c910e6e0
Update corrections.ino (#678)
* Update corrections.ino

flatSSoftWin stores a gundreds of RPMs,  to should be multiplied by 100

* Update corrections.ino

Co-authored-by: Josh Stewart <josh@noisymime.org>
2021-10-05 07:58:57 +11:00
tx_haggis b8c4ec3e61
Use packed enums to save a few bytes of RAM (#667) 2021-10-04 08:27:02 +11:00
HWright9 1d3a30ab4c
Cylinder Trims to use Fuel Load (#672)
Changed from MAP to fuel load so these work with TPS. Added 2 and 3 cylinder engines to fuel trim.
Fixed Logging issue not showing PW2.
2021-10-04 01:14:31 +11:00
Josh Stewart 93de5eecda Initial work on common SDFat library.
Implements much of the layout and settings from #543
2021-10-04 00:09:53 +11:00
Wilmar den Ouden 0024c66b89
chore(stm32): set the RTC lib the PlatformIO lib package (#661)
Signed-off-by: wilmardo <info@wilmardenouden.nl>
2021-09-18 09:10:29 +10:00
tx_haggis 1b5e351b45
Remove repeated #defines from cancomms.ino (#658)
They are already in cancomms.h

Co-authored-by: Josh Stewart <josh@noisymime.org>
2021-09-17 00:10:34 +10:00
shiznit304 a7281808a6
camelCaseFix (#643) 2021-09-17 00:07:54 +10:00
mike501 d8474462d8
DRZ400 Trigger Decoder (#625)
* DRZ400 

Create the DRZ400 decoder based on duel wheel. Works by creating a filter on the secondary filter so it only detects one of the two teeth enabling single tooth decoder to work

* fix missing commas to speeduino.ini
2021-09-16 10:36:39 +10:00
Josh Stewart 89e49d2c00 Faster VSS reads and gear detection 2021-09-14 21:45:44 +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 b0e311b3e4
202108 fixes (#659)
Added correct pin out for SPI flash using BlackPill

Fix fsIntIndex size
2021-09-14 11:23:32 +10:00
tx_haggis de2dc65538
Missing commas (#656) 2021-09-12 09:14:06 +10:00