Compare commits

...

5 Commits

Author SHA1 Message Date
Matthew Kennedy c0931fc603
Merge e24d596053 into 12321d4325 2024-08-29 13:30:00 -07:00
Matthew Kennedy e24d596053 fits on ethernet f4 2024-08-29 13:22:50 -07:00
Matthew Kennedy 6bb54ad9b4 Merge branch 'master' into all-ecu-big-blocking 2024-08-29 12:56:09 -07:00
Matthew Kennedy f20516a506 reclaim 100 bytes of blocking factor 2024-08-28 03:04:56 -07:00
Matthew Kennedy 0cedba8c4e all ECUs can use big blocking factor! 2024-08-28 02:11:37 -07:00
8 changed files with 7 additions and 13 deletions

View File

@ -3,5 +3,3 @@
! Atlas is guaranteed dual bank flash, so there's no delay when sending the burn command.
! All commands should complete effectively instantly.
#define TS_BLOCK_READ_TIMEOUT 250
#define BLOCKING_FACTOR 1500

View File

@ -1 +0,0 @@
#define BLOCKING_FACTOR 1500

View File

@ -23,4 +23,3 @@
#define show_Proteus_presets true
#define LUA_SCRIPT_SIZE 12000
#define BLOCKING_FACTOR 1500

View File

@ -262,7 +262,7 @@
#if MODULE_ETHERNET_CONSOLE
// F4 ethernet needs some extra space
#define LUA_USER_HEAP 40000
#define LUA_USER_HEAP 25000
#else // MODULE_ETHERNET_CONSOLE
#define LUA_USER_HEAP 50000
#endif

View File

@ -371,6 +371,4 @@ float mapFast
uint16_t mapAveragingSamples
uint8_t[12 iterate] mapPerCylinder;;"kPa", 1, 0, 0, 0, 0
uint8_t[102 iterate] unusedAtTheEnd;;"",1, 0, 0, 0, 0
end_struct

View File

@ -42,6 +42,9 @@ static Timer requestPeriodTimer;
* Gauges refresh
*/
void TunerStudio::cmdOutputChannels(TsChannelBase* tsChannel, uint16_t offset, uint16_t count) {
// Assert that the entire output channels block will fit in a single TS transaction
static_assert(BLOCKING_FACTOR >= TS_TOTAL_OUTPUT_SIZE + 10);
if (offset + count > TS_TOTAL_OUTPUT_SIZE) {
efiPrintf("TS: Version Mismatch? Too much outputs requested %d/%d/%d", offset, count,
sizeof(TunerStudioOutputChannels));
@ -49,10 +52,8 @@ void TunerStudio::cmdOutputChannels(TsChannelBase* tsChannel, uint16_t offset, u
return;
}
if (offset < BLOCKING_FACTOR) {
engine->outputChannels.outputRequestPeriod
= 1e6 * requestPeriodTimer.getElapsedSecondsAndReset(getTimeNowNt());
}
engine->outputChannels.outputRequestPeriod
= 1e6 * requestPeriodTimer.getElapsedSecondsAndReset(getTimeNowNt());
tsState.outputChannelsCommandCounter++;
updateTunerStudioState();

View File

@ -6,7 +6,6 @@
#include "thread_controller.h"
#include "tunerstudio.h"
// Assert that the USB tx/rx buffers are large enough to fit one full packet
static_assert(SERIAL_USB_BUFFERS_SIZE >= BLOCKING_FACTOR + 10);

View File

@ -106,7 +106,7 @@ struct_no_prefix persistent_config_s
struct_no_prefix engine_configuration_s
#define BLOCKING_FACTOR 750
#define BLOCKING_FACTOR 1300
#define SENT_INPUT_COUNT 1