Commit Graph

55 Commits

Author SHA1 Message Date
Josh Stewart a31e64b9df Warnings cleanup 2024-05-29 16:29:25 +10:00
Josh Stewart cac1a05f97 Fix compilation for RTC_ENABLED is set but not SD_LOGGING 2024-05-11 09:07:44 +10:00
Daniel Tobias 3a712baf23
Comment typos correction (#1189)
* basic spelling fixes

* basic spelling fixes, external libs
2024-03-21 11:37:45 +11:00
Josh Stewart 5bef8d4bf7 Signatures for 202405-dev 2024-02-26 19:59:16 +00:00
Josh Stewart a4eed5f3e3 Signatures for 202402 release 2024-02-23 15:55:56 +11:00
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 484e3916e3 Further cleanup work on secondary comms. Slight RAM free up. 2023-10-06 11:48:05 +11:00
Josh Stewart 6c16f552a5 Fix for build failure on mega2561 with last commit 2023-10-05 22:38:57 +11:00
Josh Stewart 5140b31829 Initial work cleaning up Secondary Serial incl msDroid compat option
Fixes #1106
2023-10-05 22:24:13 +11:00
Josh Stewart 441b24bc84 Consolidate Secondary Serial live values command. Fixes Real Dash over Secondary Serial 2023-10-05 12:54:22 +11:00
Josh Stewart 94e90c5f63 Temporary workaround for RealDash communication using legacy interface 2023-09-18 16:07:07 +10:00
Josh Stewart d2c7a19ac1 Allow SD card formatting through TS Native interface 2023-09-18 10:12:02 +10:00
Josh Stewart 46a7c6fda5 Fix for O2 calibration not being written to EEPROM 2023-06-13 16:37:21 +10:00
Josh Stewart fed32686a5 Dev signatures for 202306-dev 2023-05-28 00:11:29 +10:00
Josh Stewart dd41ae5f27 Signatures for 202305 release 2023-05-26 17:00:51 +10:00
Josh Stewart 7e8534c6d0 Allow RPM2 to be used for VSS on all decoders that don't have secondary 2023-05-17 15:39:34 +10:00
mike501 805a535238
VVT2 improved logging & setup (#1036)
* adding VVT logging and trigger edge editing


fix missing define (temp fix?)


Revert "fix missing define (temp fix?)"

This reverts commit c6280f38ff69cc41278148a79c888736a71754b1.

fixes

* Create an additional logger screen in tunerstudio

Changes to create a third high speed logger window in tuner studio.

* Change variable name 

Discord discussion requested compositeLogEnabled didn't do a test for false as the type is now a byte. Variable renamed to be compositeTriggerUsed and false replaced with 0. Variable name and values used should now make more logical sense.

* added more logging

Log the primary, secondary and third inputs as well as engine cycle on all composite logs. Still have 3 different logs to allow you to visualise which is the best way to present the information.
2023-05-15 14:15:46 +10:00
Josh Stewart 9ff33f0384 Allow send of partial tooth and composite logs at low rpm/resolution 2023-04-26 16:35:39 +10:00
Josh Stewart 8c85b0c998 Remove legacy comms option from TunerStudio. Add legacy comms lock 2023-04-26 13:45:22 +10:00
Josh Stewart e5e46b1d73 Add serial compatibility mode option 2023-03-23 11:05:10 +11:00
tx_haggis f95b4978cd
Refactor comms: save 130+ bytes RAM (#906)
* Remove serialCRC - only used within parseSerial()
Also hoist the CRC read into a function.

* Minimize global variable visibility

* Encapsulate write of multi-byte primitives

* Factor out sendBufferAndCrc()

* Push safety test into TS_CommandButtonsHandler()

* Extract writePage()

* Simpler parsing

* Remove some functions from public interface

* Store constant arrays in progmem

* Centralize high speed logger start/stop code

* Factor out loadO2Calibration()

* Factor out temperature calibration table update functions

* Remove dead code

* Fix sendToothLog()

* Fix sendCompositeLog()

* Replace tooth log send booleans with an enum
Saves a byte

* Remove sendBufferAndCrcProgMem()
Use serialPayload to send

* Whitespace clean up

* Optimize comms.cpp for size

* Replace global unsigned long with bool
Saves 2 bytes

* Replace 2 global bools with an enum
Saves a byte, reads better.

* Remove global FastCRC instance

* Make sendSerialReturnCode blocking.
It was using non-blocking functions but was never
re-entered.
Rename to make blocking & non-blocking calls
more obvious.

* Use one uint16_t to track RX/TX byte count

* Simplify new comms log tx API

* Extract loadPageToBuffer function

* All endianess changes use the same code

* Doxygen comments and code organization

* Remove serialWriteUpdateCrc() & updateTmpCalibration()

* Combine SerialStatus & logSendStatus enums.
Makes sense since we can only be doing one thing at a time.

* Remove global inProgressCompositeTime
Only used when sending composite log

* Replace 3 global bools with expanded SerialStatus enum

* Remove unused global tsCanId

* Limit scope of some comms globals.

* Remove isMap global - replace witth function

* Reduce the serial API to only 2 calls
transmit & receive

* Tidy up #define visibility

* Fix Black* build errors

* Workaround Teensy code race condition
availableForWrite() is not reliable.

* Prevent race condition
Was pematurely setting the serialStatusFlag to
SERIAL_INACTIVE before final CRC ws read from
serial.

* Use post write buffer availability checks
Remove buffer size check prior to writing.

* Write multi-byte values as single bytes.
(attempt to fix Teensy 3.5 issue)

* Only use Serial.available() as a boolean test
(Teensy fix)

* writeNonBlocking checks Serial.write() return value

* Non-blocking CRC write
In sendBufferAndCrcNonBlocking().

* Fix compile warning

* Set serial status flag prior to transmitting!

* Reliable blocking byte writes.

* Fix timeout code: not firing under some conditions

* MISRA fixes
2023-02-21 12:55:54 +11:00
tx_haggis 3595634bd2
Table3D: MISRA fixes (#973) 2023-01-11 10:58:48 +09:00
DeionSi 647681767e
Scale IAT and CLT calibration to ADC 1023 instead of 992 (#959) 2022-11-30 15:16:49 +11:00
Josh Stewart 2fc29ceef5 MISRA cleanup rule: misra-c2012-8.2 2022-11-06 09:43:29 +11: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 e3b931b3d1 Dev signatures for 202210-dev 2022-07-27 10:01:03 +10:00
Josh Stewart 722072e5fa Signatures for 202207 2022-07-10 23:45:49 +10:00
Daniel Tobias 540b3a4fa2
Correct typos found by codespell (#880) 2022-06-27 10:39:14 +10:00
Josh Stewart bce129cb68 Fix edge case that could prevent tooth log completing its transmission 2022-04-21 13:37:18 +10:00
Josh Stewart 0dc31edc22 Allow for '?' command through legacy comms.
Fixes #821
2022-04-11 11:29:43 +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 35f196930a Minor cleanup from the newComms / LegacyComms move 2022-03-01 15:27:46 +11:00
Josh Stewart 8a54c4b23b Fix calibrations tx on legacy comms
Note the renaming of newComms to comms. Old comms has been moved to _legacy files
2022-02-28 10:28:06 +11: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
Josh Stewart 5e911584d7 Add serial command for dumping/loading raw EEPROM tunes 2022-02-02 09:30:41 +11:00
Josh Stewart b1dbd812e4 Dev signatures for 202204 2022-01-16 07:27:32 +11:00
Josh Stewart 9121b45995 Signatures for interim release 202202 2022-01-09 16:26:30 +11:00
Josh Stewart 9eb61271cf Signatures for 202201 release 2022-01-07 20:55:37 +11:00
Josh Stewart 300c8699cc New Comms change to prevent lockup during large table writes 2022-01-07 16:49:04 +11:00
Josh Stewart 744621db34 Slight tweaks to composite logger 2021-12-21 14:34:54 +11:00
Josh Stewart 809fd9d55b New Comms Tooth and Composite loggers 2021-12-20 16:22:23 +11:00
Josh Stewart 2439883a69 Further SD compatibility work with new comms 2021-11-20 08:29:11 +11:00
Josh Stewart db2e667abb Initial work on new serial comms (Disabled in ini) 2021-11-19 11:07:38 +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 793482a27b Big chunk of SD logging work. 2021-10-13 11:53:46 +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
Josh Stewart 82cdbdc561 202109 dev signatures 2021-08-20 15:26:14 +10:00
Josh Stewart 95b8e6ee75 Signatures for 202108 release 2021-08-09 23:05:32 +10:00