* 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
* 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
* 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>