Commit Graph

15391 Commits

Author SHA1 Message Date
Scott Smith 1a299a3221 Move phaseCount into MultiChannelStateSequence (#3520)
We can them drop the field from a bunch of callers, simplifying the code.
2021-11-10 19:47:27 -05:00
rusefi 35f6ac4305 open q 2021-11-10 19:24:17 -05:00
rusefi 76f9840dc1 MathMin 2021-11-10 19:23:05 -05:00
rusefi d98c27e3a9 + symbol required to make TS tips show #3463
just to be
2021-11-10 16:10:55 -05:00
rusefillc d76a94b80c fresh jar for https://github.com/rusefi/rusefi/pull/3518 2021-11-10 07:57:15 -05:00
Matthew Kennedy 26749e0384 test TS writes (#3515)
* test TS writes

* s

* this must be a gcc extension
2021-11-10 07:29:40 -05:00
Scott Smith 1745ef66ef Track ram4 sections too. (#3518) 2021-11-10 07:28:33 -05:00
Scott Smith 5bd7d8e372 Don't keep a separate MultiChannelStateSequence for the trigger emulator, version 2. (#3517)
All it wants is to use the main trigger state, so don't bother copying it.  Instead, change
PwmConfig to take a const pointer to a Multi.*Sequence, then make all the users adapt.  Worse
fallout is that SimplePwm now has its own Multi.*Sequence, but PwmConfig is downgraded to a
pointer, so that's only a net +4 bytes.  And we can make the overhead of Multi.*Sequence much lower
using embedded arrays, which only the caller can do since it knows the maximum size... (for another
day...)

Also remove SimplePwm's 2nd copy of SingleChannelStateSequence.  It served no purpose.

Saves 1992 bytes of BSS and 24 bytes of RAM4 (latter probably due to SimplePwm change)
2021-11-10 07:01:20 -05:00
rusefillc 38ea0d1835 Revert "Don't keep a separate MultiChannelStateSequence for the trigger emulator. (#3513)"
This reverts commit 4e220dc163.
2021-11-09 20:42:23 -05:00
GitHub set-date Action 150019b0ed Update date 2021-11-10 01:00:05 +00:00
GitHub build-firmware Action 6b39c9f5f1 Auto-generated configs and docs 2021-11-09 20:43:52 +00:00
rusefi 01f259404a hellen88 2021-11-09 15:33:01 -05:00
Scott Smith 4e220dc163 Don't keep a separate MultiChannelStateSequence for the trigger emulator. (#3513)
All it wants is to use the main trigger state, so don't bother copying it.  Instead, change
PwmConfig to take a const pointer to a Multi.*Sequence, then make all the users adapt.  Worse
fallout is that SimplePwm now has its own Multi.*Sequence, but PwmConfig is downgraded to a
pointer, so that's only a net +4 bytes.  And we can make the overhead of Multi.*Sequence much lower
using embedded arrays, which only the caller can do since it knows the maximum size... (for another
day...)

Also remove SimplePwm's 2nd copy of SingleChannelStateSequence.  It served no purpose.

Saves 1992 bytes of BSS and 24 bytes of RAM4 (latter probably due to SimplePwm change)
2021-11-09 14:35:07 -05:00
rusefillc 2fe84449cf LUA_USER_HEAP for 407 2021-11-09 09:36:42 -05:00
Scott Smith 9b40e68155 Save ~2800 bytes of RAM by not caching angle->trigger mapping (#3506)
Memory seems more valuable than CPU; use the O(lg n) lookup by angle.  A side effect is that it
seems to fix trigger lookup for the second phase of TRIGGERTYPE 53 544 TT_TRI _TACH 0.00
2021-11-09 07:03:27 -05:00
GitHub build-firmware Action 3484c3270b Auto-generated configs and docs 2021-11-09 02:36:07 +00:00
rusefi a7698a290f lua pid 2021-11-08 21:30:38 -05:00
rusefi 39fb7fddfd stefan has not yet asked for MAF 2021-11-08 21:30:38 -05:00
GitHub build-firmware Action e63e942fb5 Auto-generated configs and docs 2021-11-09 02:26:06 +00:00
rusefi 7520d9f0c0 stefan is asking for TPS/IAT/CLT 2021-11-08 21:12:53 -05:00
rusefi 99a90309ef why is meat allowed to touch machine?! 2021-11-08 20:49:12 -05:00
rusefi 8bab53c1fd nicer messages 2021-11-08 20:49:12 -05:00
GitHub build-firmware Action 464332e5be Auto-generated configs and docs 2021-11-09 01:26:41 +00:00
rusefillc 07711b4691 Proteus Lua Demo 2021-11-08 20:19:57 -05:00
GitHub set-date Action 3168ccd62c Update date 2021-11-09 01:00:19 +00:00
rusefillc a5399444b2 this one is for Scott 2021-11-08 19:02:34 -05:00
rusefillc 0ec6d5be4a dead code 2021-11-08 19:01:18 -05:00
rusefi 69a53c565f pid demo progress 2021-11-08 17:31:33 -05:00
GitHub build-firmware Action dbecc45968 Auto-generated configs and docs 2021-11-08 22:24:44 +00:00
rusefi a358dc7de9 on Lua control of H-bridge 2021-11-08 17:11:48 -05:00
rusefillc 3d1ace6550 progress 2021-11-08 16:43:49 -05:00
Scott Smith 7367aa5b8a Compile each project's PCH to a separate file to reduce developer friction. (#3505)
Having to remove the precompiled header when switching from firmware to simulator to unit_tests and
back again is annoying.  Use a directory to store the precompiled header output.  Turn off
precompiled header warnings as GCC still complains even if it finds a valid one eventually.
2021-11-08 15:52:58 -05:00
Scott Smith 8639b7c7e4 Make getTimeNowNt even faster (#3504)
The last version is already much better than the original, mostly because it doesn't call
CriticalSectionLocker, which has a ton of overhead due to debug tracking.  But this version is
another 4 instructions / 12 bytes shorter.  Does as much match in 32-bit land as possible, and
avoids math operations that span 64-bits (i.e. either operate on the lower half or upper half, but
not both).  The result is only 3 instructions not including the necessary 4 loads (ptr to now, now,
ptr to upper, upper), 1 store (upper), and 1 return/branch.
2021-11-08 14:24:31 -05:00
Andrey 2166a5ba16 ETB: do not touch HW pins if function not selected, this way Lua can use DC motor hardware pins directly 2021-11-08 12:44:37 -05:00
Andrey 3d7bc6d422 refactoring: assigning etbFunctions earlier 2021-11-08 12:39:41 -05:00
Andrey fdcce9558e WITH_ENGINE_TEST_HELPER_BOARD_CALLBACK 2021-11-08 12:27:02 -05:00
Andrey 757cd10c1f docs 2021-11-08 12:23:00 -05:00
Scott Smith 2752c39d7f Change getTimeNowNt to be lock free. (#3502)
Track the top two bits of the 32-bit time field, along with the bits that comprise the top half of
the 64-bit time field.  We can detect when the 32-bit field is advancing or falling back from the
global time counter as long as the change is less than about 1 billion ticks.  This shows up as
either 01 or 11 in the top 2 bits of the 32-bit time field relative to the 64-bit field.  Or is
there is no change it shows up as 00.  Changes of 2 billion or more cannot be discerned as +2
billion and -2 billion both show up as 10.

Change the simulator to use this logic to make sure it gets some exercise.
2021-11-08 08:24:20 -05:00
GitHub build-firmware Action f6aac4b1f9 Auto-generated configs and docs 2021-11-08 03:23:43 +00:00
rusefillc 96e3b8c6f6 Main and Pump pins default set wrong fix #3501 2021-11-07 22:09:26 -05:00
GitHub set-date Action db5ef62885 Update date 2021-11-08 01:02:17 +00:00
rusefillc 259ab7a234 Latest firmware causes an error (2021 11 07 build) fix #3500 2021-11-07 19:52:30 -05:00
Matthew Kennedy 7f4b91809e dead vss flag (#3499) 2021-11-07 14:36:46 -05:00
Andrey G 0e5b71b86b Openblt deliver (#3486)
* common_make: rusefi.* should be functional image

OpenBLT used: rusefi.* is bootloader plus RusEFI
OpenBLT not used: rusefi.* is RusEFI only.
In both cases flashing of rusefi.* image to blank device should be
enough.
rusefi_update.srec does not include bootloader and this image should
be used for CAN update.

* Boundle generation: include bootloader and update image

* Update hex2dfu, deliver composite bin file
2021-11-07 13:50:01 -05:00
rusefillc 9699117634 fresh binary 2021-11-07 13:48:19 -05:00
GitHub build-firmware Action 41fe16ed40 Auto-generated configs and docs 2021-11-07 18:40:19 +00:00
rusefi 90057333d1 scriptTableName 2021-11-07 13:35:29 -05:00
rusefi bc6db62a40 back to 3 second auto-DFU sleep 2021-11-07 13:25:34 -05:00
GitHub build-firmware Action 678f5db3b9 Auto-generated configs and docs 2021-11-07 15:30:54 +00:00
Andrey a32f061a0f names for tables similar to curve names 2021-11-07 09:58:35 -05:00