Commit Graph

2916 Commits

Author SHA1 Message Date
DeionSi 0605b7f822
Added loops per revolution gauge and adjustments to loops per second gauge (#741) 2021-12-23 14:45:48 +11:00
Pasi Kemppainen 34116ad223
New CAN-bus library for STM32 (#725)
* Use new CAN-library

* Fix CAN3 pin number

* Fix building on other platforms
2021-12-23 13:46:13 +11:00
Josh Stewart d0bbb24563 Fix typo bracket in last commit 2021-12-22 16:10:06 +11:00
Josh Stewart 2892ac04fc Complete triggering options for SD logging 2021-12-22 15:20:39 +11:00
Tjeerd 0322d31ccc
Added function: Reset eeprom with key (#657)
* Add eeprom reset with key

* small improvements

* increased robustness against accidental erase of EEPROM.

Co-authored-by: Tjeerd <tjeerdie@users.noreply.github.com>
2021-12-22 14:53:36 +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
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
Josh Stewart 744621db34 Slight tweaks to composite logger 2021-12-21 14:34:54 +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 06c9ae46c5 Add timeout check on new serial 2021-12-21 12:53:53 +11:00
Josh Stewart 809fd9d55b New Comms Tooth and Composite loggers 2021-12-20 16:22:23 +11:00
Josh Stewart 5051c55e84 Attempt to select correct Time library for avr2560 on PIO/Arduino IDE 2021-12-19 22:58:14 +11:00
Josh Stewart c172141da3 Compile warnings cleanup 2021-12-19 22:38:53 +11:00
DylanRooijakkers 0a71d0972b
Boost by gear (Open loop) (#729)
* 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

* Boost by Gear (Open loop)

Added Boost by Gear to open loop boost control
2021-12-19 09:43:14 +11:00
DeionSi db8722e3d0
Add MPX4100A pressure sensor;Fix Bosch 3 Bar TMAP baro setting (#693)
* Add MPX4100A pressure sensor;Fix Bosch 3 Bar TMAP baro setting.

* Correct MPX4100A pressure sensor values

* Rename sensors according to datasheets
2021-12-13 08:10:56 +11:00
Josh Stewart 8430d50ec4 Fix broken unit tests 2021-12-10 14:44:27 +11:00
Josh Stewart 18f173f11b Add command to delete log file from SD 2021-12-10 14:29:01 +11:00
Josh Stewart 93aa6f5fd5 Fix Teensy RTC setting bug 2021-12-10 14:26:13 +11:00
Josh Stewart f21a19595f Fix missing header string for Fan duty. Add static assert to try and ID this in future 2021-12-10 13:29:25 +11:00
Josh Stewart 49966d1976 Merge branch 'master' of https://github.com/noisymime/speeduino 2021-12-09 20:41:05 +11:00
tx_haggis 9ad500189b
Performance: 15%+ loop/sec speedup by optimising 3d table bilinear interpolation (#735)
* Bi-linear interpolation - round towards nearest integer

Add the equivalent of 0.5 to the final calculation pre-rounding.
This will have the effect of rounding to the nearest integer, rather
than truncating. I.e. rounding down

* Unit tests: isolate table tests and check interpolation x/y bins

* Unit tests: add native table3d tests

* Unit tests: derive min/max from axis test values

* Unit tests: more detailed messages

* Unit tests: fix rounding & unit tests

* Performance

* Performance: use uint16_t instead of unsigned long
for the fixed point math: we only need the fractional
part. I.e. 1.16 not 16.16

* Use narrowest possible type

* Optimise bin position logic for performance

* Only promote to uint32_t when really required.

* Simplify bin checks - no zero width bins

* Save memory: use a single byte for the last bin caches

* Performance: increment pointers instead of
repeatedly dereferncing array by index.

* Comments

* Incorrect array underrun logic

* Rename type, comments

* Fix unit tests
2021-12-09 20:40:31 +11:00
Josh Stewart 143a5833aa More minor libdivide tweaks 2021-12-09 15:55:40 +11:00
Josh Stewart 9c390deacb Further libdivide tweaks 2021-12-09 12:35:26 +11:00
Josh Stewart 105534efb8 Add option to use libdivide in maths.h functions 2021-12-09 10:50:17 +11:00
tx_haggis 36d285d883
Performance: speed up table I/O (optimized division) (#738)
* Add libdivide

* Apply libdivide to axis I/O scaling

* Fix CI build

* Fix CI build
2021-12-09 09:41:57 +11:00
Vitor Moreno B. Sales 1536b9196d
Steper OL+CL mode (#554) 2021-12-09 08:52:56 +11:00
Josh Stewart 8b262a0087 Sensor calibration in New Comms 2021-12-07 15:20:02 +11:00
Josh Stewart e7a217fab7 Show correct SD card size 2021-11-30 14:40:01 +11:00
Josh Stewart 1b128bb513 Merge branch 'master' of https://github.com/noisymime/speeduino 2021-11-26 13:47:34 +11:00
Josh Stewart 09b61fae79 Handle serial buffer being full in newComms 2021-11-26 13:47:15 +11:00
Corey Harding b419f15a32
Add Radiator Cooling Fan indicator (#719). Fixes #716
* Update auxiliaries.ino

Add Radiator Fan Status Indicator Changes

* Update globals.h

Add Radiator Fan Status Indicator Changes

* Update cancomms.ino

Add Radiator Fan Status Indicator Changes

* Update speeduino.ini

Add Radiator Fan Status Indicator Changes

* Update speeduino.ini

Simplify Naming

* Update auxiliaries.ino

Simplify Naming

* Update cancomms.ino

Simplify Naming

* Update globals.h

Simplify Naming

* Update speeduino.ini

Enable Datalogging of Radiator Cooling Fan Status

* Update auxiliaries.ino

Remove old instances of fanOn

* Update globals.h

Remove old instances of fanOn

* Update auxiliaries.ino

Correct formatting

* Update auxiliaries.ino

formatting

* Update auxiliaries.ino

formatting

* Update auxiliaries.ino

formatting

* Update auxiliaries.ino

formatting

* Update auxiliaries.ino

formatting

Co-authored-by: github-account-0 <91717711+github-account-0@users.noreply.github.com>
2021-11-26 10:28:53 +11:00
Josh Stewart 6025b88fdf Merge branch 'master' of https://github.com/noisymime/speeduino 2021-11-25 13:19:59 +11:00
Josh Stewart c3805456b2 SD File copy to TunerStudio working 2021-11-25 13:19:54 +11:00
Josh Stewart 2841a9f648 Allow for manual SD logging start/stop 2021-11-24 16:14:31 +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 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