Commit Graph

111 Commits

Author SHA1 Message Date
Matthew Kennedy f54bfd3c25 Revert "we never actually checked isEndOfPacket"
This reverts commit 1343641092.
2025-03-13 13:16:22 -07:00
Matthew Kennedy 1343641092 we never actually checked isEndOfPacket 2025-03-12 23:50:02 -07:00
Matthew Kennedy 2eb6c25313
ts refactoring (#439)
* replace large buffer instances

* handlePageReadCommand uses locked

* cleanup

* explicitly call big vs. small packet implementation

* correctness

* unused UNUSED

* cleaner TS logging & cleanup

* about time we bumped this
2024-06-09 20:26:27 -07:00
Matthew Kennedy 4465d20622 remove responseCode from writeCrcPacket 2024-06-03 17:34:21 -07:00
Matthew Kennedy ed52ff474e eliminate TsChannelBase::sendResponse 2024-06-03 17:28:14 -07:00
Matthew Kennedy 65e1091179 operate on uint8_t instead of char 2024-06-03 17:02:43 -07:00
Matthew Kennedy 35b46d0e92 TS helper for no-payload responses 2024-06-03 17:02:43 -07:00
Matthew Kennedy a22302579e TS cleanup: ts_response_format_e 2024-06-02 12:49:24 -07:00
Matthew Kennedy dba95f57dc except that one can't be final 2024-03-01 12:57:01 -08:00
Matthew Kennedy a85e6c777d make some channels final 2024-03-01 12:46:39 -08:00
Matthew Kennedy 73ca7c7974 ts channel shadow avoidance 2023-11-01 14:12:15 -07:00
Matthew Kennedy 34df8d6e9a dead define 2023-03-03 02:21:43 -08:00
rusefillc d4e61df602 Default binary should have more relaxed pinout: serial #4998
we can now simplify code a bit
2023-01-23 08:04:41 -05:00
rusefillc 9c015abad5 Default binary should have more relaxed pinout: serial #4998
refactoring: it looks like we can go with simpler code?
2023-01-23 06:01:10 -05:00
rusefillc 8730782cd3 Refactoring: less confusion macro names around serial/uart/etc in connectivity fix #4999 2023-01-23 05:26:59 -05:00
rusefillc 3aa9ffca60 Refactoring: less confusion macro names around serial/uart/etc in connectivity #4999 2023-01-23 05:09:32 -05:00
rusefillc 46005774f4 Refactoring: less confusion macro names around serial/uart/etc in connectivity #4999 2023-01-23 04:59:43 -05:00
rusefillc b699bb48d4 Refactoring: less confusion macro names around serial/uart/etc in connectivity #4999 2023-01-23 04:55:24 -05:00
rusefillc 1388de3a8c Full Optimized – High Speed #4818
refactoring: extract method
2022-11-24 21:41:20 -05:00
rusefillc db26a35209 refactoring 2022-07-30 12:07:36 -04:00
Andrey G 2eeb1ad84e TunerStudio reconnect speedup (#4358)
* TunerStudio: do not emit tons of errors if we are not in sync

Track state of sync with ither side. Emit only ONE error when sync
is lost.
Also no need to wait 1sec for second byte in binary mode. 10mS is
enought.

* TunerStudio: remove duplicated debug print

* TunerStudio: comment about in_sync

* TunerStudio: clear comments
2022-07-20 17:54:10 -04:00
rusefillc f0a055345e logging of live data structs was: data points #3614
YES! we now expose fragments
2022-04-14 22:41:46 -04:00
rusefi 7ff80dfbbc logging of live data structs was: data points #3614 2022-04-14 02:01:34 -04:00
rusefi f5b1834b92 steps towards better commands encapsulation 2022-04-14 01:06:44 -04:00
Matthew Kennedy 53ae63df09 move allowLongResponse option to ECU side (#3917)
* executeCommand knows about opcodes

* kick

* remove allowLongResponse

* add api in firmware instead

* test size

* bad merge

* firmware missed a spot

* fix logic

* haha we have to disable it
2022-02-11 16:03:20 -05:00
Andrei d1f30f10b1 CAN update 2021-12-03 21:44:15 -05:00
Scott Smith 8406fafa9e Expose console over serial port for H7 proc (#3578)
This way you can use the console/TunerStudio with the ST-Link

In the process, combine TS_PRIMARY_UART and TS_PRIMARY_SERIAL into TS_PRIMARY_PORT, to make UART vs
SERIAL selection more robus.  Ditto for TS_SECONDARY_*.  Also change use of TS_NO_PRIMARY to be #if
not #ifdef, so that it can be properly set as a compile flag and not be overwritten by various
header files.
2021-11-20 00:39:08 -05:00
Matthew Kennedy c984894cb3 last packet optimization (#3363)
* last packet optimization

* comment

* test

* missed one

* set tcp mss
2021-10-18 19:59:08 -04:00
rusefillc 2944a89e4e TS channel names for nicer console messages 2021-09-18 15:33:14 -04:00
Matthew Kennedy c03c779703 make build happy (#3067) 2021-07-26 09:08:05 -04:00
Andrey 270905fa8b removing dead code 2021-06-23 04:26:32 -04:00
Matthew Kennedy 72dac58f9b fix multi-serial-port insanity (#2476)
* carve out UART specific

* implement channel

* config cleanup

* use new config

* bootloader

* dead code

* s

* h7 inherits f7

* oops

* ok now it's right

* tests

* cleanup

* call setup

* put that in its own file

* cleanup

* format

* guard

* not needed

* improve guarding

* portable

* allow override of uart mode

* fixes for bootloader

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-28 09:06:36 -04:00
Matthew Kennedy 7cdad67f3f USB uses its own channel, add implementations for serial channels (#2472)
* USB uses its own channel

* revise channels

* put serial ports in their own file

* h7 uart incompatible for now

* guard for sim
2021-03-19 17:05:04 -04:00
Matthew Kennedy cb33bb77ae Dedicated code path for USB console/TS (#2465)
* new apis

* dedicated USB path

* move decl

* init

* don't init usb twice

* guard

* check that we're initialized before using TS

* comment

* guard

* guard USB

* brain doesn't go good

* make tests happy

* dead define

* cypress

* ifdef != if

* s

* include priority

* don't start a thread we know we don't need

* bad-ish merge

* const

* why did this code exist...?

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-03-18 14:07:22 -04:00
Matthew Kennedy 34b678728a extract CAN TS channel (#2469)
* extract CAN channel

* this is gross
2021-03-17 08:39:13 -04:00
Matthew Kennedy 726be2232e yet more TS sanity (#2382)
* ts cleanup part 1

* move more stuff in to the class

* extract base class

* switch to TsChannelBase where we can

* dfu

* more to TsChannelBase

* bad merge

* another bad merge

* bootloader

* bluetooth

* format

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-20 02:11:39 -05:00
Matthew Kennedy 12a31e5132 start making tunerstudio more sane: part 2 (#2381)
* ts cleanup part 1

* move more stuff in to the class

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-19 20:48:21 -05:00
Matthew Kennedy 43f39fa616 start making tunerstudio more sane: part 1 (#2378)
* ts cleanup part 1

* unused unused

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2021-02-19 07:40:59 -05:00
Matthew Kennedy 2e1dad3650 start making TS protocol testable (#2043)
* start pulling out a class

* pull function out of loop

* there we go

* ok there we go for real

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-12-08 03:05:43 -05:00
rusefillc 1eb0f8808f occasional tunerstudio CRC errors #1943
unit test progress
2020-11-15 12:36:07 -05:00
rusefillc 0cc30b4239 Re-applying part of "fix CRC errors #1944" 2020-11-15 10:28:23 -05:00
rusefillc 0ec945dc4c fix CRC errors #1944
partial rollback in order to isolate the defect
2020-11-15 10:02:40 -05:00
Matthew Kennedy 3a052682dd fix large response packets (#1947)
* fix console text mode

* oops I should actually write the crc
2020-11-15 07:14:50 -05:00
Matthew Kennedy ebcd4f73af fix CRC errors (#1944)
* fix crc mismatch

* cleanup

* use size_t, add null check

* bounds check for good measure

* rename to scratchBuffer

* comment
2020-11-14 19:21:29 -05:00
rusefi f8d5463064 making error codes available 2020-10-01 00:03:54 -04:00
andreika-git 2d4d34291c Hellen says fix cypress build (#1818)
* fix compilation

* fresh generated files

* more files

Co-authored-by: Andrei <andreikagit@users.noreply.github.com>
2020-09-23 14:06:22 -04:00
rusefi 63b1a6652b Merge remote-tracking branch 'origin/Hellen_fork_point' into master
# Conflicts:
#	firmware/console/binary/tunerstudio_io.cpp
#	firmware/console/console_io.cpp
2020-09-11 05:54:21 -04:00
rusefi 58be12bf0e Hellen says merge #1772 TS 2020-09-11 05:50:48 -04:00
rusefi a3c9871d58 Hellen says merge #1772 helping merge 2020-09-09 14:35:01 -04:00
Matthew Kennedy d2c93afff8 Ts error codes (#1706)
* correct TS errors

* tidy

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
2020-08-21 08:24:31 -04:00