Commit Graph

5 Commits

Author SHA1 Message Date
Josh Stewart fcdc2d2d5f Merge branch 'master' of https://github.com/noisymime/speeduino 2021-04-21 14:53:01 +10:00
Josh Stewart 787405f029 Board compatibility work 2021-04-21 14:52:58 +10:00
tx_haggis 02cb7bebd6
Isolate table3D member access in comms.ino (#545)
* 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 :-(
2021-04-21 14:36:27 +10: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 e17874553f Change the TEENSY40 config to be TEENSY41 2020-07-14 13:57:36 +10:00