* 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.
* 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
* 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
* 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
* Add Doxygen markup for grouping decoders. Tidy-up doucumentation just enough to make
Doxygen 'Modules' page neat / somewhat consistent (w/o stripping any info, on the contrary
some info is now added for few decoders that had only name present).
Add minimally modified Doxygen Doxyfile configuration.
* Document statuses and config* structure members in globals.h:
- Convert existing documentation to doxygen
- Document some of the undocumented members cross-referencing code files
where they are used (often containing good explanations in code comments) or
deriving meaning from code (leave question mark as marker of uncertainty
or need for clarification)
- Same activity in misc .h header files w. struct declarations.
Misc .ino files with code:
- Convert existing code documentation to doxygen
- Add documentation to undocumented functions (deriving idea from raw code and
code embedded comments)
- Some additions to existing documentation.
End sentences with period, as it has many iportant meanings for Doxygen
e.g. auto-brief ends at first-sentence period and in (doxygen generated)
HTML ascii newline does not break lines (or sentences).
Doxyfile: Add README.md file as INPUT from upper (codebase root) directory.
* fix!: fix ODR violations
* refactor: move page specific code into a separate CPP file
* refactor: page getter/setter share mapping logic
Extract common page-to-entity mapping logic from
getPageValue() & setPageValue() - place in map_page_offset_to_entity()
and share.
* performance: optimize CRC calc
Calculate page CRC by iterating over entities & tables.
* CRC table calculation - use table iterator
* refactor: use iterators for sendPage()
Re-implement sendPage() using page & table iterators
Future proof & fast
* refactor: sendPageASCII()
Pull put shared code into functions.
Use table iterator
* refactor: use shared axis factor
This puts the axis factor usage in one place
* refactor: encapsulate page size & count
Added getPageCount() & getPageSize()
* Added static_assert for all pages.
* Remove C++ language elements
namesapces, scope resolution, enum struct
* Rename comms.ino to comms.cpp
Provides better encapsulation of non-global
data & functions.
INO files are all mashed together by some
custom process. So everything becomes global and
static functions/variables aren't really private to
the translation unit. Thus breaking encapsulation :-(