Commit Graph

1030 Commits

Author SHA1 Message Date
Daniel Tobias e4909f441d
couple of signed overflow fixes (#519)
* the TS_CMD_VSS_RATIO* id values overflow signed 16 bit int on avr

switch to unsigned 16 bit value

define TS_CMD_VSS_60KMH  39168 //0x99x00
define TS_CMD_VSS_RATIO1 39169
define TS_CMD_VSS_RATIO2 39170
define TS_CMD_VSS_RATIO3 39171
define TS_CMD_VSS_RATIO4 39172
define TS_CMD_VSS_RATIO5 39173
define TS_CMD_VSS_RATIO6 39174

* make sure we don't overflow and accidentally set negative timing

currentStatus.advance can only hold a signed 8 bit value

* make sure we can't have a negative multiplier
2021-02-04 13:10:35 +11:00
Josh Stewart 68abcd9638 Remove RTC from mega2560 build 2021-02-04 12:22:30 +11:00
Josh Stewart 414d664c03 Fix for excessive EEPROM writes causing disconnect when loading tune onto blank board 2021-02-03 11:51:17 +11:00
Josh Stewart 930f1ed198 Missed file from last commit 2021-02-02 15:45:13 +11:00
Josh Stewart 0e80fdf6d8 Move from using malloc() to a fixed heap size for 3d table. Closes #291 2021-02-02 15:41:04 +11:00
Josh Stewart a810bfbfd1 Remove fullStatus array for comms 2021-02-02 13:14:47 +11:00
Vitor Moreno B. Sales 132cc6200d
Fix pin 54 selection (#511)
Fix pin 54 listing and renamed macros to better understanding

Co-authored-by: Josh Stewart <josh@noisymime.org>
2021-02-02 10:00:04 +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 c7c0076e3b Prevent SPI pins from being re-moded on Dropbear 2021-02-01 10:27:50 +11:00
Josh Stewart fe910f1fa2 Tweek EEPROM write frequency to try and prevent disconnect when doing temp calibrations 2021-01-29 15:03:36 +11:00
Josh Stewart 54044edaad Separate chunkWrite command from the regular w command 2021-01-29 15:02:02 +11:00
Joe Mann 4ba9d15178
Pin definition for user board (#425)
* Pin definition for the Juice Box board

Ignition-only user board

* Update platformio.ini

Formatting corrections.

* Added JUICEBOX user board

User board and pin mappings

* Updated platformio.ini to reflect noisymime

* Add platformio.ini to gitignore

* Updated pin mappings

Pin mappings updated. Serial 2 now working

* Removed platformio.ini

* Match noisymime version

* Match noisymime version (2nd attempt)

* Update speeduino.ini

Match noisymime version to allow merge.

* JuiceBox pin layout added back in
2021-01-29 11:00:10 +11:00
Josh Stewart d77b3059bc Fix corrections unit test 2021-01-23 15:28:20 +11:00
Josh Stewart 1da8672bf7 RTC fixes for Teensy41 and mega2561 2021-01-23 14:19:45 +11:00
Josh Stewart 3aa21a160a Change name of rtc.h/.ino files to avoid conflict for stm32 2021-01-23 08:49:44 +11:00
Pasi Kemppainen 3b46db4ca2
STM32 CAN library improvement: addition of TX mailboxes (#508)
* CAN-bus library for STM32

This adds CAN-bus library for STM32. Mainly for STM32F4, but others can be added later.

* CAN2 and F446 support added for STM32 CAN library

Adds support for second can interface and F446 bit timings.

* Fix STM32 CAN pin selection and STM32F1 support

The previous way to select CAN pins wasn't actually working, so this fixes that problem and also the F1 support too.

* Fix building for Mega/Teensy

* Update cancomms.ino

* Update speeduino.ino

* STM32 CAN library fixes

* TX mailbox addition

Co-authored-by: Pasi Kemppainen <pazi88@users.noreply.github.com>
Co-authored-by: Josh Stewart <josh@noisymime.org>
2021-01-23 08:40:39 +11:00
Josh Stewart 42ebf460a9 Merge branch 'master' of https://github.com/noisymime/speeduino 2021-01-22 16:31:18 +11:00
Josh Stewart 1175b0ddb6 Add AE check to see whether MAP_DOT or TPS_DOT are increasing 2021-01-22 16:31:14 +11:00
Josh Stewart ca6eef2b31 Initial layout work on RTC and SD 2021-01-22 16:16:30 +11:00
Pasi Kemppainen eebf8ed1f6
STM32 CAN-bus library fixes. (#503)
* CAN-bus library for STM32

This adds CAN-bus library for STM32. Mainly for STM32F4, but others can be added later.

* CAN2 and F446 support added for STM32 CAN library

Adds support for second can interface and F446 bit timings.

* Fix STM32 CAN pin selection and STM32F1 support

The previous way to select CAN pins wasn't actually working, so this fixes that problem and also the F1 support too.

* Fix building for Mega/Teensy

* Update cancomms.ino

* Update speeduino.ino

* STM32 CAN library fixes

Co-authored-by: Pasi Kemppainen <pazi88@users.noreply.github.com>
Co-authored-by: Josh Stewart <josh@noisymime.org>
2021-01-20 17:32:03 +11:00
Antti Muurikainen 375ed6b5fe
Lookup afrTarget value also in case O2 sensor is disabled, but incorporate AFR is turned on (#502)
Co-authored-by: antti.muurikainen <antti.muurikainen@nodeon.com>
2021-01-20 13:01:04 +11:00
James Portman e22faf56da
refactor calculateIgnitionAngles (#491)
easier to read and to follow the logic, remove code duplication

Co-authored-by: James <james@notarealemailaddress.com>
2020-12-15 13:00:29 +11:00
Josh Stewart 0c5472096f 202101 dev signatures 2020-12-15 10:25:01 +11:00
Josh Stewart 0995eb4ad4 Fix for misaligned spark2 memory 2020-12-13 15:36:01 +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
Josh Stewart b70cdd7421 Fix for 'sticking' VVT output 2020-12-11 12:50:13 +11:00
Josh Stewart 4c9321f6b0 Add command handler for stm32 reboot button 2020-12-08 09:24:34 +11:00
Tjeerd 5c5ecbbcea
Fix building stm32 f401 (#489)
* fix building for STM32F401CC and general macro cleanup

* Now building for all generic STM32F4x7 boards in arduino IDE is ok.

* buildflag cleanup

Co-authored-by: Tjeerd <tjeerdie@users.noreply.github.com>
2020-12-08 00:43:01 +11:00
Josh Stewart cebf27e573 Merge branch 'master' of https://github.com/noisymime/speeduino 2020-12-07 17:12:10 +11:00
Josh Stewart 5853c6e630 Potential fix for new ignition mode on channels 4+ 2020-12-07 17:08:47 +11:00
Vitor Moreno B. Sales a3c7c529d6
Only do ign math if channel is active (#486) 2020-12-06 09:14:28 +11:00
Vitor Moreno B. Sales 0760fa65d0
STM32 jump to DFU bootloader (#485)
* STM32 jump to DFU

This enable jumping to hardware bootloader with software command.
Based on @iLeeeZi previous work.

Co-Authored-By: iLeeeZi <3372213+iLeeeZi@users.noreply.github.com>
Co-Authored-By: Pasi Kemppainen <48950874+pazi88@users.noreply.github.com>

* lowercase functions fixes

Co-authored-by: iLeeeZi <3372213+iLeeeZi@users.noreply.github.com>
Co-authored-by: Pasi Kemppainen <48950874+pazi88@users.noreply.github.com>
2020-12-03 09:24:15 +11:00
Josh Stewart e073834135 Cleanup some stm32 warnings 2020-12-02 13:21:00 +11:00
Sepehr20mg10 c3df8bf66d
Update sensors.h (#469)
Reducing the minimum limit of barometric pressure (when using map as baro sensor)
The highest motorable road is "Khardung La" with 49 kPa barometric pressure but I think 65 kPa is a safer limit than that.
maybe it needs to be customizable in TS ?
2020-12-02 11:06:24 +11:00
Tjeerd 6078b7e32a
Changes to prevent board lockup with initial run. (EEPROM all 0xFF) (#463)
Co-authored-by: Tjeerd <tjeerdie@users.noreply.github.com>
Co-authored-by: Josh Stewart <josh@noisymime.org>
2020-12-02 11:04:37 +11:00
Tjeerd 8451aacf55
Add support for stm32F401internal flash as EEPROM emulation (#462)
* Add support STM32F401CC using internal flash as EEPROM

* update flash location of EEPROM

Co-authored-by: Tjeerd <tjeerdie@users.noreply.github.com>
2020-12-02 10:52:13 +11:00
Pasi Kemppainen affce3c162
Fix BMW PnP board pin mapping (#460)
* Fix BMW PnP board pin mapping

Remove duplicate uses of pin 48. Also add default VSS and Baro pins.

* Fix typo

Co-authored-by: Pasi Kemppainen <pazi88@users.noreply.github.com>
2020-12-02 09:55:06 +11:00
Josh Stewart 1321be93e6 Merge branch 'master' of https://github.com/noisymime/speeduino 2020-12-02 09:08:02 +11:00
Josh Stewart ed8a80c6a5 Teensy41 header file 2020-12-02 09:07:57 +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
Tjeerd df1f5ccbf0
Closed loop idle improve (#481)
* Squashed commit of the following:

commit c73f316fa5bf8c929a8fef5736f4a40045ea992f
Author: Tjeerd <tjeerdie@users.noreply.github.com>
Date:   Wed Nov 25 21:53:45 2020 +0100

    cleanup and fix merge issues

commit 57f1e8c6c73bcfb699b18ac51a2ec646be822f55
Merge: 04478ca 131673d
Author: Tjeerd <tjeerdie@users.noreply.github.com>
Date:   Wed Nov 25 18:59:58 2020 +0100

    Merge branch 'Closedloop_idle_improvements' into ClosedLoopIdleImprovement

commit 131673dc60417cbc773b0763d2f93e917c83325f
Author: Tjeerd <tjeerdie@users.noreply.github.com>
Date:   Sun Nov 22 21:54:03 2020 +0100

    more fiddeling with idle control

commit e4406166cde91552027a0dfb7958d6894098f066
Author: Tjeerd <tjeerdie@users.noreply.github.com>
Date:   Sun Nov 22 20:36:24 2020 +0100

    More fiddeling with idle control

commit 45822003d41e021e3ed93e8e14ce05479ddfd17b
Author: Tjeerd <tjeerdie@users.noreply.github.com>
Date:   Sat Nov 21 14:59:32 2020 +0100

    fix initial value

commit ff8fadae7844bd8e5934ee0f311fbf5e0842ec29
Author: Tjeerd <tjeerdie@users.noreply.github.com>
Date:   Thu Nov 19 23:14:14 2020 +0100

    add TPS limit to prevent integeral windup.

commit 7683b2e65569787b1c94eae6f4847cdadd394402
Author: Tjeerd <tjeerdie@users.noreply.github.com>
Date:   Thu Nov 19 22:40:53 2020 +0100

    cleanup idle.h

commit da55ee9dbd76d65608bfb5b950bc948a498b9599
Author: Tjeerd <tjeerdie@users.noreply.github.com>
Date:   Thu Nov 19 22:36:18 2020 +0100

    Further improvement simplifying code for closedloop PID control with feedforward.
    make PWM output work
    Tinkering new Idle control
    working on closedloop idle
    Initial work on improving closed loop Idle control

* reset platformio.ini

Co-authored-by: Tjeerd <tjeerdie@users.noreply.github.com>
2020-12-02 08:37:58 +11:00
Pasi Kemppainen 8d262bd8fc
STM32 CAN bus library addition (#482)
* CAN-bus library for STM32

This adds CAN-bus library for STM32. Mainly for STM32F4, but others can be added later.

* CAN2 and F446 support added for STM32 CAN library

Adds support for second can interface and F446 bit timings.

* Fix STM32 CAN pin selection and STM32F1 support

The previous way to select CAN pins wasn't actually working, so this fixes that problem and also the F1 support too.

* Fix building for Mega/Teensy

* Update cancomms.ino

* Update speeduino.ino

Co-authored-by: Pasi Kemppainen <pazi88@users.noreply.github.com>
Co-authored-by: Josh Stewart <josh@noisymime.org>
2020-12-02 08:29:10 +11:00
Josh Stewart 4825f573b2 Further work unifying the MC33810 build. Complete but needs testing 2020-12-01 18:12:39 +11:00
Josh Stewart 04478caf79 Merge branch 'master' of https://github.com/noisymime/speeduino 2020-11-19 21:38:07 +11:00
Josh Stewart fd9fa36c29 Major revamp of unit testing framework 2020-11-19 21:38:00 +11:00
Benas Brazdziunas 33485ae9e1
Temporary fix for Teensy CanBus ALT pins being set (#476)
* Temporary fix for Teensy CanBus ALT pins being set and not possible use pins 29 30 for other stuff.

* Add comment indicating why the setRX/TX calls are needed

Co-authored-by: Josh Stewart <josh@noisymime.org>
2020-11-17 10:21:54 +11:00
Josh Stewart bccf70f445 Fix typo on 8 cylinder Wasted COP init 2020-11-17 09:36:32 +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