Commit Graph

16198 Commits

Author SHA1 Message Date
Scott Smith 6b473bd168
Track ram4 sections too. (#3518) 2021-11-10 07:28:33 -05:00
Scott Smith dac67235c4
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 1db9a02f1d Revert "Don't keep a separate MultiChannelStateSequence for the trigger emulator. (#3513)"
This reverts commit 280dfa94e7.
2021-11-09 20:42:23 -05:00
GitHub set-date Action aea4a2ad22 Update date 2021-11-10 01:00:05 +00:00
GitHub build-firmware Action 6056a62a14 Auto-generated configs and docs 2021-11-09 20:43:52 +00:00
rusefi ad75fbe216 hellen88 2021-11-09 15:33:01 -05:00
Scott Smith 280dfa94e7
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 1d970dace1 LUA_USER_HEAP for 407 2021-11-09 09:36:42 -05:00
Scott Smith 158f719d95
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 7f373a6415 Auto-generated configs and docs 2021-11-09 02:36:07 +00:00
rusefi ccb27d487d lua pid 2021-11-08 21:30:38 -05:00
rusefi b64f6c4715 stefan has not yet asked for MAF 2021-11-08 21:30:38 -05:00
GitHub build-firmware Action 710f35d515 Auto-generated configs and docs 2021-11-09 02:26:06 +00:00
rusefi 5e44cc277b stefan is asking for TPS/IAT/CLT 2021-11-08 21:12:53 -05:00
rusefi 06e97a1794 why is meat allowed to touch machine?! 2021-11-08 20:49:12 -05:00
rusefi 22e78a97a5 nicer messages 2021-11-08 20:49:12 -05:00
GitHub build-firmware Action 0b0140db83 Auto-generated configs and docs 2021-11-09 01:26:41 +00:00
rusefillc a199103bd5 Proteus Lua Demo 2021-11-08 20:19:57 -05:00
GitHub set-date Action 6038b5a6ae Update date 2021-11-09 01:00:19 +00:00
rusefillc a783e5056b this one is for Scott 2021-11-08 19:02:34 -05:00
rusefillc fe25b24050 dead code 2021-11-08 19:01:18 -05:00
rusefi 8aaecb568e pid demo progress 2021-11-08 17:31:33 -05:00
GitHub build-firmware Action e089b8d9ac Auto-generated configs and docs 2021-11-08 22:24:44 +00:00
rusefi 19f5fd5cbd on Lua control of H-bridge 2021-11-08 17:11:48 -05:00
rusefillc 1f0ba902af progress 2021-11-08 16:43:49 -05:00
Scott Smith 37da55c920
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 13c496b79b
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 2c715be4b7 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 8a963633d3 refactoring: assigning etbFunctions earlier 2021-11-08 12:39:41 -05:00
Andrey 1b0d48d8c0 WITH_ENGINE_TEST_HELPER_BOARD_CALLBACK 2021-11-08 12:27:02 -05:00
Andrey 9d2f9f0d35 docs 2021-11-08 12:23:00 -05:00
Scott Smith d4132fdf01
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 45c4ccd4c4 Auto-generated configs and docs 2021-11-08 03:23:43 +00:00
rusefillc f9ec1cddc5 Main and Pump pins default set wrong fix #3501 2021-11-07 22:09:26 -05:00
GitHub set-date Action 21e7272e66 Update date 2021-11-08 01:02:17 +00:00
rusefillc f514f488b9 Latest firmware causes an error (2021 11 07 build) fix #3500 2021-11-07 19:52:30 -05:00
Matthew Kennedy 95b5c6fcf9
dead vss flag (#3499) 2021-11-07 14:36:46 -05:00
Andrey G 383d5c97ea
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 fb3da1af14 fresh binary 2021-11-07 13:48:19 -05:00
GitHub build-firmware Action a0cddcec54 Auto-generated configs and docs 2021-11-07 18:40:19 +00:00
rusefi bfd0a12095 scriptTableName 2021-11-07 13:35:29 -05:00
rusefi bb9717303d back to 3 second auto-DFU sleep 2021-11-07 13:25:34 -05:00
rusefi 8672c66405 https://github.com/rusefi/rusefi-hardware/tree/main/mini48-stm32 2021-11-07 11:00:55 -05:00
GitHub build-firmware Action f0d6cd8479 Auto-generated configs and docs 2021-11-07 15:30:54 +00:00
Andrey 84b6a744b0 names for tables similar to curve names 2021-11-07 09:58:35 -05:00
Andrey 9b0f617664 lua pid class #3411 2021-11-07 09:53:40 -05:00
Andrey 821276197b lua pid class #3411 2021-11-07 09:49:47 -05:00
Andrey 9ac1575777 reducing complexity 2021-11-07 01:57:32 -05:00
rusefillc 5de6c2a270 typo 2021-11-07 01:51:05 -05:00
rusefillc 20784db801 refactoring - magic constant bad
cypress and kinetis both have this macro already
2021-11-07 01:34:16 -04:00